Fix resource type miss in vnfd scale template

For vnf scaling, the policy type which is defined in
tacker_def.yaml is 'tosca.policies.tacker.Scaling'.
So all the scaling policy should use this type.
Currently there are some typos when using this policy type.

Change-Id: I8f60c1712007756bb8b6650e053e0d7069f0f9ba
Closes-Bug: #1637895
This commit is contained in:
xu-haiwei 2016-10-21 06:33:55 +00:00
parent 385a46358c
commit 6ccea5f268
8 changed files with 10 additions and 10 deletions

View File

@ -60,7 +60,7 @@ alarming monitoring and auto-scaling was also supported by Alarm monitor in Tack
policies:
- SP1:
type: tosca.policy.tacker.Scaling
type: tosca.policies.tacker.Scaling
properties:
increment: 1
cooldown: 120

View File

@ -38,7 +38,7 @@ topology_template:
policies:
- SP1:
type: tosca.policy.tacker.Scaling
type: tosca.policies.tacker.Scaling
properties:
increment: 1
cooldown: 120

View File

@ -55,7 +55,7 @@ topology_template:
policies:
- SP1:
type: tosca.policy.tacker.Scaling
type: tosca.policies.tacker.Scaling
properties:
increment: 1
cooldown: 120

View File

@ -48,7 +48,7 @@ ACTIVE_PENDING_STATUSES = (
PENDING_UPDATE
)
POLICY_SCALING = 'tosca.policy.tacker.Scaling'
POLICY_SCALING = 'tosca.policies.tacker.Scaling'
POLICY_SCALING_ACTIONS = (ACTION_SCALE_OUT,
ACTION_SCALE_IN) = ('out', 'in')
POLICY_ACTIONS = {POLICY_SCALING: POLICY_SCALING_ACTIONS}

View File

@ -40,7 +40,7 @@ topology_template:
policies:
- SP1:
type: tosca.policy.tacker.Scaling
type: tosca.policies.tacker.Scaling
properties:
increment: 1
cooldown: 60

View File

@ -38,7 +38,7 @@ topology_template:
policies:
- SP1:
type: tosca.policy.tacker.Scaling
type: tosca.policies.tacker.Scaling
properties:
increment: 1
cooldown: 120

View File

@ -34,7 +34,7 @@ topology_template:
policies:
- SP1:
type: tosca.policy.tacker.Scaling
type: tosca.policies.tacker.Scaling
properties:
increment: 1
cooldown: 60

View File

@ -374,11 +374,11 @@ class OpenStack(abstract_driver.DeviceAbstractDriver,
# policies:
# - SP1:
# type: tosca.policy.tacker.Scaling
# type: tosca.policies.tacker.Scaling
if 'policies' in vnfd_dict:
for policy_dict in vnfd_dict['policies']:
name, policy = list(policy_dict.items())[0]
if policy['type'] == 'tosca.policy.tacker.Scaling':
if policy['type'] == 'tosca.policies.tacker.Scaling':
_convert_to_heat_scaling_policy(policy['properties'],
name)
# TODO(kanagaraj-manickam) only one policy is supported
@ -429,7 +429,7 @@ class OpenStack(abstract_driver.DeviceAbstractDriver,
for policies in topology_tpl_dict['policies']:
policy_name, policy_dt = list(policies.items())[0]
if policy_dt['type'] == \
'tosca.policy.tacker.Scaling':
'tosca.policies.tacker.Scaling':
# Fixed metadata. it will be fixed
# once targets are supported
metadata_dict = dict()