Fix the bug in translating a policy
[optf/osdf.git] / test / functest / simulators / policy / response-payloads / pdp-has-vcpe-good / hpa_policy_vGMuxInfra_1.json
1 {
2     "service": "hpaPolicy",
3     "policyName": "OSDF_R2.hpa_policy_vGMuxInfra_1",
4     "description": "HPA policy for vGMuxInfra",
5     "templateVersion": "OpenSource.version.1",
6     "version": "test1",
7     "priority": "3",
8     "riskType": "test",
9     "riskLevel": "2",
10     "guard": "False",
11     "content": {
12       "resources": "vGMuxInfra",
13       "identity": "hpaPolicy_vGMuxInfra",
14       "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"],
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               "hpa-feature-attributes": [
25                 {"hpa-attribute-key":"numCpuSockets", "hpa-attribute-value": "2","operator": ">=", "unit": ""},
26                 {"hpa-attribute-key":"numCpuSockets", "hpa-attribute-value": "4","operator": "<=", "unit": ""},
27                 {"hpa-attribute-key":"numCpuCores", "hpa-attribute-value": "2", "operator":">=", "unit": ""},
28                 {"hpa-attribute-key":"numCpuCores", "hpa-attribute-value": "4", "operator":"<=", "unit": ""},
29                 {"hpa-attribute-key":"numCpuThreads", "hpa-attribute-value": "4", "operator":">=", "unit": ""},
30                 {"hpa-attribute-key":"numCpuThreads", "hpa-attribute-value": "8", "operator":"<=", "unit": ""}
31               ]
32             },
33             {
34               "hpa-feature" : "basicCapabilities",
35               "mandatory" : "True",
36               "architecture": "generic",
37               "hpa-feature-attributes": [
38                 {"hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": ""},
39                 {"hpa-attribute-key": "virtualMemSize", "hpa-attribute-value":"6", "operator": "=", "unit": "GB"}
40               ]
41             },
42             {
43               "hpa-feature" : "ovsDpdk",
44               "mandatory" : "False",
45               "score" : "3",
46               "architecture": "generic",
47               "hpa-feature-attributes": [
48                  {"hpa-attribute-key":"dataProcessingAccelerationLibrary", "hpa-attribute-value":"ovsDpdk_version", "operator": "=", "unit":""}
49               ]
50             },
51             {
52               "hpa-feature" : "cpuInstructionSetExtensions",
53               "mandatory" : "True",
54               "architecture": "INTEL-64",
55               "hpa-feature-attributes": [
56                 {"hpa-attribute-key":"instructionSetExtensions", "hpa-attribute-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               "hpa-feature-attributes": [
69                 {"hpa-attribute-key":"logicalCpuThreadPinningPolicy", "hpa-attribute-value":"<CPUTHREADPOLICY>", "operator": "=", "unit":""},
70                 {"hpa-attribute-key":"logicalCpuPinningPolicy", "hpa-attribute-value": "<CPUPOLICY>","operator": "=", "unit":""}
71               ]
72             },
73             {
74               "hpa-feature" : "basicCapabilities",
75               "mandatory" : "True",
76               "architecture": "generic",
77               "hpa-feature-attributes": [
78                 {"hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": ""},
79                 {"hpa-attribute-key": "virtualMemSize", "hpa-attribute-value":"6", "operator": "=", "unit": "GB"}
80               ]
81             },
82             {
83               "hpa-feature" : "localStorage",
84               "mandatory" : "False",
85               "score" : "5",
86               "architecture": "generic",
87               "hpa-feature-attributes": [
88                 {"hpa-attribute-key": "diskSize", "hpa-attribute-value": "2", "operator": "=", "unit": "GB"},
89                 {"hpa-attribute-key": "ephemeralDiskSize", "hpa-attribute-value": "2", "operator": "=", "unit": "GB"},
90                 {"hpa-attribute-key": "swapMemSize", "hpa-attribute-value":"16", "operator": "=", "unit": "MB"}
91               ]
92             },
93             {
94               "hpa-feature" : "pcie",
95               "mandatory" : "True",
96               "architecture": "generic",
97               "hpa-feature-attributes": [
98                 {"hpa-attribute-key": "pciCount", "hpa-attribute-value": "2", "operator": "=", "unit": ""},
99                 {"hpa-attribute-key": "pciVendorId", "hpa-attribute-value":"8086", "operator": "=", "unit": ""},
100                 {"hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "2", "operator": "=", "unit": ""},
101                 {"hpa-attribute-key": "functionType", "hpa-attribute-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               "hpa-feature-attributes": [
115                 {"hpa-attribute-key": "numaNodes", "hpa-attribute-value": "2", "operator": "=", "unit": ""},
116                 {"hpa-attribute-key": "numaCpu-0", "hpa-attribute-value":"2", "operator": "=", "unit": ""},
117                 {"hpa-attribute-key": "numaMem-0", "hpa-attribute-value": "2048", "operator": "=", "unit": "MB"},
118                 {"hpa-attribute-key": "numaCpu-1", "hpa-attribute-value":"4", "operator": "=", "unit": ""},
119                 {"hpa-attribute-key": "numaMem-1", "value": "4096", "operator": "=", "unit": "MB"}
120               ]
121             },
122             {
123               "hpa-feature" : "basicCapabilities",
124               "mandatory" : "True",
125               "architecture": "generic",
126               "hpa-feature-attributes": [
127                 {"hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": ""},
128                 {"hpa-attribute-key": "virtualMemSize", "hpa-attribute-value":"6", "operator": "=", "unit": "GB"}
129               ]
130             },
131             {
132               "hpa-feature" : "hugePages",
133               "mandatory" : "False",
134               "score" : "7",
135               "architecture": "generic",
136               "hpa-feature-attributes": [
137                  {"hpa-attribute-key": "memoryPageSize", "hpa-attribute-value": "<MEMORYPAGESIZE>", "operator": "=", "unit": ""}
138               ]
139             }
140           ]
141         }
142       ]
143     }
144 }