98d8cea272011877967c3e85617cd339e34a6c92
[optf/osdf.git] / test / policy-local-files / hpa_policy_vG_1.json
1 {
2     "service": "hpaPolicy",
3     "policyName": "oofBeijing.hpaPolicy_vG",
4     "description": "HPA policy for vG",
5     "templateVersion": "0.0.1",
6     "version": "1.0",
7     "priority": "3",
8     "riskType": "test",
9     "riskLevel": "2",
10     "guard": "False",
11     "content": {
12       "resources": "vG",
13       "identity": "hpaPolicy_vG",
14       "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"],
15       "policyType": "hpaPolicy",
16       "flavorFeatures": [
17         {
18           "flavorLabel": "flavor_label_vm_01",
19           "flavorProperties":[
20             {
21               "hpa_feature" : "cpuTopology",
22               "mandatory" : "True",
23               "architecture": "generic",
24               "featureAttributes": [
25                 {"attribute":"numCpuSockets", "values": "2","operator": ">=", "unit": ""},
26                 {"attribute":"numCpuSockets", "values": "4","operator": "<=", "unit": ""},
27                 {"attribute":"numCpuCores", "value": "2", "operator":">=", "unit": ""},
28                 {"attribute":"numCpuCores", "value": "4", "operator":"<=", "unit": ""},
29                 {"attribute":"numCpuThreads", "value": "4", "operator":">=", "unit": ""},
30                 {"attribute":"numCpuThreads", "value": "8", "operator":"<=", "unit": ""}
31               ]
32             },
33             {
34               "hpa_feature" : "basicCapabilities",
35               "mandatory" : "True",
36               "architecture": "generic",
37               "featureAttributes": [
38                 {"attribute": "numVirtualCpu", "value": "6", "operator": "=", "unit": ""},
39                 {"attribute": "virtualMemSize", "value":"6", "operator": "=", "unit": "GB"}
40               ]
41             },
42             {
43               "hpa_feature" : "ovsDpdk",
44               "mandatory" : "False",
45               "score" : "3",
46               "architecture": "generic",
47               "featureAttributes": [
48                  {"attribute":"dataProcessingAccelerationLibrary", "value":"ovsDpdk_version", "operator": "=", "unit":""}
49               ]
50             },
51             {
52               "hpa_feature" : "cpuInstructionSetExtensions",
53               "mandatory" : "True",
54               "architecture": "INTEL-64",
55               "featureAttributes": [
56                 {"attribute":"instructionSetExtensions", "value":["<CPUINST>", "<CPUINST>"], "operator": "ALL", "unit":""}
57               ]
58             }
59           ]
60         },
61         {
62           "flavorLabel": "flavor_label_vm_02",
63           "flavorProperties":[
64             {
65               "hpa_feature" : "cpuPinningy",
66               "mandatory" : "True",
67               "architecture": "generic",
68               "featureAttributes": [
69                 {"attribute":"logicalCpuThreadPinningPolicy", "value":"<CPUTHREADPOLICY>", "operator": "=", "unit":""},
70                 {"attribute":"logicalCpuPinningPolicy", "value": "<CPUPOLICY>","operator": "=", "unit":""}
71               ]
72             },
73             {
74               "hpa_feature" : "basicCapabilities",
75               "mandatory" : "True",
76               "architecture": "generic",
77               "featureAttributes": [
78                 {"attribute": "numVirtualCpu", "value": "6", "operator": "=", "unit": ""},
79                 {"attribute": "virtualMemSize", "value":"6", "operator": "=", "unit": "GB"}
80               ]
81             },
82             {
83               "hpa_feature" : "localStorage",
84               "mandatory" : "False",
85               "score" : "5",
86               "architecture": "generic",
87               "featureAttributes": [
88                 {"attribute": "diskSize", "value": "2", "operator": "=", "unit": "GB"},  
89                 {"attribute": "ephemeralDiskSize", "value": "2", "operator": "=", "unit": "GB"},
90                 {"attribute": "swapMemSize", "value":"16", "operator": "=", "unit": "MB"}
91               ]
92             },
93             {
94               "hpa_feature" : "pcie",
95               "mandatory" : "True",
96               "architecture": "generic",
97               "featureAttributes": [
98                 {"attribute": "pciCount", "value": "2", "operator": "=", "unit": ""},
99                 {"attribute": "pciVendorId", "value":"8086", "operator": "=", "unit": ""},
100                 {"attribute": "pciDeviceId", "value": "2", "operator": "=", "unit": ""},
101                 {"attribute": "functionType", "value": "<PCITYPEVALUE>","operator": "=", "unit": ""}
102               ]
103             }
104           ]
105         },
106         {
107           "flavorLabel": "flavor_label_vm_03",
108           "flavorProperties":[
109             {
110               "hpa_feature" : "numa",
111               "mandatory" : "False",
112               "score" : "5",
113               "architecture": "generic",
114               "featureAttributes": [
115                 {"attribute": "numaNodes", "value": "2", "operator": "=", "unit": ""},
116                 {"attribute": "numaCpu-0", "values":"2", "operator": "=", "unit": ""},
117                 {"attribute": "numaMem-0", "value": "2048", "operator": "=", "unit": "MB"},
118                 {"attribute": "numaCpu-1", "values":"4", "operator": "=", "unit": ""},
119                 {"attribute": "numaMem-1", "value": "4096", "operator": "=", "unit": "MB"}
120               ]
121             },
122             {
123               "hpa_feature" : "basicCapabilities",
124               "mandatory" : "True",
125               "architecture": "generic",
126               "featureAttributes": [
127                 {"attribute": "numVirtualCpu", "value": "6", "operator": "=", "unit": ""},
128                 {"attribute": "virtualMemSize", "value":"6", "operator": "=", "unit": "GB"}
129               ]
130             },
131             {
132               "hpa_feature" : "hugePages",
133               "mandatory" : "False",
134               "score" : "7",
135               "architecture": "generic",
136               "featureAttributes": [
137                  {"attribute": "memoryPageSize", "value": "<MEMORYPAGESIZE>", "operator": "=", "unit": ""}
138               ]
139             }
140           ]
141         }
142       ]
143     }
144 }