Fix incorrect resource types in docs/comment/code
The template guide documentation references OS::Compute::Server in several places, and there are similar errors in the environment code comments and environment test code. Also there is a similar issue with template guide reference to Rackspace::Compute::Server, and a minor typo/spelling issue. Change-Id: Iafbf405a328bdd8222c277efe5b52d7f8f589635 Closes-Bug: #1270078
This commit is contained in:
parent
bca680bc91
commit
75af33a802
|
@ -114,7 +114,7 @@ Returns an IP address such as ``10.0.0.2``
|
|||
----------
|
||||
Fn::GetAZs
|
||||
----------
|
||||
Return the Availablity Zones within the given region.
|
||||
Return the Availability Zones within the given region.
|
||||
|
||||
*Note: AZ's and regions are not fully implemented in Heat.*
|
||||
|
||||
|
@ -262,7 +262,7 @@ Here is a top level template ``top.yaml``
|
|||
|
||||
resources:
|
||||
my_server:
|
||||
type: OS::Compute::Server
|
||||
type: OS::Nova::Server
|
||||
metadata:
|
||||
key: value
|
||||
some: more stuff
|
||||
|
@ -273,7 +273,7 @@ Here is a resource template ``my_actual_server.yaml``
|
|||
|
||||
resources:
|
||||
_actual_server_:
|
||||
type: OS::Compute::Server
|
||||
type: OS::Nova::Server
|
||||
metadata: {'Fn::ResourceFacade': Metadata}
|
||||
|
||||
The environment file ``env.yaml``
|
||||
|
@ -282,7 +282,7 @@ The environment file ``env.yaml``
|
|||
resource_registry:
|
||||
resources:
|
||||
my_server:
|
||||
"OS::Compute::Server": my_actual_server.yaml
|
||||
"OS::Nova::Server": my_actual_server.yaml
|
||||
|
||||
To use it
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ class ResourceRegistry(object):
|
|||
|
||||
def _register_info(self, path, info):
|
||||
"""place the new info in the correct location in the registry.
|
||||
path: a list of keys ['resources', 'my_server', 'OS::Compute::Server']
|
||||
path: a list of keys ['resources', 'my_server', 'OS::Nova::Server']
|
||||
"""
|
||||
descriptive_path = '/'.join(path)
|
||||
name = path[-1]
|
||||
|
@ -226,7 +226,7 @@ class ResourceRegistry(object):
|
|||
if impl and resource_type in impl:
|
||||
yield impl[resource_type]
|
||||
|
||||
# handle: "OS::Compute::Server" -> "Rackspace::Compute::Server"
|
||||
# handle: "OS::Nova::Server" -> "Rackspace::Cloud::Server"
|
||||
impl = self._registry.get(resource_type)
|
||||
if impl:
|
||||
yield impl
|
||||
|
|
|
@ -49,13 +49,13 @@ class EnvironmentTest(common.HeatTestCase):
|
|||
self.assertEqual(new_env, env.user_env_as_dict())
|
||||
|
||||
def test_global_registry(self):
|
||||
self.g_env.register_class('CloudX::Compute::Server',
|
||||
self.g_env.register_class('CloudX::Nova::Server',
|
||||
generic_resource.GenericResource)
|
||||
new_env = {u'parameters': {u'a': u'ff', u'b': u'ss'},
|
||||
u'resource_registry': {u'OS::*': 'CloudX::*'}}
|
||||
env = environment.Environment(new_env)
|
||||
self.assertEqual('CloudX::Compute::Server',
|
||||
env.get_resource_info('OS::Compute::Server',
|
||||
self.assertEqual('CloudX::Nova::Server',
|
||||
env.get_resource_info('OS::Nova::Server',
|
||||
'my_db_server').name)
|
||||
|
||||
def test_map_one_resource_type(self):
|
||||
|
|
Loading…
Reference in New Issue