2 * This XCORE file contains models for the placement optimization policies in SNIRO.
3 * @author Ankitkumar Patel
8 package com.att.ecomp.sniro.policies.placement
12 annotation "http://ecomp.att.com" as ecomp
13 annotation "http://ecomp.att.com/policy" as policy
18 * Comparison operators
20 enum ComparisonOperator{
21 less=1, grater=2, lessEqual=3, greaterEqual=4, equal=5, notEqual=6
25 GW_TENANT_ID=1, PORTAL_TENANT_ID=2
29 * Computational operators
31 enum ComputationalOperator{
47 disaster=1, region=2, complex=3, time=4, maintenance=5
51 * Geographical region types
54 US=1, EMEA=2, AP=3, CALA=4, CA=5, INTERNATIONAL=6
61 distance=0, latency=1, aic_version=2
62 //thoughput=1, geoDistance=1, airDistance=2, latency=3, bandwidth=4
67 * The type of inventory defined in AIC
74 * The type of AT&T network
81 * Objective functions.
84 enum ObjectiveFunction{
85 minimize=1, maximize=2
89 * This is a model of a condition.
90 * @param parameter This is the parameter of interest.
91 * @param operator This is a comparison operator.
92 * @param value This is a value of a parameter
94 class ConditionalInfo{
95 @ecomp(^type = "configuration")
97 @ecomp(^type = "configuration")
98 ComparisonOperator operator
99 @ecomp(^type = "configuration")
104 customer_loc=1, none=2, customer_pref_loc=3
109 * Model for distance to location property.
110 * @param distanceCondition This is a distance condition.
111 * @param locationInfo This is a location with respect to which distance condition is applied.
113 class DistanceToLocationProperty{
114 //distanceCondition.parameter must be distance.
115 @ecomp(^type = "configuration")
116 contains ConditionalInfo distanceCondition
117 @ecomp(^type = "configuration")
118 LocationInfo locationInfo
121 enum DistanceToLocationPolicyType{
122 distance_to_location=1
126 * Model for distance to location policy.
127 * @param identity This is an identity created by a user.
128 * @param type This is the type of a policy.
129 * @param resourceInstance This is a list of resource instances over which this policy is applied.
130 * @param distanceToLocationProperty This is the distance properties of the policy.
133 policyTemplate = "SNIRO-PLACEMENT"
135 class DistanceToLocationPolicy extends SniroPolicyMetaInfo{
136 @ecomp(^type = "configuration")
137 @policy (matching = "true")
138 DistanceToLocationPolicyType ^type
139 @ecomp(^type = "configuration")
140 String[] resourceInstanceType
141 @ecomp(^type = "configuration")
142 contains DistanceToLocationProperty distanceToLocationProperty
146 * The property associated with the NetworkBetweenDemandsPolicy.
147 * @param latencyCondition The latency property associated with the policy.
148 * @param locationInfo The customer location information.
150 class NetworkToLocationProperty{
151 //latencyCondition.parameter must be latency.
152 @ecomp(^type = "configuration")
153 contains ConditionalInfo latencyCondition
154 @ecomp(^type = "configuration")
155 LocationInfo locationInfo
158 enum NetworkToLocationPolicyType{
159 network_to_location=1
163 * Network between demands policy.
164 * @param type The type of a policy.
165 * @param resourceInstanceType The resources associated with a policy.
166 * @param networkToLocationProperty The property associated with the policy.
170 policyTemplate = "SNIRO-PLACEMENT"
172 class NetworkToLocationPolicy extends SniroPolicyMetaInfo{
173 @policy (matching = "true")
174 @ecomp(^type = "configuration")
175 NetworkToLocationPolicyType ^type
176 @ecomp(^type = "configuration")
177 String[] resourceInstanceType
178 @ecomp(^type = "configuration")
179 contains NetworkToLocationProperty networkToLocationProperty
183 * The property associated with the NetworkBetweenDemandsPolicy.
184 * @param latencyCondition The latency property associated with the policy.
186 class NetworkBetweenDemandsProperty{
187 //latencyCondition.parameter must be latency.
188 @ecomp(^type = "configuration")
189 contains ConditionalInfo latencyCondition
192 enum NetworkBetweenDemandsPolicyType{
193 network_between_demands=1
197 * Network between demands policy.
198 * @param type The type of a policy.
199 * @param resourceInstanceType The resources associated with a policy.
200 * @param networkBetweenDemandsProperty The property associated with the policy.
203 policyTemplate = "SNIRO-PLACEMENT"
205 class NetworkBetweenDemandsPolicy extends SniroPolicyMetaInfo{
206 @policy (matching = "true")
207 @ecomp(^type = "configuration")
208 NetworkBetweenDemandsPolicyType ^type
209 @ecomp(^type = "configuration")
210 String[] resourceInstanceType
211 @ecomp(^type = "configuration")
212 contains NetworkBetweenDemandsProperty networkBetweenDemandsProperty
217 * Network roles supported a VNF placement
218 * @param all A list of network roles.
221 @ecomp(^type = "configuration")
226 * Complex names supported by a VNF placement
227 * @param any A list of complex names.
230 @ecomp(^type = "configuration")
234 * This are the AIC properties.
235 * @param aicVersion This is the version of AIC.
236 * @param aicType This is the type of AIC.
237 * @param dataPlace This is the type of data plane.
238 * @param hypervisor This is the type of hypervisor.
239 * @param networkRoles This is a list of connected networks.
240 * @param exclusivityGroups This is an exclusivity group Id
241 * @param state State in which a VNF should be located.
242 * @param country Country in which a VNF should be located.
243 * @param getRegion Geographical region in which a VNF should be located.
245 class AicAttributeProperty{
246 //aicVersionCondition.parameter must be aicVersion.
247 @ecomp(^type = "configuration")
249 @ecomp(^type = "configuration")
251 @ecomp(^type = "configuration")
253 @ecomp(^type = "configuration")
255 @ecomp(^type = "configuration")
256 contains NetworkRoles networkRoles
257 @ecomp(^type = "configuration")
258 contains Complex complex
259 @ecomp(^type = "configuration")
260 String exclusivityGroups
261 @ecomp(^type = "configuration")
263 @ecomp(^type = "configuration")
265 @ecomp(^type = "configuration")
267 @ecomp(^type = "configuration")
268 String replicationRole
272 enum AicAttributePolicyType{
277 * Model for the AIC attribute policy.
278 * @param type This is the type of a policy.
279 * @param resourceInstance This is a list of resources over which the policy is applied.
280 * @param aicAttributeProperty This is the properties associated with the policy.
283 policyTemplate = "SNIRO-PLACEMENT"
285 class AicAttributePolicy extends SniroPolicyMetaInfo{
286 @policy (matching = "true")
287 @ecomp(^type = "configuration")
288 AicAttributePolicyType ^type
289 @ecomp(^type = "configuration")
290 String[] resourceInstanceType
291 @ecomp(^type = "configuration")
292 contains AicAttributeProperty aicAttributeProperty
296 * The property associated with the capacity policy.
297 * @param tenant The tenant whose capacity needs to be checked.
298 * @param description The location of a heat template.
300 class CapacityProperty{
301 @ecomp(^type = "configuration")
303 @ecomp(^type = "configuration")
307 enum CapacityPolicyType{
313 * @param type The type of a policy.
314 * @param resourceInstanceType The type of resources associated with a policy.
315 * @param capacityProperty The property associated with a policy.
318 policyTemplate = "SNIRO-PLACEMENT"
320 class CapacityPolicy extends SniroPolicyMetaInfo{
321 @policy (matching = "true")
322 @ecomp(^type = "configuration")
323 CapacityPolicyType ^type
324 @ecomp(^type = "configuration")
325 String[] resourceInstanceType
326 @ecomp(^type = "configuration")
327 contains CapacityProperty capacityProperty
330 enum InventoryGroupPolicyType{
335 * Model for the inventory group policy.
336 * @param type This is the type of a policy.
337 * @param resourceInstance This is a list of resources that must be grouped/paired
340 policyTemplate = "SNIRO-PLACEMENT"
342 class InventoryGroupPolicy extends SniroPolicyMetaInfo{
343 @policy (matching = "true")
344 @ecomp(^type = "configuration")
345 InventoryGroupPolicyType ^type
346 @ecomp(^type = "configuration")
347 String[] resourceInstanceType
351 * This is the property associated with this policy.
352 * @param controller ECOMP controller.
353 * @param request This should be key-value pairs to be sent in a request.
355 class ResourceInstanceProperty{
356 @ecomp(^type = "configuration")
358 @ecomp(^type = "configuration")
362 enum ResourceInstancePolicyType{
366 * Model for the resource instance policy.
367 * @param type This is the type of a policy.
368 * @param resourceInstance This is a list of resources.
369 * @param resourceInstanceProperty This is a property associated with each resource in the list.
372 policyTemplate = "SNIRO-PLACEMENT"
374 class ResourceInstancePolicy extends SniroPolicyMetaInfo{
375 @policy (matching = "true")
376 @ecomp(^type = "configuration")
377 ResourceInstancePolicyType ^type
378 @ecomp(^type = "configuration")
379 String[] resourceInstanceType
380 @ecomp(^type = "configuration")
381 contains ResourceInstanceProperty resourceInstanceProperty
386 * This is the property associated with this policy.
387 * @param controller ECOMP controller
388 * @param request This should be key-value pairs to be sent in a request.
390 class ResourceRegionProperty{
391 @ecomp(^type = "configuration")
393 @ecomp(^type = "configuration")
397 enum ResourceRegionPolicyType{
402 * Model for the resource region policy
403 * @param type This is the type of a policy.
404 * @param resourceInstance This is a list of resources.
405 * @param resourceRegionProperty This is a property associated with this policy.
408 policyTemplate = "SNIRO-PLACEMENT"
410 class ResourceRegionPolicy extends SniroPolicyMetaInfo{
411 @policy (matching = "true")
412 @ecomp(^type = "configuration")
413 ResourceRegionPolicyType ^type
414 @ecomp(^type = "configuration")
415 String[] resourceInstanceType
416 @ecomp(^type = "configuration")
417 contains ResourceRegionProperty resourceRegionProperty
421 * This is the property associated with zone policy.
422 * @param qualifier This is the qualifier.
423 * @param category This is the category of a zone.
426 @ecomp(^type = "configuration")
428 @ecomp(^type = "configuration")
429 ZoneCategory category
437 * Model of the zone policy.
438 * @param type This is the type of a policy.
439 * @param resourceInstanceType This is a list of resources.
440 * @param zoneProperty This is the property associated with the policy.
443 policyTemplate = "SNIRO-PLACEMENT"
446 class ZonePolicy extends SniroPolicyMetaInfo{
447 @policy (matching = "true")
448 @ecomp(^type = "configuration")
450 @ecomp(^type = "configuration")
451 String[] resourceInstanceType
452 @ecomp(^type = "configuration")
453 contains ZoneProperty zoneProperty
457 * The property associated with a VNF type.
458 * @param inventoryProvider The ECOMP entity providing inventory information.
459 * @param inventoryType The type of an inventory.
460 * @param serviceId The id of a service.
462 class VNFPolicyProperty{
463 @ecomp(^type = "configuration")
464 String inventoryProvider
465 @ecomp(^type = "configuration")
466 InventoryType inventoryType
467 @ecomp(^type = "configuration")
468 contains Attributes attributes
472 * The property associated with a Subscriber type.
473 * @param subscriberName The name of a subscriber.
474 * @param subscriberRole The role of a subscriber.
475 * @param provStatus The provisioning status of a subscriber.
477 class SubscriberPolicyProperty{
478 @ecomp(^type = "configuration")
479 String[] subscriberName
480 @ecomp(^type = "configuration")
481 String[] subscriberRole
482 @ecomp(^type = "configuration")
490 enum SubscriberPolicyType{
495 @ecomp(^type = "configuration")
496 String globalCustomerId
497 @ecomp(^type = "configuration")
498 String operationalStatus
499 @ecomp(^type = "configuration")
500 String[] orchestrationStatus
501 @ecomp(^type = "configuration")
502 String modelInvariantId
503 @ecomp(^type = "configuration")
504 String modelVersionId
505 @ecomp(^type = "configuration")
510 * Policy associated with a VNF.
511 * @param resourceInstance This parameter identifies a specific VNF.
512 * @param inventoryProvider This is the provider of inventory.
513 * @param inventoryType This is the type of inventory.
514 * @param serviceType The service associated with a VNF.
515 * @param serviceId The Id associated with a service.
516 * @param globalCustomerId The global id of a customer.
519 policyTemplate = "SNIRO-PLACEMENT"
521 class VNFPolicy extends SniroPolicyMetaInfo{
522 @policy (matching = "true")
523 @ecomp(^type = "configuration")
525 @ecomp(^type = "configuration")
526 String[] resourceInstanceType
527 @ecomp(^type = "configuration")
528 contains VNFPolicyProperty[] property
532 * Policy associated with a Subscriber.
533 * @param subscriberName The name of a subscriber.
534 * @param subscriberRole The role of a subscriber.
535 * @param provStatus The provisioning status of a subscriber.
538 policyTemplate = "SNIRO-PLACEMENT"
540 class SubscriberPolicy extends SniroPolicyMetaInfo{
541 @policy (matching = "true")
542 @ecomp(^type = "configuration")
543 SubscriberPolicyType ^type
544 @ecomp(^type = "configuration")
545 contains SubscriberPolicyProperty[] property
550 * This is the property associated with this policy.
551 * @param providerUrl This is the url of provider to check the capacity.
552 * @param request This should be key-value pairs to be sent in a request.
554 class InstanceReservationProperty{
555 @ecomp(^type = "configuration")
557 @ecomp(^type = "configuration")
561 enum InstanceReservationPolicyType{
562 instance_reservation=1
565 * Model for the resource instance policy.
566 * @param identity This is an identity created by a user.
567 * @param type This is the type of a policy.
568 * @param resourceInstance This is a list of resources.
569 * @param resourceInstanceProperty This is a property associated with each resource in the list.
572 policyTemplate = "SNIRO-PLACEMENT"
574 class instanceReservationPolicy extends SniroPolicyMetaInfo{
575 @policy (matching = "true")
576 @ecomp(^type = "configuration")
577 InstanceReservationPolicyType ^type
578 @ecomp(^type = "configuration")
579 String[] resourceInstanceType
580 @ecomp(^type = "configuration")
581 contains InstanceReservationProperty instanceReservationProperty
586 * This is a model of an operand.
587 * @param parameter This is a parameter.
588 * @param associativity This is a list of entities with which a parameter is associated.
592 @ecomp(^type = "configuration")
594 @ecomp(^type = "configuration")
600 * This is the optimization function.
601 * @param identity This is an identity of a function.
602 * @param operation This is a computational operator.
603 * @param leftOperand This is a left operand of a function.
604 * @param rightOperand This is a right operand of a function.
607 class OptimizationFunction{
608 @ecomp(^type = "configuration")
609 ExpressionIdentity identity
610 @ecomp(^type = "configuration")
611 ComputationalOperator operation
612 @ecomp(^type = "configuration")
613 contains Operand[] operands
618 * Properties associated with a sub-expression.
619 * @param weight The weight of an expression.
620 * @param parameter The parameter involved in an expression.
621 * @param entity The entities involved in an expression.
622 * @param operator The operator of an expression.
623 * @param customerLocationInfo The location of a customer.
625 class AttributeProperty{
626 @ecomp(^type = "configuration")
628 @ecomp(^type = "configuration")
630 @ecomp(^type = "configuration")
632 @ecomp(^type = "configuration")
633 ComputationalOperator operator
634 @ecomp(^type = "configuration")
635 LocationInfo customerLocationInfo
638 enum PlacementOptimizationPolicyType{
639 placementOptimization=1
643 * @param operator An operator in an expression.
644 * @param parameterAttributes Represents sub-expression
646 class ObjectiveParameter{
647 @ecomp(^type = "configuration")
648 ComputationalOperator operator
649 @ecomp(^type = "configuration")
650 contains AttributeProperty[] parameterAttributes
654 * Model of the placement optimization policy.
655 * @param type This is the type of a policy.
656 * @param objective This is an objective function.
657 * @param objectiveParameter The parameter/expression to be optimized.
660 policyTemplate = "SNIRO-PLACEMENT"
663 class PlacementOptimizationPolicy extends SniroPolicyMetaInfo{
664 @policy (matching = "true")
665 @ecomp(^type = "configuration")
666 PlacementOptimizationPolicyType ^type
667 @ecomp(^type = "configuration")
668 ObjectiveFunction objective
669 @ecomp(^type = "configuration")
670 contains ObjectiveParameter objectiveParameter
675 * Meta information required for SNIRO policies.
676 * @param identity This is a user-defined identity.
677 * @param policyScope The scope of a policy
681 policyTemplate = "SNIRO"
683 class SniroPolicyMetaInfo{
684 @ecomp(^type = "configuration")
686 @ecomp(^type = "configuration")
687 @policy (matching = "true")
688 contains Scope policyScope
692 * Scopes in which a policy is applicable.
693 * @param serviceType The type of a service.
694 * @param networkType The type of a network
695 * @param geoRigion The geographical region.
696 * @param resourceInstanceType The resources associated with a policy/
697 * @param subscriberRole
700 @ecomp(^type = "configuration")
701 @policy (matching = "true")
703 @ecomp(^type = "configuration")
704 @policy (matching = "true")
706 @ecomp(^type = "configuration")
707 @policy (matching = "true")
709 @ecomp(^type = "configuration")
710 @policy (matching = "true")
711 String[] resourceInstanceType
712 @ecomp(^type = "configuration")
713 @policy (matching = "true")
714 String[] modelInvariantId
715 @ecomp(^type = "configuration")
716 @policy (matching = "true")
717 String[] subscriberRole