Improve VNF Package for v2 API FT
This patch modifies the following for the VNF Package for v2 API FT: [1] Deleted the description about "OS::Heat::ScalingPolicy" - Unnecessary because v2 API does not use "OS::Heat::ScalingPolicy". [2] Changed VDU1 to use only one VolumeType - Changed because it is not necessary to create a VolumeType for each VolumeStorage. [3] Renamed VolumeType of VDU1 to "VDU1-multi" - Renamed because it is difficult to understand with the resourceID of VDU1_CP1. [4] Renamed VolumeType resource of VDU2 to "VDU2-VolumeType" - Renamed because it is difficult to understand with "multi". Since there is a part that counts the number of resources in FT, the FT code is also partially modified with the change in [2]. Change-Id: I5827fbdee369fcc39be0d895390f8e7f82632933
This commit is contained in:
parent
3156895dee
commit
67530ac0c7
|
@ -22,6 +22,8 @@ parameters:
|
|||
type: string
|
||||
subnet2:
|
||||
type: string
|
||||
volume_type:
|
||||
type: string
|
||||
|
||||
resources:
|
||||
VDU1:
|
||||
|
@ -42,8 +44,6 @@ resources:
|
|||
get_resource: VDU1_CP4
|
||||
- port:
|
||||
get_resource: VDU1_CP5
|
||||
|
||||
|
||||
availability_zone: { get_param: zone }
|
||||
|
||||
VDU1-VirtualStorage:
|
||||
|
@ -51,12 +51,7 @@ resources:
|
|||
properties:
|
||||
image: { get_param: image }
|
||||
size: 1
|
||||
volume_type: { get_resource: multi }
|
||||
multi:
|
||||
type: OS::Cinder::VolumeType
|
||||
properties:
|
||||
name: { get_resource: VDU1_CP1 }
|
||||
metadata: { multiattach: "<is> True" }
|
||||
volume_type: { get_param: volume_type }
|
||||
|
||||
# extVL without FixedIP or with numDynamicAddresses
|
||||
VDU1_CP1:
|
||||
|
|
|
@ -25,10 +25,17 @@ resources:
|
|||
net3: { get_resource: internalVL1 }
|
||||
net4: { get_resource: internalVL2 }
|
||||
net5: { get_resource: internalVL3 }
|
||||
volume_type: { get_resource: VDU1-VolumeType }
|
||||
|
||||
# NOTE: Resource definition of OS::Heat::ScalingPolicy is omitted.
|
||||
# It is not used by v2 scale implementation unlike v1.
|
||||
|
||||
VDU1-VolumeType:
|
||||
type: OS::Cinder::VolumeType
|
||||
properties:
|
||||
name: VDU1-multi
|
||||
metadata: { multiattach: "<is> True" }
|
||||
|
||||
VDU2:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
|
@ -53,8 +60,8 @@ resources:
|
|||
properties:
|
||||
image: { get_param: [ nfv, VDU, VDU2-VirtualStorage, vcImageId] }
|
||||
size: 1
|
||||
volume_type: { get_resource: multi }
|
||||
multi:
|
||||
volume_type: { get_resource: VDU2-VolumeType }
|
||||
VDU2-VolumeType:
|
||||
type: OS::Cinder::VolumeType
|
||||
properties:
|
||||
name: VDU2-multi
|
||||
|
|
|
@ -42,8 +42,6 @@ resources:
|
|||
get_resource: VDU1_CP4
|
||||
- port:
|
||||
get_resource: VDU1_CP5
|
||||
|
||||
|
||||
availability_zone: { get_param: zone }
|
||||
|
||||
VDU1-VirtualStorage:
|
||||
|
@ -51,11 +49,11 @@ resources:
|
|||
properties:
|
||||
image: { get_param: image }
|
||||
size: 1
|
||||
volume_type: { get_resource: multi }
|
||||
multi:
|
||||
volume_type: { get_resource: VDU1-VolumeType }
|
||||
VDU1-VolumeType:
|
||||
type: OS::Cinder::VolumeType
|
||||
properties:
|
||||
name: multivolume
|
||||
name: VDU1-multi
|
||||
metadata: { multiattach: "<is> True" }
|
||||
|
||||
# extVL without FixedIP or with numDynamicAddresses
|
||||
|
|
|
@ -53,8 +53,8 @@ resources:
|
|||
properties:
|
||||
image: { get_param: [ nfv, VDU, VDU2-VirtualStorage, vcImageId] }
|
||||
size: 1
|
||||
volume_type: { get_resource: multi }
|
||||
multi:
|
||||
volume_type: { get_resource: VDU2-VolumeType }
|
||||
VDU2-VolumeType:
|
||||
type: OS::Cinder::VolumeType
|
||||
properties:
|
||||
name: VDU2-multi
|
||||
|
|
|
@ -19,20 +19,8 @@ resources:
|
|||
image: { get_param: [ nfv, VDU, VDU1, vcImageId] }
|
||||
net1: { get_param: [ nfv, CP, VDU1_CP1, network] }
|
||||
|
||||
VDU1_scale_out:
|
||||
type: OS::Heat::ScalingPolicy
|
||||
properties:
|
||||
scaling_adjustment: 1
|
||||
auto_scaling_group_id:
|
||||
get_resource: VDU1_scale
|
||||
adjustment_type: change_in_capacity
|
||||
VDU1_scale_in:
|
||||
type: OS::Heat::ScalingPolicy
|
||||
properties:
|
||||
scaling_adjustment: -1
|
||||
auto_scaling_group_id:
|
||||
get_resource: VDU1_scale
|
||||
adjustment_type: change_in_capacity
|
||||
# NOTE: Resource definition of OS::Heat::ScalingPolicy is omitted.
|
||||
# It is not used by v2 scale implementation unlike v1.
|
||||
|
||||
VDU2:
|
||||
type: OS::Nova::Server
|
||||
|
|
|
@ -18,21 +18,16 @@ resources:
|
|||
flavor: { get_param: [ nfv, VDU, VDU1, computeFlavourId ] }
|
||||
image: { get_param: [ nfv, VDU, VDU1-VirtualStorage, vcImageId] }
|
||||
net1: { get_param: [ nfv, CP, VDU1_CP1, network] }
|
||||
volume_type: { get_resource: VDU1-VolumeType }
|
||||
|
||||
VDU1_scale_out:
|
||||
type: OS::Heat::ScalingPolicy
|
||||
# NOTE: Resource definition of OS::Heat::ScalingPolicy is omitted.
|
||||
# It is not used by v2 scale implementation unlike v1.
|
||||
|
||||
VDU1-VolumeType:
|
||||
type: OS::Cinder::VolumeType
|
||||
properties:
|
||||
scaling_adjustment: 1
|
||||
auto_scaling_group_id:
|
||||
get_resource: VDU1_scale
|
||||
adjustment_type: change_in_capacity
|
||||
VDU1_scale_in:
|
||||
type: OS::Heat::ScalingPolicy
|
||||
properties:
|
||||
scaling_adjustment: -1
|
||||
auto_scaling_group_id:
|
||||
get_resource: VDU1_scale
|
||||
adjustment_type: change_in_capacity
|
||||
name: VDU1-multi
|
||||
metadata: { multiattach: "<is> True" }
|
||||
|
||||
VDU2:
|
||||
type: OS::Nova::Server
|
||||
|
|
|
@ -8,6 +8,8 @@ parameters:
|
|||
type: string
|
||||
net1:
|
||||
type: string
|
||||
volume_type:
|
||||
type: string
|
||||
|
||||
resources:
|
||||
VDU1:
|
||||
|
@ -30,10 +32,4 @@ resources:
|
|||
properties:
|
||||
image: { get_param: image }
|
||||
size: 4
|
||||
volume_type: { get_resource: multi }
|
||||
multi:
|
||||
type: OS::Cinder::VolumeType
|
||||
properties:
|
||||
name: { get_resource: VDU1_CP1 }
|
||||
metadata: { multiattach: "<is> True" }
|
||||
|
||||
volume_type: { get_param: volume_type }
|
||||
|
|
|
@ -19,20 +19,8 @@ resources:
|
|||
image: { get_param: [ nfv, VDU, VDU1, vcImageId ] }
|
||||
net1: { get_param: [ nfv, CP, VDU1_CP1, network] }
|
||||
|
||||
VDU1_scale_out:
|
||||
type: OS::Heat::ScalingPolicy
|
||||
properties:
|
||||
scaling_adjustment: 1
|
||||
auto_scaling_group_id:
|
||||
get_resource: VDU1_scale
|
||||
adjustment_type: change_in_capacity
|
||||
VDU1_scale_in:
|
||||
type: OS::Heat::ScalingPolicy
|
||||
properties:
|
||||
scaling_adjustment: -1
|
||||
auto_scaling_group_id:
|
||||
get_resource: VDU1_scale
|
||||
adjustment_type: change_in_capacity
|
||||
# NOTE: Resource definition of OS::Heat::ScalingPolicy is omitted.
|
||||
# It is not used by v2 scale implementation unlike v1.
|
||||
|
||||
VDU2:
|
||||
type: OS::Nova::Server
|
||||
|
|
|
@ -18,21 +18,16 @@ resources:
|
|||
flavor: { get_param: [ nfv, VDU, VDU1, computeFlavourId ] }
|
||||
image: { get_param: [ nfv, VDU, VDU1-VirtualStorage, vcImageId ] }
|
||||
net1: { get_param: [ nfv, CP, VDU1_CP1, network] }
|
||||
volume_type: { get_resource: VDU1-VolumeType }
|
||||
|
||||
VDU1_scale_out:
|
||||
type: OS::Heat::ScalingPolicy
|
||||
# NOTE: Resource definition of OS::Heat::ScalingPolicy is omitted.
|
||||
# It is not used by v2 scale implementation unlike v1.
|
||||
|
||||
VDU1-VolumeType:
|
||||
type: OS::Cinder::VolumeType
|
||||
properties:
|
||||
scaling_adjustment: 1
|
||||
auto_scaling_group_id:
|
||||
get_resource: VDU1_scale
|
||||
adjustment_type: change_in_capacity
|
||||
VDU1_scale_in:
|
||||
type: OS::Heat::ScalingPolicy
|
||||
properties:
|
||||
scaling_adjustment: -1
|
||||
auto_scaling_group_id:
|
||||
get_resource: VDU1_scale
|
||||
adjustment_type: change_in_capacity
|
||||
name: VDU1-multi
|
||||
metadata: { multiattach: "<is> True" }
|
||||
|
||||
VDU2:
|
||||
type: OS::Nova::Server
|
||||
|
@ -55,8 +50,8 @@ resources:
|
|||
properties:
|
||||
image: { get_param: [ nfv, VDU, VDU2-VirtualStorage, vcImageId ] }
|
||||
size: 4
|
||||
volume_type: { get_resource: multi }
|
||||
multi:
|
||||
volume_type: { get_resource: VDU2-VolumeType }
|
||||
VDU2-VolumeType:
|
||||
type: OS::Cinder::VolumeType
|
||||
properties:
|
||||
name: VDU2-multi
|
||||
|
|
|
@ -8,6 +8,8 @@ parameters:
|
|||
type: string
|
||||
net1:
|
||||
type: string
|
||||
volume_type:
|
||||
type: string
|
||||
|
||||
resources:
|
||||
VDU1:
|
||||
|
@ -30,10 +32,4 @@ resources:
|
|||
properties:
|
||||
image: { get_param: image }
|
||||
size: 4
|
||||
volume_type: { get_resource: multi }
|
||||
multi:
|
||||
type: OS::Cinder::VolumeType
|
||||
properties:
|
||||
name: { get_resource: VDU1_CP1 }
|
||||
metadata: { multiattach: "<is> True" }
|
||||
|
||||
volume_type: { get_param: volume_type }
|
||||
|
|
|
@ -19,20 +19,8 @@ resources:
|
|||
image: { get_param: [ nfv, VDU, VDU1, vcImageId] }
|
||||
net1: { get_param: [ nfv, CP, VDU1_CP1, network] }
|
||||
|
||||
VDU1_scale_out:
|
||||
type: OS::Heat::ScalingPolicy
|
||||
properties:
|
||||
scaling_adjustment: 1
|
||||
auto_scaling_group_id:
|
||||
get_resource: VDU1_scale
|
||||
adjustment_type: change_in_capacity
|
||||
VDU1_scale_in:
|
||||
type: OS::Heat::ScalingPolicy
|
||||
properties:
|
||||
scaling_adjustment: -1
|
||||
auto_scaling_group_id:
|
||||
get_resource: VDU1_scale
|
||||
adjustment_type: change_in_capacity
|
||||
# NOTE: Resource definition of OS::Heat::ScalingPolicy is omitted.
|
||||
# It is not used by v2 scale implementation unlike v1.
|
||||
|
||||
VDU2:
|
||||
type: OS::Nova::Server
|
||||
|
|
|
@ -19,20 +19,8 @@ resources:
|
|||
image: { get_param: [ nfv, VDU, VDU1, vcImageId] }
|
||||
net1: { get_param: [ nfv, CP, VDU1_CP1, network] }
|
||||
|
||||
VDU1_scale_out:
|
||||
type: OS::Heat::ScalingPolicy
|
||||
properties:
|
||||
scaling_adjustment: 1
|
||||
auto_scaling_group_id:
|
||||
get_resource: VDU1_scale
|
||||
adjustment_type: change_in_capacity
|
||||
VDU1_scale_in:
|
||||
type: OS::Heat::ScalingPolicy
|
||||
properties:
|
||||
scaling_adjustment: -1
|
||||
auto_scaling_group_id:
|
||||
get_resource: VDU1_scale
|
||||
adjustment_type: change_in_capacity
|
||||
# NOTE: Resource definition of OS::Heat::ScalingPolicy is omitted.
|
||||
# It is not used by v2 scale implementation unlike v1.
|
||||
|
||||
VDU2:
|
||||
type: OS::Nova::Server
|
||||
|
|
|
@ -18,21 +18,16 @@ resources:
|
|||
flavor: { get_param: [ nfv, VDU, VDU1, computeFlavourId ] }
|
||||
image: { get_param: [ nfv, VDU, VDU1-VirtualStorage, vcImageId ] }
|
||||
net1: { get_param: [ nfv, CP, VDU1_CP1, network] }
|
||||
volume_type: { get_resource: VDU1-VolumeType }
|
||||
|
||||
VDU1_scale_out:
|
||||
type: OS::Heat::ScalingPolicy
|
||||
# NOTE: Resource definition of OS::Heat::ScalingPolicy is omitted.
|
||||
# It is not used by v2 scale implementation unlike v1.
|
||||
|
||||
VDU1-VolumeType:
|
||||
type: OS::Cinder::VolumeType
|
||||
properties:
|
||||
scaling_adjustment: 1
|
||||
auto_scaling_group_id:
|
||||
get_resource: VDU1_scale
|
||||
adjustment_type: change_in_capacity
|
||||
VDU1_scale_in:
|
||||
type: OS::Heat::ScalingPolicy
|
||||
properties:
|
||||
scaling_adjustment: -1
|
||||
auto_scaling_group_id:
|
||||
get_resource: VDU1_scale
|
||||
adjustment_type: change_in_capacity
|
||||
name: VDU1-multi
|
||||
metadata: { multiattach: "<is> True" }
|
||||
|
||||
VDU2:
|
||||
type: OS::Nova::Server
|
||||
|
@ -55,8 +50,8 @@ resources:
|
|||
properties:
|
||||
image: { get_param: [ nfv, VDU, VDU2-VirtualStorage, vcImageId ] }
|
||||
size: 4
|
||||
volume_type: { get_resource: multi }
|
||||
multi:
|
||||
volume_type: { get_resource: VDU2-VolumeType }
|
||||
VDU2-VolumeType:
|
||||
type: OS::Cinder::VolumeType
|
||||
properties:
|
||||
name: VDU2-multi
|
||||
|
|
|
@ -8,6 +8,8 @@ parameters:
|
|||
type: string
|
||||
net1:
|
||||
type: string
|
||||
volume_type:
|
||||
type: string
|
||||
|
||||
resources:
|
||||
VDU1:
|
||||
|
@ -30,10 +32,4 @@ resources:
|
|||
properties:
|
||||
image: { get_param: image }
|
||||
size: 4
|
||||
volume_type: { get_resource: multi }
|
||||
multi:
|
||||
type: OS::Cinder::VolumeType
|
||||
properties:
|
||||
name: { get_resource: VDU1_CP1 }
|
||||
metadata: { multiattach: "<is> True" }
|
||||
|
||||
volume_type: { get_param: volume_type }
|
||||
|
|
|
@ -665,9 +665,8 @@ class VnfLcmTest(base_v2.BaseSolV2Test):
|
|||
nested_stacks = self.heat_client.get_resources(stack_name)
|
||||
count_after_scaleout = len(nested_stacks)
|
||||
# check nested stack was created
|
||||
# 9 was the sum of 1 VM, 1 Volume, 1 VolumeType, 5 CPs,
|
||||
# 1 stack(VDU1.yaml)
|
||||
self.assertEqual(9, count_after_scaleout - count_before_scaleout)
|
||||
# 8 was the sum of 1 VM, 1 Volume, 5 CPs, 1 stack(VDU1.yaml)
|
||||
self.assertEqual(8, count_after_scaleout - count_before_scaleout)
|
||||
|
||||
# 15. Scale in operation
|
||||
scalein_req = paramgen.scalein_vnf_max()
|
||||
|
@ -706,9 +705,8 @@ class VnfLcmTest(base_v2.BaseSolV2Test):
|
|||
nested_stacks = self.heat_client.get_resources(stack_name)
|
||||
count_after_scalein = len(nested_stacks)
|
||||
# check nested stack was deleted
|
||||
# 9 was the sum of 1 VM, 1 Volume, 1 VolumeType, 5 CPs,
|
||||
# 1 stack(VDU1.yaml)
|
||||
self.assertEqual(9, count_after_scaleout - count_after_scalein)
|
||||
# 8 was the sum of 1 VM, 1 Volume, 5 CPs, 1 stack(VDU1.yaml)
|
||||
self.assertEqual(8, count_after_scaleout - count_after_scalein)
|
||||
|
||||
# 17. Heal VNF(vnfc)
|
||||
nested_stacks = self.heat_client.get_resources(stack_name)
|
||||
|
@ -2660,9 +2658,8 @@ class VnfLcmTest(base_v2.BaseSolV2Test):
|
|||
nested_stacks = self.heat_client.get_resources(stack_name)
|
||||
count_after_scaleout = len(nested_stacks)
|
||||
# check nested stack was created
|
||||
# 9 was the sum of 1 VM, 1 Volume, 1 VolumeType, 5 CPs,
|
||||
# 1 stack(VDU1.yaml)
|
||||
self.assertEqual(9, count_after_scaleout - count_before_scaleout)
|
||||
# 8 was the sum of 1 VM, 1 Volume, 5 CPs, 1 stack(VDU1.yaml)
|
||||
self.assertEqual(8, count_after_scaleout - count_before_scaleout)
|
||||
|
||||
# check vnfState of VNF
|
||||
self.assertEqual(fields.VnfOperationalStateType.STARTED,
|
||||
|
@ -2700,9 +2697,8 @@ class VnfLcmTest(base_v2.BaseSolV2Test):
|
|||
nested_stacks = self.heat_client.get_resources(stack_name)
|
||||
count_after_scalein = len(nested_stacks)
|
||||
# check nested stack was deleted
|
||||
# 9 was the sum of 1 VM, 1 Volume, 1 VolumeType, 5 CPs,
|
||||
# 1 stack(VDU1.yaml)
|
||||
self.assertEqual(9, count_after_scaleout - count_after_scalein)
|
||||
# 8 was the sum of 1 VM, 1 Volume, 5 CPs, 1 stack(VDU1.yaml)
|
||||
self.assertEqual(8, count_after_scaleout - count_after_scalein)
|
||||
|
||||
# 10. Heal VNF(all with all=True parameter))
|
||||
nested_stacks = self.heat_client.get_resources(stack_name)
|
||||
|
|
Loading…
Reference in New Issue