Esempio n. 1
0
 def delete_firewall(self, context, edge_id):
     try:
         self.vcns.delete_firewall(edge_id)
     except vcns_exc.VcnsApiException as e:
         LOG.exception(_LE("Failed to delete firewall " "with edge_id:%s"), edge_id)
         raise e
     nsxv_db.cleanup_nsxv_edge_firewallrule_binding(context.session, edge_id)
Esempio n. 2
0
 def update_firewall(self, context, edge_id, firewall):
     fw_req = self._convert_firewall(context, firewall)
     try:
         self.vcns.update_firewall(edge_id, fw_req)
     except vcns_exc.VcnsApiException as e:
         LOG.exception(_LE("Failed to update firewall " "with edge_id: %s"), edge_id)
         raise e
     fw_res = self._get_firewall(context, edge_id)
     nsxv_db.cleanup_nsxv_edge_firewallrule_binding(context.session, edge_id)
     self._create_rule_id_mapping(context, edge_id, firewall, fw_res)