diff options
author | Steve Baker <sbaker@redhat.com> | 2014-09-14 10:05:43 +1200 |
---|---|---|
committer | Steve Baker <sbaker@redhat.com> | 2014-09-14 10:05:43 +1200 |
commit | d6e40a3fffb37d476990cf4de4413057b5a9ef90 (patch) | |
tree | 01dda3bc2c41e81046f06922ecb29a2f49042710 | |
parent | fd18617b30a569142636e4a31b9b8975364155c2 (diff) |
Use the server name attribute
The 'show' attribute results in a nova API call, which has
performance overhead even with attribute memoization.
The name attribute was added to expose the name without needing
an API call, since the resource already knows the name. This
change switches from using 'show' to 'name' throughout.
Change-Id: I1e83dd008cd02e5cec97868db0d5a695f07b7199
-rw-r--r-- | overcloud-source.yaml | 30 | ||||
-rw-r--r-- | undercloud-source.yaml | 7 |
2 files changed, 16 insertions, 21 deletions
diff --git a/overcloud-source.yaml b/overcloud-source.yaml index 3dbd5712..a9f39860 100644 --- a/overcloud-source.yaml +++ b/overcloud-source.yaml @@ -447,11 +447,9 @@ resources: - 0 - Merge::Map: controller0: - - Fn::Select: + - get_attr: + - controller0 - name - - get_attr: - - controller0 - - show nodeid: {get_input: bootstack_nodeid} database: host: &database_host @@ -533,7 +531,7 @@ resources: nodes: Merge::Map: controller0: - {get_attr: [controller0, show, name]} + {get_attr: [controller0, name]} keystone: db: Fn::Join: @@ -678,7 +676,7 @@ resources: Merge::Map: controller0: ip: {get_attr: [controller0, networks, ctlplane, 0]} - name: {get_attr: [controller0, show, name]} + name: {get_attr: [controller0, name]} net_binds: - ip: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]} services: @@ -778,7 +776,7 @@ resources: config: {get_resource: controllerConfig} server: {get_resource: controller0} input_values: - bootstack_nodeid: {get_attr: [controller0, show, name]} + bootstack_nodeid: {get_attr: [controller0, name]} controller_host: {get_attr: [controller0, networks, ctlplane, 0]} controller_virtual_ip: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]} @@ -815,10 +813,10 @@ resources: Fn::Join: - ' ' - - {get_attr: [NovaCompute0, networks, ctlplane, 0]} - - {get_attr: [NovaCompute0, show, name]} + - {get_attr: [NovaCompute0, name]} - Fn::Join: - '.' - - - {get_attr: [NovaCompute0, show, name]} + - - {get_attr: [NovaCompute0, name]} - 'novalocal' - Fn::Join: - "\n" @@ -827,10 +825,10 @@ resources: Fn::Join: - ' ' - - {get_attr: [BlockStorage0, networks, ctlplane, 0]} - - {get_attr: [BlockStorage0, show, name]} + - {get_attr: [BlockStorage0, name]} - Fn::Join: - '.' - - - {get_attr: [BlockStorage0, show, name]} + - - {get_attr: [BlockStorage0, name]} - 'novalocal' - Fn::Join: - "\n" @@ -839,10 +837,10 @@ resources: Fn::Join: - ' ' - - {get_attr: [SwiftStorage0, networks, ctlplane, 0]} - - {get_attr: [SwiftStorage0, show, name]} + - {get_attr: [SwiftStorage0, name]} - Fn::Join: - '.' - - - {get_attr: [SwiftStorage0, show, name]} + - - {get_attr: [SwiftStorage0, name]} - 'novalocal' - Fn::Join: - "\n" @@ -851,10 +849,10 @@ resources: Fn::Join: - ' ' - - {get_attr: [controller0, networks, ctlplane, 0]} - - {get_attr: [controller0, show, name]} + - {get_attr: [controller0, name]} - Fn::Join: - '.' - - - {get_attr: [controller0, show, name]} + - - {get_attr: [controller0, name]} - 'novalocal' - {get_param: CloudName} rabbit: @@ -863,7 +861,7 @@ resources: - ',' - Merge::Map: controller0: - {get_attr: [controller0, show, name]} + {get_attr: [controller0, name]} controller0SSLDeployment: type: OS::Heat::StructuredDeployment properties: diff --git a/undercloud-source.yaml b/undercloud-source.yaml index 0788e8b6..2fcadd90 100644 --- a/undercloud-source.yaml +++ b/undercloud-source.yaml @@ -230,11 +230,9 @@ resources: - 0 - Merge::Map: undercloud: - - Fn::Select: + - get_attr: + - undercloud - name - - get_attr: - - undercloud - - show nodeid: {get_input: bootstack_nodeid} bootstack: public_interface_ip: @@ -363,7 +361,6 @@ resources: bootstack_nodeid: get_attr: - undercloud - - show - name controller_host: get_attr: |