def test_create_member_with_all_params(self): """lbaas-member-create with all params set.""" resource = 'member' cmd_resource = 'lbaas_member' cmd = member.CreateMember(test_cli20.MyApp(sys.stdout), None) my_id = 'my-id' address = '10.1.1.1' protocol_port = '80' pool_id = 'pool-id' subnet_id = 'subnet-id' weight = '100' args = [ '--address', address, '--protocol-port', protocol_port, '--subnet', subnet_id, pool_id, '--weight', weight, '--admin-state-down' ] position_names = [ 'admin_state_up', 'address', 'protocol_port', 'subnet_id', 'weight' ] position_values = [False, address, protocol_port, subnet_id, weight] self._test_create_resource(resource, cmd, '', my_id, args, position_names, position_values, cmd_resource=cmd_resource, parent_id=pool_id)
def test_create_member_with_mandatory_params(self): """lbaas-member-create with mandatory params only.""" resource = 'member' cmd_resource = 'lbaas_member' cmd = member.CreateMember(test_cli20.MyApp(sys.stdout), None) my_id = 'my-id' address = '10.1.1.1' protocol_port = '80' pool_id = 'pool-id' subnet_id = 'subnet-id' args = [ '--address', address, '--protocol-port', protocol_port, '--subnet', subnet_id, pool_id ] position_names = [ 'admin_state_up', 'address', 'protocol_port', 'subnet_id' ] position_values = [True, address, protocol_port, subnet_id] self._test_create_resource(resource, cmd, '', my_id, args, position_names, position_values, cmd_resource=cmd_resource, parent_id=pool_id)