Make Actors event-agnostic
[policy/models.git] / models-interactions / model-actors / actorServiceProvider / src / main / java / org / onap / policy / controlloop / actorserviceprovider / OperationProperties.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP
4  * ================================================================================
5  * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.controlloop.actorserviceprovider;
22
23 /**
24  * Names of properties needed by the Actors defined within this repo. Note: this is not
25  * exhaustive, as additional property names may be returned by company-defined Actors.
26  * <p/>
27  * Note: any time a property is added, applications using the actors must be updated to
28  * provide the property's value when requested.
29  */
30 public class OperationProperties {
31
32     /**
33      * A&AI Default Cloud Region. Obtained as follows:
34      * <ol>
35      * <li>invoke the custom query getDefaultCloudRegion() method</li>
36      * </ol>
37      */
38     public static final String AAI_DEFAULT_CLOUD_REGION = "AAI/defaultCloudRegion";
39
40     /**
41      * A&AI Default Tenant. Obtained as follows:
42      * <ol>
43      * <li>invoke the custom query getDefaultTenant() method</li>
44      * </ol>
45      */
46     public static final String AAI_DEFAULT_TENANT = "AAI/defaultTenant";
47
48     /**
49      * A&AI PNF. Obtained as follows:
50      * <ol>
51      * <li>using the target entity, invoke AaiGetPnfOperation</li>
52      * </ol>
53      */
54     public static final String AAI_PNF = "AAI/pnf";
55
56     /**
57      * A&AI [Generic] VNF for the target resource ID. Obtained as follows:
58      * <ol>
59      * <li>using the target resource ID, invoke the custom query
60      * getGenericVnfByModelInvariantId() method to get the generic VNF</li>
61      * </ol>
62      */
63     public static final String AAI_RESOURCE_VNF = "AAI/resourceId/vnf";
64
65     /**
66      * A&AI Service instance. Obtained as follows:
67      * <ol>
68      * <li>invoke the custom query getServiceInstance() method</li>
69      * </ol>
70      */
71     public static final String AAI_SERVICE = "AAI/service";
72
73     /**
74      * A&AI Service model. Obtained as follows:
75      * <ol>
76      * <li>invoke the custom query getServiceInstance() method</li>
77      * <li>using the service instance, invoke the getModelVersionId() method</li>
78      * </ol>
79      */
80     public static final String AAI_SERVICE_MODEL = "AAI/service/model";
81
82     /**
83      * A&AI Target Entity. This is a String that can typically be found in the enrichment
84      * data, depending on the Target type. Sometimes, however, it must be retrieved via an
85      * A&AI query.
86      */
87     public static final String AAI_TARGET_ENTITY = "AAI/targetEntity";
88
89     /**
90      * A&AI VNF. Obtained as follows:
91      * <ol>
92      * <li>using the target model invariant ID, invoke the custom query
93      * getGenericVnfByModelInvariantId() method to get the VNF</li>
94      * <li>using the VNF item, invoke the getModelVersionId() method to get the
95      * version</li>
96      * </ol>
97      */
98     public static final String AAI_VNF = "AAI/vnf";
99
100     /**
101      * A&AI VNF Model. Obtained as follows:
102      * <ol>
103      * <li>using the target model invariant ID, invoke the custom query
104      * getGenericVnfByModelInvariantId() method to get the VNF</li>
105      * <li>using the VNF item, invoke the getModelVersionId() method to get the
106      * version</li>
107      * <li>using the version, invoke the custom query getModelVerByVersionId() method</li>
108      * </ol>
109      */
110     public static final String AAI_VNF_MODEL = "AAI/vnf/model";
111
112     /**
113      * A&AI link to the vserver. Obtained as follows:
114      * <ol>
115      * <li>using the vserver name from the enrichment data, perform an A&AI tenant
116      * query</li>
117      * <li>get the "result-data" field from the tenant output</li>
118      * <li>get the "resource-link" field from that</li>
119      * <li>strip off the "/aai/v16" prefix</li>
120      * </ol>
121      */
122     public static final String AAI_VSERVER_LINK = "AAI/vserver/link";
123
124     /**
125      * Optional A&AI properties (Map-String-String) for CDS GRPC. If an application
126      * provides this, it will be used instead of constructing the map from the other
127      * properties.
128      */
129     public static final String OPT_CDS_GRPC_AAI_PROPERTIES = "cds/grpc/aai/properties";
130
131     /*
132      * These are typically extracted from the event or from the event's enrichment data.
133      *
134      * NOTE: all of the values must be of the form "enrichment/{enrichment-field-name}".
135      */
136     public static final String ENRICHMENT_BANDWIDTH = "enrichment/bandwidth";
137     public static final String ENRICHMENT_BANDWIDTH_CHANGE_TIME = "enrichment/bandwidth-change-time";
138     public static final String ENRICHMENT_GENERIC_VNF_ID = "enrichment/generic-vnf.vnf-id";
139     public static final String ENRICHMENT_NETWORK_ID = "enrichment/network-information.network-id";
140     public static final String ENRICHMENT_SERVICE_ID = "enrichment/service-instance.service-instance-id";
141     public static final String ENRICHMENT_VNF_ID = "enrichment/vnfId";
142     public static final String ENRICHMENT_VSERVER_ID = "enrichment/vserver.vserver-id";
143     public static final String ENRICHMENT_VSERVER_NAME = "enrichment/vserver.vserver-name";
144
145     public static final String EVENT_ADDITIONAL_PARAMS = "event/additionalParams";
146     public static final String EVENT_PAYLOAD = "event/payload";
147
148     /*
149      * These are data computed and/or tracked by the invoker.
150      */
151
152     /**
153      * An Integer containing the count.
154      */
155     public static final String DATA_VF_COUNT = "data/vfCount";
156
157
158     private OperationProperties() {
159         super();
160     }
161 }