Remove deprecated network-related resource commands

In Newton we deprecated the various network-related resource
commands which were either for nova-network or were proxy
APIs to Neutron, because of the 2.36 microversion which deprecated
those APIs.

This removes the deprecated commands. Because of the size of this
change, the deprecated python API binding removals will come in a
separate change.

Change-Id: I6ecca49e7208f9dc0969bf377930a729c4b407b8
This commit is contained in:
Matt Riedemann 2017-02-22 15:43:42 -05:00
parent 41f66d15aa
commit adf7d1e48c
7 changed files with 56 additions and 1331 deletions

View File

@ -64,15 +64,6 @@ class SimpleReadOnlyNovaClientTest(base.ClientTestBase):
def test_admin_flavor_list(self):
self.assertIn("Memory_MB", self.nova('flavor-list'))
def test_admin_floating_ip_bulk_list(self):
self.nova('floating-ip-bulk-list')
def test_admin_floating_ip_list(self):
self.nova('floating-ip-list')
def test_admin_floating_ip_pool_list(self):
self.nova('floating-ip-pool-list')
def test_admin_host_list(self):
self.nova('host-list')
@ -95,16 +86,6 @@ class SimpleReadOnlyNovaClientTest(base.ClientTestBase):
'list',
params='--all-tenants bad')
def test_admin_network_list(self):
self.nova('network-list')
def test_admin_secgroup_list(self):
self.nova('secgroup-list')
@decorators.skip_because(bug="1157349")
def test_admin_secgroup_list_rules(self):
self.nova('secgroup-list-rules')
def test_admin_server_group_list(self):
self.nova('server-group-list')
@ -123,9 +104,6 @@ class SimpleReadOnlyNovaClientTest(base.ClientTestBase):
def test_admin_list_extensions(self):
self.nova('list-extensions')
def test_admin_net_list(self):
self.nova('net-list')
def test_agent_list(self):
self.nova('agent-list')
self.nova('agent-list', flags='--debug')

View File

@ -21,12 +21,6 @@ class TestNetworkCommandsV2_36(base.ClientTestBase):
# and emit a warning.
COMPUTE_API_VERSION = "2.36"
def test_command_deprecation(self):
output = self.nova('network-list', merge_stderr=True)
self.assertIn(
'is deprecated', output,
'network-list command did not print deprecation warning')
def test_limits(self):
"""Tests that 2.36 won't return network-related resource limits and
the CLI output won't show them.

View File

@ -459,8 +459,8 @@ class ShellTest(utils.TestCase):
'.*--matching',
'.*--wrap',
'.*help',
'.*secgroup-delete-rule',
'.*--priority']
'.*server-group-delete',
'.*--image-with']
for r in required:
self.assertThat((stdout + stderr),
matchers.MatchesRegex(r, re.DOTALL | re.MULTILINE))

View File

@ -1544,15 +1544,6 @@ class ShellTest(utils.TestCase):
self.assert_called('POST', '/servers/1234/action',
{'changePassword': {'adminPass': 'p'}})
def test_scrub(self):
self.run_command('scrub 4ffc664c198e435e9853f2538fbcd7a7')
self.assert_called('GET', '/os-networks', pos=-4)
self.assert_called('GET', '/os-security-groups?all_tenants=1',
pos=-3)
self.assert_called('POST', '/os-networks/1/action',
{"disassociate": None}, pos=-2)
self.assert_called('DELETE', '/os-security-groups/1')
def test_show(self):
self.run_command('show 1234')
self.assert_called('GET', '/servers?name=1234', pos=0)
@ -1722,84 +1713,6 @@ class ShellTest(utils.TestCase):
self.assert_called('DELETE', '/servers/uuid1/metadata/key1', pos=1)
self.assert_called('DELETE', '/servers/uuid2/metadata/key1', pos=2)
def test_dns_create(self):
self.run_command('dns-create 192.168.1.1 testname testdomain')
self.assert_called('PUT',
'/os-floating-ip-dns/testdomain/entries/testname')
self.run_command('dns-create 192.168.1.1 testname testdomain --type A')
self.assert_called('PUT',
'/os-floating-ip-dns/testdomain/entries/testname')
def test_dns_create_public_domain(self):
self.run_command('dns-create-public-domain testdomain '
'--project test_project')
self.assert_called('PUT', '/os-floating-ip-dns/testdomain')
def test_dns_create_private_domain(self):
self.run_command('dns-create-private-domain testdomain '
'--availability-zone av_zone')
self.assert_called('PUT', '/os-floating-ip-dns/testdomain')
def test_dns_delete(self):
self.run_command('dns-delete testdomain testname')
self.assert_called('DELETE',
'/os-floating-ip-dns/testdomain/entries/testname')
def test_dns_delete_domain(self):
self.run_command('dns-delete-domain testdomain')
self.assert_called('DELETE', '/os-floating-ip-dns/testdomain')
def test_dns_list(self):
self.run_command('dns-list testdomain --ip 192.168.1.1')
self.assert_called('GET',
'/os-floating-ip-dns/testdomain/entries?'
'ip=192.168.1.1')
self.run_command('dns-list testdomain --name testname')
self.assert_called('GET',
'/os-floating-ip-dns/testdomain/entries/testname')
def test_dns_domains(self):
self.run_command('dns-domains')
self.assert_called('GET', '/os-floating-ip-dns')
def test_floating_ip_list(self):
self.run_command('floating-ip-list')
self.assert_called('GET', '/os-floating-ips')
def test_floating_ip_create(self):
self.run_command('floating-ip-create')
self.assert_called('GET', '/os-floating-ips/1')
def test_floating_ip_delete(self):
self.run_command('floating-ip-delete 11.0.0.1')
self.assert_called('DELETE', '/os-floating-ips/1')
def test_floating_ip_bulk_list(self):
self.run_command('floating-ip-bulk-list')
self.assert_called('GET', '/os-floating-ips-bulk')
def test_floating_ip_bulk_create(self):
self.run_command('floating-ip-bulk-create 10.0.0.1/24')
self.assert_called('POST', '/os-floating-ips-bulk',
{'floating_ips_bulk_create':
{'ip_range': '10.0.0.1/24'}})
def test_floating_ip_bulk_create_host_and_interface(self):
self.run_command('floating-ip-bulk-create 10.0.0.1/24 --pool testPool'
' --interface ethX')
self.assert_called('POST', '/os-floating-ips-bulk',
{'floating_ips_bulk_create':
{'ip_range': '10.0.0.1/24',
'pool': 'testPool',
'interface': 'ethX'}})
def test_floating_ip_bulk_delete(self):
self.run_command('floating-ip-bulk-delete 10.0.0.1/24')
self.assert_called('PUT', '/os-floating-ips-bulk/delete',
{'ip_range': '10.0.0.1/24'})
def test_server_floating_ip_associate(self):
self.run_command('floating-ip-associate sample-server 11.0.0.1')
self.assert_called('POST', '/servers/1234/action',
@ -2324,20 +2237,6 @@ class ShellTest(utils.TestCase):
self.run_command('service-delete 1')
self.assert_called('DELETE', '/os-services/1')
def test_fixed_ips_get(self):
self.run_command('fixed-ip-get 192.168.1.1')
self.assert_called('GET', '/os-fixed-ips/192.168.1.1')
def test_fixed_ips_reserve(self):
self.run_command('fixed-ip-reserve 192.168.1.1')
body = {'reserve': None}
self.assert_called('POST', '/os-fixed-ips/192.168.1.1/action', body)
def test_fixed_ips_unreserve(self):
self.run_command('fixed-ip-unreserve 192.168.1.1')
body = {'unreserve': None}
self.assert_called('POST', '/os-fixed-ips/192.168.1.1/action', body)
def test_host_list(self):
self.run_command('host-list')
self.assert_called('GET', '/os-hosts')
@ -2631,34 +2530,6 @@ class ShellTest(utils.TestCase):
'PUT', '/os-quota-class-sets/97f4c221bff44578b0300df4ef119353',
body)
def test_network_list(self):
self.run_command('network-list')
self.assert_called('GET', '/os-networks')
def test_network_list_fields(self):
output, _err = self.run_command(
'network-list --fields '
'vlan,project_id')
self.assert_called('GET', '/os-networks')
self.assertIn('1234', output)
self.assertIn('4ffc664c198e435e9853f2538fbcd7a7', output)
def test_network_list_invalid_fields(self):
self.assertRaises(exceptions.CommandError,
self.run_command,
'network-list --fields vlan,project_id,invalid')
def test_network_list_redundant_fields(self):
output, _err = self.run_command(
'network-list --fields label,project_id,project_id')
header = output.splitlines()[1]
self.assertEqual(1, header.count('Label'))
self.assertEqual(1, header.count('Project Id'))
def test_network_show(self):
self.run_command('network-show 1')
self.assert_called('GET', '/os-networks')
def test_cloudpipe_list(self):
self.run_command('cloudpipe-list')
self.assert_called('GET', '/os-cloudpipe')
@ -2674,115 +2545,6 @@ class ShellTest(utils.TestCase):
'vpn_port': '1234'}}
self.assert_called('PUT', '/os-cloudpipe/configure-project', body)
def test_network_associate_host(self):
self.run_command('network-associate-host 1 testHost')
body = {'associate_host': 'testHost'}
self.assert_called('POST', '/os-networks/1/action', body)
def test_network_associate_project(self):
self.run_command('network-associate-project 1')
body = {'id': "1"}
self.assert_called('POST', '/os-networks/add', body)
def test_network_disassociate_host(self):
self.run_command('network-disassociate --host-only 1 2')
body = {'disassociate_host': None}
self.assert_called('POST', '/os-networks/2/action', body)
def test_network_disassociate_project(self):
self.run_command('network-disassociate --project-only 1 2')
body = {'disassociate_project': None}
self.assert_called('POST', '/os-networks/2/action', body)
def test_network_create_v4(self):
self.run_command('network-create --fixed-range-v4 10.0.1.0/24'
' --dns1 10.0.1.254 new_network')
body = {'network': {'cidr': '10.0.1.0/24', 'label': 'new_network',
'dns1': '10.0.1.254'}}
self.assert_called('POST', '/os-networks', body)
def test_network_create_v6(self):
self.run_command('network-create --fixed-range-v6 2001::/64'
' new_network')
body = {'network': {'cidr_v6': '2001::/64', 'label': 'new_network'}}
self.assert_called('POST', '/os-networks', body)
def test_network_create_invalid(self):
cmd = 'network-create 10.0.1.0'
self.assertRaises(exceptions.CommandError, self.run_command, cmd)
def test_network_create_multi_host(self):
self.run_command('network-create --fixed-range-v4 192.168.0.0/24'
' --multi-host=T new_network')
body = {'network': {'cidr': '192.168.0.0/24', 'label': 'new_network',
'multi_host': True}}
self.assert_called('POST', '/os-networks', body)
self.run_command('network-create --fixed-range-v4 192.168.0.0/24'
' --multi-host=True new_network')
body = {'network': {'cidr': '192.168.0.0/24', 'label': 'new_network',
'multi_host': True}}
self.assert_called('POST', '/os-networks', body)
self.run_command('network-create --fixed-range-v4 192.168.0.0/24'
' --multi-host=1 new_network')
body = {'network': {'cidr': '192.168.0.0/24', 'label': 'new_network',
'multi_host': True}}
self.assert_called('POST', '/os-networks', body)
self.run_command('network-create --fixed-range-v4 192.168.1.0/24'
' --multi-host=F new_network')
body = {'network': {'cidr': '192.168.1.0/24', 'label': 'new_network',
'multi_host': False}}
self.assert_called('POST', '/os-networks', body)
def test_network_create_vlan(self):
self.run_command('network-create --fixed-range-v4 192.168.0.0/24'
' --vlan=200 new_network')
body = {'network': {'cidr': '192.168.0.0/24', 'label': 'new_network',
'vlan': 200}}
self.assert_called('POST', '/os-networks', body)
def test_network_create_vlan_start(self):
self.run_command('network-create --fixed-range-v4 192.168.0.0/24'
' --vlan-start=100 new_network')
body = {'network': {'cidr': '192.168.0.0/24', 'label': 'new_network',
'vlan_start': 100}}
self.assert_called('POST', '/os-networks', body)
def test_network_create_extra_args(self):
self.run_command('network-create --fixed-range-v4 192.168.0.0/24'
' --enable-dhcp F --dhcp-server 192.168.0.2'
' --share-address T --allowed-start 192.168.0.10'
' --allowed-end 192.168.0.20 --mtu 9000 new_network')
body = {'network': {'cidr': '192.168.0.0/24', 'label': 'new_network',
'enable_dhcp': False, 'dhcp_server': '192.168.0.2',
'share_address': True, 'mtu': 9000,
'allowed_start': '192.168.0.10',
'allowed_end': '192.168.0.20'}}
self.assert_called('POST', '/os-networks', body)
def test_network_delete(self):
self.run_command('network-delete 1')
self.assert_called('DELETE', '/os-networks/1')
def test_tenant_network_list(self):
self.run_command('tenant-network-list')
self.assert_called('GET', '/os-tenant-networks')
def test_tenant_network_show(self):
self.run_command('tenant-network-show 1')
self.assert_called('GET', '/os-tenant-networks/1')
def test_tenant_network_create(self):
self.run_command('tenant-network-create new_network 10.0.1.0/24')
body = {'network': {'cidr': '10.0.1.0/24', 'label': 'new_network'}}
self.assert_called('POST', '/os-tenant-networks', body)
def test_tenant_network_delete(self):
self.run_command('tenant-network-delete 1')
self.assert_called('DELETE', '/os-tenant-networks/1')
def test_add_fixed_ip(self):
self.run_command('add-fixed-ip sample-server 1')
self.assert_called('POST', '/servers/1234/action',
@ -2879,82 +2641,6 @@ class ShellTest(utils.TestCase):
self.run_command('availability-zone-list')
self.assert_called('GET', '/os-availability-zone/detail')
def test_security_group_create(self):
self.run_command('secgroup-create test FAKE_SECURITY_GROUP')
self.assert_called('POST', '/os-security-groups',
{'security_group':
{'name': 'test',
'description': 'FAKE_SECURITY_GROUP'}})
def test_security_group_update(self):
self.run_command('secgroup-update test te FAKE_SECURITY_GROUP')
self.assert_called('PUT', '/os-security-groups/1',
{'security_group':
{'name': 'te',
'description': 'FAKE_SECURITY_GROUP'}})
def test_security_group_list(self):
self.run_command('secgroup-list')
self.assert_called('GET', '/os-security-groups')
def test_security_group_add_rule(self):
self.run_command('secgroup-add-rule test tcp 22 22 10.0.0.0/8')
self.assert_called('POST', '/os-security-group-rules',
{'security_group_rule':
{'from_port': 22,
'ip_protocol': 'tcp',
'to_port': 22,
'parent_group_id': 1,
'cidr': '10.0.0.0/8',
'group_id': None}})
def test_security_group_delete_rule(self):
self.run_command('secgroup-delete-rule test TCP 22 22 10.0.0.0/8')
self.assert_called('DELETE', '/os-security-group-rules/11')
def test_security_group_delete_rule_protocol_case(self):
self.run_command('secgroup-delete-rule test tcp 22 22 10.0.0.0/8')
self.assert_called('DELETE', '/os-security-group-rules/11')
def test_security_group_add_group_rule(self):
self.run_command('secgroup-add-group-rule test test2 tcp 22 22')
self.assert_called('POST', '/os-security-group-rules',
{'security_group_rule':
{'from_port': 22,
'ip_protocol': 'TCP',
'to_port': 22,
'parent_group_id': 1,
'cidr': None,
'group_id': 2}})
def test_security_group_delete_valid_group_rule(self):
self.run_command('secgroup-delete-group-rule test test2 TCP 222 222')
self.assert_called('DELETE', '/os-security-group-rules/12')
def test_security_group_delete_valid_group_rule_protocol_case(self):
self.run_command('secgroup-delete-group-rule test test2 tcp 222 222')
self.assert_called('DELETE', '/os-security-group-rules/12')
def test_security_group_delete_invalid_group_rule(self):
self.run_command('secgroup-delete-group-rule test test4 TCP -1 -1')
self.assert_called('DELETE', '/os-security-group-rules/14')
def test_security_group_delete_invalid_group_rule_protocol_case(self):
self.run_command('secgroup-delete-group-rule test test4 tcp -1 -1')
self.assert_called('DELETE', '/os-security-group-rules/14')
def test_security_group_list_rules(self):
self.run_command('secgroup-list-rules test')
self.assert_called('GET', '/os-security-groups')
def test_security_group_list_all_tenants(self):
self.run_command('secgroup-list --all-tenants 1')
self.assert_called('GET', '/os-security-groups?all_tenants=1')
def test_security_group_delete(self):
self.run_command('secgroup-delete test')
self.assert_called('DELETE', '/os-security-groups/1')
def test_server_security_group_add(self):
self.run_command('add-secgroup sample-server testgroup')
self.assert_called('POST', '/servers/1234/action',
@ -3235,6 +2921,7 @@ class ShellTest(utils.TestCase):
exclusions = set([
1, # Same as version 2.0
3, # doesn't require any changes in novaclient
4, # fixed-ip-get command is gone
5, # doesn't require any changes in novaclient
7, # doesn't require any changes in novaclient
9, # doesn't require any changes in novaclient
@ -3339,50 +3026,6 @@ class ShellTest(utils.TestCase):
self.assert_called('GET', '/servers/detail?not-tags-any=tag1%2Ctag2')
class GetSecgroupTest(utils.TestCase):
def test_with_integer(self):
cs = mock.Mock(**{
'security_groups.get.return_value': 'sec_group',
'security_groups.list.return_value': [],
})
result = novaclient.v2.shell._get_secgroup(cs, '1')
self.assertEqual('sec_group', result)
cs.security_groups.get.assert_called_once_with('1')
def test_with_uuid(self):
cs = mock.Mock(**{
'security_groups.get.return_value': 'sec_group',
'security_groups.list.return_value': [],
})
result = novaclient.v2.shell._get_secgroup(
cs, 'c0c32459-dc5f-44dc-9a0a-473b28bac831')
self.assertEqual('sec_group', result)
cs.security_groups.get.assert_called_once_with(
'c0c32459-dc5f-44dc-9a0a-473b28bac831')
def test_with_an_nonexisting_name(self):
cs = mock.Mock(**{
'security_groups.get.return_value': 'sec_group',
'security_groups.list.return_value': [],
})
self.assertRaises(exceptions.CommandError,
novaclient.v2.shell._get_secgroup,
cs,
'abc')
def test_with_non_unique_name(self):
group_one = mock.MagicMock()
group_one.name = 'group_one'
cs = mock.Mock(**{
'security_groups.get.return_value': 'sec_group',
'security_groups.list.return_value': [group_one, group_one],
})
self.assertRaises(exceptions.NoUniqueMatch,
novaclient.v2.shell._get_secgroup,
cs,
'group_one')
class PollForStatusTestCase(utils.TestCase):
@mock.patch("novaclient.v2.shell.time")
def test_simple_usage(self, mock_time):
@ -3468,39 +3111,3 @@ class PollForStatusTestCase(utils.TestCase):
action=action,
show_progress=True,
silent=False)
class ShellNetworkUtilTest(utils.TestCase):
def test_deprecated_network_newer(self):
@novaclient.v2.shell.deprecated_network
def tester(cs):
'foo'
self.assertEqual(api_versions.APIVersion('2.35'),
cs.api_version)
cs = mock.MagicMock()
cs.api_version = api_versions.APIVersion('2.9999')
tester(cs)
self.assertEqual('DEPRECATED: foo', tester.__doc__)
def test_deprecated_network_older(self):
@novaclient.v2.shell.deprecated_network
def tester(cs):
'foo'
# since we didn't need to adjust the api_version the mock won't
# have cs.client.api_version set on it
self.assertFalse(hasattr(cs, 'client'))
# we have to set the attribute back on cs so the decorator can
# set the value on it when we return from this wrapped function
setattr(cs, 'client', mock.MagicMock())
cs = mock.MagicMock()
cs.api_version = api_versions.APIVersion('2.1')
# we have to delete the cs.client attribute so hasattr won't return a
# false positive in the wrapped function
del cs.client
tester(cs)
self.assertEqual('DEPRECATED: foo', tester.__doc__)
# the deprecated_network decorator will set cs.client.api_version
# after calling the wrapped function
self.assertEqual(cs.api_version, cs.api_version)

View File

@ -14,9 +14,6 @@
from novaclient import api_versions
from novaclient import base
from novaclient.i18n import _
from novaclient import utils
from novaclient.v2 import shell
class TenantNetwork(base.Resource):
@ -59,86 +56,3 @@ class TenantNetworkManager(base.ManagerWithFind):
"""DEPRECATED"""
body = {'network': {'label': label, 'cidr': cidr}}
return self._create('/os-tenant-networks', body, 'network')
@utils.arg('network_id', metavar='<network_id>', help='ID of network')
def do_net(cs, args):
"""
DEPRECATED, use tenant-network-show instead.
"""
do_tenant_network_show(cs, args)
@utils.arg('network_id', metavar='<network_id>', help='ID of network')
@shell.deprecated_network
def do_tenant_network_show(cs, args):
"""
Show a tenant network.
"""
network = cs.tenant_networks.get(args.network_id)
utils.print_dict(network._info)
def do_net_list(cs, args):
"""
DEPRECATED, use tenant-network-list instead.
"""
do_tenant_network_list(cs, args)
@shell.deprecated_network
def do_tenant_network_list(cs, args):
"""
List tenant networks.
"""
networks = cs.tenant_networks.list()
utils.print_list(networks, ['ID', 'Label', 'CIDR'])
@utils.arg(
'label',
metavar='<network_label>',
help=_('Network label (ex. my_new_network)'))
@utils.arg(
'cidr',
metavar='<cidr>',
help=_('IP block to allocate from (ex. 172.16.0.0/24 or 2001:DB8::/64)'))
def do_net_create(cs, args):
"""
DEPRECATED, use tenant-network-create instead.
"""
do_tenant_network_create(cs, args)
@utils.arg(
'label',
metavar='<network_label>',
help=_('Network label (ex. my_new_network)'))
@utils.arg(
'cidr',
metavar='<cidr>',
help=_('IP block to allocate from (ex. 172.16.0.0/24 or 2001:DB8::/64)'))
@shell.deprecated_network
def do_tenant_network_create(cs, args):
"""
Create a tenant network.
"""
network = cs.tenant_networks.create(args.label, args.cidr)
utils.print_dict(network._info)
@utils.arg('network_id', metavar='<network_id>', help='ID of network')
def do_net_delete(cs, args):
"""
DEPRECATED, use tenant-network-delete instead.
"""
do_tenant_network_delete(cs, args)
@utils.arg('network_id', metavar='<network_id>', help='ID of network')
@shell.deprecated_network
def do_tenant_network_delete(cs, args):
"""
Delete a tenant network.
"""
cs.tenant_networks.delete(args.network_id)

View File

@ -21,20 +21,16 @@ from __future__ import print_function
import argparse
import collections
import datetime
import functools
import getpass
import locale
import logging
import os
import pprint
import sys
import time
from oslo_utils import encodeutils
from oslo_utils import netutils
from oslo_utils import strutils
from oslo_utils import timeutils
from oslo_utils import uuidutils
import six
import novaclient
@ -68,34 +64,6 @@ CLIENT_BDM2_KEYS = {
'tag': 'tag',
}
msg_deprecate_net = ('WARNING: Command %s is deprecated and will be removed '
'after Nova 15.0.0 is released. Use python-neutronclient '
'or openstackclient instead.')
def deprecated_proxy(fn, msg_format):
@functools.wraps(fn)
def wrapped(cs, *args, **kwargs):
command_name = '-'.join(fn.__name__.split('_')[1:])
print(msg_format % command_name, file=sys.stderr)
# The network or image proxy API methods were deprecated in 2.36 and
# will return a 404 so we fallback to 2.35 to maintain a transition
# for CLI users.
want_version = api_versions.APIVersion('2.35')
cur_version = cs.api_version
if cs.api_version > want_version:
cs.api_version = want_version
try:
return fn(cs, *args, **kwargs)
finally:
cs.api_version = cur_version
wrapped.__doc__ = 'DEPRECATED: ' + fn.__doc__
return wrapped
deprecated_network = functools.partial(deprecated_proxy,
msg_format=msg_deprecate_net)
def _key_value_pairing(text):
try:
@ -1088,267 +1056,6 @@ def do_flavor_access_remove(cs, args):
utils.print_list(access_list, columns)
@utils.arg(
'project_id', metavar='<project_id>',
help=_('The ID of the project.'))
@deprecated_network
def do_scrub(cs, args):
"""Delete networks and security groups associated with a project."""
networks_list = cs.networks.list()
networks_list = [network for network in networks_list
if getattr(network, 'project_id', '') == args.project_id]
search_opts = {'all_tenants': 1}
groups = cs.security_groups.list(search_opts)
groups = [group for group in groups
if group.tenant_id == args.project_id]
for network in networks_list:
cs.networks.disassociate(network)
for group in groups:
cs.security_groups.delete(group)
@utils.arg(
'--fields',
default=None,
metavar='<fields>',
help=_('Comma-separated list of fields to display. '
'Use the show command to see which fields are available.'))
@deprecated_network
def do_network_list(cs, args):
"""Print a list of available networks."""
network_list = cs.networks.list()
columns = ['ID', 'Label', 'Cidr']
columns += _get_list_table_columns_and_formatters(
args.fields, network_list,
exclude_fields=(c.lower() for c in columns))[0]
utils.print_list(network_list, columns)
@utils.arg(
'network',
metavar='<network>',
help=_("UUID or label of network."))
@deprecated_network
def do_network_show(cs, args):
"""Show details about the given network."""
network = utils.find_resource(cs.networks, args.network)
utils.print_dict(network.to_dict())
@utils.arg(
'network',
metavar='<network>',
help=_("UUID or label of network."))
@deprecated_network
def do_network_delete(cs, args):
"""Delete network by label or id."""
network = utils.find_resource(cs.networks, args.network)
network.delete()
@utils.arg(
'--host-only',
dest='host_only',
metavar='<0|1>',
nargs='?',
type=int,
const=1,
default=0)
@utils.arg(
'--project-only',
dest='project_only',
metavar='<0|1>',
nargs='?',
type=int,
const=1,
default=0)
@utils.arg(
'network',
metavar='<network>',
help=_("UUID of network."))
@deprecated_network
def do_network_disassociate(cs, args):
"""Disassociate host and/or project from the given network."""
if args.host_only:
cs.networks.disassociate(args.network, True, False)
elif args.project_only:
cs.networks.disassociate(args.network, False, True)
else:
cs.networks.disassociate(args.network, True, True)
@utils.arg(
'network',
metavar='<network>',
help=_("UUID of network."))
@utils.arg(
'host',
metavar='<host>',
help=_("Name of host"))
@deprecated_network
def do_network_associate_host(cs, args):
"""Associate host with network."""
cs.networks.associate_host(args.network, args.host)
@utils.arg(
'network',
metavar='<network>',
help=_("UUID of network."))
@deprecated_network
def do_network_associate_project(cs, args):
"""Associate project with network."""
cs.networks.associate_project(args.network)
def _filter_network_create_options(args):
valid_args = ['label', 'cidr', 'vlan_start', 'vpn_start', 'cidr_v6',
'gateway', 'gateway_v6', 'bridge', 'bridge_interface',
'multi_host', 'dns1', 'dns2', 'uuid', 'fixed_cidr',
'project_id', 'priority', 'vlan', 'mtu', 'dhcp_server',
'allowed_start', 'allowed_end']
kwargs = {}
for k, v in args.__dict__.items():
if k in valid_args and v is not None:
kwargs[k] = v
return kwargs
@utils.arg(
'label',
metavar='<network_label>',
help=_("Label for network"))
@utils.arg(
'--fixed-range-v4',
dest='cidr',
metavar='<x.x.x.x/yy>',
help=_("IPv4 subnet (ex: 10.0.0.0/8)"))
@utils.arg(
'--fixed-range-v6',
dest="cidr_v6",
help=_('IPv6 subnet (ex: fe80::/64'))
@utils.arg(
'--vlan',
dest='vlan',
type=int,
metavar='<vlan id>',
help=_("The vlan ID to be assigned to the project."))
@utils.arg(
'--vlan-start',
dest='vlan_start',
type=int,
metavar='<vlan start>',
help=_('First vlan ID to be assigned to the project. Subsequent vlan '
'IDs will be assigned incrementally.'))
@utils.arg(
'--vpn',
dest='vpn_start',
type=int,
metavar='<vpn start>',
help=_("vpn start"))
@utils.arg(
'--gateway',
dest="gateway",
help=_('gateway'))
@utils.arg(
'--gateway-v6',
dest="gateway_v6",
help=_('IPv6 gateway'))
@utils.arg(
'--bridge',
dest="bridge",
metavar='<bridge>',
help=_('VIFs on this network are connected to this bridge.'))
@utils.arg(
'--bridge-interface',
dest="bridge_interface",
metavar='<bridge interface>',
help=_('The bridge is connected to this interface.'))
@utils.arg(
'--multi-host',
dest="multi_host",
metavar="<'T'|'F'>",
help=_('Multi host'))
@utils.arg(
'--dns1',
dest="dns1",
metavar="<DNS Address>", help=_('First DNS.'))
@utils.arg(
'--dns2',
dest="dns2",
metavar="<DNS Address>",
help=_('Second DNS.'))
@utils.arg(
'--uuid',
dest="uuid",
metavar="<network uuid>",
help=_('Network UUID.'))
@utils.arg(
'--fixed-cidr',
dest="fixed_cidr",
metavar='<x.x.x.x/yy>',
help=_('IPv4 subnet for fixed IPs (ex: 10.20.0.0/16).'))
@utils.arg(
'--project-id',
dest="project_id",
metavar="<project id>",
help=_('Project ID.'))
@utils.arg(
'--priority',
dest="priority",
metavar="<number>",
help=_('Network interface priority.'))
@utils.arg(
'--mtu',
dest="mtu",
type=int,
help=_('MTU for network.'))
@utils.arg(
'--enable-dhcp',
dest="enable_dhcp",
metavar="<'T'|'F'>",
help=_('Enable DHCP.'))
@utils.arg(
'--dhcp-server',
dest="dhcp_server",
help=_('DHCP-server address (defaults to gateway address)'))
@utils.arg(
'--share-address',
dest="share_address",
metavar="<'T'|'F'>",
help=_('Share address'))
@utils.arg(
'--allowed-start',
dest="allowed_start",
help=_('Start of allowed addresses for instances.'))
@utils.arg(
'--allowed-end',
dest="allowed_end",
help=_('End of allowed addresses for instances.'))
@deprecated_network
def do_network_create(cs, args):
"""Create a network."""
if not (args.cidr or args.cidr_v6):
raise exceptions.CommandError(
_("Must specify either fixed_range_v4 or fixed_range_v6"))
kwargs = _filter_network_create_options(args)
if args.multi_host is not None:
kwargs['multi_host'] = bool(args.multi_host == 'T' or
strutils.bool_from_string(args.multi_host))
if args.enable_dhcp is not None:
kwargs['enable_dhcp'] = bool(
args.enable_dhcp == 'T' or
strutils.bool_from_string(args.enable_dhcp))
if args.share_address is not None:
kwargs['share_address'] = bool(
args.share_address == 'T' or
strutils.bool_from_string(args.share_address))
cs.networks.create(**kwargs)
def _extract_metadata(args):
metadata = {}
for metadatum in args.metadata[0]:
@ -2675,440 +2382,10 @@ def do_list_secgroup(cs, args):
_print_secgroups(groups)
@utils.arg(
'pool',
metavar='<floating-ip-pool>',
help=_('Name of Floating IP Pool. (Optional)'),
nargs='?',
default=None)
@deprecated_network
def do_floating_ip_create(cs, args):
"""Allocate a floating IP for the current tenant."""
_print_floating_ip_list([cs.floating_ips.create(pool=args.pool)])
@utils.arg('address', metavar='<address>', help=_('IP of Floating IP.'))
@deprecated_network
def do_floating_ip_delete(cs, args):
"""De-allocate a floating IP."""
floating_ips = cs.floating_ips.list()
for floating_ip in floating_ips:
if floating_ip.ip == args.address:
return cs.floating_ips.delete(floating_ip.id)
raise exceptions.CommandError(_("Floating IP %s not found.") %
args.address)
@deprecated_network
def do_floating_ip_list(cs, _args):
"""List floating IPs."""
_print_floating_ip_list(cs.floating_ips.list())
@deprecated_network
def do_floating_ip_pool_list(cs, _args):
"""List all floating IP pools."""
utils.print_list(cs.floating_ip_pools.list(), ['name'])
@utils.arg(
'--host', dest='host', metavar='<host>', default=None,
help=_('Filter by host.'))
@deprecated_network
def do_floating_ip_bulk_list(cs, args):
"""List all floating IPs (nova-network only)."""
utils.print_list(cs.floating_ips_bulk.list(args.host), ['project_id',
'address',
'instance_uuid',
'pool',
'interface'])
@utils.arg('ip_range', metavar='<range>',
help=_('Address range to create.'))
@utils.arg(
'--pool', dest='pool', metavar='<pool>', default=None,
help=_('Pool for new Floating IPs.'))
@utils.arg(
'--interface', metavar='<interface>', default=None,
help=_('Interface for new Floating IPs.'))
@deprecated_network
def do_floating_ip_bulk_create(cs, args):
"""Bulk create floating IPs by range (nova-network only)."""
cs.floating_ips_bulk.create(args.ip_range, args.pool, args.interface)
@utils.arg('ip_range', metavar='<range>',
help=_('Address range to delete.'))
@deprecated_network
def do_floating_ip_bulk_delete(cs, args):
"""Bulk delete floating IPs by range (nova-network only)."""
cs.floating_ips_bulk.delete(args.ip_range)
def _print_dns_list(dns_entries):
utils.print_list(dns_entries, ['ip', 'name', 'domain'])
def _print_domain_list(domain_entries):
utils.print_list(domain_entries, ['domain', 'scope',
'project', 'availability_zone'])
@deprecated_network
def do_dns_domains(cs, args):
"""Print a list of available dns domains."""
domains = cs.dns_domains.domains()
_print_domain_list(domains)
@utils.arg('domain', metavar='<domain>', help=_('DNS domain.'))
@utils.arg('--ip', metavar='<ip>', help=_('IP address.'), default=None)
@utils.arg('--name', metavar='<name>', help=_('DNS name.'), default=None)
@deprecated_network
def do_dns_list(cs, args):
"""List current DNS entries for domain and IP or domain and name."""
if not (args.ip or args.name):
raise exceptions.CommandError(
_("You must specify either --ip or --name"))
if args.name:
entry = cs.dns_entries.get(args.domain, args.name)
_print_dns_list([entry])
else:
entries = cs.dns_entries.get_for_ip(args.domain,
ip=args.ip)
_print_dns_list(entries)
@utils.arg('ip', metavar='<ip>', help=_('IP address.'))
@utils.arg('name', metavar='<name>', help=_('DNS name.'))
@utils.arg('domain', metavar='<domain>', help=_('DNS domain.'))
@utils.arg(
'--type',
metavar='<type>',
help=_('DNS type (e.g. "A")'),
default='A')
@deprecated_network
def do_dns_create(cs, args):
"""Create a DNS entry for domain, name, and IP."""
cs.dns_entries.create(args.domain, args.name, args.ip, args.type)
@utils.arg('domain', metavar='<domain>', help=_('DNS domain.'))
@utils.arg('name', metavar='<name>', help=_('DNS name.'))
@deprecated_network
def do_dns_delete(cs, args):
"""Delete the specified DNS entry."""
cs.dns_entries.delete(args.domain, args.name)
@utils.arg('domain', metavar='<domain>', help=_('DNS domain.'))
@deprecated_network
def do_dns_delete_domain(cs, args):
"""Delete the specified DNS domain."""
cs.dns_domains.delete(args.domain)
@utils.arg('domain', metavar='<domain>', help=_('DNS domain.'))
@utils.arg(
'--availability-zone',
metavar='<availability-zone>',
default=None,
help=_('Limit access to this domain to servers '
'in the specified availability zone.'))
@deprecated_network
def do_dns_create_private_domain(cs, args):
"""Create the specified DNS domain."""
cs.dns_domains.create_private(args.domain,
args.availability_zone)
@utils.arg('domain', metavar='<domain>', help=_('DNS domain.'))
@utils.arg(
'--project', metavar='<project>',
help=_('Limit access to this domain to users '
'of the specified project.'),
default=None)
@deprecated_network
def do_dns_create_public_domain(cs, args):
"""Create the specified DNS domain."""
cs.dns_domains.create_public(args.domain,
args.project)
def _print_secgroup_rules(rules, show_source_group=True):
class FormattedRule(object):
def __init__(self, obj):
items = (obj if isinstance(obj, dict) else obj.to_dict()).items()
for k, v in items:
if k == 'ip_range':
v = v.get('cidr')
elif k == 'group':
k = 'source_group'
v = v.get('name')
if v is None:
v = ''
setattr(self, k, v)
rules = [FormattedRule(rule) for rule in rules]
headers = ['IP Protocol', 'From Port', 'To Port', 'IP Range']
if show_source_group:
headers.append('Source Group')
utils.print_list(rules, headers)
def _print_secgroups(secgroups):
utils.print_list(secgroups, ['Id', 'Name', 'Description'])
def _get_secgroup(cs, secgroup):
# Check secgroup is an ID (nova-network) or UUID (neutron)
if (utils.is_integer_like(encodeutils.safe_encode(secgroup)) or
uuidutils.is_uuid_like(secgroup)):
try:
return cs.security_groups.get(secgroup)
except exceptions.NotFound:
pass
# Check secgroup as a name
match_found = False
for s in cs.security_groups.list():
encoding = (
locale.getpreferredencoding() or sys.stdin.encoding or 'UTF-8')
if not six.PY3:
s.name = s.name.encode(encoding)
if secgroup == s.name:
if match_found is not False:
msg = (_("Multiple security group matches found for name '%s'"
", use an ID to be more specific.") % secgroup)
raise exceptions.NoUniqueMatch(msg)
match_found = s
if match_found is False:
raise exceptions.CommandError(_("Secgroup ID or name '%s' not found.")
% secgroup)
return match_found
@utils.arg(
'secgroup',
metavar='<secgroup>',
help=_('ID or name of security group.'))
@utils.arg(
'ip_proto',
metavar='<ip-proto>',
help=_('IP protocol (icmp, tcp, udp).'))
@utils.arg(
'from_port',
metavar='<from-port>',
help=_('Port at start of range.'))
@utils.arg(
'to_port',
metavar='<to-port>',
help=_('Port at end of range.'))
@utils.arg('cidr', metavar='<cidr>', help=_('CIDR for address range.'))
@deprecated_network
def do_secgroup_add_rule(cs, args):
"""Add a rule to a security group."""
secgroup = _get_secgroup(cs, args.secgroup)
rule = cs.security_group_rules.create(secgroup.id,
args.ip_proto,
args.from_port,
args.to_port,
args.cidr)
_print_secgroup_rules([rule])
@utils.arg(
'secgroup',
metavar='<secgroup>',
help=_('ID or name of security group.'))
@utils.arg(
'ip_proto',
metavar='<ip-proto>',
help=_('IP protocol (icmp, tcp, udp).'))
@utils.arg(
'from_port',
metavar='<from-port>',
help=_('Port at start of range.'))
@utils.arg(
'to_port',
metavar='<to-port>',
help=_('Port at end of range.'))
@utils.arg('cidr', metavar='<cidr>', help=_('CIDR for address range.'))
@deprecated_network
def do_secgroup_delete_rule(cs, args):
"""Delete a rule from a security group."""
secgroup = _get_secgroup(cs, args.secgroup)
for rule in secgroup.rules:
if (rule['ip_protocol'] and
rule['ip_protocol'].upper() == args.ip_proto.upper() and
rule['from_port'] == int(args.from_port) and
rule['to_port'] == int(args.to_port) and
rule['ip_range']['cidr'] == args.cidr):
_print_secgroup_rules([rule])
return cs.security_group_rules.delete(rule['id'])
raise exceptions.CommandError(_("Rule not found"))
@utils.arg('name', metavar='<name>', help=_('Name of security group.'))
@utils.arg(
'description', metavar='<description>',
help=_('Description of security group.'))
@deprecated_network
def do_secgroup_create(cs, args):
"""Create a security group."""
secgroup = cs.security_groups.create(args.name, args.description)
_print_secgroups([secgroup])
@utils.arg(
'secgroup',
metavar='<secgroup>',
help=_('ID or name of security group.'))
@utils.arg('name', metavar='<name>', help=_('Name of security group.'))
@utils.arg(
'description', metavar='<description>',
help=_('Description of security group.'))
@deprecated_network
def do_secgroup_update(cs, args):
"""Update a security group."""
sg = _get_secgroup(cs, args.secgroup)
secgroup = cs.security_groups.update(sg, args.name, args.description)
_print_secgroups([secgroup])
@utils.arg(
'secgroup',
metavar='<secgroup>',
help=_('ID or name of security group.'))
@deprecated_network
def do_secgroup_delete(cs, args):
"""Delete a security group."""
secgroup = _get_secgroup(cs, args.secgroup)
cs.security_groups.delete(secgroup)
_print_secgroups([secgroup])
@utils.arg(
'--all-tenants',
dest='all_tenants',
metavar='<0|1>',
nargs='?',
type=int,
const=1,
default=int(strutils.bool_from_string(
os.environ.get("ALL_TENANTS", 'false'), True)),
help=_('Display information from all tenants (Admin only).'))
@deprecated_network
def do_secgroup_list(cs, args):
"""List security groups for the current tenant."""
search_opts = {'all_tenants': args.all_tenants}
columns = ['Id', 'Name', 'Description']
if args.all_tenants:
columns.append('Tenant_ID')
groups = cs.security_groups.list(search_opts=search_opts)
utils.print_list(groups, columns)
@utils.arg(
'secgroup',
metavar='<secgroup>',
help=_('ID or name of security group.'))
@deprecated_network
def do_secgroup_list_rules(cs, args):
"""List rules for a security group."""
secgroup = _get_secgroup(cs, args.secgroup)
_print_secgroup_rules(secgroup.rules)
@utils.arg(
'secgroup',
metavar='<secgroup>',
help=_('ID or name of security group.'))
@utils.arg(
'source_group',
metavar='<source-group>',
help=_('ID or name of source group.'))
@utils.arg(
'ip_proto',
metavar='<ip-proto>',
help=_('IP protocol (icmp, tcp, udp).'))
@utils.arg(
'from_port',
metavar='<from-port>',
help=_('Port at start of range.'))
@utils.arg(
'to_port',
metavar='<to-port>',
help=_('Port at end of range.'))
@deprecated_network
def do_secgroup_add_group_rule(cs, args):
"""Add a source group rule to a security group."""
secgroup = _get_secgroup(cs, args.secgroup)
source_group = _get_secgroup(cs, args.source_group)
params = {'group_id': source_group.id}
if args.ip_proto or args.from_port or args.to_port:
if not (args.ip_proto and args.from_port and args.to_port):
raise exceptions.CommandError(_("ip_proto, from_port, and to_port"
" must be specified together"))
params['ip_protocol'] = args.ip_proto.upper()
params['from_port'] = args.from_port
params['to_port'] = args.to_port
rule = cs.security_group_rules.create(secgroup.id, **params)
_print_secgroup_rules([rule])
@utils.arg(
'secgroup',
metavar='<secgroup>',
help=_('ID or name of security group.'))
@utils.arg(
'source_group',
metavar='<source-group>',
help=_('ID or name of source group.'))
@utils.arg(
'ip_proto',
metavar='<ip-proto>',
help=_('IP protocol (icmp, tcp, udp).'))
@utils.arg(
'from_port',
metavar='<from-port>',
help=_('Port at start of range.'))
@utils.arg(
'to_port',
metavar='<to-port>',
help=_('Port at end of range.'))
@deprecated_network
def do_secgroup_delete_group_rule(cs, args):
"""Delete a source group rule from a security group."""
secgroup = _get_secgroup(cs, args.secgroup)
source_group = _get_secgroup(cs, args.source_group)
params = {'group_name': source_group.name}
if args.ip_proto or args.from_port or args.to_port:
if not (args.ip_proto and args.from_port and args.to_port):
raise exceptions.CommandError(_("ip_proto, from_port, and to_port"
" must be specified together"))
params['ip_protocol'] = args.ip_proto.upper()
params['from_port'] = int(args.from_port)
params['to_port'] = int(args.to_port)
for rule in secgroup.rules:
if (rule.get('ip_protocol') and
rule['ip_protocol'].upper() == params.get(
'ip_protocol').upper() and
rule.get('from_port') == params.get('from_port') and
rule.get('to_port') == params.get('to_port') and
rule.get('group', {}).get('name') == params.get('group_name')):
return cs.security_group_rules.delete(rule['id'])
raise exceptions.CommandError(_("Rule not found"))
@api_versions.wraps("2.0", "2.1")
def _keypair_create(cs, args, name, pub_key):
return cs.keypairs.create(name, pub_key)
@ -4030,40 +3307,6 @@ def do_service_delete(cs, args):
cs.services.delete(args.id)
@api_versions.wraps("2.0", "2.3")
def _print_fixed_ip(cs, fixed_ip):
fields = ['address', 'cidr', 'hostname', 'host']
utils.print_list([fixed_ip], fields)
@api_versions.wraps("2.4")
def _print_fixed_ip(cs, fixed_ip):
fields = ['address', 'cidr', 'hostname', 'host', 'reserved']
utils.print_list([fixed_ip], fields)
@utils.arg('fixed_ip', metavar='<fixed_ip>', help=_('Fixed IP Address.'))
@deprecated_network
def do_fixed_ip_get(cs, args):
"""Retrieve info on a fixed IP."""
result = cs.fixed_ips.get(args.fixed_ip)
_print_fixed_ip(cs, result)
@utils.arg('fixed_ip', metavar='<fixed_ip>', help=_('Fixed IP Address.'))
@deprecated_network
def do_fixed_ip_reserve(cs, args):
"""Reserve a fixed IP."""
cs.fixed_ips.reserve(args.fixed_ip)
@utils.arg('fixed_ip', metavar='<fixed_ip>', help=_('Fixed IP Address.'))
@deprecated_network
def do_fixed_ip_unreserve(cs, args):
"""Unreserve a fixed IP."""
cs.fixed_ips.unreserve(args.fixed_ip)
@utils.arg('host', metavar='<hostname>', help=_('Name of host.'))
def do_host_describe(cs, args):
"""Describe a specific host."""
@ -5042,70 +4285,6 @@ def do_server_group_list(cs, args):
_print_server_group_details(cs, server_groups)
@deprecated_network
def do_secgroup_list_default_rules(cs, args):
"""List rules that will be added to the 'default' security group for
new tenants.
"""
_print_secgroup_rules(cs.security_group_default_rules.list(),
show_source_group=False)
@utils.arg(
'ip_proto',
metavar='<ip-proto>',
help=_('IP protocol (icmp, tcp, udp).'))
@utils.arg(
'from_port',
metavar='<from-port>',
help=_('Port at start of range.'))
@utils.arg(
'to_port',
metavar='<to-port>',
help=_('Port at end of range.'))
@utils.arg('cidr', metavar='<cidr>', help=_('CIDR for address range.'))
@deprecated_network
def do_secgroup_add_default_rule(cs, args):
"""Add a rule to the set of rules that will be added to the 'default'
security group for new tenants (nova-network only).
"""
rule = cs.security_group_default_rules.create(args.ip_proto,
args.from_port,
args.to_port,
args.cidr)
_print_secgroup_rules([rule], show_source_group=False)
@utils.arg(
'ip_proto',
metavar='<ip-proto>',
help=_('IP protocol (icmp, tcp, udp).'))
@utils.arg(
'from_port',
metavar='<from-port>',
help=_('Port at start of range.'))
@utils.arg(
'to_port',
metavar='<to-port>',
help=_('Port at end of range.'))
@utils.arg('cidr', metavar='<cidr>', help=_('CIDR for address range.'))
@deprecated_network
def do_secgroup_delete_default_rule(cs, args):
"""Delete a rule from the set of rules that will be added to the
'default' security group for new tenants (nova-network only).
"""
for rule in cs.security_group_default_rules.list():
if (rule.ip_protocol and
rule.ip_protocol.upper() == args.ip_proto.upper() and
rule.from_port == int(args.from_port) and
rule.to_port == int(args.to_port) and
rule.ip_range['cidr'] == args.cidr):
_print_secgroup_rules([rule], show_source_group=False)
return cs.security_group_default_rules.delete(rule.id)
raise exceptions.CommandError(_("Rule not found"))
@utils.arg('name', metavar='<name>', help=_('Server group name.'))
@utils.arg(
'policy',

View File

@ -0,0 +1,53 @@
---
prelude: >
Deprecated network-related resource commands have been removed.
upgrade:
- |
The following deprecated network-related resource commands have been
removed::
* nova dns-create
* nova dns-create-private-domain
* nova dns-create-public-domain
* nova dns-delete
* nova dns-delete-domain
* nova dns-domains
* nova dns-list
* nova fixed-ip-get
* nova fixed-ip-reserve
* nova fixed-ip-unreserve
* nova floating-ip-create
* nova floating-ip-delete
* nova floating-ip-list
* nova floating-ip-bulk-create
* nova floating-ip-bulk-delete
* nova floating-ip-bulk-list
* nova floating-ip-pool-list
* nova net
* nova net-create
* nova net-delete
* nova net-list
* nova network-create
* nova network-delete
* nova network-list
* nova network-show
* nova network-associate-host
* nova-network-associate-project
* nova network-disassociate
* nova scrub
* nova secgroup-create
* nova secgroup-delete
* nova secgroup-list
* nova secgroup-update
* nova secgroup-add-rule
* nova secgroup-delete-rule
* nova secgroup-list-rules
* nova secgroup-add-default-rule
* nova secgroup-delete-default-rule
* nova secgroup-list-default-rules
* nova secgroup-add-group-rule
* nova secgroup-delete-group-rule
* nova tenant-network-create
* nova tenant-network-delete
* nova tenant-network-list
* nova tenant-network-show