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

Discard master-slave vocabulary #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
30 changes: 15 additions & 15 deletions footmark/slb/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def create_load_balancer_listener(self, load_balancer_id,\
vserver_group_id='',\
gzip='',\
server_certificate_id='',\
master_slave_server_group_id='',\
main_subordinate_server_group_id='',\
persistence_timeout=None,\
health_check_connect_timeout=None,\
xforwarded_for = 'on',\
Expand Down Expand Up @@ -355,8 +355,8 @@ def create_load_balancer_listener(self, load_balancer_id,\
:param: gzip: whether open Gzip compression
:type: server_certificate_id: string
:param: server_certificate_id: Server certificate ID.
:type: master_slave_server_group_id: string
:param: master_slave_server_group_id: Master standby server group ID
:type: main_subordinate_server_group_id: string
:param: main_subordinate_server_group_id: Main standby server group ID
:type: persistence_timeout: string
:param: persistence_timeout: Timeout time for connection persistence.
:type: health_check_connect_timeout: int
Expand Down Expand Up @@ -418,8 +418,8 @@ def create_load_balancer_listener(self, load_balancer_id,\
self.build_list_params(params, health_check_http_code, 'HealthCheckHttpCode')
if vserver_group_id:
self.build_list_params(params, vserver_group_id, 'VServerGroupId')
if master_slave_server_group_id:
self.build_list_params(params, master_slave_server_group_id, 'MasterSlaveServerGroupId')
if main_subordinate_server_group_id:
self.build_list_params(params, main_subordinate_server_group_id, 'MainSubordinateServerGroupId')
if persistence_timeout:
self.build_list_params(params, persistence_timeout, 'PersistenceTimeout')
if health_check_connect_timeout:
Expand Down Expand Up @@ -470,14 +470,14 @@ def set_listener_attribute(self, load_balancer_id,\
vserver_group_id='',\
gzip='',\
server_certificate_id='',\
master_slave_server_group_id='',\
main_subordinate_server_group_id='',\
persistence_timeout=None,\
health_check_connect_timeout=None,\
ca_certificate_id='',\
syn_proxy='',\
health_check_type='',\
vserver_group='',\
master_slave_server_group='',
main_subordinate_server_group='',
xforwarded_for='on'):
"""
set listener attribute
Expand Down Expand Up @@ -523,8 +523,8 @@ def set_listener_attribute(self, load_balancer_id,\
:param: gzip: whether open Gzip compression
:type: server_certificate_id: string
:param: server_certificate_id: Server certificate ID.
:type: master_slave_server_group_id: string
:param: master_slave_server_group_id: Master standby server group ID
:type: main_subordinate_server_group_id: string
:param: main_subordinate_server_group_id: Main standby server group ID
:type: persistence_timeout: string
:param: persistence_timeout: Timeout time for connection persistence.
:type: health_check_connect_timeout: int
Expand All @@ -539,8 +539,8 @@ def set_listener_attribute(self, load_balancer_id,\
:param: health_check_type: health check type
:type: vserver_group: string
:param: vserver_group: Whether to use a virtual server group
:type: master_slave_server_group: string
:param: master_slave_server_group: Whether to use the primary and secondary server groups
:type: main_subordinate_server_group: string
:param: main_subordinate_server_group: Whether to use the primary and secondary server groups
:return: returns request status
"""
params = {}
Expand Down Expand Up @@ -591,10 +591,10 @@ def set_listener_attribute(self, load_balancer_id,\
self.build_list_params(params, vserver_group, 'VServerGroup')
if vserver_group_id:
self.build_list_params(params, vserver_group_id, 'VServerGroupId')
if master_slave_server_group_id:
self.build_list_params(params, master_slave_server_group_id, 'MasterSlaveServerGroupId')
if master_slave_server_group:
self.build_list_params(params, master_slave_server_group, 'MasterSlaveServerGroup')
if main_subordinate_server_group_id:
self.build_list_params(params, main_subordinate_server_group_id, 'MainSubordinateServerGroupId')
if main_subordinate_server_group:
self.build_list_params(params, main_subordinate_server_group, 'MainSubordinateServerGroup')
if ca_certificate_id:
self.build_list_params(params, ca_certificate_id, 'CACertificateId')
if syn_proxy:
Expand Down
8 changes: 4 additions & 4 deletions footmark/slb/slb.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ def set_attribute(self, load_balancer_id='',\
vserver_group_id='',\
gzip='',\
server_certificate_id='',\
master_slave_server_group_id='',\
main_subordinate_server_group_id='',\
persistence_timeout=None,\
health_check_connect_timeout=None,\
ca_certificate_id='',\
syn_proxy='',\
health_check_type='',\
vserver_group='',\
master_slave_server_group=''):
main_subordinate_server_group=''):
'''
set listener attribute
'''
Expand All @@ -145,14 +145,14 @@ def set_attribute(self, load_balancer_id='',\
vserver_group_id=vserver_group_id,\
gzip=gzip,\
server_certificate_id=server_certificate_id,\
master_slave_server_group_id=master_slave_server_group_id,\
main_subordinate_server_group_id=main_subordinate_server_group_id,\
persistence_timeout=persistence_timeout,\
health_check_connect_timeout=health_check_connect_timeout,\
ca_certificate_id=ca_certificate_id,\
syn_proxy=syn_proxy,\
health_check_type=health_check_type,\
vserver_group=vserver_group,\
master_slave_server_group=master_slave_server_group)
main_subordinate_server_group=main_subordinate_server_group)

def remove_white_list_item(self, load_balancer_id, source_items):
'''
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/slb/test_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ class TestCreateLoadBalancer(ACSMockServiceTestCase):
internet_charge_type = None
bandwidth = None
vswitch_id = None
master_zone_id = "cn-beijing-b"
slave_zone_id = "cn-beijing-a"
main_zone_id = "cn-beijing-b"
subordinate_zone_id = "cn-beijing-a"
instance_ids = None
validate_cert = None
tags = None
Expand All @@ -285,8 +285,8 @@ def test_create_load_balancer(self):
address_type=self.address_type,
vswitch_id=self.vswitch_id,
internet_charge_type=self.internet_charge_type,
master_zone_id=self.master_zone_id,
slave_zone_id=self.slave_zone_id,
main_zone_id=self.main_zone_id,
subordinate_zone_id=self.subordinate_zone_id,
bandwidth=self.bandwidth,
listeners=self.listeners,
instance_ids=self.instance_ids,
Expand Down