Remove nuage plugin from client

This remove the nuage code from client

Change-Id: I7a3bdbedc429015258e76506da950226cacb07e8
Closes-Bug: #1518643
This commit is contained in:
Manjeet Singh Bhatia
2015-12-09 19:51:23 +00:00
parent 2d5b6e6699
commit a0e20366cf
4 changed files with 0 additions and 136 deletions

View File

@@ -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'

View File

@@ -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,

View File

@@ -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)

View File

@@ -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',
@@ -1524,27 +1521,6 @@ class Client(ClientBase):
return self.get(self.metering_label_rule_path %
(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."""