908c42cb13baa2229b0810ef0e6796cbff27494e
[appc.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
4  * ================================================================================
5  * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Copyright (C) 2017 Amdocs
8  * =============================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  * 
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  * 
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * 
21  * ============LICENSE_END=========================================================
22  */
23
24 package org.onap.appc.mdsal.impl;
25 /**
26  * This class contains the definitions of all constant values used in the appc-dg-mdsal-store
27  * These properties are used for creating osgi bundle zip file. It also defines contents for Blueprint.xml file of bundle
28 */
29 public class Constants {
30
31     private Constants(){}
32     /**
33      * Manifest attribute for OSGI Bundle Name
34      */
35     public static final String MANIFEST_ATTR_BUNDLE_NAME= "Bundle-Name";
36
37     /**
38      * Manifest attribute for OSGI Bundle Symbolic Name
39      */
40     public static final String MANIFEST_ATTR_BUNDLE_SYMBOLIC_NAME= "Bundle-SymbolicName";
41
42     /**
43      * Manifest attribute for OSGI Bundle Description
44      */
45     public static final String MANIFEST_ATTR_BUNDLE_DESCRIPTION= "Bundle-Description";
46
47     /**
48      * Manifest attribute for OSGI Bundle Manifest version
49      */
50     public static final String MANIFEST_ATTR_BUNDLE_MANIFEST_VERSION= "Bundle-ManifestVersion";
51
52     /**
53      * Manifest attribute for OSGI Bundle Version
54      */
55     public static final String MANIFEST_ATTR_BUNDLE_VERSION= "Bundle-Version";
56
57     /**
58      * Manifest attribute for OSGI Bundle Blueprint
59      */
60     public static final String MANIFEST_ATTR_BUNDLE_BLUEPRINT= "Bundle-Blueprint";
61
62     /**
63      * Manifest value for Mainfest Version
64      */
65     public static final String MANIFEST_VALUE_VERSION= "1.0";
66
67     /**
68      * Manifest value for OSGI Bundle Vesion
69      */
70     public static final String MANIFEST_VALUE_BUNDLE_MAN_VERSION= "2";
71
72     /**
73      * Manifest value for OSGI Bundle Blueprint location
74      */
75     public static final String MANIFEST_VALUE_BUNDLE_BLUEPRINT= "OSGI-INF/blueprint/blueprint.xml";
76
77     /**
78      * Base URL for config actions exposed by RESTCONF API
79      */
80
81     public static final String CONFIG_URL_DEFAULT = "https://localhost:8443/restconf/config";
82
83     public static final String CONFIG_URL_PROPERTY = "appc.LCM.provider.url";
84
85     public static final String CONFIG_PATH = "/restconf/config";
86
87     /**
88      * Restconf authentication user property name
89      */
90     public static final String CONFIG_USER_PROPERTY = "appc.LCM.provider.user";
91
92     /**
93      * Restconf authentication password property name
94      */
95     public static final String CONFIG_PASS_PROPERTY = "appc.LCM.provider.pass";
96
97     /**
98      * Content for blueprint.xml used while creation of OSGI bundle.
99      */
100     public static final String BLUEPRINT = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
101             "<!--\n" +
102             "    Starter Blueprint Camel Definition appc-aai-adapter-blueprint\n" +
103             "-->\n" +
104             "<blueprint xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n" +
105             "                       xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
106             "                       xsi:schemaLocation=\"http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\n" +
107             "\n" +
108             "</blueprint>";
109
110     /**
111      * HTTP Header attribute for Content type - JSON
112      */
113     public static final String OPERATION_APPLICATION_JSON= " application/json";
114
115     /**
116      * HTTP protocol used for config operations
117      */
118     public static final String OPERATION_HTTPS= "https";
119
120     /**
121      *  Constant for backslash to be used while formatting URL
122      */
123     public static final String URL_BACKSLASH ="/";
124
125     public static final String GET_NODE_STATUS_PATH_FORMAT =  "/jolokia/read/org.opendaylight.controller:Category=Shards,name=%s,type=DistributedConfigDatastore";
126
127     public static final String SHARD_NAME_FORMAT = "%s-shard-default-config";
128
129     public static final String GET_SHARD_LIST_PATH = "/jolokia/read/org.opendaylight.controller:type=DistributedConfigDatastore,Category=ShardManager,name=shard-manager-config";
130
131     public static final String YANG_LOADER_PATH = "/restconf/operations/mdsal-store:store-yang";
132
133     public static final String JSON_RESPONSE_VALUE = "value";
134
135     public static final String JSON_RESPONSE_MEMBER_NAME =  "MemberName";
136
137     public static final String SELF = "self";
138 }