From fa6dd60a45a093205ae55065f6de044c91493e60 Mon Sep 17 00:00:00 2001 From: lizi00164331 Date: Thu, 7 Sep 2017 15:34:26 +0800 Subject: Simplify esr-server project level. Remove the esr-core level and distribution level, Remove database related script. Change-Id: I0204e9fcc5dabd2b6c9eb630e8bd7841b32c0b1b Issue-ID: AAI-269 Signed-off-by: lizi00164331 --- .../src/main/java/org/onap/aai/esr/ExtsysApp.java | 101 + .../org/onap/aai/esr/ExtsysAppConfiguration.java | 106 + .../main/java/org/onap/aai/esr/common/Config.java | 32 + .../onap/aai/esr/common/ExtSysResuorceType.java | 26 + .../main/java/org/onap/aai/esr/common/MsbUtil.java | 29 + .../java/org/onap/aai/esr/common/Parameters.java | 27 + .../java/org/onap/aai/esr/entity/aai/BaseData.java | 116 + .../java/org/onap/aai/esr/entity/aai/EmsData.java | 81 + .../java/org/onap/aai/esr/entity/aai/SdncData.java | 88 + .../java/org/onap/aai/esr/entity/aai/VimData.java | 87 + .../java/org/onap/aai/esr/entity/aai/VnfmData.java | 85 + .../org/onap/aai/esr/entity/rest/AlarmAddr.java | 59 + .../org/onap/aai/esr/entity/rest/AuthInfoItem.java | 79 + .../org/onap/aai/esr/entity/rest/BaseRestData.java | 122 + .../org/onap/aai/esr/entity/rest/EmsRestData.java | 91 + .../java/org/onap/aai/esr/entity/rest/FtpAddr.java | 89 + .../onap/aai/esr/entity/rest/RegisterResponse.java | 30 + .../esr/entity/rest/ThirdPartySdncRestData.java | 134 + .../org/onap/aai/esr/entity/rest/VimRestData.java | 110 + .../org/onap/aai/esr/entity/rest/VnfmRestData.java | 120 + .../onap/aai/esr/exception/ExtsysException.java | 48 + .../esr/externalservice/aai/AaiAdapterConfig.java | 29 + .../aai/esr/externalservice/aai/AaiCommon.java | 62 + .../externalservice/aai/AaiServiceConsumer.java | 32 + .../aai/esr/externalservice/aai/IEsrVimRest.java | 81 + .../esr/externalservice/entity/CloudRegion.java | 112 + .../aai/esr/externalservice/entity/EsrEms.java | 60 + .../esr/externalservice/entity/EsrSystemInfo.java | 180 ++ .../externalservice/entity/EsrThirdpartySdnc.java | 50 + .../aai/esr/externalservice/entity/EsrVnfm.java | 62 + .../esr/externalservice/entity/ServiceNode.java | 52 + .../aai/esr/externalservice/msb/MsbHelper.java | 56 + .../java/org/onap/aai/esr/resource/EmsManager.java | 155 + .../aai/esr/resource/ThirdpatySdncManager.java | 150 + .../java/org/onap/aai/esr/resource/VimManager.java | 153 + .../org/onap/aai/esr/resource/VnfmManager.java | 153 + .../java/org/onap/aai/esr/util/ExtsysUtil.java | 54 + .../org/onap/aai/esr/util/RestResponseUtil.java | 49 + .../onap/aai/esr/wrapper/EmsManagerWrapper.java | 70 + .../onap/aai/esr/wrapper/ThirdpatySdncWrapper.java | 70 + .../onap/aai/esr/wrapper/VimManagerWrapper.java | 70 + .../onap/aai/esr/wrapper/VnfmManagerWrapper.java | 69 + .../main/resources/api-doc/META-INF/MANIFEST.MF | 3 + esr-mgr/src/main/resources/api-doc/WEB-INF/web.xml | 41 + esr-mgr/src/main/resources/api-doc/css/reset.css | 140 + esr-mgr/src/main/resources/api-doc/css/screen.css | 1271 ++++++++ .../src/main/resources/api-doc/css/typography.css | 41 + .../api-doc/fonts/droid-sans-v6-latin-700.eot | Bin 0 -> 22924 bytes .../api-doc/fonts/droid-sans-v6-latin-700.svg | 411 +++ .../api-doc/fonts/droid-sans-v6-latin-700.ttf | Bin 0 -> 40516 bytes .../api-doc/fonts/droid-sans-v6-latin-700.woff | Bin 0 -> 25992 bytes .../api-doc/fonts/droid-sans-v6-latin-700.woff2 | Bin 0 -> 11480 bytes .../api-doc/fonts/droid-sans-v6-latin-regular.eot | Bin 0 -> 22008 bytes .../api-doc/fonts/droid-sans-v6-latin-regular.svg | 403 +++ .../api-doc/fonts/droid-sans-v6-latin-regular.ttf | Bin 0 -> 39072 bytes .../api-doc/fonts/droid-sans-v6-latin-regular.woff | Bin 0 -> 24868 bytes .../fonts/droid-sans-v6-latin-regular.woff2 | Bin 0 -> 11304 bytes .../resources/api-doc/images/explorer_icons.png | Bin 0 -> 5763 bytes .../main/resources/api-doc/images/logo_small.png | Bin 0 -> 770 bytes .../resources/api-doc/images/pet_store_api.png | Bin 0 -> 824 bytes .../src/main/resources/api-doc/images/throbber.gif | Bin 0 -> 9257 bytes .../main/resources/api-doc/images/wordnik_api.png | Bin 0 -> 980 bytes esr-mgr/src/main/resources/api-doc/index.html | 115 + .../src/main/resources/api-doc/lib/backbone-min.js | 30 + .../main/resources/api-doc/lib/handlebars-2.0.0.js | 43 + .../resources/api-doc/lib/highlight.7.3.pack.js | 16 + .../main/resources/api-doc/lib/jquery-1.8.0.min.js | 17 + .../resources/api-doc/lib/jquery.ba-bbq.min.js | 25 + .../resources/api-doc/lib/jquery.slideto.min.js | 16 + .../resources/api-doc/lib/jquery.wiggle.min.js | 23 + esr-mgr/src/main/resources/api-doc/lib/marked.js | 1281 ++++++++ .../src/main/resources/api-doc/lib/shred.bundle.js | 2780 ++++++++++++++++ .../main/resources/api-doc/lib/shred/content.js | 207 ++ .../main/resources/api-doc/lib/swagger-client.js | 3309 ++++++++++++++++++++ .../main/resources/api-doc/lib/swagger-oauth.js | 295 ++ .../main/resources/api-doc/lib/underscore-min.js | 21 + esr-mgr/src/main/resources/api-doc/o2c.html | 37 + esr-mgr/src/main/resources/api-doc/swagger-ui.js | 2255 +++++++++++++ .../src/main/resources/api-doc/swagger-ui.min.js | 17 + esr-mgr/src/test/resources/Hibernate.cfg.xml | 38 + esr-mgr/src/test/resources/db/extsys.mv.db | Bin 0 -> 12288 bytes .../sql/extsys-resource-createObj-mysql.sql | 71 + 82 files changed, 16335 insertions(+) create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/ExtsysApp.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/ExtsysAppConfiguration.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/common/Config.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/common/ExtSysResuorceType.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/common/MsbUtil.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/common/Parameters.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/BaseData.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/EmsData.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/SdncData.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/VimData.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/VnfmData.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/AlarmAddr.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/AuthInfoItem.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/BaseRestData.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/EmsRestData.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/FtpAddr.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/RegisterResponse.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/ThirdPartySdncRestData.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VimRestData.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VnfmRestData.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/exception/ExtsysException.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/AaiAdapterConfig.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/AaiCommon.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/AaiServiceConsumer.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/IEsrVimRest.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/CloudRegion.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/EsrEms.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/EsrSystemInfo.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/EsrThirdpartySdnc.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/EsrVnfm.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/ServiceNode.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/externalservice/msb/MsbHelper.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/resource/EmsManager.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/resource/ThirdpatySdncManager.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/resource/VimManager.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/resource/VnfmManager.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/util/ExtsysUtil.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/util/RestResponseUtil.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/wrapper/EmsManagerWrapper.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/wrapper/ThirdpatySdncWrapper.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VimManagerWrapper.java create mode 100644 esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VnfmManagerWrapper.java create mode 100644 esr-mgr/src/main/resources/api-doc/META-INF/MANIFEST.MF create mode 100644 esr-mgr/src/main/resources/api-doc/WEB-INF/web.xml create mode 100644 esr-mgr/src/main/resources/api-doc/css/reset.css create mode 100644 esr-mgr/src/main/resources/api-doc/css/screen.css create mode 100644 esr-mgr/src/main/resources/api-doc/css/typography.css create mode 100644 esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.eot create mode 100644 esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.svg create mode 100644 esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.ttf create mode 100644 esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.woff create mode 100644 esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.woff2 create mode 100644 esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.eot create mode 100644 esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.svg create mode 100644 esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.ttf create mode 100644 esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.woff create mode 100644 esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.woff2 create mode 100644 esr-mgr/src/main/resources/api-doc/images/explorer_icons.png create mode 100644 esr-mgr/src/main/resources/api-doc/images/logo_small.png create mode 100644 esr-mgr/src/main/resources/api-doc/images/pet_store_api.png create mode 100644 esr-mgr/src/main/resources/api-doc/images/throbber.gif create mode 100644 esr-mgr/src/main/resources/api-doc/images/wordnik_api.png create mode 100644 esr-mgr/src/main/resources/api-doc/index.html create mode 100644 esr-mgr/src/main/resources/api-doc/lib/backbone-min.js create mode 100644 esr-mgr/src/main/resources/api-doc/lib/handlebars-2.0.0.js create mode 100644 esr-mgr/src/main/resources/api-doc/lib/highlight.7.3.pack.js create mode 100644 esr-mgr/src/main/resources/api-doc/lib/jquery-1.8.0.min.js create mode 100644 esr-mgr/src/main/resources/api-doc/lib/jquery.ba-bbq.min.js create mode 100644 esr-mgr/src/main/resources/api-doc/lib/jquery.slideto.min.js create mode 100644 esr-mgr/src/main/resources/api-doc/lib/jquery.wiggle.min.js create mode 100644 esr-mgr/src/main/resources/api-doc/lib/marked.js create mode 100644 esr-mgr/src/main/resources/api-doc/lib/shred.bundle.js create mode 100644 esr-mgr/src/main/resources/api-doc/lib/shred/content.js create mode 100644 esr-mgr/src/main/resources/api-doc/lib/swagger-client.js create mode 100644 esr-mgr/src/main/resources/api-doc/lib/swagger-oauth.js create mode 100644 esr-mgr/src/main/resources/api-doc/lib/underscore-min.js create mode 100644 esr-mgr/src/main/resources/api-doc/o2c.html create mode 100644 esr-mgr/src/main/resources/api-doc/swagger-ui.js create mode 100644 esr-mgr/src/main/resources/api-doc/swagger-ui.min.js create mode 100644 esr-mgr/src/test/resources/Hibernate.cfg.xml create mode 100644 esr-mgr/src/test/resources/db/extsys.mv.db create mode 100644 esr-mgr/src/test/resources/sql/extsys-resource-createObj-mysql.sql (limited to 'esr-mgr/src') diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysApp.java b/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysApp.java new file mode 100644 index 0000000..6552d95 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysApp.java @@ -0,0 +1,101 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.dropwizard.Application; +import io.dropwizard.assets.AssetsBundle; +import io.dropwizard.server.SimpleServerFactory; +import io.dropwizard.setup.Bootstrap; +import io.dropwizard.setup.Environment; +import io.swagger.jaxrs.config.BeanConfig; +import io.swagger.jaxrs.listing.ApiListingResource; + +import org.glassfish.jersey.media.multipart.MultiPartFeature; +import org.onap.aai.esr.common.Config; +import org.onap.aai.esr.externalservice.msb.MsbHelper; +import org.onap.msb.sdk.httpclient.msb.MSBServiceClient; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ExtsysApp extends Application { + + private static final Logger LOGGER = LoggerFactory.getLogger(ExtsysApp.class); + + public static void main(String[] args) throws Exception { + new ExtsysApp().run(args); + } + + @Override + public String getName() { + return "ONAP-ESR"; + } + + + @Override + public void initialize(Bootstrap bootstrap) { + bootstrap.addBundle(new AssetsBundle("/api-doc", "/api-doc", "index.html", "api-doc")); + } + + @Override + public void run(ExtsysAppConfiguration configuration, Environment environment) { + LOGGER.info("Start to initialize esr."); + environment.jersey().packages("org.onap.aai.esr.resource"); + environment.jersey().register(MultiPartFeature.class); + String MSB_IP=configuration.getMsbIp(); + int MSB_Port=configuration.getMsbPort(); + + initSwaggerConfig(environment, configuration); + Config.setConfigration(configuration); + MSBServiceClient msbClient = new MSBServiceClient(MSB_IP, MSB_Port); + + MsbHelper helper = new MsbHelper(msbClient); + try { + helper.registerMsb(); + } catch (Exception e) { + LOGGER.error("Register ESR to msb failed", e); + } + + LOGGER.info("Initialize extsys finished."); + } + + /** + * initialize swagger configuration. + * + * @param environment environment information + * @param configuration configuration + */ + private void initSwaggerConfig(Environment environment, ExtsysAppConfiguration configuration) { + environment.jersey().register(new ApiListingResource()); + environment.getObjectMapper().setSerializationInclusion(JsonInclude.Include.NON_NULL); + + BeanConfig config = new BeanConfig(); + config.setTitle("Open-o ExtSys Service rest API"); + config.setVersion("1.0.0"); + config.setResourcePackage("org.onap.aai.esr.resource"); + // set rest api basepath in swagger + SimpleServerFactory simpleServerFactory = + (SimpleServerFactory) configuration.getServerFactory(); + String basePath = simpleServerFactory.getApplicationContextPath(); + String rootPath = simpleServerFactory.getJerseyRootPath(); + rootPath = rootPath.substring(0, rootPath.indexOf("/*")); + basePath = basePath.equals("/") ? rootPath + : (new StringBuilder()).append(basePath).append(rootPath).toString(); + config.setBasePath(basePath); + config.setScan(true); + } + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysAppConfiguration.java b/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysAppConfiguration.java new file mode 100644 index 0000000..862c6a5 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysAppConfiguration.java @@ -0,0 +1,106 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.aai.esr; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.dropwizard.Configuration; +import io.dropwizard.db.DataSourceFactory; +import org.hibernate.validator.constraints.NotEmpty; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + + + +public class ExtsysAppConfiguration extends Configuration { + @NotEmpty + private String template; + + @NotEmpty + private String defaultName = "ONAP-A&AI-ESR"; + + @NotEmpty + private String msbIp; + + @NotEmpty + private int msbPort; + + @NotEmpty + private String msbServerAddr; + + @Valid + private String serviceIp; + + @JsonProperty + public String getTemplate() { + return template; + } + + @JsonProperty + public void setTemplate(String template) { + this.template = template; + } + + @JsonProperty + public String getDefaultName() { + return defaultName; + } + + @JsonProperty + public void setDefaultName(String name) { + this.defaultName = name; + } + + @JsonProperty + public String getMsbIp() { + return msbIp; + } + + @JsonProperty + public String setMsbIp() { + return msbIp; + } + + @JsonProperty + public int getMsbPort() { + return msbPort; + } + + @JsonProperty + public int setMsbPort() { + return msbPort; + } + + @JsonProperty + public String getMsbServerAddr() { + return msbServerAddr; + } + + @JsonProperty + public void setMsbServerAddr(String msbServerAddr) { + this.msbServerAddr = msbServerAddr; + } + @JsonProperty + public String getServiceIp() { + return serviceIp; + } + + @JsonProperty + public void setServiceIp(String serviceIp) { + this.serviceIp = serviceIp; + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/common/Config.java b/esr-mgr/src/main/java/org/onap/aai/esr/common/Config.java new file mode 100644 index 0000000..3826bf8 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/common/Config.java @@ -0,0 +1,32 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.aai.esr.common; + +import org.onap.aai.esr.ExtsysAppConfiguration; + + +public class Config { + private static ExtsysAppConfiguration configration; + + public static ExtsysAppConfiguration getConfigration() { + return configration; + } + + public static void setConfigration(ExtsysAppConfiguration config) { + configration = config; + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/common/ExtSysResuorceType.java b/esr-mgr/src/main/java/org/onap/aai/esr/common/ExtSysResuorceType.java new file mode 100644 index 0000000..650cca8 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/common/ExtSysResuorceType.java @@ -0,0 +1,26 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.aai.esr.common; + + +public enum ExtSysResuorceType { + VIM, SDNC, EMS, VNFM, BASE; + + public static ExtSysResuorceType getType(String type) { + return valueOf(type); + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/common/MsbUtil.java b/esr-mgr/src/main/java/org/onap/aai/esr/common/MsbUtil.java new file mode 100644 index 0000000..0bd4f01 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/common/MsbUtil.java @@ -0,0 +1,29 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.common; + + +public class MsbUtil { + +// public static String getVimBaseUrl() { +// return Config.getConfigration().getMsbServerAddr() + "/api/vim/v1"; +// } +// +// public static String getAaiServiceUrl() { +// return Config.getConfigration().getMsbServerAddr() + "/aai/v11/"; +// } + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/common/Parameters.java b/esr-mgr/src/main/java/org/onap/aai/esr/common/Parameters.java new file mode 100644 index 0000000..0e80e24 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/common/Parameters.java @@ -0,0 +1,27 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.aai.esr.common; + +/** + * Parameters.
+ * + * @author sun qi + * @version ESR V1 + */ +public enum Parameters { + emsId, sdnControllerId, vimId, vnfmId, id +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/BaseData.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/BaseData.java new file mode 100644 index 0000000..3f3f491 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/BaseData.java @@ -0,0 +1,116 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.entity.aai; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Inheritance; +import javax.persistence.InheritanceType; +import javax.persistence.Table; + +@Entity +@Table(name = "extsys_base_table") +@Inheritance(strategy = InheritanceType.JOINED) +public class BaseData { + @Id + @Column(name = "ID") + private String id; + + @Column(name = "NAME") + private String name; + + @Column(name = "VENDOR") + private String vendor; + + @Column(name = "VERSION") + private String version; + + @Column(name = "DESCRIPTION") + private String description; + + @Column(name = "TYPE") + private String type; + @Column(name = "CREATETIME") + private String createTime; + @Column(name = "CATAGORY") + private String category; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getVendor() { + return vendor; + } + + public void setVendor(String vendor) { + this.vendor = vendor; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/EmsData.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/EmsData.java new file mode 100644 index 0000000..dc7fbed --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/EmsData.java @@ -0,0 +1,81 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.entity.aai; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.PrimaryKeyJoinColumn; +import javax.persistence.Table; + + + +@Entity +@Table(name = "extsys_ems_table") +@PrimaryKeyJoinColumn(name = "EMSID") +@JsonIgnoreProperties(ignoreUnknown = true) +public class EmsData extends BaseData { + + + @Column(name = "PRODUCTNAME") + private String productName; + + @Column(name = "URL") + private String url; + + @Column(name = "USERNAME") + private String userName; + + @Column(name = "PASSWORD") + private String password; + + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/SdncData.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/SdncData.java new file mode 100644 index 0000000..c7b022d --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/SdncData.java @@ -0,0 +1,88 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.entity.aai; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.PrimaryKeyJoinColumn; +import javax.persistence.Table; + + + +@Entity +@Table(name = "extsys_sdnc_table") +@PrimaryKeyJoinColumn(name = "SDNCONTROLLERID") +@JsonIgnoreProperties(ignoreUnknown = true) +public class SdncData extends BaseData { + + @Column(name = "URL") + private String url; + + @Column(name = "USERNAME") + private String userName; + + @Column(name = "PASSWORD") + private String password; + + @Column(name = "PRODUCTNAME") + private String productName; + + @Column(name = "PROTOCOL") + private String protocol; + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getProtocol() { + return protocol; + } + + public void setProtocol(String protocol) { + this.protocol = protocol; + } + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/VimData.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/VimData.java new file mode 100644 index 0000000..0b546a8 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/VimData.java @@ -0,0 +1,87 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.entity.aai; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.PrimaryKeyJoinColumn; +import javax.persistence.Table; + +@Entity +@Table(name = "extsys_vim_table") +@PrimaryKeyJoinColumn(name = "VIMID") +@JsonIgnoreProperties(ignoreUnknown = true) +public class VimData extends BaseData { + + + @Column(name = "URL") + private String url; + + @Column(name = "USERNAME") + private String userName; + + @Column(name = "PASSWORD") + private String password; + + @Column(name = "DOMAIN") + private String domain; + + @Column(name = "TENANT") + private String tenant; + + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public String getTenant() { + return tenant; + } + + public void setTenant(String tenant) { + this.tenant = tenant; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/VnfmData.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/VnfmData.java new file mode 100644 index 0000000..795ba96 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/VnfmData.java @@ -0,0 +1,85 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.entity.aai; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.PrimaryKeyJoinColumn; +import javax.persistence.Table; + +@Entity +@Table(name = "extsys_vnfm_table") +@PrimaryKeyJoinColumn(name = "VNFMID") +@JsonIgnoreProperties(ignoreUnknown = true) +public class VnfmData extends BaseData { + + @Column(name = "URL") + private String url; + @Column(name = "USERNAME") + private String userName; + + @Column(name = "PASSWORD") + private String password; + + @Column(name = "VIMID") + private String vimId; + + @Column(name = "CERTIFICATEURL") + private String certificateUrl; + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getVimId() { + return vimId; + } + + public void setVimId(String vimId) { + this.vimId = vimId; + } + + public String getCertificateUrl() { + return certificateUrl; + } + + public void setCertificateUrl(String certificateUrl) { + this.certificateUrl = certificateUrl; + } + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/AlarmAddr.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/AlarmAddr.java new file mode 100644 index 0000000..d777db3 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/AlarmAddr.java @@ -0,0 +1,59 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.entity.rest; + +public class AlarmAddr { + + private String ip; + + private String port; + + private String user; + + private String password; + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public String getPort() { + return port; + } + + public void setPort(String port) { + this.port = port; + } + + public String getUser() { + return user; + } + + public void setUser(String user) { + this.user = user; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/AuthInfoItem.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/AuthInfoItem.java new file mode 100644 index 0000000..4e9948a --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/AuthInfoItem.java @@ -0,0 +1,79 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.entity.rest; + +public class AuthInfoItem { + + private String cloudDomain; + + private String userName; + + private String password; + + private String authUrl; + + private String sslCacert; + + private String sslInsecure; + + public String getCloudDomain() { + return cloudDomain; + } + + public void setCloudDomain(String cloudDomain) { + this.cloudDomain = cloudDomain; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getAuthUrl() { + return authUrl; + } + + public void setAuthUrl(String authUrl) { + this.authUrl = authUrl; + } + + public String getSslCacert() { + return sslCacert; + } + + public void setSslCacert(String sslCacert) { + this.sslCacert = sslCacert; + } + + public String getSslInsecure() { + return sslInsecure; + } + + public void setSslInsecure(String sslInsecure) { + this.sslInsecure = sslInsecure; + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/BaseRestData.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/BaseRestData.java new file mode 100644 index 0000000..540d009 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/BaseRestData.java @@ -0,0 +1,122 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.entity.rest; + + +public class BaseRestData { + + private String instanceId; + + private String systemName; + + private String vendor; + + private String version; + + private String type; + + private String url; + + private String username; + + private String password; + + private String systemStatus; + + private String systemType; + + public String getInstanceId() { + return instanceId; + } + + public void setInstanceId(String instanceId) { + this.instanceId = instanceId; + } + + public String getSystemName() { + return systemName; + } + + public void setSystemName(String systemName) { + this.systemName = systemName; + } + + public String getVendor() { + return vendor; + } + + public void setVendor(String vendor) { + this.vendor = vendor; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getSystemStatus() { + return systemStatus; + } + + public void setSystemStatus(String systemStatus) { + this.systemStatus = systemStatus; + } + + public String getSystemType() { + return systemType; + } + + public void setSystemType(String systemType) { + this.systemType = systemType; + } + + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/EmsRestData.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/EmsRestData.java new file mode 100644 index 0000000..205fc84 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/EmsRestData.java @@ -0,0 +1,91 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.entity.rest; + + +public class EmsRestData extends BaseRestData{ + + private String emsId; + + private String name; + + private String vendor; + + private String version; + + private FtpAddr resourceAddr; + + private FtpAddr performanceAddr; + + private AlarmAddr alarmAddr; + + public String getEmsId() { + return emsId; + } + + public void setEmsId(String emsId) { + this.emsId = emsId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getVendor() { + return vendor; + } + + public void setVendor(String vendor) { + this.vendor = vendor; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public FtpAddr getResourceAddr() { + return resourceAddr; + } + + public void setResourceAddr(FtpAddr resourceAddr) { + this.resourceAddr = resourceAddr; + } + + public FtpAddr getPerformanceAddr() { + return performanceAddr; + } + + public void setPerformanceAddr(FtpAddr performanceAddr) { + this.performanceAddr = performanceAddr; + } + + public AlarmAddr getAlarmAddr() { + return alarmAddr; + } + + public void setAlarmAddr(AlarmAddr alarmAddr) { + this.alarmAddr = alarmAddr; + } + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/FtpAddr.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/FtpAddr.java new file mode 100644 index 0000000..fe60469 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/FtpAddr.java @@ -0,0 +1,89 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.entity.rest; + +public class FtpAddr { + + private String ftptype; + + private String ip; + + private String port; + + private String user; + + private String password; + + private String remotepath; + + private String passive; + + public String getFtptype() { + return ftptype; + } + + public void setFtptype(String ftptype) { + this.ftptype = ftptype; + } + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public String getPort() { + return port; + } + + public void setPort(String port) { + this.port = port; + } + + public String getUser() { + return user; + } + + public void setUser(String user) { + this.user = user; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getRemotepath() { + return remotepath; + } + + public void setRemotepath(String remotepath) { + this.remotepath = remotepath; + } + + public String getPassive() { + return passive; + } + + public void setPassive(String passive) { + this.passive = passive; + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/RegisterResponse.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/RegisterResponse.java new file mode 100644 index 0000000..617edf9 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/RegisterResponse.java @@ -0,0 +1,30 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.entity.rest; + +public class RegisterResponse { + + private String id; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/ThirdPartySdncRestData.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/ThirdPartySdncRestData.java new file mode 100644 index 0000000..685e56d --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/ThirdPartySdncRestData.java @@ -0,0 +1,134 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.entity.rest; + +public class ThirdPartySdncRestData { + + private String thirdpartySdncId; + + private String name; + + private String vendor; + + private String version; + + private String type; + + private String location; + + private String url; + + private String userName; + + private String password; + + private String productName; + + private String protocol; + + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getProtocol() { + return protocol; + } + + public void setProtocol(String protocol) { + this.protocol = protocol; + } + + public ThirdPartySdncRestData() { + + } + + public String getThirdpartySdncId() { + return thirdpartySdncId; + } + + public void setThirdpartySdncId(String thirdpartySdncId) { + this.thirdpartySdncId = thirdpartySdncId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getVendor() { + return vendor; + } + + public void setVendor(String vendor) { + this.vendor = vendor; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VimRestData.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VimRestData.java new file mode 100644 index 0000000..7f07f87 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VimRestData.java @@ -0,0 +1,110 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.entity.rest; + +public class VimRestData extends BaseRestData { + + private String cloudOwner; + + private String cloudRegionId; + + private String cloudType; + + private String cloudRegionVersion; + + private String ownerDefinedType; + + private String cloudZone; + + private String complexName; + + private String cloudExtraInfo; + + private AuthInfoItem authInfoItem; + + public String getCloudOwner() { + return cloudOwner; + } + + public void setCloudOwner(String cloudOwner) { + this.cloudOwner = cloudOwner; + } + + public String getCloudRegionId() { + return cloudRegionId; + } + + public void setCloudRegionId(String cloudRegionId) { + this.cloudRegionId = cloudRegionId; + } + + public String getCloudType() { + return cloudType; + } + + public void setCloudType(String cloudType) { + this.cloudType = cloudType; + } + + public String getCloudRegionVersion() { + return cloudRegionVersion; + } + + public void setCloudRegionVersion(String cloudRegionVersion) { + this.cloudRegionVersion = cloudRegionVersion; + } + + public String getOwnerDefinedType() { + return ownerDefinedType; + } + + public void setOwnerDefinedType(String ownerDefinedType) { + this.ownerDefinedType = ownerDefinedType; + } + + public String getCloudZone() { + return cloudZone; + } + + public void setCloudZone(String cloudZone) { + this.cloudZone = cloudZone; + } + + public String getComplexName() { + return complexName; + } + + public void setComplexName(String complexName) { + this.complexName = complexName; + } + + public String getCloudExtraInfo() { + return cloudExtraInfo; + } + + public void setCloudExtraInfo(String cloudExtraInfo) { + this.cloudExtraInfo = cloudExtraInfo; + } + + public AuthInfoItem getAuthInfoItem() { + return authInfoItem; + } + + public void setAuthInfoItem(AuthInfoItem authInfoItem) { + this.authInfoItem = authInfoItem; + } + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VnfmRestData.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VnfmRestData.java new file mode 100644 index 0000000..edefe54 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VnfmRestData.java @@ -0,0 +1,120 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.entity.rest; + +public class VnfmRestData{ + + private String vnfmId; + + private String name; + + private String type; + + private String vimId; + + private String vendor; + + private String version; + + private String certificateUrl; + + private String url; + + private String userName; + + private String password; + + public String getVnfmId() { + return vnfmId; + } + + public void setVnfmId(String vnfmId) { + this.vnfmId = vnfmId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getVimId() { + return vimId; + } + + public void setVimId(String vimId) { + this.vimId = vimId; + } + + public String getVendor() { + return vendor; + } + + public void setVendor(String vendor) { + this.vendor = vendor; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getCertificateUrl() { + return certificateUrl; + } + + public void setCertificateUrl(String certificateUrl) { + this.certificateUrl = certificateUrl; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/exception/ExtsysException.java b/esr-mgr/src/main/java/org/onap/aai/esr/exception/ExtsysException.java new file mode 100644 index 0000000..acfa459 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/exception/ExtsysException.java @@ -0,0 +1,48 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.exception; + +public class ExtsysException extends Exception { + + private static final long serialVersionUID = 1L; + private String errorCode; + private String errorMsg; + + public String getErrorCode() { + return errorCode; + } + + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } + + public String getErrorMsg() { + return errorMsg; + } + + public void setErrorMsg(String errorMsg) { + this.errorMsg = errorMsg; + } + + public ExtsysException() { + super(); + } + + public ExtsysException(String errorCode, String errorMsg) { + this.errorCode = errorCode; + this.errorMsg = errorMsg; + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/AaiAdapterConfig.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/AaiAdapterConfig.java new file mode 100644 index 0000000..68bf1c9 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/AaiAdapterConfig.java @@ -0,0 +1,29 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.externalservice.aai; + +public class AaiAdapterConfig { + + protected static String aaiAdapterAddr; + + public static void setAaiAdapterAddr(String address){ + aaiAdapterAddr = "https://" + address; + } + + public static String getAaiAdapterAddr(){ + return aaiAdapterAddr; + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/AaiCommon.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/AaiCommon.java new file mode 100644 index 0000000..c2088a1 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/AaiCommon.java @@ -0,0 +1,62 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.externalservice.aai; + +import java.io.IOException; +import java.io.StringReader; +import com.sun.jersey.api.client.ClientResponse; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + +public class AaiCommon { + + private static String AAI_AUTHENTICATION_USER = "AAI"; + private static String AAI_AUTHENTICATION_PAASWORD = "AAI"; + private static String RESOURCE_VERSION_PARAM = "resource-version"; + +// public String getAuthenticationCredentials() { +// String usernameAndPassword = AAI_AUTHENTICATION_USER + ":" +// + AAI_AUTHENTICATION_PAASWORD; +// return "Basic " + java.util.Base64.getEncoder().encodeToString("AAI:AAI".getBytes()); +// } + + public String getResourceVersion(ClientResponse response) + throws ParserConfigurationException, SAXException, IOException { + String respData = response.getEntity(String.class); + + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + DocumentBuilder builder = factory.newDocumentBuilder(); + InputSource is = new InputSource(new StringReader(respData)); + Document doc = builder.parse(is); + + NodeList nodeList = doc.getDocumentElement().getChildNodes(); + for (int i = 0; i < nodeList.getLength(); i++) { + Node currentNode = nodeList.item(i); + if (currentNode.getNodeName().equals(RESOURCE_VERSION_PARAM)) { + return currentNode.getTextContent(); + } + } + + return null; + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/AaiServiceConsumer.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/AaiServiceConsumer.java new file mode 100644 index 0000000..cbb65ad --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/AaiServiceConsumer.java @@ -0,0 +1,32 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.externalservice.aai; + +import org.glassfish.jersey.client.ClientConfig; + +import com.eclipsesource.jaxrs.consumer.ConsumerFactory; + +public class AaiServiceConsumer { + private static IEsrVimRest aaiAdapterProxy; + + static { + ClientConfig config = new ClientConfig(); + aaiAdapterProxy = + ConsumerFactory.createConsumer(AaiAdapterConfig.getAaiAdapterAddr(), + config, IEsrVimRest.class); + } + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/IEsrVimRest.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/IEsrVimRest.java new file mode 100644 index 0000000..0c45938 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/IEsrVimRest.java @@ -0,0 +1,81 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.aai.esr.externalservice.aai; + +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +import org.glassfish.jersey.client.ClientResponse; +import org.onap.aai.esr.externalservice.entity.CloudRegion; + +import retrofit2.http.Header; +import retrofit2.http.Headers; + + +@Path("/aai/v11/cloud-infrastructure/cloud-regions") +public interface IEsrVimRest { + +// @Headers({ +// "X-TransactionId: 9999", +// "Accept: application/json", +// "X-FromAppId: aai-esr" +// }) +// @Path("/cloud-region/{cloud_owner}/{cloud_region_id}") +// @PUT +// @Consumes(MediaType.APPLICATION_JSON) +// +// public ClientResponse registerVIMServce(@Header("Authorization") String authorization, @PathParam("cloud_owner") String cloud_owner, +// CloudRegion entity) throws Exception; +// +// @Headers({ +// "X-TransactionId: 9999", +// "Accept: application/json", +// "X-FromAppId: aai-esr" +// }) +// @Path("/cloud-region/{cloud_owner}/{cloud_region_id}?depth=all") +// @GET +// @Produces(MediaType.APPLICATION_JSON) +// public ClientResponse queryVIMDetail(@Header("Authorization") String authorization, @PathParam("cloud_owner") String cloud_owner, +// @PathParam("cloud_region_id") String cloud_region_id) throws Exception; +// +// @Headers({ +// "X-TransactionId: 9999", +// "Accept: application/json", +// "X-FromAppId: aai-esr" +// }) +// @Path("/") +// @GET +// @Produces(MediaType.APPLICATION_JSON) +// public ClientResponse queryVIMList(@Header("Authorization") String authorization) throws Exception; +// +// +// @Headers({ +// "X-TransactionId: 9999", +// "Accept: application/json", +// "X-FromAppId: aai-esr" +// }) +// @Path("/cloud-region/{cloud_owner}/{cloud_region_id}/esr-system-info/{esr_system_info_id}") +// @GET +// public ClientResponse delVIMAuthInfo(@Header("Authorization") String authorization, @PathParam("cloud_owner") String cloud_owner, +// @PathParam("cloud_region_id") String cloud_region_id, @PathParam("esr_system_info_id") String esr_system_info_id) throws Exception; + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/CloudRegion.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/CloudRegion.java new file mode 100644 index 0000000..f4fcf20 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/CloudRegion.java @@ -0,0 +1,112 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.externalservice.entity; + +import java.util.ArrayList; + +public class CloudRegion { + + // required + private String cloudOwner; + //required + private String cloudRegionId; + //required + private String cloudType; + //required + private String cloudRegionVersion; + // not required + private String ownerDefinedType; + //not required + private String cloudZone; + //not required + private String complexName; + //not required + private String cloudExtraInfo; + + private ArrayList esrSystemInfos; + + public String getCloudOwner() { + return cloudOwner; + } + + public void setCloudOwner(String cloudOwner) { + this.cloudOwner = cloudOwner; + } + + public String getCloudRegionId() { + return cloudRegionId; + } + + public void setCloudRegionId(String cloudRegionId) { + this.cloudRegionId = cloudRegionId; + } + + public String getCloudType() { + return cloudType; + } + + public void setCloudType(String cloudType) { + this.cloudType = cloudType; + } + + public String getCloudRegionVersion() { + return cloudRegionVersion; + } + + public void setCloudRegionVersion(String cloudRegionVersion) { + this.cloudRegionVersion = cloudRegionVersion; + } + + public String getOwnerDefinedType() { + return ownerDefinedType; + } + + public void setOwnerDefinedType(String ownerDefinedType) { + this.ownerDefinedType = ownerDefinedType; + } + + public String getCloudZone() { + return cloudZone; + } + + public void setCloudZone(String cloudZone) { + this.cloudZone = cloudZone; + } + + public String getComplexName() { + return complexName; + } + + public void setComplexName(String complexName) { + this.complexName = complexName; + } + + public String getCloudExtraInfo() { + return cloudExtraInfo; + } + + public void setCloudExtraInfo(String cloudExtraInfo) { + this.cloudExtraInfo = cloudExtraInfo; + } + + public ArrayList getEsrSystemInfos() { + return esrSystemInfos; + } + + public void setEsrSystemInfos(ArrayList esrSystemInfos) { + this.esrSystemInfos = esrSystemInfos; + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/EsrEms.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/EsrEms.java new file mode 100644 index 0000000..a11b5d4 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/EsrEms.java @@ -0,0 +1,60 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.externalservice.entity; + +import java.util.ArrayList; + +public class EsrEms { + private String emsId; + + private Boolean passive; + + private String remotePath; + + private ArrayList esrSystemInfos; + + public String getEmsId() { + return emsId; + } + + public void setEmsId(String emsId) { + this.emsId = emsId; + } + + public Boolean getPassive() { + return passive; + } + + public void setPassive(Boolean passive) { + this.passive = passive; + } + + public String getRemotePath() { + return remotePath; + } + + public void setRemotePath(String remotePath) { + this.remotePath = remotePath; + } + + public ArrayList getEsrSystemInfos() { + return esrSystemInfos; + } + + public void setEsrSystemInfos(ArrayList esrSystemInfos) { + this.esrSystemInfos = esrSystemInfos; + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/EsrSystemInfo.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/EsrSystemInfo.java new file mode 100644 index 0000000..12bb2bc --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/EsrSystemInfo.java @@ -0,0 +1,180 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.externalservice.entity; + +public class EsrSystemInfo { + + private String esrSystemInfoId; + + private String systemName; + + private String type; + + private String vendor; + + private String version; + + private String serviceUrl; + + private String userName; + + private String password; + + private String systemType; + + private String protocal; + + private String sslCacert; + + private Boolean sslInsecure; + + private Boolean ipAddress; + + private Boolean port; + + private Boolean cloudDomain; + + private Boolean defaultTenant; + + public String getEsrSystemInfoId() { + return esrSystemInfoId; + } + + public void setEsrSystemInfoId(String esrSystemInfoId) { + this.esrSystemInfoId = esrSystemInfoId; + } + + public String getSystemName() { + return systemName; + } + + public void setSystemName(String systemName) { + this.systemName = systemName; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getVendor() { + return vendor; + } + + public void setVendor(String vendor) { + this.vendor = vendor; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getServiceUrl() { + return serviceUrl; + } + + public void setServiceUrl(String serviceUrl) { + this.serviceUrl = serviceUrl; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getSystemType() { + return systemType; + } + + public void setSystemType(String systemType) { + this.systemType = systemType; + } + + public String getProtocal() { + return protocal; + } + + public void setProtocal(String protocal) { + this.protocal = protocal; + } + + public String getSslCacert() { + return sslCacert; + } + + public void setSslCacert(String sslCacert) { + this.sslCacert = sslCacert; + } + + public Boolean getSslInsecure() { + return sslInsecure; + } + + public void setSslInsecure(Boolean sslInsecure) { + this.sslInsecure = sslInsecure; + } + + public Boolean getIpAddress() { + return ipAddress; + } + + public void setIpAddress(Boolean ipAddress) { + this.ipAddress = ipAddress; + } + + public Boolean getPort() { + return port; + } + + public void setPort(Boolean port) { + this.port = port; + } + + public Boolean getCloudDomain() { + return cloudDomain; + } + + public void setCloudDomain(Boolean cloudDomain) { + this.cloudDomain = cloudDomain; + } + + public Boolean getDefaultTenant() { + return defaultTenant; + } + + public void setDefaultTenant(Boolean defaultTenant) { + this.defaultTenant = defaultTenant; + } + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/EsrThirdpartySdnc.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/EsrThirdpartySdnc.java new file mode 100644 index 0000000..068e288 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/EsrThirdpartySdnc.java @@ -0,0 +1,50 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.externalservice.entity; + +public class EsrThirdpartySdnc { + + private String thirdpartySdncId; + + private String location; + + private String productName; + + public String getThirdpartySdncId() { + return thirdpartySdncId; + } + + public void setThirdpartySdncId(String thirdpartySdncId) { + this.thirdpartySdncId = thirdpartySdncId; + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/EsrVnfm.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/EsrVnfm.java new file mode 100644 index 0000000..05d1789 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/EsrVnfm.java @@ -0,0 +1,62 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.externalservice.entity; + +import java.util.ArrayList; + +public class EsrVnfm { + + private String vnfmId; + + private String vimId; + + private String certificateUrl; + + private ArrayList esrSystemInfos; + + public String getVnfmId() { + return vnfmId; + } + + public void setVnfmId(String vnfmId) { + this.vnfmId = vnfmId; + } + + public String getVimId() { + return vimId; + } + + public void setVimId(String vimId) { + this.vimId = vimId; + } + + public String getCertificateUrl() { + return certificateUrl; + } + + public void setCertificateUrl(String certificateUrl) { + this.certificateUrl = certificateUrl; + } + + public ArrayList getEsrSystemInfos() { + return esrSystemInfos; + } + + public void setEsrSystemInfos(ArrayList esrSystemInfos) { + this.esrSystemInfos = esrSystemInfos; + } + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/ServiceNode.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/ServiceNode.java new file mode 100644 index 0000000..f79f584 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/entity/ServiceNode.java @@ -0,0 +1,52 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.externalservice.entity; + + +public class ServiceNode { + + private String ip; + + private String port; + + private int ttl; + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public String getPort() { + return port; + } + + public void setPort(String port) { + this.port = port; + } + + public int getTtl() { + return ttl; + } + + public void setTtl(int ttl) { + this.ttl = ttl; + } + + +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/msb/MsbHelper.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/msb/MsbHelper.java new file mode 100644 index 0000000..f385350 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/msb/MsbHelper.java @@ -0,0 +1,56 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.externalservice.msb; + +import java.net.InetAddress; +import java.util.HashSet; +import java.util.Set; + +import org.onap.msb.sdk.discovery.entity.MicroServiceInfo; +import org.onap.msb.sdk.httpclient.msb.MSBServiceClient; +import org.onap.msb.sdk.discovery.entity.Node; + +public class MsbHelper { + + private MSBServiceClient msbClient; + + public MsbHelper(MSBServiceClient msbClient) { + super(); + this.msbClient = msbClient; + } + + + + public void registerMsb() throws Exception { + + + MicroServiceInfo msinfo = new MicroServiceInfo(); + + msinfo.setServiceName("animals"); + msinfo.setVersion("v1"); + msinfo.setUrl("/api/rpc/v1"); + msinfo.setProtocol("REST"); + msinfo.setVisualRange("0|1"); + + Set nodes = new HashSet<>(); + Node node1 = new Node(); + node1.setIp(InetAddress.getLocalHost().getHostAddress()); + node1.setPort("9090"); + nodes.add(node1); + msinfo.setNodes(nodes); + msbClient.registerMicroServiceInfo(msinfo, false); + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/resource/EmsManager.java b/esr-mgr/src/main/java/org/onap/aai/esr/resource/EmsManager.java new file mode 100644 index 0000000..368a0c3 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/resource/EmsManager.java @@ -0,0 +1,155 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.resource; + +import com.codahale.metrics.annotation.Timed; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; + +import org.eclipse.jetty.http.HttpStatus; +import org.onap.aai.esr.entity.aai.EmsData; +import org.onap.aai.esr.entity.rest.EmsRestData; +import org.onap.aai.esr.exception.ExtsysException; +import org.onap.aai.esr.util.ExtsysUtil; +import org.onap.aai.esr.util.RestResponseUtil; +import org.onap.aai.esr.wrapper.EmsManagerWrapper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +@Path("/emses") +@Api(tags = {" ems Management "}) +public class EmsManager { + + private static final Logger LOGGER = LoggerFactory.getLogger(EmsManager.class); + + /** + * query all ems. + */ + @Path("") + @GET + @ApiOperation(value = "get all ems ") + @Produces(MediaType.APPLICATION_JSON) + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response queryEmsList() { + LOGGER.info("start query all ems!"); + return EmsManagerWrapper.getInstance().queryEmsList(); + } + + /** + * query ems info by id. + */ + @Path("/{emsId}") + @GET + @ApiOperation(value = "get ems by id") + @Produces(MediaType.APPLICATION_JSON) + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response queryemsById(@ApiParam(value = "ems id") @PathParam("emsId") String emsId) { + LOGGER.info("start query ems by id." + emsId); + return EmsManagerWrapper.getInstance().queryEmsById(emsId); + } + + /** + * delete ems by id. + */ + @Path("/{emsId}") + @DELETE + @ApiOperation(value = "delete a ems") + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response delems(@ApiParam(value = "ems id") @PathParam("emsId") String emsId) { + LOGGER.info("start delete ems .id:" + emsId); + return EmsManagerWrapper.getInstance().delEms(emsId); + } + + /** + * update ems by id. + */ + @PUT + @Path("/{emsId}") + @Consumes(MediaType.APPLICATION_JSON) + @Produces({MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON}) + @ApiOperation(value = "update a ems") + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response updateEms(@ApiParam(value = "ems", required = true) EmsRestData ems, + @ApiParam(value = "ems id", required = true) @PathParam("emsId") String emsId) { + LOGGER.info("start update ems .id:" + emsId + " info:" + ExtsysUtil.objectToString(ems)); + return RestResponseUtil.getSuccessResponse(new EmsRestData()); + } + + /** + * register ems. + */ + @POST + @Path("") + @Consumes(MediaType.APPLICATION_JSON) + @Produces({MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON}) + @ApiOperation(value = "create a ems") + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response registerEms(@ApiParam(value = "ems", required = true) EmsRestData ems) { + LOGGER.info("start add ems" + " info:" + ExtsysUtil.objectToString(ems)); + return EmsManagerWrapper.getInstance().registerEms(ems); + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/resource/ThirdpatySdncManager.java b/esr-mgr/src/main/java/org/onap/aai/esr/resource/ThirdpatySdncManager.java new file mode 100644 index 0000000..1a3095c --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/resource/ThirdpatySdncManager.java @@ -0,0 +1,150 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.resource; + +import com.codahale.metrics.annotation.Timed; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; + +import org.eclipse.jetty.http.HttpStatus; +import org.onap.aai.esr.entity.rest.ThirdPartySdncRestData; +import org.onap.aai.esr.util.ExtsysUtil; +import org.onap.aai.esr.wrapper.ThirdpatySdncWrapper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +@Path("/sdncontrollers") +@Api(tags = {"ThirdParty sdnc Management "}) +public class ThirdpatySdncManager { + + private static final Logger LOGGER = LoggerFactory.getLogger(ThirdpatySdncManager.class); + + /** + *query all thirdParty sdnc. + */ + @Path("") + @GET + @ApiOperation(value = "get all thirdParty sdnc ") + @Produces(MediaType.APPLICATION_JSON) + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response queryThirdpartySdncList() { + LOGGER.info("start query all thirdParty sdnc!"); + return ThirdpatySdncWrapper.getInstance().queryThirdpartySdncList(); + } + + /** + *query thirdParty sdnc by id. + */ + @Path("/{thirdPartySdncId}") + @GET + @ApiOperation(value = "get thirdParty sdnc by id") + @Produces(MediaType.APPLICATION_JSON) + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response queryThirdpartySdncById(@ApiParam(value = "thirdparty sdnc id") @PathParam("thirdPartySdncId") String thirdPartySdncId) { + LOGGER.info("start query thirdparty sdnc by id." + thirdPartySdncId); + return ThirdpatySdncWrapper.getInstance().queryThirdpartySdncById(thirdPartySdncId); + } + + /** + *delete thirdparty sdnc by id. + */ + @Path("/{thirdPartySdncId}") + @DELETE + @ApiOperation(value = "delete a thirdparty sdnc") + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response delThirdpartySdnc(@ApiParam(value = "thirdparty sdnc id") @PathParam("thirdPartySdncId") String thirdPartySdncId) { + LOGGER.info("start delete thirdparty sdnc .id:" + thirdPartySdncId); + return ThirdpatySdncWrapper.getInstance().delThirdpartySdnc(thirdPartySdncId); + } + + /** + *update thirdParty sdnc by id. + */ + @PUT + @Path("/{thirdPartySdncId}") + @Consumes(MediaType.APPLICATION_JSON) + @Produces({MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON}) + @ApiOperation(value = "update a thirdParty Sdnc") + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response updateThirdpartySdnc(@ApiParam(value = "thirdpartySdnc", required = true) ThirdPartySdncRestData thirdPartySdnc, + @ApiParam(value = "sdnc id", required = true) @PathParam("thirdPartySdncId") String thirdPartySdncId) { + LOGGER.info("start update sdnc .id:" + thirdPartySdncId + " info:" + ExtsysUtil.objectToString(thirdPartySdnc)); + return ThirdpatySdncWrapper.getInstance().updateThirdpartySdnc(thirdPartySdnc); + } + + /** + *thirdParty sdnc register. + */ + @POST + @Path("") + @Consumes(MediaType.APPLICATION_JSON) + @Produces({MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON}) + @ApiOperation(value = "register a thirdparty sdnc") + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response registerThirdpatySdnc(@ApiParam(value = "thirdPartySdnc", required = true) ThirdPartySdncRestData thirdPartySdnc) { + LOGGER.info("start register sdnc" + " info:" + ExtsysUtil.objectToString(thirdPartySdnc)); + return ThirdpatySdncWrapper.getInstance().registerThirdpartySdnc(thirdPartySdnc); + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/resource/VimManager.java b/esr-mgr/src/main/java/org/onap/aai/esr/resource/VimManager.java new file mode 100644 index 0000000..f31140b --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/resource/VimManager.java @@ -0,0 +1,153 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.resource; + +import com.codahale.metrics.annotation.Timed; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; +import org.eclipse.jetty.http.HttpStatus; +import org.onap.aai.esr.entity.aai.VimData; +import org.onap.aai.esr.entity.rest.VimRestData; +import org.onap.aai.esr.exception.ExtsysException; +import org.onap.aai.esr.util.ExtsysUtil; +import org.onap.aai.esr.util.RestResponseUtil; +import org.onap.aai.esr.wrapper.VimManagerWrapper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +@Path("/vims") +@Api(tags = {" vim Management "}) +public class VimManager { + + private static final Logger LOGGER = LoggerFactory.getLogger(VimManager.class); + + /** + * query all VIM. + */ + @Path("") + @GET + @ApiOperation(value = "get all vim ") + @Produces(MediaType.APPLICATION_JSON) + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response queryVimList() { + return VimManagerWrapper.getInstance().queryVimList(); + } + + /** + * query vim by id. + */ + @Path("/{vimId}") + @GET + @ApiOperation(value = "get vim by id") + @Produces(MediaType.APPLICATION_JSON) + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response queryVimById(@ApiParam(value = "vim id") @PathParam("vimId") String vimId) { + LOGGER.info("start query vim by id." + vimId); + return VimManagerWrapper.getInstance().queryVimById(vimId); + } + + /** + * delete vim by id. + */ + @Path("/{vimId}") + @DELETE + @ApiOperation(value = "delete a vim") + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response delvim(@ApiParam(value = "vim id") @PathParam("vimId") String vimId) { + LOGGER.info("start delete vim .id:" + vimId); + return VimManagerWrapper.getInstance().delVim(vimId); + } + + /** + * update vim by id. + */ + @PUT + @Path("/{vimId}") + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + @ApiOperation(value = "update a vim") + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response updatevims(@ApiParam(value = "vim", required = true) VimRestData vim, + @ApiParam(value = "vim id", required = true) @PathParam("vimId") String vimId) { + LOGGER.info("start update vim .id:" + vimId + " info:" + ExtsysUtil.objectToString(vim)); + return VimManagerWrapper.getInstance().updateVim(vim); + } + + /** + * register vim . + */ + @POST + @Path("") + @Consumes(MediaType.APPLICATION_JSON) + @Produces({MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON}) + @ApiOperation(value = "create a vim") + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response registerVims(@ApiParam(value = "vim", required = true) VimRestData vim) { + LOGGER.info("start add vim" + " info:" + ExtsysUtil.objectToString(vim)); + return VimManagerWrapper.getInstance().registerVim(vim); + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/resource/VnfmManager.java b/esr-mgr/src/main/java/org/onap/aai/esr/resource/VnfmManager.java new file mode 100644 index 0000000..f7e7097 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/resource/VnfmManager.java @@ -0,0 +1,153 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.resource; + +import com.codahale.metrics.annotation.Timed; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; +import org.eclipse.jetty.http.HttpStatus; +import org.onap.aai.esr.entity.aai.VnfmData; +import org.onap.aai.esr.entity.rest.VnfmRestData; +import org.onap.aai.esr.exception.ExtsysException; +import org.onap.aai.esr.util.ExtsysUtil; +import org.onap.aai.esr.util.RestResponseUtil; +import org.onap.aai.esr.wrapper.VnfmManagerWrapper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +@Path("/vnfms") +@Api(tags = {" vnfm Management "}) +public class VnfmManager { + + private static final Logger LOGGER = LoggerFactory.getLogger(VnfmManager.class); + + /** + * query all vnfm. + */ + @Path("") + @GET + @ApiOperation(value = "get all vnfm ") + @Produces(MediaType.APPLICATION_JSON) + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response queryVnfmList() { + LOGGER.info("start query all vnfm!"); + return VnfmManagerWrapper.getInstance().queryVnfmList(); + } + + /** + * query vnfm by id. + */ + @Path("/{vnfmId}") + @GET + @ApiOperation(value = "get vnfm by id") + @Produces(MediaType.APPLICATION_JSON) + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response queryVnfmById(@ApiParam(value = "vnfm id") @PathParam("vnfmId") String vnfmId) { + LOGGER.info("start query vnfm by id." + vnfmId); + return VnfmManagerWrapper.getInstance().queryVnfmById(vnfmId); + } + + /** + * delete vnfm by id. + */ + @Path("/{vnfmId}") + @DELETE + @ApiOperation(value = "delete a vnfm") + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response delVnfm(@ApiParam(value = "vnfm id") @PathParam("vnfmId") String vnfmId) { + LOGGER.info("start delete vnfm .id:" + vnfmId); + return VnfmManagerWrapper.getInstance().delVnfm(vnfmId); + } + + /** + * update vnfm by id. + */ + @PUT + @Path("/{vnfmId}") + @Consumes(MediaType.APPLICATION_JSON) + @Produces({MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON}) + @ApiOperation(value = "update a vnfm") + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response updateVnfm(@ApiParam(value = "vnfm", required = true) VnfmRestData vnfm, + @ApiParam(value = "vnfm id", required = true) @PathParam("vnfmId") String vnfmId) { + LOGGER.info("start update vnfm .id:" + vnfmId + " info:" + ExtsysUtil.objectToString(vnfm)); + return VnfmManagerWrapper.getInstance().updateVnfm(vnfm, vnfmId); + } + + /** + * add vnfm . + */ + @POST + @Path("") + @Consumes(MediaType.APPLICATION_JSON) + @Produces({MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON}) + @ApiOperation(value = "create a vnfm") + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", + response = String.class), + @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, + message = "Unprocessable MicroServiceInfo Entity ", response = String.class), + @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error", + response = String.class)}) + @Timed + public Response registerVnfm(@ApiParam(value = "vnfm", required = true) VnfmRestData vnfm) { + return VnfmManagerWrapper.getInstance().registerVnfm(vnfm); + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/util/ExtsysUtil.java b/esr-mgr/src/main/java/org/onap/aai/esr/util/ExtsysUtil.java new file mode 100644 index 0000000..72f8bd7 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/util/ExtsysUtil.java @@ -0,0 +1,54 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.util; + +import com.google.gson.Gson; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.UUID; + +public class ExtsysUtil { + private final static Logger logger = LoggerFactory.getLogger(ExtsysUtil.class); + + public static String generateId() { + return UUID.randomUUID().toString(); + } + + public static boolean isNotEmpty(String str) { + return str != null && !"".equals(str) && str.length() > 0; + } + + /** + * change object to str. + */ + public static String objectToString(Object obj) { + Gson gson = new Gson(); + if (obj != null) { + return gson.toJson(obj); + } else { + return null; + } + } + + public static String getNowTime() { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + return sdf.format(new Date()); + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/util/RestResponseUtil.java b/esr-mgr/src/main/java/org/onap/aai/esr/util/RestResponseUtil.java new file mode 100644 index 0000000..3c27178 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/util/RestResponseUtil.java @@ -0,0 +1,49 @@ +/** + * Copyright 2016-2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.util; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.Response.Status; + +public class RestResponseUtil { + + /** + * get http success entity. + */ + public static Response getSuccessResponse(Object obj) { + if (obj != null) { + return Response.ok(obj).build(); + } else { + return Response.ok().build(); + } + } + + public static Response getCreateSussceeResponse(Object obj) { + return Response.status(Status.CREATED).entity(obj).build(); + } + + /** + * get http error entity. + */ + public static Response getErrorResponse(Object obj) { + if (obj != null) { + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(obj).build(); + } else { + return Response.serverError().build(); + } + + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/EmsManagerWrapper.java b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/EmsManagerWrapper.java new file mode 100644 index 0000000..842feb2 --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/EmsManagerWrapper.java @@ -0,0 +1,70 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.wrapper; + +import java.util.ArrayList; + +import javax.ws.rs.core.Response; + +import org.onap.aai.esr.entity.rest.EmsRestData; +import org.onap.aai.esr.entity.rest.RegisterResponse; +import org.onap.aai.esr.entity.rest.VnfmRestData; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class EmsManagerWrapper { + private static EmsManagerWrapper emsManagerWrapper; + private static final Logger LOG = LoggerFactory.getLogger(EmsManagerWrapper.class); + + /** + * get VnfmManagerWrapper instance. + * @return ems manager wrapper instance + */ + public static EmsManagerWrapper getInstance() { + if (emsManagerWrapper == null) { + emsManagerWrapper = new EmsManagerWrapper(); + } + return emsManagerWrapper; + } + + public Response registerEms(EmsRestData ems) { + //TODO + RegisterResponse result = null; + return Response.ok(result).build(); + } + + public Response updateEms(EmsRestData ems) { + //TODO + return Response.ok().build(); + } + + public Response queryEmsList() { + //TODO + ArrayList emsList = new ArrayList(); + return Response.ok(emsList).build(); + } + + public Response queryEmsById(String emsId) { + EmsRestData ems = new EmsRestData(); + //TODO + return Response.ok(ems).build(); + } + + public Response delEms(String emsId) { + //TODO + return Response.noContent().build(); + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/ThirdpatySdncWrapper.java b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/ThirdpatySdncWrapper.java new file mode 100644 index 0000000..d88c9ae --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/ThirdpatySdncWrapper.java @@ -0,0 +1,70 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.wrapper; + +import java.util.ArrayList; + +import javax.ws.rs.core.Response; + +import org.onap.aai.esr.entity.rest.RegisterResponse; +import org.onap.aai.esr.entity.rest.ThirdPartySdncRestData; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ThirdpatySdncWrapper { + + private static ThirdpatySdncWrapper thirdpatySdncWrapper; + private static final Logger LOG = LoggerFactory.getLogger(ThirdpatySdncWrapper.class); + + /** + * get ThirdpatySdncWrapper instance. + * @return ThirdpatySdnc manager wrapper instance + */ + public static ThirdpatySdncWrapper getInstance() { + if (thirdpatySdncWrapper == null) { + thirdpatySdncWrapper = new ThirdpatySdncWrapper(); + } + return thirdpatySdncWrapper; + } + + public Response registerThirdpartySdnc(ThirdPartySdncRestData thirdpartySdnc) { + //TODO + RegisterResponse result = null; + return Response.ok(result).build(); + } + + public Response updateThirdpartySdnc(ThirdPartySdncRestData thirdpartySdnc) { + //TODO + return Response.ok().build(); + } + + public Response queryThirdpartySdncList() { + //TODO + ArrayList thirdpartySdncList = new ArrayList(); + return Response.ok(thirdpartySdncList).build(); + } + + public Response queryThirdpartySdncById(String thirdpartySdncId) { + ThirdPartySdncRestData thirdpartySdnc = new ThirdPartySdncRestData(); + //TODO + return Response.ok(thirdpartySdnc).build(); + } + + public Response delThirdpartySdnc(String thirdpartySdncId) { + //TODO + return Response.noContent().build(); + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VimManagerWrapper.java b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VimManagerWrapper.java new file mode 100644 index 0000000..75cc4fc --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VimManagerWrapper.java @@ -0,0 +1,70 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.wrapper; + +import java.util.ArrayList; + +import javax.ws.rs.core.Response; + +import org.onap.aai.esr.entity.rest.RegisterResponse; +import org.onap.aai.esr.entity.rest.VimRestData; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class VimManagerWrapper { + + private static VimManagerWrapper vimManagerWrapper; + private static final Logger LOG = LoggerFactory.getLogger(VimManagerWrapper.class); + + /** + * get VimManagerWrapper instance. + * @return vim manager wrapper instance + */ + public static VimManagerWrapper getInstance() { + if (vimManagerWrapper == null) { + vimManagerWrapper = new VimManagerWrapper(); + } + return vimManagerWrapper; + } + + public Response registerVim(VimRestData vim) { + //TODO + RegisterResponse result = null; + return Response.ok(result).build(); + } + + public Response updateVim(VimRestData vim) { + //TODO + return Response.ok().build(); + } + + public Response queryVimList() { + //TODO + ArrayList vimList = new ArrayList(); + return Response.ok(vimList).build(); + } + + public Response queryVimById(String vimId) { + VimRestData vim = new VimRestData(); + //TODO + return Response.ok(vim).build(); + } + + public Response delVim(String vimId) { + //TODO + return Response.noContent().build(); + } +} diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VnfmManagerWrapper.java b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VnfmManagerWrapper.java new file mode 100644 index 0000000..a1ac53c --- /dev/null +++ b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VnfmManagerWrapper.java @@ -0,0 +1,69 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.aai.esr.wrapper; + +import java.util.ArrayList; + +import javax.ws.rs.core.Response; + +import org.onap.aai.esr.entity.rest.RegisterResponse; +import org.onap.aai.esr.entity.rest.VnfmRestData; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class VnfmManagerWrapper { + private static VnfmManagerWrapper vnfmManagerWrapper; + private static final Logger LOG = LoggerFactory.getLogger(VnfmManagerWrapper.class); + + /** + * get VnfmManagerWrapper instance. + * @return vnfm manager wrapper instance + */ + public static VnfmManagerWrapper getInstance() { + if (vnfmManagerWrapper == null) { + vnfmManagerWrapper = new VnfmManagerWrapper(); + } + return vnfmManagerWrapper; + } + + public Response registerVnfm(VnfmRestData vnfm) { + //TODO + RegisterResponse result = null; + return Response.ok(result).build(); + } + + public Response updateVnfm(VnfmRestData vnfm, String vnfmId) { + //TODO + return Response.ok().build(); + } + + public Response queryVnfmList() { + ArrayList vnfmList = new ArrayList(); + //TODO + return Response.ok(vnfmList).build(); + } + + public Response queryVnfmById(String vnfmId) { + VnfmRestData vnfm = new VnfmRestData(); + //TODO + return Response.ok(vnfm).build(); + } + + public Response delVnfm(String vnfmId) { + //TODO + return Response.noContent().build(); + } +} diff --git a/esr-mgr/src/main/resources/api-doc/META-INF/MANIFEST.MF b/esr-mgr/src/main/resources/api-doc/META-INF/MANIFEST.MF new file mode 100644 index 0000000..eaf90a9 --- /dev/null +++ b/esr-mgr/src/main/resources/api-doc/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Created-By: 1.7.0_72 (Oracle Corporation) + diff --git a/esr-mgr/src/main/resources/api-doc/WEB-INF/web.xml b/esr-mgr/src/main/resources/api-doc/WEB-INF/web.xml new file mode 100644 index 0000000..2a5346c --- /dev/null +++ b/esr-mgr/src/main/resources/api-doc/WEB-INF/web.xml @@ -0,0 +1,41 @@ + + + + + + ZENAP API-DOC. + + ZENAP API-DOC + + + + + index.html + index.xhtml + index.htm + index.jsp + + + + diff --git a/esr-mgr/src/main/resources/api-doc/css/reset.css b/esr-mgr/src/main/resources/api-doc/css/reset.css new file mode 100644 index 0000000..2e11612 --- /dev/null +++ b/esr-mgr/src/main/resources/api-doc/css/reset.css @@ -0,0 +1,140 @@ +/** + * Copyright 2016 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */ +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block; +} +body { + line-height: 1; +} +ol, +ul { + list-style: none; +} +blockquote, +q { + quotes: none; +} +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/esr-mgr/src/main/resources/api-doc/css/screen.css b/esr-mgr/src/main/resources/api-doc/css/screen.css new file mode 100644 index 0000000..2b982c2 --- /dev/null +++ b/esr-mgr/src/main/resources/api-doc/css/screen.css @@ -0,0 +1,1271 @@ +/** + * Copyright 2016 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* Original style from softwaremaniacs.org (c) Ivan Sagalaev */ +.swagger-section pre code { + display: block; + padding: 0.5em; + background: #F0F0F0; +} +.swagger-section pre code, +.swagger-section pre .subst, +.swagger-section pre .tag .title, +.swagger-section pre .lisp .title, +.swagger-section pre .clojure .built_in, +.swagger-section pre .nginx .title { + color: black; +} +.swagger-section pre .string, +.swagger-section pre .title, +.swagger-section pre .constant, +.swagger-section pre .parent, +.swagger-section pre .tag .value, +.swagger-section pre .rules .value, +.swagger-section pre .rules .value .number, +.swagger-section pre .preprocessor, +.swagger-section pre .ruby .symbol, +.swagger-section pre .ruby .symbol .string, +.swagger-section pre .aggregate, +.swagger-section pre .template_tag, +.swagger-section pre .django .variable, +.swagger-section pre .smalltalk .class, +.swagger-section pre .addition, +.swagger-section pre .flow, +.swagger-section pre .stream, +.swagger-section pre .bash .variable, +.swagger-section pre .apache .tag, +.swagger-section pre .apache .cbracket, +.swagger-section pre .tex .command, +.swagger-section pre .tex .special, +.swagger-section pre .erlang_repl .function_or_atom, +.swagger-section pre .markdown .header { + color: #800; +} +.swagger-section pre .comment, +.swagger-section pre .annotation, +.swagger-section pre .template_comment, +.swagger-section pre .diff .header, +.swagger-section pre .chunk, +.swagger-section pre .markdown .blockquote { + color: #888; +} +.swagger-section pre .number, +.swagger-section pre .date, +.swagger-section pre .regexp, +.swagger-section pre .literal, +.swagger-section pre .smalltalk .symbol, +.swagger-section pre .smalltalk .char, +.swagger-section pre .go .constant, +.swagger-section pre .change, +.swagger-section pre .markdown .bullet, +.swagger-section pre .markdown .link_url { + color: #080; +} +.swagger-section pre .label, +.swagger-section pre .javadoc, +.swagger-section pre .ruby .string, +.swagger-section pre .decorator, +.swagger-section pre .filter .argument, +.swagger-section pre .localvars, +.swagger-section pre .array, +.swagger-section pre .attr_selector, +.swagger-section pre .important, +.swagger-section pre .pseudo, +.swagger-section pre .pi, +.swagger-section pre .doctype, +.swagger-section pre .deletion, +.swagger-section pre .envvar, +.swagger-section pre .shebang, +.swagger-section pre .apache .sqbracket, +.swagger-section pre .nginx .built_in, +.swagger-section pre .tex .formula, +.swagger-section pre .erlang_repl .reserved, +.swagger-section pre .prompt, +.swagger-section pre .markdown .link_label, +.swagger-section pre .vhdl .attribute, +.swagger-section pre .clojure .attribute, +.swagger-section pre .coffeescript .property { + color: #8888ff; +} +.swagger-section pre .keyword, +.swagger-section pre .id, +.swagger-section pre .phpdoc, +.swagger-section pre .title, +.swagger-section pre .built_in, +.swagger-section pre .aggregate, +.swagger-section pre .css .tag, +.swagger-section pre .javadoctag, +.swagger-section pre .phpdoc, +.swagger-section pre .yardoctag, +.swagger-section pre .smalltalk .class, +.swagger-section pre .winutils, +.swagger-section pre .bash .variable, +.swagger-section pre .apache .tag, +.swagger-section pre .go .typename, +.swagger-section pre .tex .command, +.swagger-section pre .markdown .strong, +.swagger-section pre .request, +.swagger-section pre .status { + font-weight: bold; +} +.swagger-section pre .markdown .emphasis { + font-style: italic; +} +.swagger-section pre .nginx .built_in { + font-weight: normal; +} +.swagger-section pre .coffeescript .javascript, +.swagger-section pre .javascript .xml, +.swagger-section pre .tex .formula, +.swagger-section pre .xml .javascript, +.swagger-section pre .xml .vbscript, +.swagger-section pre .xml .css, +.swagger-section pre .xml .cdata { + opacity: 0.5; +} +.swagger-section .swagger-ui-wrap { + line-height: 1; + font-family: "Droid Sans", sans-serif; + max-width: 960px; + margin-left: auto; + margin-right: auto; +} +.swagger-section .swagger-ui-wrap b, +.swagger-section .swagger-ui-wrap strong { + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-section .swagger-ui-wrap q, +.swagger-section .swagger-ui-wrap blockquote { + quotes: none; +} +.swagger-section .swagger-ui-wrap p { + line-height: 1.4em; + padding: 0 0 10px; + color: #333333; +} +.swagger-section .swagger-ui-wrap q:before, +.swagger-section .swagger-ui-wrap q:after, +.swagger-section .swagger-ui-wrap blockquote:before, +.swagger-section .swagger-ui-wrap blockquote:after { + content: none; +} +.swagger-section .swagger-ui-wrap .heading_with_menu h1, +.swagger-section .swagger-ui-wrap .heading_with_menu h2, +.swagger-section .swagger-ui-wrap .heading_with_menu h3, +.swagger-section .swagger-ui-wrap .heading_with_menu h4, +.swagger-section .swagger-ui-wrap .heading_with_menu h5, +.swagger-section .swagger-ui-wrap .heading_with_menu h6 { + display: block; + clear: none; + float: left; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + width: 60%; +} +.swagger-section .swagger-ui-wrap table { + border-collapse: collapse; + border-spacing: 0; +} +.swagger-section .swagger-ui-wrap table thead tr th { + padding: 5px; + font-size: 0.9em; + color: #666666; + border-bottom: 1px solid #999999; +} +.swagger-section .swagger-ui-wrap table tbody tr:last-child td { + border-bottom: none; +} +.swagger-section .swagger-ui-wrap table tbody tr.offset { + background-color: #f0f0f0; +} +.swagger-section .swagger-ui-wrap table tbody tr td { + padding: 6px; + font-size: 0.9em; + border-bottom: 1px solid #cccccc; + vertical-align: top; + line-height: 1.3em; +} +.swagger-section .swagger-ui-wrap ol { + margin: 0px 0 10px; + padding: 0 0 0 18px; + list-style-type: decimal; +} +.swagger-section .swagger-ui-wrap ol li { + padding: 5px 0px; + font-size: 0.9em; + color: #333333; +} +.swagger-section .swagger-ui-wrap ol, +.swagger-section .swagger-ui-wrap ul { + list-style: none; +} +.swagger-section .swagger-ui-wrap h1 a, +.swagger-section .swagger-ui-wrap h2 a, +.swagger-section .swagger-ui-wrap h3 a, +.swagger-section .swagger-ui-wrap h4 a, +.swagger-section .swagger-ui-wrap h5 a, +.swagger-section .swagger-ui-wrap h6 a { + text-decoration: none; +} +.swagger-section .swagger-ui-wrap h1 a:hover, +.swagger-section .swagger-ui-wrap h2 a:hover, +.swagger-section .swagger-ui-wrap h3 a:hover, +.swagger-section .swagger-ui-wrap h4 a:hover, +.swagger-section .swagger-ui-wrap h5 a:hover, +.swagger-section .swagger-ui-wrap h6 a:hover { + text-decoration: underline; +} +.swagger-section .swagger-ui-wrap h1 span.divider, +.swagger-section .swagger-ui-wrap h2 span.divider, +.swagger-section .swagger-ui-wrap h3 span.divider, +.swagger-section .swagger-ui-wrap h4 span.divider, +.swagger-section .swagger-ui-wrap h5 span.divider, +.swagger-section .swagger-ui-wrap h6 span.divider { + color: #aaaaaa; +} +.swagger-section .swagger-ui-wrap a { + color: #547f00; +} +.swagger-section .swagger-ui-wrap a img { + border: none; +} +.swagger-section .swagger-ui-wrap article, +.swagger-section .swagger-ui-wrap aside, +.swagger-section .swagger-ui-wrap details, +.swagger-section .swagger-ui-wrap figcaption, +.swagger-section .swagger-ui-wrap figure, +.swagger-section .swagger-ui-wrap footer, +.swagger-section .swagger-ui-wrap header, +.swagger-section .swagger-ui-wrap hgroup, +.swagger-section .swagger-ui-wrap menu, +.swagger-section .swagger-ui-wrap nav, +.swagger-section .swagger-ui-wrap section, +.swagger-section .swagger-ui-wrap summary { + display: block; +} +.swagger-section .swagger-ui-wrap pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #fcf6db; + border: 1px solid #e5e0c6; + padding: 10px; +} +.swagger-section .swagger-ui-wrap pre code { + line-height: 1.6em; + background: none; +} +.swagger-section .swagger-ui-wrap .content > .content-type > div > label { + clear: both; + display: block; + color: #0F6AB4; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +.swagger-section .swagger-ui-wrap .content pre { + font-size: 12px; + margin-top: 5px; + padding: 5px; +} +.swagger-section .swagger-ui-wrap .icon-btn { + cursor: pointer; +} +.swagger-section .swagger-ui-wrap .info_title { + padding-bottom: 10px; + font-weight: bold; + font-size: 25px; +} +.swagger-section .swagger-ui-wrap p.big, +.swagger-section .swagger-ui-wrap div.big p { + font-size: 1em; + margin-bottom: 10px; +} +.swagger-section .swagger-ui-wrap form.fullwidth ol li.string input, +.swagger-section .swagger-ui-wrap form.fullwidth ol li.url input, +.swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea, +.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input { + width: 500px !important; +} +.swagger-section .swagger-ui-wrap .info_license { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .info_tos { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .message-fail { + color: #cc0000; +} +.swagger-section .swagger-ui-wrap .info_url { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .info_email { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .info_name { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .info_description { + padding-bottom: 10px; + font-size: 15px; +} +.swagger-section .swagger-ui-wrap .markdown ol li, +.swagger-section .swagger-ui-wrap .markdown ul li { + padding: 3px 0px; + line-height: 1.4em; + color: #333333; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input, +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input, +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input { + display: block; + padding: 4px; + width: auto; + clear: both; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title, +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title, +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title { + font-size: 1.3em; +} +.swagger-section .swagger-ui-wrap table.fullwidth { + width: 100%; +} +.swagger-section .swagger-ui-wrap .model-signature { + font-family: "Droid Sans", sans-serif; + font-size: 1em; + line-height: 1.5em; +} +.swagger-section .swagger-ui-wrap .model-signature .signature-nav a { + text-decoration: none; + color: #AAA; +} +.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover { + text-decoration: underline; + color: black; +} +.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected { + color: black; + text-decoration: none; +} +.swagger-section .swagger-ui-wrap .model-signature .propType { + color: #5555aa; +} +.swagger-section .swagger-ui-wrap .model-signature pre:hover { + background-color: #ffffdd; +} +.swagger-section .swagger-ui-wrap .model-signature pre { + font-size: .85em; + line-height: 1.2em; + overflow: auto; + max-height: 200px; + cursor: pointer; +} +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav { + display: block; + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child { + padding-right: 0; + border-right: none; +} +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li { + float: left; + margin: 0 5px 5px 0; + padding: 2px 5px 2px 0; + border-right: 1px solid #ddd; +} +.swagger-section .swagger-ui-wrap .model-signature .propOpt { + color: #555; +} +.swagger-section .swagger-ui-wrap .model-signature .snippet small { + font-size: 0.75em; +} +.swagger-section .swagger-ui-wrap .model-signature .propOptKey { + font-style: italic; +} +.swagger-section .swagger-ui-wrap .model-signature .description .strong { + font-weight: bold; + color: #000; + font-size: .9em; +} +.swagger-section .swagger-ui-wrap .model-signature .description div { + font-size: 0.9em; + line-height: 1.5em; + margin-left: 1em; +} +.swagger-section .swagger-ui-wrap .model-signature .description .stronger { + font-weight: bold; + color: #000; +} +.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper { + border-spacing: 0; + position: absolute; + background-color: #ffffff; + border: 1px solid #bbbbbb; + display: none; + font-size: 11px; + max-width: 400px; + line-height: 30px; + color: black; + padding: 5px; + margin-left: 10px; +} +.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th { + text-align: center; + background-color: #eeeeee; + border: 1px solid #bbbbbb; + font-size: 11px; + color: #666666; + font-weight: bold; + padding: 5px; + line-height: 15px; +} +.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName { + font-weight: bold; +} +.swagger-section .swagger-ui-wrap .model-signature .propName { + font-weight: bold; +} +.swagger-section .swagger-ui-wrap .model-signature .signature-container { + clear: both; +} +.swagger-section .swagger-ui-wrap .body-textarea { + width: 300px; + height: 100px; + border: 1px solid #aaa; +} +.swagger-section .swagger-ui-wrap .markdown p code, +.swagger-section .swagger-ui-wrap .markdown li code { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #f0f0f0; + color: black; + padding: 1px 3px; +} +.swagger-section .swagger-ui-wrap .required { + font-weight: bold; +} +.swagger-section .swagger-ui-wrap input.parameter { + width: 300px; + border: 1px solid #aaa; +} +.swagger-section .swagger-ui-wrap h1 { + color: black; + font-size: 1.5em; + line-height: 1.3em; + padding: 10px 0 10px 0; + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-section .swagger-ui-wrap .heading_with_menu { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-section .swagger-ui-wrap .heading_with_menu ul { + display: block; + clear: none; + float: right; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + margin-top: 10px; +} +.swagger-section .swagger-ui-wrap h2 { + color: black; + font-size: 1.3em; + padding: 10px 0 10px 0; +} +.swagger-section .swagger-ui-wrap h2 a { + color: black; +} +.swagger-section .swagger-ui-wrap h2 span.sub { + font-size: 0.7em; + color: #999999; + font-style: italic; +} +.swagger-section .swagger-ui-wrap h2 span.sub a { + color: #777777; +} +.swagger-section .swagger-ui-wrap span.weak { + color: #666666; +} +.swagger-section .swagger-ui-wrap .message-success { + color: #89BF04; +} +.swagger-section .swagger-ui-wrap caption, +.swagger-section .swagger-ui-wrap th, +.swagger-section .swagger-ui-wrap td { + text-align: left; + font-weight: normal; + vertical-align: middle; +} +.swagger-section .swagger-ui-wrap .code { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea { + font-family: "Droid Sans", sans-serif; + height: 250px; + padding: 4px; + display: block; + clear: both; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select { + display: block; + clear: both; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label { + display: block; + float: left; + clear: none; + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input { + display: block; + float: left; + clear: none; + margin: 0 5px 0 0; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label { + color: black; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label { + display: block; + clear: both; + width: auto; + padding: 0 0 3px; + color: #666666; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr { + padding-left: 3px; + color: #888888; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints { + margin-left: 0; + font-style: italic; + font-size: 0.9em; + margin: 0; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons { + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap span.blank, +.swagger-section .swagger-ui-wrap span.empty { + color: #888888; + font-style: italic; +} +.swagger-section .swagger-ui-wrap .markdown h3 { + color: #547f00; +} +.swagger-section .swagger-ui-wrap .markdown h4 { + color: #666666; +} +.swagger-section .swagger-ui-wrap .markdown pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #fcf6db; + border: 1px solid #e5e0c6; + padding: 10px; + margin: 0 0 10px 0; +} +.swagger-section .swagger-ui-wrap .markdown pre code { + line-height: 1.6em; +} +.swagger-section .swagger-ui-wrap div.gist { + margin: 20px 0 25px 0 !important; +} +.swagger-section .swagger-ui-wrap ul#resources { + font-family: "Droid Sans", sans-serif; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource { + border-bottom: 1px solid #dddddd; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a, +.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a { + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a, +.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a { + color: #555555; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child { + border-bottom: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading { + border: 1px solid transparent; + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 14px 10px 0 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + border-right: 1px solid #dddddd; + color: #666666; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a { + color: #aaaaaa; + text-decoration: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover { + text-decoration: underline; + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active { + text-decoration: underline; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first { + padding-left: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first { + padding-left: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 { + color: #999999; + padding-left: 0; + display: block; + clear: none; + float: left; + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a { + color: #999999; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover { + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0 0 10px; + padding: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 { + display: block; + clear: none; + float: left; + width: auto; + margin: 0; + padding: 0; + line-height: 1.1em; + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path { + padding-left: 10px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a { + color: black; + text-decoration: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover { + text-decoration: underline; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a { + text-transform: uppercase; + text-decoration: none; + color: white; + display: inline-block; + width: 50px; + font-size: 0.7em; + text-align: center; + padding: 7px 0 4px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + -khtml-border-radius: 2px; + border-radius: 2px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span { + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 6px 10px 0 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a { + text-decoration: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access { + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content { + border-top: none; + padding: 10px; + -moz-border-radius-bottomleft: 6px; + -webkit-border-bottom-left-radius: 6px; + -o-border-bottom-left-radius: 6px; + -ms-border-bottom-left-radius: 6px; + -khtml-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -moz-border-radius-bottomright: 6px; + -webkit-border-bottom-right-radius: 6px; + -o-border-bottom-right-radius: 6px; + -ms-border-bottom-right-radius: 6px; + -khtml-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + margin: 0 0 20px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 { + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a { + padding: 4px 0 0 10px; + display: inline-block; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit { + display: block; + clear: none; + float: left; + padding: 6px 8px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header span.response_throbber { + background-image: url('../images/throbber.gif'); + width: 128px; + height: 16px; + display: block; + clear: none; + float: right; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error { + outline: 2px solid black; + outline-color: #cc0000; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + padding: 10px; + font-size: 0.9em; + max-height: 400px; + overflow-y: auto; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading { + background-color: #f9f2e9; + border: 1px solid #f0e0ca; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a { + background-color: #c5862b; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #f0e0ca; + color: #c5862b; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a { + color: #c5862b; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content { + background-color: #faf5ee; + border: 1px solid #f0e0ca; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 { + color: #c5862b; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a { + color: #dcb67f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading { + background-color: #fcffcd; + border: 1px solid black; + border-color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #ffd20f; + color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a { + color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content { + background-color: #fcffcd; + border: 1px solid black; + border-color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 { + color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a { + color: #6fc992; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading { + background-color: #f5e8e8; + border: 1px solid #e8c6c7; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #a41e22; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #e8c6c7; + color: #a41e22; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a { + color: #a41e22; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { + background-color: #f7eded; + border: 1px solid #e8c6c7; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 { + color: #a41e22; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a { + color: #c8787a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading { + background-color: #e7f6ec; + border: 1px solid #c3e8d1; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a { + background-color: #10a54a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3e8d1; + color: #10a54a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a { + color: #10a54a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content { + background-color: #ebf7f0; + border: 1px solid #c3e8d1; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 { + color: #10a54a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a { + color: #6fc992; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading { + background-color: #FCE9E3; + border: 1px solid #F5D5C3; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a { + background-color: #D38042; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #f0cecb; + color: #D38042; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a { + color: #D38042; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content { + background-color: #faf0ef; + border: 1px solid #f0cecb; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 { + color: #D38042; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a { + color: #dcb67f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading { + background-color: #e7f0f7; + border: 1px solid #c3d9ec; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a { + background-color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3d9ec; + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a { + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 { + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a { + color: #6fa5d2; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading { + background-color: #e7f0f7; + border: 1px solid #c3d9ec; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a { + background-color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3d9ec; + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a { + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 { + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a { + color: #6fa5d2; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { + border-top: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active { + text-decoration: underline; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first { + padding-left: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first { + padding-left: 0; +} +.swagger-section .swagger-ui-wrap p#colophon { + margin: 0 15px 40px 15px; + padding: 10px 0; + font-size: 0.8em; + border-top: 1px solid #dddddd; + font-family: "Droid Sans", sans-serif; + color: #999999; + font-style: italic; +} +.swagger-section .swagger-ui-wrap p#colophon a { + text-decoration: none; + color: #547f00; +} +.swagger-section .swagger-ui-wrap h3 { + color: black; + font-size: 1.1em; + padding: 10px 0 10px 0; +} +.swagger-section .swagger-ui-wrap .markdown ol, +.swagger-section .swagger-ui-wrap .markdown ul { + font-family: "Droid Sans", sans-serif; + margin: 5px 0 10px; + padding: 0 0 0 18px; + list-style-type: disc; +} +.swagger-section .swagger-ui-wrap form.form_box { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; + padding: 10px; +} +.swagger-section .swagger-ui-wrap form.form_box label { + color: #0f6ab4 !important; +} +.swagger-section .swagger-ui-wrap form.form_box input[type=submit] { + display: block; + padding: 10px; +} +.swagger-section .swagger-ui-wrap form.form_box p.weak { + font-size: 0.8em; +} +.swagger-section .swagger-ui-wrap form.form_box p { + font-size: 0.9em; + padding: 0 0 15px; + color: #7e7b6d; +} +.swagger-section .swagger-ui-wrap form.form_box p a { + color: #646257; +} +.swagger-section .swagger-ui-wrap form.form_box p strong { + color: black; +} +.swagger-section .title { + font-style: bold; +} +.swagger-section .secondary_form { + display: none; +} +.swagger-section .main_image { + display: block; + margin-left: auto; + margin-right: auto; +} +.swagger-section .oauth_body { + margin-left: 100px; + margin-right: 100px; +} +.swagger-section .oauth_submit { + text-align: center; +} +.swagger-section .api-popup-dialog { + z-index: 10000; + position: absolute; + width: 500px; + background: #FFF; + padding: 20px; + border: 1px solid #ccc; + border-radius: 5px; + display: none; + font-size: 13px; + color: #777; +} +.swagger-section .api-popup-dialog .api-popup-title { + font-size: 24px; + padding: 10px 0; +} +.swagger-section .api-popup-dialog .api-popup-title { + font-size: 24px; + padding: 10px 0; +} +.swagger-section .api-popup-dialog p.error-msg { + padding-left: 5px; + padding-bottom: 5px; +} +.swagger-section .api-popup-dialog button.api-popup-authbtn { + height: 30px; +} +.swagger-section .api-popup-dialog button.api-popup-cancel { + height: 30px; +} +.swagger-section .api-popup-scopes { + padding: 10px 20px; +} +.swagger-section .api-popup-scopes li { + padding: 5px 0; + line-height: 20px; +} +.swagger-section .api-popup-scopes .api-scope-desc { + padding-left: 20px; + font-style: italic; +} +.swagger-section .api-popup-scopes li input { + position: relative; + top: 2px; +} +.swagger-section .api-popup-actions { + padding-top: 10px; +} +.swagger-section .access { + float: right; +} +.swagger-section .auth { + float: right; +} +.swagger-section #api_information_panel { + position: absolute; + background: #FFF; + border: 1px solid #ccc; + border-radius: 5px; + display: none; + font-size: 13px; + max-width: 300px; + line-height: 30px; + color: black; + padding: 5px; +} +.swagger-section #api_information_panel p .api-msg-enabled { + color: green; +} +.swagger-section #api_information_panel p .api-msg-disabled { + color: red; +} +.swagger-section .api-ic { + height: 18px; + vertical-align: middle; + display: inline-block; + background: url(../images/explorer_icons.png) no-repeat; +} +.swagger-section .ic-info { + background-position: 0 0; + width: 18px; + margin-top: -7px; + margin-left: 4px; +} +.swagger-section .ic-warning { + background-position: -60px 0; + width: 18px; + margin-top: -7px; + margin-left: 4px; +} +.swagger-section .ic-error { + background-position: -30px 0; + width: 18px; + margin-top: -7px; + margin-left: 4px; +} +.swagger-section .ic-off { + background-position: -90px 0; + width: 58px; + margin-top: -4px; + cursor: pointer; +} +.swagger-section .ic-on { + background-position: -160px 0; + width: 58px; + margin-top: -4px; + cursor: pointer; +} +.swagger-section #header { + background-color: #89bf04; + padding: 14px; +} +.swagger-section #header a#logo { + font-size: 1.5em; + font-weight: bold; + text-decoration: none; + background: transparent url(../images/logo_small.png) no-repeat left center; + padding: 20px 0 20px 40px; + color: white; +} +.swagger-section #header form#api_selector { + display: block; + clear: none; + float: right; +} +.swagger-section #header form#api_selector .input { + display: block; + clear: none; + float: left; + margin: 0 10px 0 0; +} +.swagger-section #header form#api_selector .input input#input_apiKey { + width: 200px; +} +.swagger-section #header form#api_selector .input input#input_baseUrl { + width: 400px; +} +.swagger-section #header form#api_selector .input a#explore { + display: block; + text-decoration: none; + font-weight: bold; + padding: 6px 8px; + font-size: 0.9em; + color: white; + background-color: #547f00; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + -ms-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; +} +.swagger-section #header form#api_selector .input a#explore:hover { + background-color: #547f00; +} +.swagger-section #header form#api_selector .input input { + font-size: 0.9em; + padding: 3px; + margin: 0; +} +.swagger-section #content_message { + margin: 10px 15px; + font-style: italic; + color: #999999; +} +.swagger-section #message-bar { + min-height: 30px; + text-align: center; + padding-top: 10px; +} diff --git a/esr-mgr/src/main/resources/api-doc/css/typography.css b/esr-mgr/src/main/resources/api-doc/css/typography.css new file mode 100644 index 0000000..991427a --- /dev/null +++ b/esr-mgr/src/main/resources/api-doc/css/typography.css @@ -0,0 +1,41 @@ +/** + * Copyright 2016 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* droid-sans-regular - latin */ +@font-face { + font-family: 'Droid Sans'; + font-style: normal; + font-weight: 400; + src: url('../fonts/droid-sans-v6-latin-regular.eot'); /* IE9 Compat Modes */ + src: local('Droid Sans'), local('DroidSans'), + url('../fonts/droid-sans-v6-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('../fonts/droid-sans-v6-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ + url('../fonts/droid-sans-v6-latin-regular.woff') format('woff'), /* Modern Browsers */ + url('../fonts/droid-sans-v6-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ + url('../fonts/droid-sans-v6-latin-regular.svg#DroidSans') format('svg'); /* Legacy iOS */ +} +/* droid-sans-700 - latin */ +@font-face { + font-family: 'Droid Sans'; + font-style: normal; + font-weight: 700; + src: url('../fonts/droid-sans-v6-latin-700.eot'); /* IE9 Compat Modes */ + src: local('Droid Sans Bold'), local('DroidSans-Bold'), + url('../fonts/droid-sans-v6-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('../fonts/droid-sans-v6-latin-700.woff2') format('woff2'), /* Super Modern Browsers */ + url('../fonts/droid-sans-v6-latin-700.woff') format('woff'), /* Modern Browsers */ + url('../fonts/droid-sans-v6-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */ + url('../fonts/droid-sans-v6-latin-700.svg#DroidSans') format('svg'); /* Legacy iOS */ +} diff --git a/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.eot b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.eot new file mode 100644 index 0000000..2250b71 Binary files /dev/null and b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.eot differ diff --git a/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.svg b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.svg new file mode 100644 index 0000000..a54bbbb --- /dev/null +++ b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.svg @@ -0,0 +1,411 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.ttf b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.ttf new file mode 100644 index 0000000..523cb92 Binary files /dev/null and b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.ttf differ diff --git a/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.woff b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.woff new file mode 100644 index 0000000..67e3e25 Binary files /dev/null and b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.woff differ diff --git a/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.woff2 b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.woff2 new file mode 100644 index 0000000..1e726a7 Binary files /dev/null and b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.woff2 differ diff --git a/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.eot b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.eot new file mode 100644 index 0000000..ac2698e Binary files /dev/null and b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.eot differ diff --git a/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.svg b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.svg new file mode 100644 index 0000000..d9f2a21 --- /dev/null +++ b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.svg @@ -0,0 +1,403 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.ttf b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.ttf new file mode 100644 index 0000000..76aede2 Binary files /dev/null and b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.ttf differ diff --git a/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.woff b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.woff new file mode 100644 index 0000000..abf1989 Binary files /dev/null and b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.woff differ diff --git a/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.woff2 b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.woff2 new file mode 100644 index 0000000..9f93f74 Binary files /dev/null and b/esr-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.woff2 differ diff --git a/esr-mgr/src/main/resources/api-doc/images/explorer_icons.png b/esr-mgr/src/main/resources/api-doc/images/explorer_icons.png new file mode 100644 index 0000000..ed9d2ff Binary files /dev/null and b/esr-mgr/src/main/resources/api-doc/images/explorer_icons.png differ diff --git a/esr-mgr/src/main/resources/api-doc/images/logo_small.png b/esr-mgr/src/main/resources/api-doc/images/logo_small.png new file mode 100644 index 0000000..5496a65 Binary files /dev/null and b/esr-mgr/src/main/resources/api-doc/images/logo_small.png differ diff --git a/esr-mgr/src/main/resources/api-doc/images/pet_store_api.png b/esr-mgr/src/main/resources/api-doc/images/pet_store_api.png new file mode 100644 index 0000000..f9f9cd4 Binary files /dev/null and b/esr-mgr/src/main/resources/api-doc/images/pet_store_api.png differ diff --git a/esr-mgr/src/main/resources/api-doc/images/throbber.gif b/esr-mgr/src/main/resources/api-doc/images/throbber.gif new file mode 100644 index 0000000..0639388 Binary files /dev/null and b/esr-mgr/src/main/resources/api-doc/images/throbber.gif differ diff --git a/esr-mgr/src/main/resources/api-doc/images/wordnik_api.png b/esr-mgr/src/main/resources/api-doc/images/wordnik_api.png new file mode 100644 index 0000000..dca4f14 Binary files /dev/null and b/esr-mgr/src/main/resources/api-doc/images/wordnik_api.png differ diff --git a/esr-mgr/src/main/resources/api-doc/index.html b/esr-mgr/src/main/resources/api-doc/index.html new file mode 100644 index 0000000..eb1968f --- /dev/null +++ b/esr-mgr/src/main/resources/api-doc/index.html @@ -0,0 +1,115 @@ + + + + + Swagger UI + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+
+ + diff --git a/esr-mgr/src/main/resources/api-doc/lib/backbone-min.js b/esr-mgr/src/main/resources/api-doc/lib/backbone-min.js new file mode 100644 index 0000000..c66d3a5 --- /dev/null +++ b/esr-mgr/src/main/resources/api-doc/lib/backbone-min.js @@ -0,0 +1,30 @@ +/* + * Copyright 2016 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Backbone.js 1.1.2 + +(function(t,e){if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,r,s){t.Backbone=e(t,s,i,r)})}else if(typeof exports!=="undefined"){var i=require("underscore");e(t,exports,i)}else{t.Backbone=e(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}})(this,function(t,e,i,r){var s=t.Backbone;var n=[];var a=n.push;var o=n.slice;var h=n.splice;e.VERSION="1.1.2";e.$=r;e.noConflict=function(){t.Backbone=s;return this};e.emulateHTTP=false;e.emulateJSON=false;var u=e.Events={on:function(t,e,i){if(!c(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);r.push({callback:e,context:i,ctx:i||this});return this},once:function(t,e,r){if(!c(this,"once",t,[e,r])||!e)return this;var s=this;var n=i.once(function(){s.off(t,n);e.apply(this,arguments)});n._callback=e;return this.on(t,n,r)},off:function(t,e,r){var s,n,a,o,h,u,l,f;if(!this._events||!c(this,"off",t,[e,r]))return this;if(!t&&!e&&!r){this._events=void 0;return this}o=t?[t]:i.keys(this._events);for(h=0,u=o.length;h").attr(t);this.setElement(r,false)}else{this.setElement(i.result(this,"el"),false)}}});e.sync=function(t,r,s){var n=T[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:n,dataType:"json"};if(!s.url){a.url=i.result(r,"url")||M()}if(s.data==null&&r&&(t==="create"||t==="update"||t==="patch")){a.contentType="application/json";a.data=JSON.stringify(s.attrs||r.toJSON(s))}if(s.emulateJSON){a.contentType="application/x-www-form-urlencoded";a.data=a.data?{model:a.data}:{}}if(s.emulateHTTP&&(n==="PUT"||n==="DELETE"||n==="PATCH")){a.type="POST";if(s.emulateJSON)a.data._method=n;var o=s.beforeSend;s.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",n);if(o)return o.apply(this,arguments)}}if(a.type!=="GET"&&!s.emulateJSON){a.processData=false}if(a.type==="PATCH"&&k){a.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var h=s.xhr=e.ajax(i.extend(a,s));r.trigger("request",r,h,s);return h};var k=typeof window!=="undefined"&&!!window.ActiveXObject&&!(window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent);var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var S=/\((.*?)\)/g;var H=/(\(\?)?:\w+/g;var A=/\*\w+/g;var I=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,u,{initialize:function(){},route:function(t,r,s){if(!i.isRegExp(t))t=this._routeToRegExp(t);if(i.isFunction(r)){s=r;r=""}if(!s)s=this[r];var n=this;e.history.route(t,function(i){var a=n._extractParameters(t,i);n.execute(s,a);n.trigger.apply(n,["route:"+r].concat(a));n.trigger("route",r,a);e.history.trigger("route",n,r,a)});return this},execute:function(t,e){if(t)t.apply(this,e)},navigate:function(t,i){e.history.navigate(t,i);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=i.result(this,"routes");var t,e=i.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(I,"\\$&").replace(S,"(?:$1)?").replace(H,function(t,e){return e?t:"([^/?]+)"}).replace(A,"([^?]*?)");return new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return i.map(r,function(t,e){if(e===r.length-1)return t||null;return t?decodeURIComponent(t):null})}});var N=e.History=function(){this.handlers=[];i.bindAll(this,"checkUrl");if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var R=/^[#\/]|\s+$/g;var O=/^\/+|\/+$/g;var P=/msie [\w.]+/;var C=/\/$/;var j=/#.*$/;N.started=false;i.extend(N.prototype,u,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(t==null){if(this._hasPushState||!this._wantsHashChange||e){t=decodeURI(this.location.pathname+this.location.search);var i=this.root.replace(C,"");if(!t.indexOf(i))t=t.slice(i.length)}else{t=this.getHash()}}return t.replace(R,"")},start:function(t){if(N.started)throw new Error("Backbone.history has already been started");N.started=true;this.options=i.extend({root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment();var s=document.documentMode;var n=P.exec(navigator.userAgent.toLowerCase())&&(!s||s<=7);this.root=("/"+this.root+"/").replace(O,"/");if(n&&this._wantsHashChange){var a=e.$('