Skip to content

Commit 5402425

Browse files
committed
[OPENSTACK-2828] use same req id
when creating/deleting ports called from agent.
1 parent 79224c2 commit 5402425

7 files changed

Lines changed: 137 additions & 118 deletions

File tree

f5_openstack_agent/lbaasv2/drivers/bigip/agent_manager_lite.py

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def create_loadbalancer(self, context, loadbalancer, service):
402402
try:
403403
bigip_device.set_bigips(service, self.conf)
404404
mgr = resource_manager.LoadBalancerManager(self.lbdriver)
405-
mgr.create(loadbalancer, service)
405+
mgr.create(context, loadbalancer, service)
406406
provision_status = constants_v2.F5_ACTIVE
407407
operating_status = constants_v2.F5_ONLINE
408408
LOG.debug("Finish to create loadbalancer %s", id)
@@ -432,7 +432,7 @@ def update_loadbalancer(self, context, old_loadbalancer,
432432
try:
433433
bigip_device.set_bigips(service, self.conf)
434434
mgr = resource_manager.LoadBalancerManager(self.lbdriver)
435-
mgr.update(old_loadbalancer, loadbalancer, service)
435+
mgr.update(context, old_loadbalancer, loadbalancer, service)
436436
provision_status = constants_v2.F5_ACTIVE
437437
operating_status = constants_v2.F5_ONLINE
438438
LOG.debug("Finish to update loadbalancer %s", id)
@@ -460,7 +460,7 @@ def delete_loadbalancer(self, context, loadbalancer, service):
460460
try:
461461
bigip_device.set_bigips(service, self.conf)
462462
mgr = resource_manager.LoadBalancerManager(self.lbdriver)
463-
mgr.delete(loadbalancer, service)
463+
mgr.delete(context, loadbalancer, service)
464464
provision_status = constants_v2.F5_ACTIVE
465465
LOG.debug("Finish to delete loadbalancer %s", id)
466466
except iControlUnexpectedHTTPError as ex:
@@ -528,7 +528,7 @@ def create_listener(self, context, listener, service):
528528
try:
529529
bigip_device.set_bigips(service, self.conf)
530530
mgr = resource_manager.ListenerManager(self.lbdriver)
531-
mgr.create(listener, service)
531+
mgr.create(context, listener, service)
532532
provision_status = constants_v2.F5_ACTIVE
533533
operating_status = constants_v2.F5_ONLINE
534534
LOG.debug("Finish to create listener %s", id)
@@ -560,7 +560,7 @@ def update_listener(self, context, old_listener, listener, service):
560560
try:
561561
bigip_device.set_bigips(service, self.conf)
562562
mgr = resource_manager.ListenerManager(self.lbdriver)
563-
mgr.update(old_listener, listener, service)
563+
mgr.update(context, old_listener, listener, service)
564564
provision_status = constants_v2.F5_ACTIVE
565565
LOG.debug("Finish to update listener %s", id)
566566
except Exception as ex:
@@ -591,7 +591,7 @@ def delete_listener(self, context, listener, service):
591591
try:
592592
bigip_device.set_bigips(service, self.conf)
593593
mgr = resource_manager.ListenerManager(self.lbdriver)
594-
mgr.delete(listener, service)
594+
mgr.delete(context, listener, service)
595595
provision_status = constants_v2.F5_ACTIVE
596596
LOG.debug("Finish to delete listener %s", id)
597597
except Exception as ex:
@@ -627,7 +627,7 @@ def create_pool(self, context, pool, service):
627627
try:
628628
bigip_device.set_bigips(service, self.conf)
629629
mgr = resource_manager.PoolManager(self.lbdriver)
630-
mgr.create(pool, service)
630+
mgr.create(context, pool, service)
631631
provision_status = constants_v2.F5_ACTIVE
632632
operating_status = constants_v2.F5_ONLINE
633633
LOG.debug("Finish to create pool %s", id)
@@ -660,7 +660,7 @@ def update_pool(self, context, old_pool, pool, service):
660660
bigip_device.set_bigips(service, self.conf)
661661
# TODO(qzhao): Deploy config to BIG-IP
662662
mgr = resource_manager.PoolManager(self.lbdriver)
663-
mgr.update(old_pool, pool, service)
663+
mgr.update(context, old_pool, pool, service)
664664
provision_status = constants_v2.F5_ACTIVE
665665
LOG.debug("Finish to update pool %s", id)
666666
except Exception as ex:
@@ -691,7 +691,7 @@ def delete_pool(self, context, pool, service):
691691
try:
692692
bigip_device.set_bigips(service, self.conf)
693693
mgr = resource_manager.PoolManager(self.lbdriver)
694-
mgr.delete(pool, service)
694+
mgr.delete(context, pool, service)
695695
provision_status = constants_v2.F5_ACTIVE
696696
LOG.debug("Finish to delete pool %s", id)
697697
except Exception as ex:
@@ -729,7 +729,7 @@ def create_member(
729729
try:
730730
bigip_device.set_bigips(service, self.conf)
731731
mgr = resource_manager.MemberManager(self.lbdriver)
732-
mgr.create(member, service)
732+
mgr.create(context, member, service)
733733
provision_status = constants_v2.F5_ACTIVE
734734
operating_status = constants_v2.F5_ONLINE
735735
if multiple:
@@ -772,11 +772,11 @@ def create_member(
772772

773773
if the_port_id:
774774
LOG.info(the_port_id)
775-
self.plugin_rpc.delete_port(port_id=the_port_id)
775+
self.plugin_rpc.delete_port(context=context, port_id=the_port_id)
776776
if the_port_ids:
777777
LOG.info(the_port_ids)
778778
for each in the_port_ids:
779-
self.plugin_rpc.delete_port(port_id=each)
779+
self.plugin_rpc.delete_port(context=context, port_id=each)
780780
except Exception as ex:
781781
if multiple:
782782
LOG.exception("Fail to update status of multiple members "
@@ -794,7 +794,7 @@ def update_member(self, context, old_member, member, service):
794794
try:
795795
bigip_device.set_bigips(service, self.conf)
796796
mgr = resource_manager.MemberManager(self.lbdriver)
797-
mgr.update(old_member, member, service)
797+
mgr.update(context, old_member, member, service)
798798
provision_status = constants_v2.F5_ACTIVE
799799
LOG.debug("Finish to update member %s", id)
800800
except Exception as ex:
@@ -826,7 +826,7 @@ def delete_member(self, context, member, service):
826826
try:
827827
bigip_device.set_bigips(service, self.conf)
828828
mgr = resource_manager.MemberManager(self.lbdriver)
829-
mgr.delete(member, service)
829+
mgr.delete(context, member, service)
830830
provision_status = constants_v2.F5_ACTIVE
831831
if multiple:
832832
LOG.debug("Finish to delete multiple members")
@@ -890,7 +890,7 @@ def create_health_monitor(self, context, health_monitor, service):
890890
mgr = resource_manager.MonitorManager(
891891
self.lbdriver, type=health_monitor['type']
892892
)
893-
mgr.create(health_monitor, service)
893+
mgr.create(context, health_monitor, service)
894894
provision_status = constants_v2.F5_ACTIVE
895895
operating_status = constants_v2.F5_ONLINE
896896
LOG.debug("Finish to create monitor %s", id)
@@ -927,7 +927,7 @@ def update_health_monitor(self, context, old_health_monitor,
927927
mgr = resource_manager.MonitorManager(
928928
self.lbdriver, type=health_monitor['type']
929929
)
930-
mgr.update(old_health_monitor, health_monitor, service)
930+
mgr.update(context, old_health_monitor, health_monitor, service)
931931
provision_status = constants_v2.F5_ACTIVE
932932
operating_status = constants_v2.F5_ONLINE
933933
LOG.debug("Finish to update health_monitor %s", id)
@@ -961,7 +961,7 @@ def delete_health_monitor(self, context, health_monitor, service):
961961
mgr = resource_manager.MonitorManager(
962962
self.lbdriver, type=health_monitor['type']
963963
)
964-
mgr.delete(health_monitor, service)
964+
mgr.delete(context, health_monitor, service)
965965
provision_status = constants_v2.F5_ACTIVE
966966
operating_status = constants_v2.F5_ONLINE
967967
LOG.debug("Finish to delete health_monitor %s", id)
@@ -1069,7 +1069,7 @@ def create_l7policy(self, context, l7policy, service):
10691069
try:
10701070
bigip_device.set_bigips(service, self.conf)
10711071
mgr = resource_manager.L7PolicyManager(self.lbdriver)
1072-
mgr.create(l7policy, service)
1072+
mgr.create(context, l7policy, service)
10731073
provision_status = constants_v2.F5_ACTIVE
10741074
operating_status = constants_v2.F5_ONLINE
10751075
LOG.debug("Finish to create l7policy %s", id)
@@ -1101,7 +1101,7 @@ def update_l7policy(self, context, old_l7policy, l7policy, service):
11011101
try:
11021102
bigip_device.set_bigips(service, self.conf)
11031103
mgr = resource_manager.L7PolicyManager(self.lbdriver)
1104-
mgr.update(old_l7policy, l7policy, service)
1104+
mgr.update(context, old_l7policy, l7policy, service)
11051105
provision_status = constants_v2.F5_ACTIVE
11061106
operating_status = constants_v2.F5_ONLINE
11071107
LOG.debug("Finish to update l7policy %s", id)
@@ -1133,7 +1133,7 @@ def delete_l7policy(self, context, l7policy, service):
11331133
try:
11341134
bigip_device.set_bigips(service, self.conf)
11351135
mgr = resource_manager.L7PolicyManager(self.lbdriver)
1136-
mgr.delete(l7policy, service)
1136+
mgr.delete(context, l7policy, service)
11371137
provision_status = constants_v2.F5_ACTIVE
11381138
operating_status = constants_v2.F5_ONLINE
11391139
LOG.debug("Finish to delete l7policy %s", id)
@@ -1168,7 +1168,7 @@ def create_l7rule(self, context, l7rule, service):
11681168
try:
11691169
bigip_device.set_bigips(service, self.conf)
11701170
mgr = resource_manager.L7RuleManager(self.lbdriver)
1171-
mgr.create(l7rule, service)
1171+
mgr.create(context, l7rule, service)
11721172
provision_status = constants_v2.F5_ACTIVE
11731173
operating_status = constants_v2.F5_ONLINE
11741174
LOG.debug("Finish to create l7rule %s", id)
@@ -1200,7 +1200,7 @@ def update_l7rule(self, context, old_l7rule, l7rule, service):
12001200
try:
12011201
bigip_device.set_bigips(service, self.conf)
12021202
mgr = resource_manager.L7RuleManager(self.lbdriver)
1203-
mgr.update(old_l7rule, l7rule, service)
1203+
mgr.update(context, old_l7rule, l7rule, service)
12041204
provision_status = constants_v2.F5_ACTIVE
12051205
operating_status = constants_v2.F5_ONLINE
12061206
LOG.debug("Finish to update l7rule %s", id)
@@ -1233,7 +1233,7 @@ def delete_l7rule(self, context, l7rule, service):
12331233
bigip_device.set_bigips(service, self.conf)
12341234
# TODO(qzhao): Deploy config to BIG-IP
12351235
mgr = resource_manager.L7RuleManager(self.lbdriver)
1236-
mgr.delete(l7rule, service)
1236+
mgr.delete(context, l7rule, service)
12371237
provision_status = constants_v2.F5_ACTIVE
12381238
operating_status = constants_v2.F5_ONLINE
12391239
LOG.debug("Finish to delete l7rule %s", id)
@@ -1265,7 +1265,7 @@ def create_acl_group(self, context, acl_group):
12651265
id = acl_group['id']
12661266
try:
12671267
mgr = resource_manager.ACLGroupManager(self.lbdriver)
1268-
mgr.create(acl_group)
1268+
mgr.create(context, acl_group)
12691269
LOG.debug("Finish to create acl_group %s", id)
12701270
except Exception as ex:
12711271
LOG.error("Fail to create acl_group %s "
@@ -1276,7 +1276,7 @@ def delete_acl_group(self, context, acl_group):
12761276
"""Handle RPC cast from plugin to delete ACL Group."""
12771277
try:
12781278
mgr = resource_manager.ACLGroupManager(self.lbdriver)
1279-
mgr.delete(acl_group)
1279+
mgr.delete(context, acl_group)
12801280
LOG.debug("Finish to delete ACL Group %s", id)
12811281
except Exception as ex:
12821282
LOG.error("Fail to delete ACL Group %s "
@@ -1290,7 +1290,7 @@ def update_acl_group(self, context, acl_group, service):
12901290
try:
12911291
bigip_device.set_bigips(service, self.conf)
12921292
mgr = resource_manager.ACLGroupManager(self.lbdriver)
1293-
mgr.update(old_acl_group, acl_group, service)
1293+
mgr.update(context, old_acl_group, acl_group, service)
12941294
LOG.debug("Finish to update acl_group %s", id)
12951295
except Exception as ex:
12961296
LOG.exception("Fail to update acl group %s.\n"
@@ -1312,7 +1312,7 @@ def add_acl_bind(self, context, listener,
13121312
# create acl data group on each bigips first
13131313
bigip_device.set_bigips(service, self.conf)
13141314
mgr = resource_manager.ACLGroupManager(self.lbdriver)
1315-
mgr.create(acl_group, service)
1315+
mgr.create(context, acl_group, service)
13161316
LOG.debug("Finish to create data group of acl group %s",
13171317
acl_id)
13181318

0 commit comments

Comments
 (0)