84e7e6bde82c993cff0ca19ab434ba29d61fd995
[optf/has.git] / conductor / doc / examples / README.md
1 # Example Conductor Templates
2
3 *Updated: 10 Oct 2017*
4
5 ## Example 1
6
7 ```yaml
8
9 # Homing Specification Version
10 homing_template_version: 2017-10-10
11
12 # Runtime order Parameters
13 parameters:
14   service_name: Residential vCPE
15   service_id: vcpe_service_id
16   customer_lat: 32.897480
17   customer_long: -97.040443
18
19 # List of geographical locations
20 locations:
21   customer_loc:
22     latitude: {get_param: customer_lat}
23     longitude: {get_param: customer_long}
24
25 # List of VNFs (demands) to be homed
26 demands:
27   vGMuxInfra:
28   - inventory_provider: aai
29     inventory_type: service
30     attributes:
31       equipment_type: vG_Mux
32       customer_id: some_company
33     excluded_candidates:
34       - candidate_id:
35         1ac71fb8-ad43-4e16-9459-c3f372b8236d
36     existing_placement:
37         - candidate_id: 21d5f3e8-e714-4383-8f99-cc480144505a
38   vG:
39   - inventory_provider: aai
40     inventory_type: service
41     attributes:
42       equipment_type: vG
43       modelId: vG_model_id
44       customer_id: some_company
45     excluded_candidates:
46       - candidate_id: 1ac71fb8-ad43-4e16-9459-c3f372b8236d
47     existing_placement:
48       - candidate_id: 21d5f3e8-e714-4383-8f99-cc480144505a
49   - inventory_provider: aai
50     inventory_type: cloud
51
52 # List of homing policies (constraints)
53 constraints:
54     # distance constraint
55     - constraint_vgmux_customer:
56         type: distance_to_location
57         demands: [vGMuxInfra]
58         properties:
59                 distance: < 100 km
60           location: customer_loc
61     # cloud region co-location constraint
62     - colocation:
63                 type: zone
64         demands: [vGMuxInfra, vG]
65         properties:
66                 qualifier: same
67           category: region
68     # platform capability constraint
69     - numa_cpu_pin_capabilities:
70                 type: attribute
71         demands: [vG]
72         properties:
73                 evaluate:
74             vcpu_pinning: True
75             numa_topology: numa_spanning
76     # cloud provider constraint
77     - cloud_version_capabilities:
78                 type: attribute
79         demands: [vGMuxInfra]
80         properties:
81                 evaluate:
82                 cloud_version: 1.11.84
83             cloud_provider: AWS
84
85 # Objective function to minimize
86 optimization:
87   minimize:
88     sum:
89     - {distance_between: [customer_loc, vGMuxInfra]}
90     - {distance_between: [customer_loc, vG]}
91
92 ```
93
94 ## Contact ##
95
96 Shankar Narayanan <shankarpnsn@gmail.com>