Exemple #1
0
 def args2body(self, parsed_args):
     body = {
         self.resource: {},
     }
     quantumv20.update_dict(parsed_args, body[self.resource],
                            ['name', 'description', 'shared',
                             'tenant_id'])
     return body
 def args2body(self, parsed_args):
     body = {
         self.resource: {
             'admin_state_up': parsed_args.admin_state_down,
         },
     }
     quantumv20.update_dict(parsed_args, body[self.resource],
                            ['description', 'lb_method', 'name',
                             'subnet_id', 'protocol', 'tenant_id'])
     return body
Exemple #3
0
 def args2body(self, parsed_args):
     body = {
         self.resource: {},
     }
     quantumv20.update_dict(parsed_args, body[self.resource],
                            ['name', 'description', 'shared', 'protocol',
                             'source_ip_address', 'destination_ip_address',
                             'source_port', 'destination_port',
                             'action', 'enabled', 'tenant_id'])
     return body
 def args2body(self, parsed_args):
     _pool_id = quantumv20.find_resourceid_by_name_or_id(
         self.get_client(), 'pool', parsed_args.pool_id)
     body = {
         self.resource: {
             'pool_id': _pool_id,
             'admin_state_up': parsed_args.admin_state_down,
         },
     }
     quantumv20.update_dict(parsed_args, body[self.resource],
                            ['address', 'port', 'weight', 'tenant_id'])
     return body
 def args2body(self, parsed_args):
     _subnet_id = quantumv20.find_resourceid_by_name_or_id(
         self.get_client(), 'subnet', parsed_args.subnet_id)
     body = {
         self.resource: {
             'admin_state_up': parsed_args.admin_state,
             'subnet_id': _subnet_id,
         },
     }
     quantumv20.update_dict(parsed_args, body[self.resource],
                            ['description', 'lb_method', 'name',
                             'protocol', 'tenant_id'])
     return body
Exemple #6
0
 def args2body(self, parsed_args):
     _pool_id = quantumv20.find_resourceid_by_name_or_id(
         self.get_client(), 'pool', parsed_args.pool_id)
     body = {
         self.resource: {
             'pool_id': _pool_id,
             'admin_state_up': parsed_args.admin_state_down,
         },
     }
     quantumv20.update_dict(parsed_args, body[self.resource],
                            ['address', 'connection_limit', 'description',
                             'name', 'port', 'protocol', 'subnet_id',
                             'tenant_id'])
     return body
 def args2body(self, parsed_args):
     body = {
         self.resource: {
             'admin_state_up': parsed_args.admin_state,
             'delay': parsed_args.delay,
             'max_retries': parsed_args.max_retries,
             'timeout': parsed_args.timeout,
             'type': parsed_args.type,
         },
     }
     quantumv20.update_dict(parsed_args, body[self.resource],
                            ['expected_codes', 'http_method', 'url_path',
                             'tenant_id'])
     return body