summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManjeet Singh Bhatia <manjeet.s.bhatia@intel.com>2015-12-09 19:51:23 +0000
committerManjeet Singh Bhatia <manjeet.s.bhatia@intel.com>2015-12-11 21:05:43 +0000
commita0e20366cf30596a519ce49f2837b3dd575ee8d5 (patch)
tree87bf9c3e332457e72fe934b5d1b8c7f19a7d2275
parent2d5b6e669949401cc60c58c2d8149e43328eae04 (diff)
downloadpython-neutronclient-a0e20366cf30596a519ce49f2837b3dd575ee8d5.tar.gz
Remove nuage plugin from client
This remove the nuage code from client Change-Id: I7a3bdbedc429015258e76506da950226cacb07e8 Closes-Bug: #1518643
-rw-r--r--neutronclient/neutron/v2_0/netpartition.py52
-rw-r--r--neutronclient/shell.py5
-rw-r--r--neutronclient/tests/unit/test_cli20_nuage_netpartition.py55
-rw-r--r--neutronclient/v2_0/client.py24
4 files changed, 0 insertions, 136 deletions
diff --git a/neutronclient/neutron/v2_0/netpartition.py b/neutronclient/neutron/v2_0/netpartition.py
deleted file mode 100644
index dda2782..0000000
--- a/neutronclient/neutron/v2_0/netpartition.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 2014 Alcatel-Lucent USA Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-
-from neutronclient.neutron.v2_0 import CreateCommand
-from neutronclient.neutron.v2_0 import DeleteCommand
-from neutronclient.neutron.v2_0 import ListCommand
-from neutronclient.neutron.v2_0 import ShowCommand
-
-
-class ListNetPartition(ListCommand):
- """List netpartitions that belong to a given tenant."""
- resource = 'net_partition'
- list_columns = ['id', 'name']
-
-
-class ShowNetPartition(ShowCommand):
- """Show information of a given netpartition."""
-
- resource = 'net_partition'
-
-
-class CreateNetPartition(CreateCommand):
- """Create a netpartition for a given tenant."""
-
- resource = 'net_partition'
-
- def add_known_arguments(self, parser):
- parser.add_argument(
- 'name', metavar='name',
- help='Name of netpartition to create.')
-
- def args2body(self, parsed_args):
- body = {'name': parsed_args.name}
- return {'net_partition': body}
-
-
-class DeleteNetPartition(DeleteCommand):
- """Delete a given netpartition."""
-
- resource = 'net_partition'
diff --git a/neutronclient/shell.py b/neutronclient/shell.py
index fe8bd97..5a34d46 100644
--- a/neutronclient/shell.py
+++ b/neutronclient/shell.py
@@ -61,7 +61,6 @@ from neutronclient.neutron.v2_0.lb.v2 import member as lbaas_member
from neutronclient.neutron.v2_0.lb.v2 import pool as lbaas_pool
from neutronclient.neutron.v2_0.lb import vip as lb_vip
from neutronclient.neutron.v2_0 import metering
-from neutronclient.neutron.v2_0 import netpartition
from neutronclient.neutron.v2_0 import network
from neutronclient.neutron.v2_0.nsx import networkgateway
from neutronclient.neutron.v2_0.nsx import qos_queue
@@ -344,10 +343,6 @@ COMMAND_V2 = {
'meter-label-rule-list': metering.ListMeteringLabelRule,
'meter-label-rule-show': metering.ShowMeteringLabelRule,
'meter-label-rule-delete': metering.DeleteMeteringLabelRule,
- 'nuage-netpartition-list': netpartition.ListNetPartition,
- 'nuage-netpartition-show': netpartition.ShowNetPartition,
- 'nuage-netpartition-create': netpartition.CreateNetPartition,
- 'nuage-netpartition-delete': netpartition.DeleteNetPartition,
'rbac-create': rbac.CreateRBACPolicy,
'rbac-update': rbac.UpdateRBACPolicy,
'rbac-list': rbac.ListRBACPolicy,
diff --git a/neutronclient/tests/unit/test_cli20_nuage_netpartition.py b/neutronclient/tests/unit/test_cli20_nuage_netpartition.py
deleted file mode 100644
index fc26979..0000000
--- a/neutronclient/tests/unit/test_cli20_nuage_netpartition.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 2014 Alcatel-Lucent USA Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-
-import sys
-
-from neutronclient.neutron.v2_0 import netpartition
-from neutronclient.tests.unit import test_cli20
-
-
-class CLITestV20NetPartitionJSON(test_cli20.CLITestV20Base):
- resource = 'net_partition'
- non_admin_status_resources = ['net_partition']
-
- def test_create_netpartition(self):
- cmd = netpartition.CreateNetPartition(test_cli20.MyApp(sys.stdout),
- None)
- name = 'myname'
- myid = 'myid'
- args = [name, ]
- position_names = ['name', ]
- position_values = [name, ]
- self._test_create_resource(self.resource, cmd, name, myid, args,
- position_names, position_values)
-
- def test_list_netpartitions(self):
- resources = '%ss' % self.resource
- cmd = netpartition.ListNetPartition(test_cli20.MyApp(sys.stdout),
- None)
- self._test_list_resources(resources, cmd, True)
-
- def test_show_netpartition(self):
- cmd = netpartition.ShowNetPartition(test_cli20.MyApp(sys.stdout),
- None)
- args = ['--fields', 'id', '--fields', 'name', self.test_id]
- self._test_show_resource(self.resource, cmd, self.test_id, args,
- ['id', 'name'])
-
- def test_delete_netpartition(self):
- cmd = netpartition.DeleteNetPartition(test_cli20.MyApp(sys.stdout),
- None)
- myid = 'myid'
- args = [myid]
- self._test_delete_resource(self.resource, cmd, myid, args)
diff --git a/neutronclient/v2_0/client.py b/neutronclient/v2_0/client.py
index 3c3c84a..12bf2af 100644
--- a/neutronclient/v2_0/client.py
+++ b/neutronclient/v2_0/client.py
@@ -394,8 +394,6 @@ class Client(ClientBase):
firewall_policy_remove_path = "/fw/firewall_policies/%s/remove_rule"
firewalls_path = "/fw/firewalls"
firewall_path = "/fw/firewalls/%s"
- net_partitions_path = "/net-partitions"
- net_partition_path = "/net-partitions/%s"
rbac_policies_path = "/rbac-policies"
rbac_policy_path = "/rbac-policies/%s"
qos_policies_path = "/qos/policies"
@@ -435,7 +433,6 @@ class Client(ClientBase):
'firewalls': 'firewall',
'metering_labels': 'metering_label',
'metering_label_rules': 'metering_label_rule',
- 'net_partitions': 'net_partition',
'loadbalancers': 'loadbalancer',
'listeners': 'listener',
'lbaas_pools': 'lbaas_pool',
@@ -1525,27 +1522,6 @@ class Client(ClientBase):
(metering_label_rule), params=_params)
@APIParamsCall
- def list_net_partitions(self, **params):
- """Fetch a list of all network partitions for a tenant."""
- return self.get(self.net_partitions_path, params=params)
-
- @APIParamsCall
- def show_net_partition(self, netpartition, **params):
- """Fetch a network partition."""
- return self.get(self.net_partition_path % (netpartition),
- params=params)
-
- @APIParamsCall
- def create_net_partition(self, body=None):
- """Create a network partition."""
- return self.post(self.net_partitions_path, body=body)
-
- @APIParamsCall
- def delete_net_partition(self, netpartition):
- """Delete the network partition."""
- return self.delete(self.net_partition_path % netpartition)
-
- @APIParamsCall
def create_rbac_policy(self, body=None):
"""Create a new RBAC policy."""
return self.post(self.rbac_policies_path, body=body)