code: def _fw_policy_create(self, drvr_name, data, cache):
          
          policy = {}
          fw_policy = data.get('firewall_policy')
          tenant_id = fw_policy.get('tenant_id')
          LOG.info("Creating policy for tenant %s", tenant_id)
          policy_id = fw_policy.get('id')
          policy_name = fw_policy.get('name')
          pol_rule_dict = fw_policy.get('firewall_rules')
          if tenant_id not in self.fwid_attr:
              self.fwid_attr[tenant_id] = FwMapAttr(tenant_id)
          policy['name'] = policy_name
          policy['rule_dict'] = pol_rule_dict
          self.fwid_attr[tenant_id].store_policy(policy_id, policy)
          if not cache:
              self._check_create_fw(tenant_id, drvr_name)
          self.tenant_db.store_policy_tenant(policy_id, tenant_id)
          for rule in pol_rule_dict:
              rule_id = rule
              if not self.fwid_attr[tenant_id].is_rule_present(rule_id):
                  rule_data = self.os_helper.get_fw_rule(rule_id)
                  if rule_data is not None:
                      self.fw_rule_create(rule_data, cache=cache)
docs: Firewall Policy create routine.
  
          This function updates its local cache with policy parameters.
          It checks if local cache has information about the rules
          associated with the policy. If not, it means a restart has
          happened. It retrieves the rules associated with the policy by
          calling Openstack API's and calls the rule create internal routine.