Пример #1
0
 def delete_category(self, context, category_id):
     v = self.get_category(context, category_id)
     self.db.delete_category(context, category_id)
     v.update({"operation": "delete"})
     delta = {}
     delta.update({"categories_delta": v})
     result_delta = self.sfcdelta.create_categories_delta(context, delta)
Пример #2
0
 def create_category_nf_map(self, context, nf_map, category_id):
     v = self.db.create_category_networkfunction(context, nf_map, category_id)
     data = v
     v.update({"operation": "create"})
     delta = {}
     delta.update({"category_networkfunctions_delta": v})
     result_delta = self.sfcdelta.create_category_networkfunctions_delta(context, delta)
     return data
Пример #3
0
 def update_category(self, context, category_id, category):
     v = self.db.update_category(context, category_id, category)
     data = v
     v.update({"operation": "update"})
     delta = {}
     delta.update({"categories_delta": v})
     result_delta = self.sfcdelta.create_categories_delta(context, delta)
     return data
Пример #4
0
 def create_networkfunction(self, context, networkfunction):
     v = self.db.create_networkfunction(context, networkfunction)
     data = v
     v.update({"operation": "create"})
     delta = {}
     delta.update({"networkfunctions_delta": v})
     result_delta = self.sfcdelta.create_networkfunctions_delta(context, delta)
     return data
Пример #5
0
 def create_config_handle(self, context, config_handle):
     v = self.db.create_config_handle(context, config_handle)
     data = v
     v.update({"operation": "create"})
     delta = {}
     delta.update({"config_handles_delta": v})
     result_delta = self.sfcdelta.create_config_handles_delta(context, delta)
     return data
Пример #6
0
 def create_chainset_zone(self, context, zone, chainset_id):
     v = self.db.create_chainset_zone(context, zone, chainset_id)
     data = v
     v.update({"operation": "create"})
     delta = {}
     delta.update({"chainset_zones_delta": v})
     result_delta = self.sfcdelta.create_chainset_zone_deltas(context, delta)
     return data
Пример #7
0
 def delete_networkfunction(self, context, networkfunction_id):
     # LOG.debug(_('Delete networkfunction %s'), networkfunction_id)
     v = self.get_networkfunction(context, networkfunction_id)
     self.db.delete_networkfunction(context, networkfunction_id)
     v.update({"operation": "delete"})
     delta = {}
     delta.update({"networkfunctions_delta": v})
     result_delta = self.sfcdelta.create_networkfunctions_delta(context, delta)
Пример #8
0
 def delete_config_handle(self, context, config_handle_id):
     # LOG.debug(_('Delete config_handle %s'), config_handle_id)
     v = self.get_config_handle(context, config_handle_id)
     self.db.delete_config_handle(context, config_handle_id)
     v.update({"operation": "delete"})
     delta = {}
     delta.update({"config_handles_delta": v})
     result_delta = self.sfcdelta.create_config_handles_delta(context, delta)
Пример #9
0
 def create_chainmap(self, context, chainmap):
     v = self.db.create_chainmap(context, chainmap)
     data = v
     v.update({"operation": "create"})
     delta = {}
     delta.update({"chainmaps_delta": v})
     result_delta = self.sfcdelta.create_chainmaps_delta(context, delta)
     return data
Пример #10
0
 def create_chain_appliance(self, context, appliance, chain_id):
     v = self.db.create_chain_appliance_map(context, appliance, chain_id)
     data = v
     v.update({"operation": "create"})
     delta = {}
     delta.update({"chain_appliances_delta": v})
     result_delta = self.sfcdelta.create_chain_appliances_delta(context, delta)
     return data
Пример #11
0
 def delete_vendor(self, context, vendor_id):
     # LOG.debug(_('Delete vendor %s'), vendor_id)
     v = self.get_vendor(context, vendor_id)
     self.db.delete_vendor(context, vendor_id)
     v.update({"operation": "delete"})
     delta = {}
     delta.update({"vendors_delta": v})
     result_delta = self.sfcdelta.create_vendors_delta(context, delta)
Пример #12
0
 def create_vendor(self, context, vendor):
     v = self.db.create_vendor(context, vendor)
     data = v
     v.update({"operation": "create"})
     delta = {}
     delta.update({"vendors_delta": v})
     result_delta = self.sfcdelta.create_vendors_delta(context, delta)
     return data
Пример #13
0
 def update_appliance(self, context, appliance_id, appliance):
     # LOG.debug(_('Update appliance %s'), appliance_id)
     v = self.db.update_appliance(context, appliance_id, appliance)
     data = v
     v.update({"operation": "update"})
     delta = {}
     delta.update({"appliances_delta": v})
     result_delta = self.sfcdelta.create_appliances_delta(context, delta)
     return data
Пример #14
0
 def update_chain_bypass_rule(self, context, rule_id, chain_id, bypass_rule):
     # LOG.debug(_('Update rule %s'), rule_id)
     v = self.db.update_chain_bypass_rule(context, rule_id, chain_id, bypass_rule)
     data = v
     v.update({"operation": "update"})
     delta = {}
     delta.update({"chain_bypass_rules_delta": v})
     result_delta = self.sfcdelta.create_chain_bypass_rules_delta(context, delta)
     return data
Пример #15
0
    def create_chain_bypass_rule(self, context, bypass_rule, chain_id):
        v = self.db.create_chain_bypass_rule(context, bypass_rule, chain_id)
        data = v
        v.update({"operation": "create"})
        delta = {}
        delta.update({"chain_bypass_rules_delta": v})
        result_delta = self.sfcdelta.create_chain_bypass_rules_delta(context, delta)

        return data
Пример #16
0
 def delete_chainmap(self, context, chainmap_id):
     # LOG.debug(_('Delete chainmap %s'), chainmap_id)
     v = self.get_chainmap(context, chainmap_id)
     self.db.delete_chainmap(context, chainmap_id)
     data = v
     v.update({"operation": "delete"})
     delta = {}
     delta.update({"chainmaps_delta": v})
     result_delta = self.sfcdelta.create_chainmaps_delta(context, delta)
Пример #17
0
 def update_vendor(self, context, vendor_id, vendor):
     # LOG.debug(_('Update vendor %s'), vendor_id)
     v = self.db.update_vendor(context, vendor_id, vendor)
     data = v
     v.update({"operation": "update"})
     delta = {}
     delta.update({"vendors_delta": v})
     result_delta = self.sfcdelta.create_vendors_delta(context, delta)
     return data
Пример #18
0
 def delete_category_nf_map(self, context, networkfunction_id, category_id):
     LOG.debug(_("Delete category_networkfunction %s"), networkfunction_id)
     v = self.get_category_nf_map(context, networkfunction_id, category_id)
     self.db.delete_category_networkfunction(context, category_id, networkfunction_id)
     data = v
     v.update({"operation": "delete"})
     delta = {}
     delta.update({"category_networkfunctions_delta": v})
     result_delta = self.sfcdelta.create_category_networkfunctions_delta(context, delta)
Пример #19
0
 def update_chainmap(self, context, chainmap_id, chainmap):
     # LOG.debug(_('Update chainmap %s'), chainmap_id)
     v = self.db.update_chainmap(context, chainmap_id, chainmap)
     data = v
     v.update({"operation": "update"})
     delta = {}
     delta.update({"chainmaps_delta": v})
     result_delta = self.sfcdelta.create_chainmaps_delta(context, delta)
     return data
Пример #20
0
 def delete_appliance(self, context, appliance_id):
     # LOG.debug(_('Delete appliance %s'), appliance_id)
     v = self.get_appliance(context, appliance_id)
     self.db.delete_appliance(context, appliance_id)
     data = v
     v.update({"operation": "delete"})
     delta = {}
     delta.update({"appliances_delta": v})
     result_delta = self.sfcdelta.create_appliances_delta(context, delta)
Пример #21
0
 def delete_chain_bypass_rule(self, context, rule_id, chain_id):
     # LOG.debug(_('Delete rule %s'), rule_id)
     v = self.get_chain_bypass_rule(context, rule_id, chain_id)
     self.db.delete_chain_bypass_rule(context, rule_id, chain_id)
     data = v
     v.update({"operation": "delete"})
     delta = {}
     delta.update({"chain_bypass_rules_delta": v})
     result_delta = self.sfcdelta.create_chain_bypass_rules_delta(context, delta)
Пример #22
0
 def delete_chainset_zone(self, context, zone_id, chainset_id):
     # LOG.debug(_('Delete zone %s'), zone_id)
     v = self.get_chainset_zone(context, zone_id, chainset_id)
     self.db.delete_chainset_zone(context, zone_id, chainset_id)
     data = v
     v.update({"operation": "delete"})
     delta = {}
     delta.update({"chainset_zones_delta": v})
     result_delta = self.sfcdelta.create_chainset_zone_deltas(context, delta)
Пример #23
0
 def update_config_handle(self, context, config_handle_id, config_handle):
     # LOG.debug(_('Update config_handle %s'), config_handle_id)
     v = self.db.update_config_handle(context, config_handle_id, config_handle)
     data = v
     v.update({"operation": "update"})
     delta = {}
     delta.update({"config_handles_delta": v})
     result_delta = self.sfcdelta.create_config_handles_delta(context, delta)
     return data
Пример #24
0
 def update_networkfunction(self, context, networkfunction_id, networkfunction):
     # LOG.debug(_('Update networkfunction %s'), networkfunction_id)
     v = self.db.update_networkfunction(context, networkfunction_id, networkfunction)
     data = v
     v.update({"operation": "update"})
     delta = {}
     delta.update({"networkfunctions_delta": v})
     result_delta = self.sfcdelta.create_networkfunctions_delta(context, delta)
     return data
Пример #25
0
 def update_chainset_zone(self, context, zone_id, chainset_id, zone):
     # LOG.debug(_('Update zone %s'), zone_id)
     v = self.db.update_chainset_zone(context, zone_id, chainset_id, zone)
     data = v
     v.update({"operation": "update"})
     delta = {}
     delta.update({"chainset_zones_delta": v})
     result_delta = self.sfcdelta.create_chainset_zone_deltas(context, delta)
     return data
Пример #26
0
 def delete_chain_appliance(self, context, appliance_id, chain_id):
     # LOG.debug(_('Delete appliance_map %s'), appliance_map_id)
     v = self.get_chain_appliance(context, appliance_id, chain_id)
     appliance_map_id = v["id"]
     self.db.delete_chain_appliance_map(context, appliance_map_id, chain_id)
     data = v
     v.update({"operation": "delete"})
     delta = {}
     delta.update({"chain_appliances_delta": v})
     result_delta = self.sfcdelta.create_chain_appliances_delta(context, delta)
Пример #27
0
 def update_chain_appliance_instance(self, context, chain_appliance_map_instance_id, chain_appliance_map_instance):
     v = self.db.update_chain_appliance_map_instance(
         context, chain_appliance_map_instance_id, chain_appliance_map_instance
     )
     data = v
     v.update({"operation": "update"})
     delta = {}
     delta.update({"appliance_instances_delta": v})
     result_delta = self.sfcdelta.create_appliance_instances_delta(context, delta)
     return data
Пример #28
0
 def create_chainset_rule(self, context, rule, chainset_id):
     v = self.db.create_chainset_rule(context, rule, chainset_id)
     data = v
     v.update({"operation": "create"})
     delta = {}
     delta.update({"chainrules_delta": v})
     cbr = v
     chain_id = cbr.get("chain_id") or ""
     if chain_id:
         result_delta = self.sfcdelta.create_chainrules_delta(context, delta)
     return data
Пример #29
0
 def delete_chainset_rule(self, context, rule_id, chainset_id):
     # LOG.debug(_('Delete rule %s'), rule_id)
     v = self.get_chainset_rule(context, rule_id, chainset_id)
     self.db.delete_chainset_rule(context, rule_id, chainset_id)
     data = v
     v.update({"operation": "delete"})
     delta = {}
     delta.update({"chainrules_delta": v})
     cbr = v
     chain_id = cbr.get("chain_id") or ""
     if chain_id:
         result_delta = self.sfcdelta.create_chainrules_delta(context, delta)
Пример #30
0
 def create_chain_appliance_instance(self, context, chain_id, appliance_id, instance):
     chain_appliance = self.get_chain_appliance(context, appliance_id, chain_id)
     appliance_map_id = chain_appliance["id"]
     instance["instance"].update({"appliance_map_id": appliance_map_id})
     v = self.db.create_chain_appliance_map_instance(context, instance)
     data = v
     v.update({"operation": "create"})
     v.update({"chain_id": chain_id})
     v.update({"appliance_id": appliance_id})
     delta = {}
     delta.update({"appliance_instances_delta": v})
     result_delta = self.sfcdelta.create_appliance_instances_delta(context, delta)
     return data