def test_create_loadbalancer_with_all_params(self):
     """lbaas-loadbalancer-create with all params set."""
     resource = 'loadbalancer'
     cmd_resource = 'lbaas_loadbalancer'
     cmd = lb.CreateLoadBalancer(test_cli20.MyApp(sys.stdout), None)
     name = 'lbaas-loadbalancer-name'
     description = 'lbaas-loadbalancer-desc'
     flavor_id = 'lbaas-loadbalancer-flavor'
     vip_subnet_id = 'vip-subnet'
     my_id = 'my-id'
     args = [
         '--admin-state-down', '--description', description, '--name', name,
         '--flavor', flavor_id, vip_subnet_id
     ]
     position_names = [
         'admin_state_up', 'description', 'name', 'flavor_id',
         'vip_subnet_id'
     ]
     position_values = [False, description, name, flavor_id, vip_subnet_id]
     self._test_create_resource(resource,
                                cmd,
                                name,
                                my_id,
                                args,
                                position_names,
                                position_values,
                                cmd_resource=cmd_resource)
Exemple #2
0
 def test_create_loadbalancer_with_mandatory_params(self):
     # lbaas-loadbalancer-create with mandatory params only.
     resource = 'loadbalancer'
     cmd_resource = 'lbaas_loadbalancer'
     cmd = lb.CreateLoadBalancer(test_cli20.MyApp(sys.stdout), None)
     name = 'lbaas-loadbalancer-name'
     vip_subnet_id = 'vip-subnet'
     my_id = 'my-id'
     args = [vip_subnet_id]
     position_names = ['vip_subnet_id']
     position_values = [vip_subnet_id]
     self._test_create_resource(resource, cmd, name, my_id, args,
                                position_names, position_values,
                                cmd_resource=cmd_resource)