Refactoring of security-groups operation

Mostly eliminates nsx-api calls within a database transactions

Change-Id: If367af129773ec20341df516b4f6015c8dd830ce
This commit is contained in:
Roey Chen
2015-03-31 05:50:25 -07:00
committed by garyk
parent 1b22d5f945
commit 30177fb806
4 changed files with 137 additions and 173 deletions

View File

@@ -128,8 +128,8 @@ class NsxSecurityGroupUtils(object):
pairs.append(pair)
return pairs
def insert_rule_in_section(self, section, nsx_rule):
section.insert(0, nsx_rule)
def extend_section_with_rules(self, section, nsx_rules):
section.extend(nsx_rules)
def parse_section(self, xml_string):
return et.fromstring(xml_string)