summaryrefslogtreecommitdiff
path: root/quantumclient
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-05-10 10:29:04 +0000
committerGerrit Code Review <review@openstack.org>2013-05-10 10:29:04 +0000
commitdf1ab479b3456f6cab87ea7e3b699d647be4af6c (patch)
treed82e07c1c122e83d73e210ee97826376bc42c5f1 /quantumclient
parentb971ef0e3b3a757846667f66b4c96d54bb66d568 (diff)
parentad7caef9c302575427dfc46cea1c5b84fef8e061 (diff)
downloadpython-neutronclient-df1ab479b3456f6cab87ea7e3b699d647be4af6c.tar.gz
Merge "Change variable name of admin_state_down to admin_state"
Diffstat (limited to 'quantumclient')
-rw-r--r--quantumclient/quantum/v2_0/lb/healthmonitor.py4
-rw-r--r--quantumclient/quantum/v2_0/lb/member.py4
-rw-r--r--quantumclient/quantum/v2_0/lb/pool.py4
-rw-r--r--quantumclient/quantum/v2_0/lb/vip.py4
-rw-r--r--quantumclient/quantum/v2_0/network.py9
-rw-r--r--quantumclient/quantum/v2_0/port.py8
-rw-r--r--quantumclient/quantum/v2_0/router.py6
-rw-r--r--quantumclient/quantum/v2_0/subnet.py2
8 files changed, 20 insertions, 21 deletions
diff --git a/quantumclient/quantum/v2_0/lb/healthmonitor.py b/quantumclient/quantum/v2_0/lb/healthmonitor.py
index 23998e5..a4e7ee6 100644
--- a/quantumclient/quantum/v2_0/lb/healthmonitor.py
+++ b/quantumclient/quantum/v2_0/lb/healthmonitor.py
@@ -49,7 +49,7 @@ class CreateHealthMonitor(quantumv20.CreateCommand):
def add_known_arguments(self, parser):
parser.add_argument(
'--admin-state-down',
- default=True, action='store_false',
+ dest='admin_state', action='store_false',
help='set admin state up to false')
parser.add_argument(
'--expected-codes',
@@ -92,7 +92,7 @@ class CreateHealthMonitor(quantumv20.CreateCommand):
def args2body(self, parsed_args):
body = {
self.resource: {
- 'admin_state_up': parsed_args.admin_state_down,
+ 'admin_state_up': parsed_args.admin_state,
'delay': parsed_args.delay,
'max_retries': parsed_args.max_retries,
'timeout': parsed_args.timeout,
diff --git a/quantumclient/quantum/v2_0/lb/member.py b/quantumclient/quantum/v2_0/lb/member.py
index 7be623d..18e479a 100644
--- a/quantumclient/quantum/v2_0/lb/member.py
+++ b/quantumclient/quantum/v2_0/lb/member.py
@@ -54,7 +54,7 @@ class CreateMember(quantumv20.CreateCommand):
help='Pool id or name this vip belongs to')
parser.add_argument(
'--admin-state-down',
- default=True, action='store_false',
+ dest='admin_state', action='store_false',
help='set admin state up to false')
parser.add_argument(
'--weight',
@@ -75,7 +75,7 @@ class CreateMember(quantumv20.CreateCommand):
body = {
self.resource: {
'pool_id': _pool_id,
- 'admin_state_up': parsed_args.admin_state_down,
+ 'admin_state_up': parsed_args.admin_state,
},
}
quantumv20.update_dict(
diff --git a/quantumclient/quantum/v2_0/lb/pool.py b/quantumclient/quantum/v2_0/lb/pool.py
index 5cbb30a..26bf0c9 100644
--- a/quantumclient/quantum/v2_0/lb/pool.py
+++ b/quantumclient/quantum/v2_0/lb/pool.py
@@ -50,7 +50,7 @@ class CreatePool(quantumv20.CreateCommand):
def add_known_arguments(self, parser):
parser.add_argument(
'--admin-state-down',
- default=True, action='store_false',
+ dest='admin_state', action='store_false',
help='set admin state up to false')
parser.add_argument(
'--description',
@@ -76,7 +76,7 @@ class CreatePool(quantumv20.CreateCommand):
def args2body(self, parsed_args):
body = {
self.resource: {
- 'admin_state_up': parsed_args.admin_state_down,
+ 'admin_state_up': parsed_args.admin_state,
},
}
quantumv20.update_dict(parsed_args, body[self.resource],
diff --git a/quantumclient/quantum/v2_0/lb/vip.py b/quantumclient/quantum/v2_0/lb/vip.py
index 2fcfebf..4ee03a1 100644
--- a/quantumclient/quantum/v2_0/lb/vip.py
+++ b/quantumclient/quantum/v2_0/lb/vip.py
@@ -56,7 +56,7 @@ class CreateVip(quantumv20.CreateCommand):
help='IP address of the vip')
parser.add_argument(
'--admin-state-down',
- default=True, action='store_false',
+ dest='admin_state', action='store_false',
help='set admin state up to false')
parser.add_argument(
'--connection-limit',
@@ -89,7 +89,7 @@ class CreateVip(quantumv20.CreateCommand):
body = {
self.resource: {
'pool_id': _pool_id,
- 'admin_state_up': parsed_args.admin_state_down,
+ 'admin_state_up': parsed_args.admin_state,
},
}
quantumv20.update_dict(parsed_args, body[self.resource],
diff --git a/quantumclient/quantum/v2_0/network.py b/quantumclient/quantum/v2_0/network.py
index ed81068..20814c7 100644
--- a/quantumclient/quantum/v2_0/network.py
+++ b/quantumclient/quantum/v2_0/network.py
@@ -94,16 +94,15 @@ class CreateNetwork(CreateCommand):
def add_known_arguments(self, parser):
parser.add_argument(
'--admin-state-down',
- default=True, action='store_false',
+ dest='admin_state', action='store_false',
help='Set Admin State Up to false')
parser.add_argument(
'--admin_state_down',
- action='store_false',
+ dest='admin_state', action='store_false',
help=argparse.SUPPRESS)
parser.add_argument(
'--shared',
action='store_true',
- default=argparse.SUPPRESS,
help='Set the network as shared')
parser.add_argument(
'name', metavar='NAME',
@@ -112,10 +111,10 @@ class CreateNetwork(CreateCommand):
def args2body(self, parsed_args):
body = {'network': {
'name': parsed_args.name,
- 'admin_state_up': parsed_args.admin_state_down}, }
+ 'admin_state_up': parsed_args.admin_state}, }
if parsed_args.tenant_id:
body['network'].update({'tenant_id': parsed_args.tenant_id})
- if hasattr(parsed_args, 'shared'):
+ if parsed_args.shared:
body['network'].update({'shared': parsed_args.shared})
return body
diff --git a/quantumclient/quantum/v2_0/port.py b/quantumclient/quantum/v2_0/port.py
index 0807714..1c1c910 100644
--- a/quantumclient/quantum/v2_0/port.py
+++ b/quantumclient/quantum/v2_0/port.py
@@ -90,11 +90,11 @@ class CreatePort(CreateCommand):
help='name of this port')
parser.add_argument(
'--admin-state-down',
- default=True, action='store_false',
+ dest='admin_state', action='store_false',
help='set admin state up to false')
parser.add_argument(
'--admin_state_down',
- action='store_false',
+ dest='admin_state', action='store_false',
help=argparse.SUPPRESS)
parser.add_argument(
'--mac-address',
@@ -130,7 +130,7 @@ class CreatePort(CreateCommand):
def args2body(self, parsed_args):
_network_id = quantumv20.find_resourceid_by_name_or_id(
self.get_client(), 'network', parsed_args.network_id)
- body = {'port': {'admin_state_up': parsed_args.admin_state_down,
+ body = {'port': {'admin_state_up': parsed_args.admin_state,
'network_id': _network_id, }, }
if parsed_args.mac_address:
body['port'].update({'mac_address': parsed_args.mac_address})
@@ -179,7 +179,7 @@ class UpdatePort(UpdateCommand):
def add_known_arguments(self, parser):
parser.add_argument(
'--no-security-groups',
- default=False, action='store_true',
+ action='store_true',
help='remove security groups from port')
def args2body(self, parsed_args):
diff --git a/quantumclient/quantum/v2_0/router.py b/quantumclient/quantum/v2_0/router.py
index 86eaa72..3f8ed6c 100644
--- a/quantumclient/quantum/v2_0/router.py
+++ b/quantumclient/quantum/v2_0/router.py
@@ -63,11 +63,11 @@ class CreateRouter(CreateCommand):
def add_known_arguments(self, parser):
parser.add_argument(
'--admin-state-down',
- default=True, action='store_false',
+ dest='admin_state', action='store_false',
help='Set Admin State Up to false')
parser.add_argument(
'--admin_state_down',
- action='store_false',
+ dest='admin_state', action='store_false',
help=argparse.SUPPRESS)
parser.add_argument(
'name', metavar='NAME',
@@ -76,7 +76,7 @@ class CreateRouter(CreateCommand):
def args2body(self, parsed_args):
body = {'router': {
'name': parsed_args.name,
- 'admin_state_up': parsed_args.admin_state_down, }, }
+ 'admin_state_up': parsed_args.admin_state, }, }
if parsed_args.tenant_id:
body['router'].update({'tenant_id': parsed_args.tenant_id})
return body
diff --git a/quantumclient/quantum/v2_0/subnet.py b/quantumclient/quantum/v2_0/subnet.py
index 4442b72..a711f05 100644
--- a/quantumclient/quantum/v2_0/subnet.py
+++ b/quantumclient/quantum/v2_0/subnet.py
@@ -97,7 +97,7 @@ class CreateSubnet(CreateCommand):
help='gateway ip of this subnet')
parser.add_argument(
'--no-gateway',
- default=False, action='store_true',
+ action='store_true',
help='No distribution of gateway')
parser.add_argument(
'--allocation-pool', metavar='start=IP_ADDR,end=IP_ADDR',