-
Notifications
You must be signed in to change notification settings - Fork 0
/
sanity-vm.yaml
88 lines (74 loc) · 2.49 KB
/
sanity-vm.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
heat_template_version: 2014-10-16
description: >
Sanity test, involves create Flavor, upload Image, create VN and create a VM
parameters:
image:
type: string
description: Image to be used for compute instance
default: cirros
flavor:
type: string
description: Type of instance (flavor) to be used
default: m1.tiny
network_name:
type: string
description: Name of VirtualNetwork to be created
network_subnet_prefix:
type: string
description: Prefix of the Virtual Network
network_subnet_prefix_len:
type: string
description: Prefix length of the Virtual Network
network_subnet_default_gw:
type: string
description: Default Gateway of the Virtual Network
network_is_shared:
type: boolean
description: Is the Virtual Network shared or not
route_target:
type: string
description: Route Target of the virtual Network
resources:
template_NetworkIpam_1:
type: OS::ContrailV2::NetworkIpam
properties:
name: { get_param: network_name }
template_VirtualNetwork_1:
type: OS::ContrailV2::VirtualNetwork
depends_on: [ template_NetworkIpam_1 ]
properties:
name: { get_param: network_name }
network_ipam_refs: [{ get_resource: template_NetworkIpam_1 }]
network_ipam_refs_data:
[{
network_ipam_refs_data_ipam_subnets:
[{
network_ipam_refs_data_ipam_subnets_subnet:
{
network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: { get_param: network_subnet_prefix },
network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: { get_param: network_subnet_prefix_len },
},
network_ipam_refs_data_ipam_subnets_default_gateway: { get_param: network_subnet_default_gw },
}]
}]
route_target_list:
{
route_target_list_route_target: [{ get_param: route_target }],
}
is_shared: { get_param: network_is_shared }
my_instance:
type: OS::Nova::Server
depends_on: [ nova_flavor glance_image ]
properties:
name: { get_param: instance_name }
image: { get_param: image }
flavor: { get_param: flavor }
networks:
- network: { get_resource: template_VirtualNetwork_1 }
outputs:
instance_name:
description: Name of the instance
value: { get_attr: [my_instance, name] }
instance_ip:
description: IP address of the instance
value: { get_attr: [my_instance, first_address] }