@fw_handler_decorator<EOL><INDENT>def _fw_rule_create(self, drvr_name, data, cache):<DEDENT>
tenant_id = data.get('<STR_LIT>').get('<STR_LIT>')<EOL>fw_rule = data.get('<STR_LIT>')<EOL>rule = self._fw_rule_decode_store(data)<EOL>fw_pol_id = fw_rule.get('<STR_LIT>')<EOL>rule_id = fw_rule.get('<STR_LIT:id>')<EOL>if tenant_id not in self.fwid_attr:<EOL><INDENT>self.fwid_attr[tenant_id] = FwMapAttr(tenant_id)<EOL><DEDENT>self.fwid_attr[tenant_id].store_rule(rule_id, rule)<EOL>if not cache:<EOL><INDENT>self._check_create_fw(tenant_id, drvr_name)<EOL><DEDENT>self.tenant_db.store_rule_tenant(rule_id, tenant_id)<EOL>if fw_pol_id is not None and not (<EOL>self.fwid_attr[tenant_id].is_policy_present(fw_pol_id)):<EOL><INDENT>pol_data = self.os_helper.get_fw_policy(fw_pol_id)<EOL>if pol_data is not None:<EOL><INDENT>self.fw_policy_create(pol_data, cache=cache)<EOL><DEDENT><DEDENT>
Firewall Rule create routine.

        This function updates its local cache with rule parameters.
        It checks if local cache has information about the Policy
        associated with the rule. If not, it means a restart has happened.
        It retrieves the policy associated with the FW by calling
        Openstack API's and calls t he policy create internal routine.