Browse Source

Rename v1_1 to v2

Module novaclient.v1_1 is used as implementation of V1.1, V2 and V3.
Since future development(microversioning) will be done across V2,
implementation should be done in appropriate module(to prevent misleading).

Despite the fact that implementation for all versions are equal, discover
method for contrib path worked only for v1.1. This patch fixes this bug and
modifies shell tests to check all versions.

Change-Id: Ib6798f4dfe177586302141f522dc593560ce6a5b
tags/2.21.0
Andrey Kurilin 4 years ago
parent
commit
0a60aae852
100 changed files with 215 additions and 153 deletions
  1. +2
    -2
      README.rst
  2. +1
    -2
      doc/source/api.rst
  3. +1
    -5
      doc/source/conf.py
  4. +1
    -2
      doc/source/index.rst
  5. +1
    -1
      doc/source/shell.rst
  6. +3
    -3
      novaclient/client.py
  7. +10
    -6
      novaclient/shell.py
  8. +6
    -6
      novaclient/tests/unit/fixture_data/client.py
  9. +1
    -1
      novaclient/tests/unit/test_auth_plugins.py
  10. +2
    -2
      novaclient/tests/unit/test_base.py
  11. +19
    -19
      novaclient/tests/unit/test_client.py
  12. +0
    -0
      novaclient/tests/unit/v2/__init__.py
  13. +0
    -0
      novaclient/tests/unit/v2/contrib/__init__.py
  14. +2
    -2
      novaclient/tests/unit/v2/contrib/fakes.py
  15. +2
    -2
      novaclient/tests/unit/v2/contrib/test_assisted_volume_snapshots.py
  16. +2
    -2
      novaclient/tests/unit/v2/contrib/test_baremetal.py
  17. +2
    -2
      novaclient/tests/unit/v2/contrib/test_cells.py
  18. +2
    -2
      novaclient/tests/unit/v2/contrib/test_instance_actions.py
  19. +2
    -2
      novaclient/tests/unit/v2/contrib/test_list_extensions.py
  20. +2
    -2
      novaclient/tests/unit/v2/contrib/test_migrations.py
  21. +2
    -2
      novaclient/tests/unit/v2/contrib/test_server_external_events.py
  22. +2
    -2
      novaclient/tests/unit/v2/contrib/test_tenant_networks.py
  23. +1
    -1
      novaclient/tests/unit/v2/fakes.py
  24. +1
    -1
      novaclient/tests/unit/v2/test_agents.py
  25. +1
    -1
      novaclient/tests/unit/v2/test_aggregates.py
  26. +1
    -1
      novaclient/tests/unit/v2/test_auth.py
  27. +2
    -2
      novaclient/tests/unit/v2/test_availability_zone.py
  28. +1
    -1
      novaclient/tests/unit/v2/test_certs.py
  29. +1
    -1
      novaclient/tests/unit/v2/test_client.py
  30. +1
    -1
      novaclient/tests/unit/v2/test_cloudpipe.py
  31. +0
    -0
      novaclient/tests/unit/v2/test_fixed_ips.py
  32. +2
    -2
      novaclient/tests/unit/v2/test_flavor_access.py
  33. +2
    -2
      novaclient/tests/unit/v2/test_flavors.py
  34. +1
    -1
      novaclient/tests/unit/v2/test_floating_ip_dns.py
  35. +1
    -1
      novaclient/tests/unit/v2/test_floating_ip_pools.py
  36. +1
    -1
      novaclient/tests/unit/v2/test_floating_ips.py
  37. +1
    -1
      novaclient/tests/unit/v2/test_floating_ips_bulk.py
  38. +1
    -1
      novaclient/tests/unit/v2/test_fping.py
  39. +1
    -1
      novaclient/tests/unit/v2/test_hosts.py
  40. +0
    -0
      novaclient/tests/unit/v2/test_hypervisors.py
  41. +1
    -1
      novaclient/tests/unit/v2/test_images.py
  42. +1
    -1
      novaclient/tests/unit/v2/test_keypairs.py
  43. +1
    -1
      novaclient/tests/unit/v2/test_limits.py
  44. +1
    -1
      novaclient/tests/unit/v2/test_networks.py
  45. +1
    -1
      novaclient/tests/unit/v2/test_quota_classes.py
  46. +0
    -0
      novaclient/tests/unit/v2/test_quotas.py
  47. +1
    -1
      novaclient/tests/unit/v2/test_security_group_rules.py
  48. +1
    -1
      novaclient/tests/unit/v2/test_security_groups.py
  49. +1
    -1
      novaclient/tests/unit/v2/test_server_groups.py
  50. +1
    -1
      novaclient/tests/unit/v2/test_servers.py
  51. +2
    -2
      novaclient/tests/unit/v2/test_services.py
  52. +37
    -15
      novaclient/tests/unit/v2/test_shell.py
  53. +2
    -2
      novaclient/tests/unit/v2/test_usage.py
  54. +2
    -2
      novaclient/tests/unit/v2/test_volumes.py
  55. +0
    -0
      novaclient/tests/unit/v2/testfile.txt
  56. +0
    -0
      novaclient/tests/unit/v2/utils.py
  57. +28
    -2
      novaclient/v1_1/__init__.py
  58. +16
    -0
      novaclient/v2/__init__.py
  59. +0
    -0
      novaclient/v2/agents.py
  60. +0
    -0
      novaclient/v2/aggregates.py
  61. +0
    -0
      novaclient/v2/availability_zones.py
  62. +0
    -0
      novaclient/v2/certs.py
  63. +33
    -33
      novaclient/v2/client.py
  64. +0
    -0
      novaclient/v2/cloudpipe.py
  65. +0
    -0
      novaclient/v2/contrib/__init__.py
  66. +0
    -0
      novaclient/v2/contrib/assisted_volume_snapshots.py
  67. +0
    -0
      novaclient/v2/contrib/baremetal.py
  68. +0
    -0
      novaclient/v2/contrib/cells.py
  69. +0
    -0
      novaclient/v2/contrib/deferred_delete.py
  70. +0
    -0
      novaclient/v2/contrib/host_evacuate.py
  71. +0
    -0
      novaclient/v2/contrib/host_evacuate_live.py
  72. +0
    -0
      novaclient/v2/contrib/host_servers_migrate.py
  73. +0
    -0
      novaclient/v2/contrib/instance_action.py
  74. +0
    -0
      novaclient/v2/contrib/list_extensions.py
  75. +1
    -1
      novaclient/v2/contrib/metadata_extensions.py
  76. +0
    -0
      novaclient/v2/contrib/migrations.py
  77. +0
    -0
      novaclient/v2/contrib/server_external_events.py
  78. +0
    -0
      novaclient/v2/contrib/tenant_networks.py
  79. +0
    -0
      novaclient/v2/fixed_ips.py
  80. +0
    -0
      novaclient/v2/flavor_access.py
  81. +0
    -0
      novaclient/v2/flavors.py
  82. +0
    -0
      novaclient/v2/floating_ip_dns.py
  83. +0
    -0
      novaclient/v2/floating_ip_pools.py
  84. +0
    -0
      novaclient/v2/floating_ips.py
  85. +0
    -0
      novaclient/v2/floating_ips_bulk.py
  86. +0
    -0
      novaclient/v2/fping.py
  87. +0
    -0
      novaclient/v2/hosts.py
  88. +0
    -0
      novaclient/v2/hypervisors.py
  89. +0
    -0
      novaclient/v2/images.py
  90. +0
    -0
      novaclient/v2/keypairs.py
  91. +0
    -0
      novaclient/v2/limits.py
  92. +0
    -0
      novaclient/v2/networks.py
  93. +0
    -0
      novaclient/v2/quota_classes.py
  94. +0
    -0
      novaclient/v2/quotas.py
  95. +0
    -0
      novaclient/v2/security_group_default_rules.py
  96. +0
    -0
      novaclient/v2/security_group_rules.py
  97. +0
    -0
      novaclient/v2/security_groups.py
  98. +0
    -0
      novaclient/v2/server_groups.py
  99. +1
    -1
      novaclient/v2/servers.py
  100. +0
    -0
      novaclient/v2/services.py

+ 2
- 2
README.rst View File

@@ -46,7 +46,7 @@ and the version of the API with ``--os-compute-api-version``. Or set them as
an environment variables as well::

export OS_AUTH_URL=http://example.com:8774/v1.1/
export OS_COMPUTE_API_VERSION=1.1
export OS_COMPUTE_API_VERSION=2

If you are using Keystone, you need to set the OS_AUTH_URL to the keystone
endpoint::
@@ -69,7 +69,7 @@ There's also a complete Python API, but it has not yet been documented.
To use with nova, with keystone as the authentication system::

# use v2.0 auth with http://example.com:5000/v2.0/")
>>> from novaclient.v1_1 import client
>>> from novaclient.v2 import client
>>> nt = client.Client(USER, PASS, TENANT, AUTH_URL, service_type="compute")
>>> nt.flavors.list()
[...]

+ 1
- 2
doc/source/api.rst View File

@@ -60,5 +60,4 @@ For more information, see the reference:
:maxdepth: 2

ref/index
ref/v1_1/index
ref/v3/index
ref/v2/index

+ 1
- 5
doc/source/conf.py View File

@@ -71,17 +71,13 @@ def gen_ref(ver, title, names):
"pkg": pkg, "name": name})

gen_ref(None, "Exceptions", ["exceptions"])
gen_ref("v1_1", "Version 1.1, Version 2 API Reference",
gen_ref("v2", "Version 1.1, Version 2 API Reference, Version 3 API Reference",
["flavors", "images", "servers", "hosts", "agents", "aggregates",
"availability_zones", "certs", "fixed_ips", "floating_ip_pools",
"floating_ips", "hypervisors", "keypairs", "limits", "networks",
"quota_classes", "quotas", "security_group_rules",
"security_groups", "services", "virtual_interfaces",
"volume_snapshots", "volumes", "volume_types"])
gen_ref("v3", "Version 3 API Reference",
["flavors", "hosts", "agents", "aggregates", "availability_zones",
"certs", "hypervisors", "images", "keypairs", "quotas",
"quotas_classes", "servers", "services"])

# -- General configuration ----------------------------------------------------


+ 1
- 2
doc/source/index.rst View File

@@ -25,8 +25,7 @@ Contents:
shell
api
ref/index
ref/v1_1/index
ref/v3/index
ref/v2/index
releases

Contributing

+ 1
- 1
doc/source/shell.rst View File

@@ -41,7 +41,7 @@ For example, in Bash you'd use::
export OS_PASSWORD=yadayadayada
export OS_TENANT_NAME=myproject
export OS_AUTH_URL=http://...
export OS_COMPUTE_API_VERSION=1.1
export OS_COMPUTE_API_VERSION=2
From there, all shell commands take the form::

+ 3
- 3
novaclient/client.py View File

@@ -773,9 +773,9 @@ def _construct_http_client(username=None, password=None, project_id=None,

def get_client_class(version):
version_map = {
'1.1': 'novaclient.v1_1.client.Client',
'2': 'novaclient.v1_1.client.Client',
'3': 'novaclient.v1_1.client.Client',
'1.1': 'novaclient.v2.client.Client',
'2': 'novaclient.v2.client.Client',
'3': 'novaclient.v2.client.Client',
}
try:
client_path = version_map[str(version)]

+ 10
- 6
novaclient/shell.py View File

@@ -55,9 +55,9 @@ import novaclient.extension
from novaclient.i18n import _
from novaclient.openstack.common import cliutils
from novaclient import utils
from novaclient.v1_1 import shell as shell_v1_1
from novaclient.v2 import shell as shell_v2

DEFAULT_OS_COMPUTE_API_VERSION = "1.1"
DEFAULT_OS_COMPUTE_API_VERSION = "2"
DEFAULT_NOVA_ENDPOINT_TYPE = 'publicURL'
# NOTE(cyeoh): Having the service type dependent on the API version
# is pretty ugly, but we have to do this because traditionally the
@@ -446,12 +446,12 @@ class OpenStackComputeShell(object):

try:
actions_module = {
'1.1': shell_v1_1,
'2': shell_v1_1,
'3': shell_v1_1,
'1.1': shell_v2,
'2': shell_v2,
'3': shell_v2,
}[version]
except KeyError:
actions_module = shell_v1_1
actions_module = shell_v2

self._find_actions(subparsers, actions_module)
self._find_actions(subparsers, self)
@@ -491,6 +491,10 @@ class OpenStackComputeShell(object):
def _discover_via_contrib_path(self, version):
module_path = os.path.dirname(os.path.abspath(__file__))
version_str = "v%s" % version.replace('.', '_')
# NOTE(akurilin): v1.1, v2 and v3 have one implementation, so
# we should discover contrib modules in one place.
if version_str in ["v1_1", "v3"]:
version_str = "v2"
ext_path = os.path.join(module_path, version_str, 'contrib')
ext_glob = os.path.join(ext_path, "*.py")


+ 6
- 6
novaclient/tests/unit/fixture_data/client.py View File

@@ -15,7 +15,7 @@ from keystoneclient.auth.identity import v2
from keystoneclient import fixture
from keystoneclient import session

from novaclient.v1_1 import client as v1_1client
from novaclient.v2 import client as v2client

IDENTITY_URL = 'http://identityserver:5000/v2.0'
COMPUTE_URL = 'http://compute.host'
@@ -51,10 +51,10 @@ class V1(fixtures.Fixture):
self.client = self.new_client()

def new_client(self):
return v1_1client.Client(username='xx',
api_key='xx',
project_id='xx',
auth_url=self.identity_url)
return v2client.Client(username='xx',
api_key='xx',
project_id='xx',
auth_url=self.identity_url)


class SessionV1(V1):
@@ -62,4 +62,4 @@ class SessionV1(V1):
def new_client(self):
self.session = session.Session()
self.session.auth = v2.Password(self.identity_url, 'xx', 'xx')
return v1_1client.Client(session=self.session)
return v2client.Client(session=self.session)

+ 1
- 1
novaclient/tests/unit/test_auth_plugins.py View File

@@ -28,7 +28,7 @@ except ImportError:
from novaclient import auth_plugin
from novaclient import exceptions
from novaclient.tests.unit import utils
from novaclient.v1_1 import client
from novaclient.v2 import client


def mock_http_request(resp=None):

+ 2
- 2
novaclient/tests/unit/test_base.py View File

@@ -14,8 +14,8 @@
from novaclient import base
from novaclient import exceptions
from novaclient.tests.unit import utils
from novaclient.tests.unit.v1_1 import fakes
from novaclient.v1_1 import flavors
from novaclient.tests.unit.v2 import fakes
from novaclient.v2 import flavors


cs = fakes.FakeClient()

+ 19
- 19
novaclient/tests/unit/test_client.py View File

@@ -24,7 +24,7 @@ import requests
import novaclient.client
import novaclient.extension
from novaclient.tests.unit import utils
import novaclient.v1_1.client
import novaclient.v2.client


class ClientConnectionPoolTest(utils.TestCase):
@@ -138,57 +138,57 @@ class ClientTest(utils.TestCase):

def test_get_client_class_v3(self):
output = novaclient.client.get_client_class('3')
self.assertEqual(output, novaclient.v1_1.client.Client)
self.assertEqual(output, novaclient.v2.client.Client)

def test_get_client_class_v2(self):
output = novaclient.client.get_client_class('2')
self.assertEqual(output, novaclient.v1_1.client.Client)
self.assertEqual(output, novaclient.v2.client.Client)

def test_get_client_class_v2_int(self):
output = novaclient.client.get_client_class(2)
self.assertEqual(output, novaclient.v1_1.client.Client)
self.assertEqual(output, novaclient.v2.client.Client)

def test_get_client_class_v1_1(self):
output = novaclient.client.get_client_class('1.1')
self.assertEqual(output, novaclient.v1_1.client.Client)
self.assertEqual(output, novaclient.v2.client.Client)

def test_get_client_class_unknown(self):
self.assertRaises(novaclient.exceptions.UnsupportedVersion,
novaclient.client.get_client_class, '0')

def test_client_with_os_cache_enabled(self):
cs = novaclient.v1_1.client.Client("user", "password", "project_id",
auth_url="foo/v2", os_cache=True)
cs = novaclient.v2.client.Client("user", "password", "project_id",
auth_url="foo/v2", os_cache=True)
self.assertEqual(True, cs.os_cache)
self.assertEqual(True, cs.client.os_cache)

def test_client_with_os_cache_disabled(self):
cs = novaclient.v1_1.client.Client("user", "password", "project_id",
auth_url="foo/v2", os_cache=False)
cs = novaclient.v2.client.Client("user", "password", "project_id",
auth_url="foo/v2", os_cache=False)
self.assertEqual(False, cs.os_cache)
self.assertEqual(False, cs.client.os_cache)

def test_client_with_no_cache_enabled(self):
cs = novaclient.v1_1.client.Client("user", "password", "project_id",
auth_url="foo/v2", no_cache=True)
cs = novaclient.v2.client.Client("user", "password", "project_id",
auth_url="foo/v2", no_cache=True)
self.assertEqual(False, cs.os_cache)
self.assertEqual(False, cs.client.os_cache)

def test_client_with_no_cache_disabled(self):
cs = novaclient.v1_1.client.Client("user", "password", "project_id",
auth_url="foo/v2", no_cache=False)
cs = novaclient.v2.client.Client("user", "password", "project_id",
auth_url="foo/v2", no_cache=False)
self.assertEqual(True, cs.os_cache)
self.assertEqual(True, cs.client.os_cache)

def test_client_set_management_url_v1_1(self):
cs = novaclient.v1_1.client.Client("user", "password", "project_id",
auth_url="foo/v2")
cs = novaclient.v2.client.Client("user", "password", "project_id",
auth_url="foo/v2")
cs.set_management_url("blabla")
self.assertEqual("blabla", cs.client.management_url)

def test_client_get_reset_timings_v1_1(self):
cs = novaclient.v1_1.client.Client("user", "password", "project_id",
auth_url="foo/v2")
cs = novaclient.v2.client.Client("user", "password", "project_id",
auth_url="foo/v2")
self.assertEqual(0, len(cs.get_timings()))
cs.client.times.append("somevalue")
self.assertEqual(1, len(cs.get_timings()))
@@ -201,8 +201,8 @@ class ClientTest(utils.TestCase):
def test_contextmanager_v1_1(self, mock_http_client):
fake_client = mock.Mock()
mock_http_client.return_value = fake_client
with novaclient.v1_1.client.Client("user", "password", "project_id",
auth_url="foo/v2"):
with novaclient.v2.client.Client("user", "password", "project_id",
auth_url="foo/v2"):
pass
self.assertTrue(fake_client.open_session.called)
self.assertTrue(fake_client.close_session.called)

novaclient/tests/unit/v1_1/__init__.py → novaclient/tests/unit/v2/__init__.py View File


novaclient/tests/unit/v1_1/contrib/__init__.py → novaclient/tests/unit/v2/contrib/__init__.py View File


novaclient/tests/unit/v1_1/contrib/fakes.py → novaclient/tests/unit/v2/contrib/fakes.py View File

@@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from novaclient.tests.unit.v1_1 import fakes
from novaclient.v1_1 import client
from novaclient.tests.unit.v2 import fakes
from novaclient.v2 import client


class FakeClient(fakes.FakeClient):

novaclient/tests/unit/v1_1/contrib/test_assisted_volume_snapshots.py → novaclient/tests/unit/v2/contrib/test_assisted_volume_snapshots.py View File

@@ -18,8 +18,8 @@ Assisted volume snapshots - to be used by Cinder and not end users.

from novaclient import extension
from novaclient.tests.unit import utils
from novaclient.tests.unit.v1_1.contrib import fakes
from novaclient.v1_1.contrib import assisted_volume_snapshots as assisted_snaps
from novaclient.tests.unit.v2.contrib import fakes
from novaclient.v2.contrib import assisted_volume_snapshots as assisted_snaps


extensions = [

novaclient/tests/unit/v1_1/contrib/test_baremetal.py → novaclient/tests/unit/v2/contrib/test_baremetal.py View File

@@ -16,8 +16,8 @@

from novaclient import extension
from novaclient.tests.unit import utils
from novaclient.tests.unit.v1_1.contrib import fakes
from novaclient.v1_1.contrib import baremetal
from novaclient.tests.unit.v2.contrib import fakes
from novaclient.v2.contrib import baremetal


extensions = [

novaclient/tests/unit/v1_1/contrib/test_cells.py → novaclient/tests/unit/v2/contrib/test_cells.py View File

@@ -15,8 +15,8 @@

from novaclient import extension
from novaclient.tests.unit import utils
from novaclient.tests.unit.v1_1.contrib import fakes
from novaclient.v1_1.contrib import cells
from novaclient.tests.unit.v2.contrib import fakes
from novaclient.v2.contrib import cells


extensions = [

novaclient/tests/unit/v1_1/contrib/test_instance_actions.py → novaclient/tests/unit/v2/contrib/test_instance_actions.py View File

@@ -15,8 +15,8 @@

from novaclient import extension
from novaclient.tests.unit import utils
from novaclient.tests.unit.v1_1.contrib import fakes
from novaclient.v1_1.contrib import instance_action
from novaclient.tests.unit.v2.contrib import fakes
from novaclient.v2.contrib import instance_action


extensions = [

novaclient/tests/unit/v1_1/contrib/test_list_extensions.py → novaclient/tests/unit/v2/contrib/test_list_extensions.py View File

@@ -13,8 +13,8 @@

from novaclient import extension
from novaclient.tests.unit import utils
from novaclient.tests.unit.v1_1 import fakes
from novaclient.v1_1.contrib import list_extensions
from novaclient.tests.unit.v2 import fakes
from novaclient.v2.contrib import list_extensions


extensions = [

novaclient/tests/unit/v1_1/contrib/test_migrations.py → novaclient/tests/unit/v2/contrib/test_migrations.py View File

@@ -12,8 +12,8 @@

from novaclient import extension
from novaclient.tests.unit import utils
from novaclient.tests.unit.v1_1 import fakes
from novaclient.v1_1.contrib import migrations
from novaclient.tests.unit.v2 import fakes
from novaclient.v2.contrib import migrations

extensions = [
extension.Extension(migrations.__name__.split(".")[-1],

novaclient/tests/unit/v1_1/contrib/test_server_external_events.py → novaclient/tests/unit/v2/contrib/test_server_external_events.py View File

@@ -18,8 +18,8 @@ External event triggering for servers, not to be used by users.

from novaclient import extension
from novaclient.tests.unit import utils
from novaclient.tests.unit.v1_1.contrib import fakes
from novaclient.v1_1.contrib import server_external_events as ext_events
from novaclient.tests.unit.v2.contrib import fakes
from novaclient.v2.contrib import server_external_events as ext_events


extensions = [

novaclient/tests/unit/v1_1/contrib/test_tenant_networks.py → novaclient/tests/unit/v2/contrib/test_tenant_networks.py View File

@@ -15,8 +15,8 @@

from novaclient import extension
from novaclient.tests.unit import utils
from novaclient.tests.unit.v1_1.contrib import fakes
from novaclient.v1_1.contrib import tenant_networks
from novaclient.tests.unit.v2.contrib import fakes
from novaclient.v2.contrib import tenant_networks


extensions = [

novaclient/tests/unit/v1_1/fakes.py → novaclient/tests/unit/v2/fakes.py View File

@@ -25,7 +25,7 @@ from novaclient import client as base_client
from novaclient import exceptions
from novaclient.tests.unit import fakes
from novaclient.tests.unit import utils
from novaclient.v1_1 import client
from novaclient.v2 import client


class FakeClient(fakes.FakeClient, client.Client):

novaclient/tests/unit/v1_1/test_agents.py → novaclient/tests/unit/v2/test_agents.py View File

@@ -16,7 +16,7 @@
from novaclient.tests.unit.fixture_data import agents as data
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit import utils
from novaclient.v1_1 import agents
from novaclient.v2 import agents


class AgentsTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_aggregates.py → novaclient/tests/unit/v2/test_aggregates.py View File

@@ -16,7 +16,7 @@
from novaclient.tests.unit.fixture_data import aggregates as data
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit import utils
from novaclient.v1_1 import aggregates
from novaclient.v2 import aggregates


class AggregatesTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_auth.py → novaclient/tests/unit/v2/test_auth.py View File

@@ -20,7 +20,7 @@ import requests

from novaclient import exceptions
from novaclient.tests.unit import utils
from novaclient.v1_1 import client
from novaclient.v2 import client


class AuthenticateAgainstKeystoneTests(utils.TestCase):

novaclient/tests/unit/v1_1/test_availability_zone.py → novaclient/tests/unit/v2/test_availability_zone.py View File

@@ -19,13 +19,13 @@ import six
from novaclient.tests.unit.fixture_data import availability_zones as data
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit import utils
from novaclient.v1_1 import availability_zones
from novaclient.v2 import availability_zones


class AvailabilityZoneTest(utils.FixturedTestCase):
# NOTE(cyeoh): import shell here so the V3 version of
# this class can inherit off the v3 version of shell
from novaclient.v1_1 import shell # noqa
from novaclient.v2 import shell # noqa

data_fixture_class = data.V1


novaclient/tests/unit/v1_1/test_certs.py → novaclient/tests/unit/v2/test_certs.py View File

@@ -14,7 +14,7 @@
from novaclient.tests.unit.fixture_data import certs as data
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit import utils
from novaclient.v1_1 import certs
from novaclient.v2 import certs


class CertsTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_client.py → novaclient/tests/unit/v2/test_client.py View File

@@ -15,7 +15,7 @@ import uuid
from keystoneclient import session

from novaclient.tests.unit import utils
from novaclient.v1_1 import client
from novaclient.v2 import client


class ClientTest(utils.TestCase):

novaclient/tests/unit/v1_1/test_cloudpipe.py → novaclient/tests/unit/v2/test_cloudpipe.py View File

@@ -16,7 +16,7 @@ import six
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit.fixture_data import cloudpipe as data
from novaclient.tests.unit import utils
from novaclient.v1_1 import cloudpipe
from novaclient.v2 import cloudpipe


class CloudpipeTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_fixed_ips.py → novaclient/tests/unit/v2/test_fixed_ips.py View File


novaclient/tests/unit/v1_1/test_flavor_access.py → novaclient/tests/unit/v2/test_flavor_access.py View File

@@ -14,8 +14,8 @@
# under the License.

from novaclient.tests.unit import utils
from novaclient.tests.unit.v1_1 import fakes
from novaclient.v1_1 import flavor_access
from novaclient.tests.unit.v2 import fakes
from novaclient.v2 import flavor_access


cs = fakes.FakeClient()

novaclient/tests/unit/v1_1/test_flavors.py → novaclient/tests/unit/v2/test_flavors.py View File

@@ -17,8 +17,8 @@ import mock

from novaclient import exceptions
from novaclient.tests.unit import utils
from novaclient.tests.unit.v1_1 import fakes
from novaclient.v1_1 import flavors
from novaclient.tests.unit.v2 import fakes
from novaclient.v2 import flavors


class FlavorsTest(utils.TestCase):

novaclient/tests/unit/v1_1/test_floating_ip_dns.py → novaclient/tests/unit/v2/test_floating_ip_dns.py View File

@@ -14,7 +14,7 @@
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit.fixture_data import floatingips as data
from novaclient.tests.unit import utils
from novaclient.v1_1 import floating_ip_dns
from novaclient.v2 import floating_ip_dns


class FloatingIPDNSDomainTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_floating_ip_pools.py → novaclient/tests/unit/v2/test_floating_ip_pools.py View File

@@ -17,7 +17,7 @@
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit.fixture_data import floatingips as data
from novaclient.tests.unit import utils
from novaclient.v1_1 import floating_ip_pools
from novaclient.v2 import floating_ip_pools


class TestFloatingIPPools(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_floating_ips.py → novaclient/tests/unit/v2/test_floating_ips.py View File

@@ -17,7 +17,7 @@
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit.fixture_data import floatingips as data
from novaclient.tests.unit import utils
from novaclient.v1_1 import floating_ips
from novaclient.v2 import floating_ips


class FloatingIPsTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_floating_ips_bulk.py → novaclient/tests/unit/v2/test_floating_ips_bulk.py View File

@@ -16,7 +16,7 @@
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit.fixture_data import floatingips as data
from novaclient.tests.unit import utils
from novaclient.v1_1 import floating_ips_bulk
from novaclient.v2 import floating_ips_bulk


class FloatingIPsBulkTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_fping.py → novaclient/tests/unit/v2/test_fping.py View File

@@ -16,7 +16,7 @@
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit.fixture_data import fping as data
from novaclient.tests.unit import utils
from novaclient.v1_1 import fping
from novaclient.v2 import fping


class FpingTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_hosts.py → novaclient/tests/unit/v2/test_hosts.py View File

@@ -14,7 +14,7 @@
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit.fixture_data import hosts as data
from novaclient.tests.unit import utils
from novaclient.v1_1 import hosts
from novaclient.v2 import hosts


class HostsTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_hypervisors.py → novaclient/tests/unit/v2/test_hypervisors.py View File


novaclient/tests/unit/v1_1/test_images.py → novaclient/tests/unit/v2/test_images.py View File

@@ -14,7 +14,7 @@
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit.fixture_data import images as data
from novaclient.tests.unit import utils
from novaclient.v1_1 import images
from novaclient.v2 import images


class ImagesTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_keypairs.py → novaclient/tests/unit/v2/test_keypairs.py View File

@@ -14,7 +14,7 @@
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit.fixture_data import keypairs as data
from novaclient.tests.unit import utils
from novaclient.v1_1 import keypairs
from novaclient.v2 import keypairs


class KeypairsTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_limits.py → novaclient/tests/unit/v2/test_limits.py View File

@@ -14,7 +14,7 @@
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit.fixture_data import limits as data
from novaclient.tests.unit import utils
from novaclient.v1_1 import limits
from novaclient.v2 import limits


class LimitsTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_networks.py → novaclient/tests/unit/v2/test_networks.py View File

@@ -14,7 +14,7 @@
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit.fixture_data import networks as data
from novaclient.tests.unit import utils
from novaclient.v1_1 import networks
from novaclient.v2 import networks


class NetworksTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_quota_classes.py → novaclient/tests/unit/v2/test_quota_classes.py View File

@@ -14,7 +14,7 @@
# under the License.

from novaclient.tests.unit import utils
from novaclient.tests.unit.v1_1 import fakes
from novaclient.tests.unit.v2 import fakes


cs = fakes.FakeClient()

novaclient/tests/unit/v1_1/test_quotas.py → novaclient/tests/unit/v2/test_quotas.py View File


novaclient/tests/unit/v1_1/test_security_group_rules.py → novaclient/tests/unit/v2/test_security_group_rules.py View File

@@ -15,7 +15,7 @@ from novaclient import exceptions
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit.fixture_data import security_group_rules as data
from novaclient.tests.unit import utils
from novaclient.v1_1 import security_group_rules
from novaclient.v2 import security_group_rules


class SecurityGroupRulesTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_security_groups.py → novaclient/tests/unit/v2/test_security_groups.py View File

@@ -14,7 +14,7 @@
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit.fixture_data import security_groups as data
from novaclient.tests.unit import utils
from novaclient.v1_1 import security_groups
from novaclient.v2 import security_groups


class SecurityGroupsTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_server_groups.py → novaclient/tests/unit/v2/test_server_groups.py View File

@@ -16,7 +16,7 @@
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit.fixture_data import server_groups as data
from novaclient.tests.unit import utils
from novaclient.v1_1 import server_groups
from novaclient.v2 import server_groups


class ServerGroupsTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_servers.py → novaclient/tests/unit/v2/test_servers.py View File

@@ -21,7 +21,7 @@ from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit.fixture_data import floatingips
from novaclient.tests.unit.fixture_data import servers as data
from novaclient.tests.unit import utils
from novaclient.v1_1 import servers
from novaclient.v2 import servers


class ServersTest(utils.FixturedTestCase):

novaclient/tests/unit/v1_1/test_services.py → novaclient/tests/unit/v2/test_services.py View File

@@ -14,8 +14,8 @@
# under the License.

from novaclient.tests.unit import utils
from novaclient.tests.unit.v1_1 import fakes
from novaclient.v1_1 import services
from novaclient.tests.unit.v2 import fakes
from novaclient.v2 import services


class ServicesTest(utils.TestCase):

novaclient/tests/unit/v1_1/test_shell.py → novaclient/tests/unit/v2/test_shell.py View File

@@ -30,8 +30,8 @@ import novaclient.client
from novaclient import exceptions
import novaclient.shell
from novaclient.tests.unit import utils
from novaclient.tests.unit.v1_1 import fakes
import novaclient.v1_1.shell
from novaclient.tests.unit.v2 import fakes
import novaclient.v2.shell


class ShellFixture(fixtures.Fixture):
@@ -54,7 +54,7 @@ class ShellTest(utils.TestCase):
'NOVA_USERNAME': 'username',
'NOVA_PASSWORD': 'password',
'NOVA_PROJECT_ID': 'project_id',
'OS_COMPUTE_API_VERSION': '1.1',
'OS_COMPUTE_API_VERSION': '2',
'NOVA_URL': 'http://no.where',
'OS_AUTH_URL': 'http://no.where/v2.0',
}
@@ -644,7 +644,7 @@ class ShellTest(utils.TestCase):
cmd = 'boot --image 1 --flavor 1 --min-count 3 --max-count 1 serv'
self.assertRaises(exceptions.CommandError, self.run_command, cmd)

@mock.patch('novaclient.v1_1.shell._poll_for_status')
@mock.patch('novaclient.v2.shell._poll_for_status')
def test_boot_with_poll(self, poll_method):
self.run_command('boot --flavor 1 --image 1 some-server --poll')
self.assert_called_anytime(
@@ -1088,7 +1088,7 @@ class ShellTest(utils.TestCase):
self.assertRaises(exceptions.CommandError,
self.run_command, 'show xxx')

@mock.patch('novaclient.v1_1.shell.utils.print_dict')
@mock.patch('novaclient.v2.shell.utils.print_dict')
def test_print_server(self, mock_print_dict):
self.run_command('show 5678')
args, kwargs = mock_print_dict.call_args
@@ -2225,7 +2225,7 @@ class ShellTest(utils.TestCase):
'/os-migrations?cell_name=child1&host=host1'
'&status=finished')

@mock.patch('novaclient.v1_1.shell._find_server')
@mock.patch('novaclient.v2.shell._find_server')
@mock.patch('os.system')
def test_ssh(self, mock_system, mock_find_server):
class FakeResources(object):
@@ -2273,7 +2273,7 @@ class ShellTest(utils.TestCase):
mock_system.assert_called_with("ssh -6 -p22 "
"root@2607:f0d0:1002::4 -1")

@mock.patch('novaclient.v1_1.shell._find_server')
@mock.patch('novaclient.v2.shell._find_server')
@mock.patch('os.system')
def test_ssh_multinet(self, mock_system, mock_find_server):
class FakeResources(object):
@@ -2338,6 +2338,28 @@ class ShellTest(utils.TestCase):
self.assert_called('DELETE', '/os-server-groups/12345', pos=-2)


class ShellTestV11(ShellTest):
FAKE_ENV = {
'NOVA_USERNAME': 'username',
'NOVA_PASSWORD': 'password',
'NOVA_PROJECT_ID': 'project_id',
'OS_COMPUTE_API_VERSION': '1.1',
'NOVA_URL': 'http://no.where',
'OS_AUTH_URL': 'http://no.where/v2.0',
}


class ShellTestV3(ShellTest):
FAKE_ENV = {
'NOVA_USERNAME': 'username',
'NOVA_PASSWORD': 'password',
'NOVA_PROJECT_ID': 'project_id',
'OS_COMPUTE_API_VERSION': '3',
'NOVA_URL': 'http://no.where',
'OS_AUTH_URL': 'http://no.where/v2.0',
}


class ShellWithSessionClientTest(ShellTest):

def setUp(self):
@@ -2354,7 +2376,7 @@ class GetSecgroupTest(utils.TestCase):
'security_groups.get.return_value': 'sec_group',
'security_groups.list.return_value': [],
})
result = novaclient.v1_1.shell._get_secgroup(cs, '1')
result = novaclient.v2.shell._get_secgroup(cs, '1')
self.assertEqual('sec_group', result)
cs.security_groups.get.assert_called_once_with('1')

@@ -2363,7 +2385,7 @@ class GetSecgroupTest(utils.TestCase):
'security_groups.get.return_value': 'sec_group',
'security_groups.list.return_value': [],
})
result = novaclient.v1_1.shell._get_secgroup(
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(
@@ -2375,7 +2397,7 @@ class GetSecgroupTest(utils.TestCase):
'security_groups.list.return_value': [],
})
self.assertRaises(exceptions.CommandError,
novaclient.v1_1.shell._get_secgroup,
novaclient.v2.shell._get_secgroup,
cs,
'abc')

@@ -2387,7 +2409,7 @@ class GetSecgroupTest(utils.TestCase):
'security_groups.list.return_value': [group_one, group_one],
})
self.assertRaises(exceptions.NoUniqueMatch,
novaclient.v1_1.shell._get_secgroup,
novaclient.v2.shell._get_secgroup,
cs,
'group_one')

@@ -2396,7 +2418,7 @@ class GetFirstEndpointTest(utils.TestCase):
def test_only_one_endpoint(self):
"""If there is only one endpoint, it is returned."""
endpoint = {"url": "test"}
result = novaclient.v1_1.shell._get_first_endpoint([endpoint], "XYZ")
result = novaclient.v2.shell._get_first_endpoint([endpoint], "XYZ")
self.assertEqual(endpoint, result)

def test_multiple_endpoints(self):
@@ -2409,7 +2431,7 @@ class GetFirstEndpointTest(utils.TestCase):
{"region": "ORD", "number": 1},
{"region": "ORD", "number": 2}
]
result = novaclient.v1_1.shell._get_first_endpoint(endpoints, "ORD")
result = novaclient.v2.shell._get_first_endpoint(endpoints, "ORD")
self.assertEqual(endpoints[1], result)

def test_multiple_endpoints_but_none_suitable(self):
@@ -2423,11 +2445,11 @@ class GetFirstEndpointTest(utils.TestCase):
{"region": "STU"}
]
self.assertRaises(LookupError,
novaclient.v1_1.shell._get_first_endpoint,
novaclient.v2.shell._get_first_endpoint,
endpoints, "ORD")

def test_no_endpoints(self):
"""If there are no endpoints available, an exception is raised."""
self.assertRaises(LookupError,
novaclient.v1_1.shell._get_first_endpoint,
novaclient.v2.shell._get_first_endpoint,
[], "ORD")

novaclient/tests/unit/v1_1/test_usage.py → novaclient/tests/unit/v2/test_usage.py View File

@@ -14,8 +14,8 @@
import datetime

from novaclient.tests.unit import utils
from novaclient.tests.unit.v1_1 import fakes
from novaclient.v1_1 import usage
from novaclient.tests.unit.v2 import fakes
from novaclient.v2 import usage


class UsageTest(utils.TestCase):

novaclient/tests/unit/v1_1/test_volumes.py → novaclient/tests/unit/v2/test_volumes.py View File

@@ -14,8 +14,8 @@
# under the License.

from novaclient.tests.unit import utils
from novaclient.tests.unit.v1_1 import fakes
from novaclient.v1_1 import volumes
from novaclient.tests.unit.v2 import fakes
from novaclient.v2 import volumes


cs = fakes.FakeClient()

novaclient/tests/unit/v1_1/testfile.txt → novaclient/tests/unit/v2/testfile.txt View File


novaclient/tests/unit/v1_1/utils.py → novaclient/tests/unit/v2/utils.py View File


+ 28
- 2
novaclient/v1_1/__init__.py View File

@@ -1,4 +1,3 @@
# Copyright (c) 2012 OpenStack Foundation
#
# All Rights Reserved.
#
@@ -14,4 +13,31 @@
# License for the specific language governing permissions and limitations
# under the License.

from novaclient.v1_1.client import Client # noqa
# NOTE(akurilin): This module is left for backward compatibility. Feel free to
# remove it, when openstack project will use correct way to
# obtain novaclient object.
# Known problems:
# * python-openstackclient -
# https://bugs.launchpad.net/python-openstackclient/+bug/1418024
# * neutron - https://bugs.launchpad.net/neutron/+bug/1418017


import sys
import warnings

from novaclient import v2

warnings.warn("Module novaclient.v1_1 is deprecated (taken as a basis for "
"novaclient.v2). "
"The preferable way to get client class or object you can find "
"in novaclient.client module.")


class MovedModule(object):
def __init__(self, new_module):
self.new_module = new_module

def __getattr__(self, attr):
return getattr(self.new_module, attr)

sys.modules["novaclient.v1_1"] = MovedModule(v2)

+ 16
- 0
novaclient/v2/__init__.py View File

@@ -0,0 +1,16 @@
#
# All Rights Reserved.
#
# 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 novaclient.v2.client import Client # noqa

novaclient/v1_1/agents.py → novaclient/v2/agents.py View File


novaclient/v1_1/aggregates.py → novaclient/v2/aggregates.py View File


novaclient/v1_1/availability_zones.py → novaclient/v2/availability_zones.py View File


novaclient/v1_1/certs.py → novaclient/v2/certs.py View File


novaclient/v1_1/client.py → novaclient/v2/client.py View File

@@ -14,39 +14,39 @@
# under the License.

from novaclient import client
from novaclient.v1_1 import agents
from novaclient.v1_1 import aggregates
from novaclient.v1_1 import availability_zones
from novaclient.v1_1 import certs
from novaclient.v1_1 import cloudpipe
from novaclient.v1_1 import fixed_ips
from novaclient.v1_1 import flavor_access
from novaclient.v1_1 import flavors
from novaclient.v1_1 import floating_ip_dns
from novaclient.v1_1 import floating_ip_pools
from novaclient.v1_1 import floating_ips
from novaclient.v1_1 import floating_ips_bulk
from novaclient.v1_1 import fping
from novaclient.v1_1 import hosts
from novaclient.v1_1 import hypervisors
from novaclient.v1_1 import images
from novaclient.v1_1 import keypairs
from novaclient.v1_1 import limits
from novaclient.v1_1 import networks
from novaclient.v1_1 import quota_classes
from novaclient.v1_1 import quotas
from novaclient.v1_1 import security_group_default_rules
from novaclient.v1_1 import security_group_rules
from novaclient.v1_1 import security_groups
from novaclient.v1_1 import server_groups
from novaclient.v1_1 import servers
from novaclient.v1_1 import services
from novaclient.v1_1 import usage
from novaclient.v1_1 import versions
from novaclient.v1_1 import virtual_interfaces
from novaclient.v1_1 import volume_snapshots
from novaclient.v1_1 import volume_types
from novaclient.v1_1 import volumes
from novaclient.v2 import agents
from novaclient.v2 import aggregates
from novaclient.v2 import availability_zones
from novaclient.v2 import certs
from novaclient.v2 import cloudpipe
from novaclient.v2 import fixed_ips
from novaclient.v2 import flavor_access
from novaclient.v2 import flavors
from novaclient.v2 import floating_ip_dns
from novaclient.v2 import floating_ip_pools
from novaclient.v2 import floating_ips
from novaclient.v2 import floating_ips_bulk
from novaclient.v2 import fping
from novaclient.v2 import hosts
from novaclient.v2 import hypervisors
from novaclient.v2 import images
from novaclient.v2 import keypairs
from novaclient.v2 import limits
from novaclient.v2 import networks
from novaclient.v2 import quota_classes
from novaclient.v2 import quotas
from novaclient.v2 import security_group_default_rules
from novaclient.v2 import security_group_rules
from novaclient.v2 import security_groups
from novaclient.v2 import server_groups
from novaclient.v2 import servers
from novaclient.v2 import services
from novaclient.v2 import usage
from novaclient.v2 import versions
from novaclient.v2 import virtual_interfaces
from novaclient.v2 import volume_snapshots
from novaclient.v2 import volume_types
from novaclient.v2 import volumes


class Client(object):

novaclient/v1_1/cloudpipe.py → novaclient/v2/cloudpipe.py View File


novaclient/v1_1/contrib/__init__.py → novaclient/v2/contrib/__init__.py View File


novaclient/v1_1/contrib/assisted_volume_snapshots.py → novaclient/v2/contrib/assisted_volume_snapshots.py View File


novaclient/v1_1/contrib/baremetal.py → novaclient/v2/contrib/baremetal.py View File


novaclient/v1_1/contrib/cells.py → novaclient/v2/contrib/cells.py View File


novaclient/v1_1/contrib/deferred_delete.py → novaclient/v2/contrib/deferred_delete.py View File


novaclient/v1_1/contrib/host_evacuate.py → novaclient/v2/contrib/host_evacuate.py View File


novaclient/v1_1/contrib/host_evacuate_live.py → novaclient/v2/contrib/host_evacuate_live.py View File


novaclient/v1_1/contrib/host_servers_migrate.py → novaclient/v2/contrib/host_servers_migrate.py View File


novaclient/v1_1/contrib/instance_action.py → novaclient/v2/contrib/instance_action.py View File


novaclient/v1_1/contrib/list_extensions.py → novaclient/v2/contrib/list_extensions.py View File


novaclient/v1_1/contrib/metadata_extensions.py → novaclient/v2/contrib/metadata_extensions.py View File

@@ -15,7 +15,7 @@

from novaclient.i18n import _
from novaclient.openstack.common import cliutils
from novaclient.v1_1 import shell
from novaclient.v2 import shell


@cliutils.arg(

novaclient/v1_1/contrib/migrations.py → novaclient/v2/contrib/migrations.py View File


novaclient/v1_1/contrib/server_external_events.py → novaclient/v2/contrib/server_external_events.py View File


novaclient/v1_1/contrib/tenant_networks.py → novaclient/v2/contrib/tenant_networks.py View File


novaclient/v1_1/fixed_ips.py → novaclient/v2/fixed_ips.py View File


novaclient/v1_1/flavor_access.py → novaclient/v2/flavor_access.py View File


novaclient/v1_1/flavors.py → novaclient/v2/flavors.py View File


novaclient/v1_1/floating_ip_dns.py → novaclient/v2/floating_ip_dns.py View File


novaclient/v1_1/floating_ip_pools.py → novaclient/v2/floating_ip_pools.py View File


novaclient/v1_1/floating_ips.py → novaclient/v2/floating_ips.py View File


novaclient/v1_1/floating_ips_bulk.py → novaclient/v2/floating_ips_bulk.py View File


novaclient/v1_1/fping.py → novaclient/v2/fping.py View File


novaclient/v1_1/hosts.py → novaclient/v2/hosts.py View File


novaclient/v1_1/hypervisors.py → novaclient/v2/hypervisors.py View File


novaclient/v1_1/images.py → novaclient/v2/images.py View File


novaclient/v1_1/keypairs.py → novaclient/v2/keypairs.py View File


novaclient/v1_1/limits.py → novaclient/v2/limits.py View File


novaclient/v1_1/networks.py → novaclient/v2/networks.py View File


novaclient/v1_1/quota_classes.py → novaclient/v2/quota_classes.py View File


novaclient/v1_1/quotas.py → novaclient/v2/quotas.py View File


novaclient/v1_1/security_group_default_rules.py → novaclient/v2/security_group_default_rules.py View File


novaclient/v1_1/security_group_rules.py → novaclient/v2/security_group_rules.py View File


novaclient/v1_1/security_groups.py → novaclient/v2/security_groups.py View File


novaclient/v1_1/server_groups.py → novaclient/v2/server_groups.py View File


novaclient/v1_1/servers.py → novaclient/v2/servers.py View File

@@ -28,7 +28,7 @@ from six.moves.urllib import parse
from novaclient import base
from novaclient import crypto
from novaclient.i18n import _
from novaclient.v1_1 import security_groups
from novaclient.v2 import security_groups


REBOOT_SOFT, REBOOT_HARD = 'SOFT', 'HARD'

novaclient/v1_1/services.py → novaclient/v2/services.py View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save