Skip to content

Commit

Permalink
Merge "SNAT audit uses logical router ref instead of si name"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Feb 18, 2016
2 parents cc5068d + b488872 commit 2457a40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/config/svc-monitor/svc_monitor/config_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ def __init__(self, uuid, obj_dict=None):
self.service_health_checks = set()
self.instance_ips = set()
self.virtual_machines = set()
self.logical_router = None
self.params = None
self.state = 'init'
self.launch_count = 0
Expand Down Expand Up @@ -522,6 +523,7 @@ def update(self, obj=None):
self.update_single_ref('service_template', obj)
self.update_single_ref('loadbalancer', obj)
self.update_single_ref('loadbalancer_pool', obj)
self.update_single_ref('logical_router', obj)
self.update_multiple_refs('interface_route_table', obj)
self.update_multiple_refs('service_health_check', obj)
self.update_multiple_refs('instance_ip', obj)
Expand Down Expand Up @@ -571,6 +573,7 @@ def delete(cls, uuid):
obj.update_single_ref('service_template', {})
obj.update_single_ref('loadbalancer', {})
obj.update_single_ref('loadbalancer_pool', {})
obj.update_single_ref('logical_router', {})
obj.update_multiple_refs('interface_route_table', {})
obj.update_multiple_refs('service_health_check', {})
obj.update_multiple_refs('instance_ip', {})
Expand Down
2 changes: 1 addition & 1 deletion src/config/svc-monitor/svc_monitor/snat_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def audit_snat_instances(self):
st_obj = ServiceTemplateSM.get(si.service_template)
if st_obj.params['service_type'] != "source-nat":
continue
lr_uuid = si_name.split('_')[1]
lr_uuid = si.logical_router
lr = LogicalRouterSM.get(lr_uuid)
if lr is None or lr.virtual_network is None:
self.cleanup_snat_instance(lr_uuid, si.uuid)
Expand Down

0 comments on commit 2457a40

Please sign in to comment.