Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPENSTACK-2925: add some comments for agent member code #2154

Draft
wants to merge 1 commit into
base: 9.10-stable
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion f5_openstack_agent/lbaasv2/drivers/bigip/resource_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2007,8 +2007,9 @@ def _create_member_payload(self, loadbalancer, member):
def _create_payload(self, member, service):
return self.driver.service_adapter.get_member(service)

# NOTE(x) based on the existed bigip members, we add or remove delta value
# of bulk changed members.
def _merge_members(self, lbaas_members, bigip_members, delete=False):
# why use merge ? perhaps to in case of existed member status change?

ret = {}

Expand Down
6 changes: 6 additions & 0 deletions f5_openstack_agent/lbaasv2/drivers/bigip/service_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,12 @@ def get_monitor_type(self, service):
monitor_type = lbaas_healthmonitor["type"]
return monitor_type

# NOTE(x): in ng, the lbaas_members argument is all the members of the
# current updating pool for create and delete.
# however, in bulk create (bulk delete use another way to construct
# members) the lbaas_members argument is the delta
# value of changed members. Since bulk create will merge members
# from bigips, the merged result is total members of the pool for updating.
def _map_pool(self, loadbalancer, lbaas_pool, lbaas_hm, lbaas_members):
pool = self.init_pool_name(loadbalancer, lbaas_pool)
pool["description"] = " "
Expand Down