From a84b847a3409df445482674feffa2872a8cbae83 Mon Sep 17 00:00:00 2001 From: lj1412 Date: Tue, 14 Feb 2017 15:12:08 +0000 Subject: Init dcae.controller Change-Id: I460f09494faa84b55d9c5d54112e098b0e74d007 Signed-off-by: lj1412 --- .gitignore | 1 + .gitreview | 4 + LICENSE.txt | 22 + README.md | 132 + dcae-controller-core/.gitignore | 1 + dcae-controller-core/LICENSE.txt | 22 + .../dcae-controller-core-model/.classpath | 13 + .../dcae-controller-core-model/.gitignore | 2 + .../dcae-controller-core-model/.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 8 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../dcae-controller-core-model/LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 36 + .../dcae-controller-core-model/build.properties | 11 + .../dcae-controller-core-model/plugin.properties | 4 + .../dcae-controller-core-model/plugin.xml | 49 + .../dcae-controller-core-model/pom.xml | 28 + .../controller/core/hypervisor/Hypervisor.java | 39 + .../core/hypervisor/HypervisorFactory.java | 63 + .../core/hypervisor/HypervisorPackage.java | 191 + .../hypervisor/impl/HypervisorFactoryImpl.java | 116 + .../core/hypervisor/impl/HypervisorImpl.java | 62 + .../hypervisor/impl/HypervisorPackageImpl.java | 195 + .../hypervisor/util/HypervisorAdapterFactory.java | 161 + .../core/hypervisor/util/HypervisorSwitch.java | 149 + .../dcae/controller/core/manager/DcaeManager.java | 131 + .../controller/core/manager/ManagerFactory.java | 54 + .../controller/core/manager/ManagerPackage.java | 374 ++ .../core/manager/impl/DcaeManagerImpl.java | 308 ++ .../core/manager/impl/ManagerFactoryImpl.java | 105 + .../core/manager/impl/ManagerPackageImpl.java | 316 ++ .../core/manager/util/ManagerAdapterFactory.java | 141 + .../core/manager/util/ManagerSwitch.java | 131 + .../core/server/ControllerCoreServer.java | 40 + .../controller/core/server/DcaeBasicServer.java | 331 ++ .../core/server/DcaeBasicServerNetwork.java | 98 + .../dcae/controller/core/server/ServerFactory.java | 72 + .../dcae/controller/core/server/ServerPackage.java | 663 ++++ .../core/server/impl/DcaeBasicServerImpl.java | 989 +++++ .../server/impl/DcaeBasicServerNetworkImpl.java | 239 ++ .../core/server/impl/ServerFactoryImpl.java | 127 + .../core/server/impl/ServerPackageImpl.java | 374 ++ .../core/server/util/ServerAdapterFactory.java | 213 + .../controller/core/server/util/ServerSwitch.java | 202 + .../dcae/controller/core/service/DcaeLocation.java | 99 + .../controller/core/service/DcaePolicyEntity.java | 240 ++ .../dcae/controller/core/service/DcaeService.java | 129 + .../core/service/DcaeServiceContainer.java | 65 + .../core/service/DcaeServiceDescriptor.java | 125 + .../core/service/DcaeServiceInstance.java | 229 ++ .../core/service/HealthTestResponse.java | 101 + .../controller/core/service/HealthTestStatus.java | 254 ++ .../controller/core/service/ServiceFactory.java | 81 + .../controller/core/service/ServicePackage.java | 1579 ++++++++ .../dcae/controller/core/service/User.java | 39 + .../core/service/impl/DcaeLocationImpl.java | 242 ++ .../core/service/impl/DcaePolicyEntityImpl.java | 508 +++ .../service/impl/DcaeServiceContainerImpl.java | 181 + .../service/impl/DcaeServiceDescriptorImpl.java | 293 ++ .../core/service/impl/DcaeServiceImpl.java | 228 ++ .../core/service/impl/DcaeServiceInstanceImpl.java | 539 +++ .../core/service/impl/HealthTestResponseImpl.java | 239 ++ .../core/service/impl/ServiceFactoryImpl.java | 189 + .../core/service/impl/ServicePackageImpl.java | 857 ++++ .../core/service/util/ServiceAdapterFactory.java | 269 ++ .../core/service/util/ServiceSwitch.java | 280 ++ .../core/stream/DatabusDataRouterNode.java | 124 + .../dcae/controller/core/stream/DatabusEntity.java | 126 + .../controller/core/stream/DatabusLocation.java | 70 + .../core/stream/DatabusMessageRouterCluster.java | 169 + .../dcae/controller/core/stream/DatabusStream.java | 39 + .../controller/core/stream/DatabusStreamFeed.java | 376 ++ .../core/stream/DatabusStreamFeedPublisher.java | 233 ++ .../core/stream/DatabusStreamFeedSubscriber.java | 368 ++ .../controller/core/stream/DatabusStreamTopic.java | 363 ++ .../core/stream/DatabusStreamTopicAction.java | 254 ++ .../core/stream/DatabusStreamTopicClient.java | 279 ++ .../dcae/controller/core/stream/DcaeStream.java | 39 + .../core/stream/DcaeStreamDefinition.java | 133 + .../core/stream/DcaeStreamExternalEndPoint.java | 125 + .../core/stream/DcaeStreamInternalEndPoint.java | 98 + .../core/stream/DcaeStreamPublisher.java | 39 + .../core/stream/DcaeStreamPublisherExternal.java | 38 + .../core/stream/DcaeStreamPublisherInternal.java | 38 + .../core/stream/DcaeStreamSubscriber.java | 40 + .../core/stream/DcaeStreamSubscriberExternal.java | 38 + .../core/stream/DcaeStreamSubscriberInternal.java | 38 + .../dcae/controller/core/stream/DmaapStream.java | 205 + .../core/stream/StreamAuthentication.java | 250 ++ .../dcae/controller/core/stream/StreamFactory.java | 216 + .../dcae/controller/core/stream/StreamPackage.java | 4179 ++++++++++++++++++++ .../stream/impl/DatabusDataRouterNodeImpl.java | 283 ++ .../core/stream/impl/DatabusEntityImpl.java | 294 ++ .../core/stream/impl/DatabusLocationImpl.java | 179 + .../impl/DatabusMessageRouterClusterImpl.java | 375 ++ .../core/stream/impl/DatabusStreamFeedImpl.java | 791 ++++ .../impl/DatabusStreamFeedPublisherImpl.java | 505 +++ .../impl/DatabusStreamFeedSubscriberImpl.java | 775 ++++ .../core/stream/impl/DatabusStreamImpl.java | 62 + .../stream/impl/DatabusStreamTopicClientImpl.java | 605 +++ .../core/stream/impl/DatabusStreamTopicImpl.java | 760 ++++ .../core/stream/impl/DcaeStreamDefinitionImpl.java | 334 ++ .../impl/DcaeStreamExternalEndPointImpl.java | 292 ++ .../core/stream/impl/DcaeStreamImpl.java | 62 + .../impl/DcaeStreamInternalEndPointImpl.java | 238 ++ .../impl/DcaeStreamPublisherExternalImpl.java | 328 ++ .../core/stream/impl/DcaeStreamPublisherImpl.java | 62 + .../impl/DcaeStreamPublisherInternalImpl.java | 272 ++ .../impl/DcaeStreamSubscriberExternalImpl.java | 321 ++ .../core/stream/impl/DcaeStreamSubscriberImpl.java | 60 + .../impl/DcaeStreamSubscriberInternalImpl.java | 267 ++ .../core/stream/impl/DmaapStreamImpl.java | 453 +++ .../core/stream/impl/StreamFactoryImpl.java | 378 ++ .../core/stream/impl/StreamPackageImpl.java | 1571 ++++++++ .../core/stream/util/StreamAdapterFactory.java | 521 +++ .../controller/core/stream/util/StreamSwitch.java | 602 +++ .../src/main/xcore/hypervisor.xcore | 30 + .../src/main/xcore/manager.xcore | 45 + .../src/main/xcore/server.xcore | 54 + .../src/main/xcore/service.xcore | 108 + .../src/main/xcore/stream.xcore | 177 + .../dcae-controller-core-utils/.classpath | 31 + .../dcae-controller-core-utils/.gitignore | 1 + .../dcae-controller-core-utils/.project | 35 + .../.settings/org.eclipse.jdt.core.prefs | 5 + .../.settings/org.eclipse.jdt.groovy.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../dcae-controller-core-utils/LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 7 + .../dcae-controller-core-utils/build.properties | 3 + .../dcae-controller-core-utils/pom.xml | 126 + .../src/assembly/assemble_zip.xml | 61 + .../controller/core/utils/DcaeServiceProvider.java | 27 + .../src/main/server/bin/.gitignore | 1 + .../src/main/server/bin/certificate.sh | 69 + .../src/main/server/bin/common.funcs | 35 + .../main/server/bin/convert-to-open-ecomp-all.sh | 51 + .../src/main/server/bin/dmaap_mr_prep.sh | 11 + .../src/main/server/bin/docker_ca_cert.pem | 20 + .../src/main/server/bin/docker_ca_key.pem | 27 + .../src/main/server/bin/fs-init.py | 300 ++ .../src/main/server/bin/generate-certs.sh | 95 + .../src/main/server/bin/install-docker.sh | 93 + .../src/main/server/bin/process-yaml.sh | 12 + .../src/main/server/bin/setup-logrotation.sh | 28 + .../src/main/server/bin/setup_https.sh | 17 + .../src/main/server/bin/update-docker-opts.sh | 28 + .../src/main/server/scripts/process-yaml.groovy | 75 + .../dcae-controller-operation-utils/.classpath | 30 + .../dcae-controller-operation-utils/.gitignore | 2 + .../dcae-controller-operation-utils/.project | 35 + .../.settings/org.eclipse.jdt.core.prefs | 5 + .../.settings/org.eclipse.jdt.groovy.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../dcae-controller-operation-utils/LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 12 + .../build.properties | 6 + .../dcae-controller-operation-utils/pom.xml | 156 + .../utils/DcaePlatformConfiguration.groovy | 1115 ++++++ .../dcae/controller/operation/utils/DocUtils.java | 309 ++ .../utils/GenControllerConfiguration.groovy | 756 ++++ .../dcae-controller-platform-model/.classpath | 17 + .../dcae-controller-platform-model/.gitignore | 2 + .../dcae-controller-platform-model/.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../dcae-controller-platform-model/LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 25 + .../build.properties | 11 + .../plugin.properties | 4 + .../dcae-controller-platform-model/plugin.xml | 17 + .../dcae-controller-platform-model/pom.xml | 42 + .../platform/controller/ControllerCluster.java | 181 + .../controller/ControllerClusterServer.java | 120 + .../controller/ControllerClusterServerData.java | 237 ++ .../platform/controller/ControllerFactory.java | 108 + .../platform/controller/ControllerPackage.java | 1641 ++++++++ .../ControllerVirtualMachineService.java | 39 + .../platform/controller/DcaeDataBus.java | 117 + .../controller/DcaePlatformController.java | 233 ++ .../controller/platform/controller/ServerRole.java | 278 ++ .../controller/impl/ControllerClusterImpl.java | 428 ++ .../impl/ControllerClusterServerDataImpl.java | 512 +++ .../impl/ControllerClusterServerImpl.java | 297 ++ .../controller/impl/ControllerFactoryImpl.java | 222 ++ .../controller/impl/ControllerPackageImpl.java | 700 ++++ .../impl/ControllerVirtualMachineServiceImpl.java | 62 + .../platform/controller/impl/DcaeDataBusImpl.java | 276 ++ .../impl/DcaePlatformControllerImpl.java | 835 ++++ .../controller/util/ControllerAdapterFactory.java | 346 ++ .../platform/controller/util/ControllerSwitch.java | 341 ++ .../src/main/xcore/controller.xcore | 95 + .../dcae-controller-platform-server/.classpath | 29 + .../dcae-controller-platform-server/.gitignore | 3 + .../dcae-controller-platform-server/.project | 35 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.jdt.groovy.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../dcae-controller-platform-server/LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 21 + .../build.properties | 6 + .../dcae-controller-platform-server/pom.xml | 179 + .../src/assembly/assemble_zip.xml | 62 + .../platform/server/tools/Generator.java | 79 + .../controller/DcaeControllerClusterProvider.java | 242 ++ ...caeControllerVirtualMachineServiceProvider.java | 89 + .../DcaeDcaePlatformControllerProvider.java | 1158 ++++++ .../controller/gui/DcaeGuiClientApiProvider.java | 83 + .../src/main/resources/DcaeController.yaml | 45 + .../bin/controller-platform-server-controller | 138 + .../src/main/server/bin/dcae-controller.sh | 130 + .../src/main/server/config/console.properties | 3 + .../src/main/server/config/controller.properties | 8 + .../src/main/server/config/gui.properties | 0 .../src/main/server/config/log4j.properties | 91 + .../src/main/server/config/makefile | 9 + .../src/main/server/config/pw.sh.sh | 15 + .../main/server/scripts/add-dcae-location.groovy | 50 + .../server/scripts/add-openstack-location.groovy | 46 + .../server/scripts/add-openstack-project.groovy | 48 + .../server/scripts/add-service-instance.groovy | 91 + .../src/main/server/scripts/add-service.groovy | 71 + .../scripts/configure-service-instance.groovy | 50 + .../src/main/server/scripts/console.groovy | 27 + .../src/main/server/scripts/create-keypair.groovy | 51 + .../src/main/server/scripts/create-object.groovy | 57 + .../src/main/server/scripts/databus-refresh.groovy | 47 + .../src/main/server/scripts/decrypt-value.groovy | 38 + .../src/main/server/scripts/delete-object.groovy | 45 + .../main/server/scripts/deploy-descriptor.groovy | 82 + .../deploy-manual-vm-service-instance.groovy | 58 + .../server/scripts/deploy-service-instance.groovy | 51 + .../scripts/deploy-undeployed-descriptors.groovy | 59 + .../src/main/server/scripts/deploy-user.groovy | 50 + .../src/main/server/scripts/deploy-vmType.groovy | 47 + .../src/main/server/scripts/encrypt-file.groovy | 64 + .../main/server/scripts/encrypt-password.groovy | 43 + .../get-service-instance-configuration.groovy | 46 + ...t-service-instance-manager-configuration.groovy | 48 + .../src/main/server/scripts/init-controller.groovy | 32 + .../src/main/server/scripts/list-object.groovy | 48 + .../scripts/operation-service-instance.groovy | 66 + .../main/server/scripts/operation-service.groovy | 53 + .../server/scripts/rackspace-substitute.groovy | 60 + .../src/main/server/scripts/report.groovy | 64 + .../scripts/setup-openstack-bash-shell.groovy | 74 + .../sync-configuration-from-directory.groovy | 83 + .../main/server/scripts/sync-configuration.groovy | 59 + .../scripts/sync-services-from-directory.groovy | 90 + .../main/server/scripts/tosca-add-blueprint.groovy | 69 + .../scripts/undeploy-service-instance-chef.groovy | 68 + .../scripts/undeploy-service-instance.groovy | 46 + .../src/main/server/scripts/undeploy-user.groovy | 50 + .../src/main/server/scripts/undeploy-vmType.groovy | 47 + ...nfiguration-from-policy-service-instance.groovy | 50 + .../src/main/server/scripts/update-object.groovy | 67 + .../src/main/server/scripts/wait-for.groovy | 101 + .../src/main/sirius-gen/ControllerCluster.yaml | 25 + .../ControllerVirtualMachineService.yaml | 135 + .../main/sirius-gen/DcaePlatformController.yaml | 135 + .../src/main/sirius-gen/GuiClientApi.yaml | 69 + .../servers/controller/DcaeControllerCluster.java | 145 + .../controller/DcaeControllerClusterClient.java | 107 + .../controller/DcaeControllerClusterConsole.java | 79 + .../DcaeControllerClusterProviderTemplate.java | 77 + .../servers/controller/DcaeControllerFactory.java | 66 + .../DcaeControllerVirtualMachineService.java | 415 ++ .../DcaeControllerVirtualMachineServiceClient.java | 277 ++ ...DcaeControllerVirtualMachineServiceConsole.java | 189 + ...ollerVirtualMachineServiceProviderTemplate.java | 137 + .../controller/DcaeDcaePlatformController.java | 448 +++ .../DcaeDcaePlatformControllerClient.java | 276 ++ .../DcaeDcaePlatformControllerConsole.java | 197 + ...DcaeDcaePlatformControllerProviderTemplate.java | 96 + .../DcaeDcaePlatformControllerServer.java | 129 + .../servers/controller/gui/DcaeGuiClientApi.java | 278 ++ .../controller/gui/DcaeGuiClientApiClient.java | 175 + .../controller/gui/DcaeGuiClientApiConsole.java | 123 + .../gui/DcaeGuiClientApiProviderTemplate.java | 78 + .../servers/controller/gui/DcaeModelFactory.java | 54 + .../controller/gui/logging/GuiClientApi.properties | 78 + .../gui/logging/GuiClientApiMessageEnum.java | 47 + .../gui/logging/GuiClientApiOperationEnum.java | 41 + .../logging/ControllerCluster.properties | 30 + .../logging/ControllerClusterMessageEnum.java | 39 + .../logging/ControllerClusterOperationEnum.java | 33 + .../ControllerVirtualMachineService.properties | 150 + ...ControllerVirtualMachineServiceMessageEnum.java | 59 + ...ntrollerVirtualMachineServiceOperationEnum.java | 53 + .../controller/logging/DcaeController.properties | 24 + .../logging/DcaeControllerMessageEnum.java | 38 + .../logging/DcaeControllerOperationEnum.java | 33 + .../logging/DcaePlatformController.properties | 150 + .../logging/DcaePlatformControllerMessageEnum.java | 59 + .../DcaePlatformControllerOperationEnum.java | 53 + .../src/test/groovy/policy.groovy | 21 + dcae-controller-core/pom.xml | 83 + dcae-controller-service-cdap/.gitignore | 1 + dcae-controller-service-cdap/LICENSE.txt | 22 + .../.classpath | 27 + .../.gitignore | 1 + .../dcae-controller-service-cdap-adaptor/.project | 35 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.jdt.groovy.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 18 + .../build.properties | 3 + .../config/.gitignore | 1 + .../dcae-controller-service-cdap-adaptor/pom.xml | 200 + .../src/assembly/assemble_zip.xml | 61 + .../service/cdap/adaptor/tools/Generator.java | 107 + .../servers/cdap/DcaeCdapServiceProvider.java | 593 +++ .../servers/cdap/gui/DcaeGuiClientApiProvider.java | 78 + .../cdapmanager/DcaeCdapManagerProvider.java | 99 + .../cdapmanager/gui/DcaeGuiClientApiProvider.java | 78 + .../bin/controller-service-Cdap-manager-controller | 138 + .../bin/controller-service-cdap-adaptor-controller | 138 + .../src/main/server/config/adaptor.properties | 7 + .../src/main/server/config/console.properties | 3 + .../src/main/server/config/gui.properties | 0 .../src/main/server/config/log4j.properties | 24 + .../src/main/server/config/makefile | 9 + .../src/main/server/config/pw.sh.sh | 15 + .../src/main/server/scripts/console.groovy | 27 + .../src/main/sirius-gen/CdapManager.yaml | 69 + .../src/main/sirius-gen/CdapService.yaml | 135 + .../src/main/sirius-gen/GuiClientApi.yaml | 69 + .../service/servers/cdap/DcaeCdapFactory.java | 54 + .../service/servers/cdap/DcaeCdapService.java | 408 ++ .../servers/cdap/DcaeCdapServiceClient.java | 276 ++ .../servers/cdap/DcaeCdapServiceConsole.java | 189 + .../cdap/DcaeCdapServiceProviderTemplate.java | 137 + .../servers/cdap/DcaeCdapServiceServer.java | 98 + .../servers/cdap/logging/CdapService.properties | 150 + .../cdap/logging/CdapServiceMessageEnum.java | 59 + .../cdap/logging/CdapServiceOperationEnum.java | 53 + .../servers/cdapmanager/DcaeCdapManager.java | 241 ++ .../servers/cdapmanager/DcaeCdapManagerClient.java | 174 + .../cdapmanager/DcaeCdapManagerConsole.java | 127 + .../DcaeCdapManagerProviderTemplate.java | 99 + .../servers/cdapmanager/DcaeCdapManagerServer.java | 115 + .../cdapmanager/DcaeCdapmanagerFactory.java | 54 + .../servers/cdapmanager/gui/DcaeGuiClientApi.java | 271 ++ .../cdapmanager/gui/DcaeGuiClientApiClient.java | 175 + .../cdapmanager/gui/DcaeGuiClientApiConsole.java | 123 + .../gui/DcaeGuiClientApiProviderTemplate.java | 78 + .../servers/cdapmanager/gui/DcaeModelFactory.java | 54 + .../gui/logging/GuiClientApi.properties | 78 + .../gui/logging/GuiClientApiMessageEnum.java | 47 + .../gui/logging/GuiClientApiOperationEnum.java | 41 + .../cdapmanager/logging/CdapManager.properties | 78 + .../logging/CdapManagerMessageEnum.java | 47 + .../logging/CdapManagerOperationEnum.java | 41 + .../.gitignore | 1 + .../LICENSE.txt | 22 + .../.classpath | 27 + .../.gitignore | 2 + .../.project | 35 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.jdt.groovy.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 17 + .../build.properties | 3 + .../config/cdap.properties | 9 + .../config/manager.properties | 8 + .../pom.xml | 198 + .../src/assembly/assemble_zip.xml | 61 + .../cdap/cluster/manager/tools/Generator.java | 99 + .../cdap/cluster/manager/tools/TestManager.java | 65 + .../cluster/manager/tools/TestRemoteManager.java | 54 + .../manager/tools/TestServiceToManager.java | 46 + .../manager/DcaeCdapClusterManagerProvider.java | 219 + .../manager/gui/DcaeGuiClientApiProvider.java | 78 + .../service/DcaeCdapClusterServiceProvider.java | 105 + ...troller-service-cdap-cluster-manager-controller | 138 + .../src/main/server/bin/cdap-cli.sh | 8 + .../src/main/server/bin/manager.sh | 60 + .../src/main/server/config/console.properties | 3 + .../src/main/server/config/gui.properties | 0 .../src/main/server/config/log4j.properties | 24 + .../src/main/server/config/makefile | 9 + .../src/main/server/config/manager.properties | 7 + .../src/main/server/config/pw.sh.sh | 15 + .../src/main/server/scripts/console.groovy | 27 + .../src/main/server/scripts/test.groovy | 65 + .../src/main/sirius-gen/CdapClusterManager.yaml | 597 +++ .../src/main/sirius-gen/CdapClusterService.yaml | 135 + .../src/main/sirius-gen/GuiClientApi.yaml | 69 + .../servers/manager/DcaeCdapClusterManager.java | 1444 +++++++ .../manager/DcaeCdapClusterManagerClient.java | 990 +++++ .../manager/DcaeCdapClusterManagerConsole.java | 655 +++ .../DcaeCdapClusterManagerProviderTemplate.java | 300 ++ .../manager/DcaeCdapClusterManagerServer.java | 115 + .../servers/manager/DcaeManagerFactory.java | 54 + .../servers/manager/gui/DcaeGuiClientApi.java | 256 ++ .../manager/gui/DcaeGuiClientApiClient.java | 175 + .../manager/gui/DcaeGuiClientApiConsole.java | 123 + .../gui/DcaeGuiClientApiProviderTemplate.java | 78 + .../servers/manager/gui/DcaeModelFactory.java | 54 + .../manager/gui/logging/GuiClientApi.properties | 78 + .../gui/logging/GuiClientApiMessageEnum.java | 47 + .../gui/logging/GuiClientApiOperationEnum.java | 41 + .../manager/logging/CdapClusterManager.properties | 654 +++ .../logging/CdapClusterManagerMessageEnum.java | 143 + .../logging/CdapClusterManagerOperationEnum.java | 137 + .../servers/service/DcaeCdapClusterService.java | 381 ++ .../service/DcaeCdapClusterServiceClient.java | 276 ++ .../service/DcaeCdapClusterServiceConsole.java | 189 + .../DcaeCdapClusterServiceProviderTemplate.java | 65 + .../service/DcaeCdapClusterServiceServer.java | 98 + .../servers/service/DcaeServiceFactory.java | 54 + .../service/logging/CdapClusterService.properties | 150 + .../logging/CdapClusterServiceMessageEnum.java | 59 + .../logging/CdapClusterServiceOperationEnum.java | 53 + .../.classpath | 17 + .../.gitignore | 2 + .../.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 30 + .../build.properties | 11 + .../plugin.properties | 4 + .../plugin.xml | 25 + .../pom.xml | 29 + .../cdap/cluster/manager/CdapClusterManager.java | 41 + .../cdap/cluster/manager/ManagerFactory.java | 63 + .../cdap/cluster/manager/ManagerPackage.java | 685 ++++ .../manager/impl/CdapClusterManagerImpl.java | 806 ++++ .../cluster/manager/impl/ManagerFactoryImpl.java | 116 + .../cluster/manager/impl/ManagerPackageImpl.java | 199 + .../manager/util/ManagerAdapterFactory.java | 277 ++ .../cdap/cluster/manager/util/ManagerSwitch.java | 253 ++ .../cluster/service/CdapClusterConfiguration.java | 74 + .../cdap/cluster/service/CdapClusterService.java | 39 + .../service/CdapClusterServiceInstance.java | 39 + .../cdap/cluster/service/ServiceFactory.java | 81 + .../cdap/cluster/service/ServicePackage.java | 740 ++++ .../service/impl/CdapClusterConfigurationImpl.java | 198 + .../service/impl/CdapClusterServiceImpl.java | 62 + .../impl/CdapClusterServiceInstanceImpl.java | 232 ++ .../cluster/service/impl/ServiceFactoryImpl.java | 138 + .../cluster/service/impl/ServicePackageImpl.java | 289 ++ .../service/util/ServiceAdapterFactory.java | 294 ++ .../cdap/cluster/service/util/ServiceSwitch.java | 280 ++ .../src/main/xcore/manager.xcore | 33 + .../src/main/xcore/service.xcore | 46 + .../dcae-controller-service-cdap-cluster/pom.xml | 82 + .../dcae-controller-service-cdap-model/.classpath | 17 + .../dcae-controller-service-cdap-model/.gitignore | 2 + .../dcae-controller-service-cdap-model/.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../dcae-controller-service-cdap-model/LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 30 + .../build.properties | 11 + .../plugin.properties | 4 + .../dcae-controller-service-cdap-model/plugin.xml | 25 + .../dcae-controller-service-cdap-model/pom.xml | 35 + .../controller/service/cdap/CdapApplication.java | 152 + .../dcae/controller/service/cdap/CdapArtifact.java | 98 + .../controller/service/cdap/CdapArtifacts.java | 98 + .../dcae/controller/service/cdap/CdapFactory.java | 117 + .../cdap/CdapInternalApplicationConfiguration.java | 151 + .../dcae/controller/service/cdap/CdapPackage.java | 1702 ++++++++ .../dcae/controller/service/cdap/CdapService.java | 72 + .../service/cdap/CdapServiceDescriptor.java | 152 + .../service/cdap/CdapServiceInstance.java | 398 ++ .../cdap/CdapServiceInstanceConfiguration.java | 39 + .../service/cdap/ControllerServiceCdapAdaptor.java | 39 + .../service/cdap/impl/CdapApplicationImpl.java | 338 ++ .../service/cdap/impl/CdapArtifactImpl.java | 239 ++ .../service/cdap/impl/CdapFactoryImpl.java | 182 + .../CdapInternalApplicationConfigurationImpl.java | 355 ++ .../service/cdap/impl/CdapPackageImpl.java | 759 ++++ .../cdap/impl/CdapServiceDescriptorImpl.java | 347 ++ .../service/cdap/impl/CdapServiceImpl.java | 209 + .../impl/CdapServiceInstanceConfigurationImpl.java | 62 + .../service/cdap/impl/CdapServiceInstanceImpl.java | 939 +++++ .../service/cdap/util/CdapAdapterFactory.java | 325 ++ .../controller/service/cdap/util/CdapSwitch.java | 329 ++ .../service/cdapmanager/CdapManager.java | 73 + .../service/cdapmanager/CdapmanagerFactory.java | 63 + .../service/cdapmanager/CdapmanagerPackage.java | 256 ++ .../service/cdapmanager/DockerManager.java | 73 + .../service/cdapmanager/impl/CdapManagerImpl.java | 199 + .../cdapmanager/impl/CdapmanagerFactoryImpl.java | 116 + .../cdapmanager/impl/CdapmanagerPackageImpl.java | 206 + .../util/CdapmanagerAdapterFactory.java | 161 + .../cdapmanager/util/CdapmanagerSwitch.java | 149 + .../src/main/xcore/manager.xcore | 34 + .../src/main/xcore/service.xcore | 101 + dcae-controller-service-cdap/pom.xml | 85 + dcae-controller-service-docker/.gitignore | 1 + dcae-controller-service-docker/LICENSE.txt | 22 + .../.gitignore | 1 + .../LICENSE.txt | 22 + .../.classpath | 27 + .../.gitignore | 3 + .../.project | 35 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.jdt.groovy.core.prefs | 2 + .../org.eclipse.ltk.core.refactoring.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 14 + .../build.properties | 6 + .../config/console.properties | 3 + .../config/gui.properties | 0 .../config/manager.properties | 7 + .../config/managers.properties | 3 + .../pom.xml | 193 + .../src/assembly/assemble_zip.xml | 61 + .../common/docker/manager/tools/Generator.java | 99 + .../manager/DcaeCommonDockerManagerProvider.java | 112 + .../manager/gui/DcaeGuiClientApiProvider.java | 78 + .../service/DcaeCommonDockerServiceProvider.java | 85 + ...roller-service-common-docker-manager-controller | 138 + ...controller-service-common-vm-manager-controller | 138 + .../src/main/server/bin/manager.sh | 37 + .../src/main/server/config/console.properties | 3 + .../src/main/server/config/gui.properties | 0 .../src/main/server/config/log4j.properties | 24 + .../src/main/server/config/makefile | 9 + .../src/main/server/config/manager.properties | 7 + .../src/main/server/config/pw.sh.sh | 15 + .../src/main/server/scripts/console.groovy | 27 + .../src/main/sirius-gen/CommonDockerManager.yaml | 69 + .../src/main/sirius-gen/CommonDockerService.yaml | 124 + .../src/main/sirius-gen/GuiClientApi.yaml | 69 + .../servers/manager/DcaeCommonDockerManager.java | 226 ++ .../manager/DcaeCommonDockerManagerClient.java | 174 + .../manager/DcaeCommonDockerManagerConsole.java | 127 + .../DcaeCommonDockerManagerProviderTemplate.java | 63 + .../manager/DcaeCommonDockerManagerServer.java | 112 + .../docker/servers/manager/DcaeManagerFactory.java | 54 + .../servers/manager/gui/DcaeGuiClientApi.java | 256 ++ .../manager/gui/DcaeGuiClientApiClient.java | 175 + .../manager/gui/DcaeGuiClientApiConsole.java | 123 + .../gui/DcaeGuiClientApiProviderTemplate.java | 78 + .../servers/manager/gui/DcaeModelFactory.java | 54 + .../manager/gui/logging/GuiClientApi.properties | 78 + .../gui/logging/GuiClientApiMessageEnum.java | 47 + .../gui/logging/GuiClientApiOperationEnum.java | 41 + .../manager/logging/CommonDockerManager.properties | 78 + .../logging/CommonDockerManagerMessageEnum.java | 47 + .../logging/CommonDockerManagerOperationEnum.java | 41 + .../servers/service/DcaeCommonDockerService.java | 356 ++ .../service/DcaeCommonDockerServiceClient.java | 259 ++ .../service/DcaeCommonDockerServiceConsole.java | 178 + .../DcaeCommonDockerServiceProviderTemplate.java | 65 + .../service/DcaeCommonDockerServiceServer.java | 101 + .../docker/servers/service/DcaeServiceFactory.java | 54 + .../service/logging/CommonDockerService.properties | 138 + .../logging/CommonDockerServiceMessageEnum.java | 57 + .../logging/CommonDockerServiceOperationEnum.java | 51 + .../.classpath | 17 + .../.gitignore | 2 + .../.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 32 + .../build.properties | 11 + .../plugin.properties | 4 + .../plugin.xml | 25 + .../pom.xml | 24 + .../common/docker/manager/CommonDockerManager.java | 212 + .../common/docker/manager/ManagerFactory.java | 63 + .../common/docker/manager/ManagerPackage.java | 406 ++ .../manager/impl/CommonDockerManagerImpl.java | 483 +++ .../docker/manager/impl/ManagerFactoryImpl.java | 116 + .../docker/manager/impl/ManagerPackageImpl.java | 269 ++ .../docker/manager/util/ManagerAdapterFactory.java | 181 + .../common/docker/manager/util/ManagerSwitch.java | 167 + .../common/docker/service/CommonDockerService.java | 39 + .../service/CommonDockerServiceConfiguration.java | 39 + .../service/CommonDockerServiceInstance.java | 210 + .../common/docker/service/ServiceFactory.java | 90 + .../common/docker/service/ServicePackage.java | 887 +++++ .../service/TommyDockerServiceConfiguration.java | 124 + .../impl/CommonDockerServiceConfigurationImpl.java | 62 + .../service/impl/CommonDockerServiceImpl.java | 62 + .../impl/CommonDockerServiceInstanceImpl.java | 482 +++ .../docker/service/impl/ServiceFactoryImpl.java | 149 + .../docker/service/impl/ServicePackageImpl.java | 383 ++ .../impl/TommyDockerServiceConfigurationImpl.java | 291 ++ .../docker/service/util/ServiceAdapterFactory.java | 293 ++ .../common/docker/service/util/ServiceSwitch.java | 284 ++ .../src/main/xcore/manager.xcore | 40 + .../src/main/xcore/service.xcore | 53 + .../dcae-controller-service-common-docker/pom.xml | 82 + .../.classpath | 27 + .../.gitignore | 1 + .../.project | 35 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.jdt.groovy.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 19 + .../build.properties | 3 + .../config/managers.properties | 3 + .../dcae-controller-service-docker-adaptor/pom.xml | 210 + .../src/assembly/assemble_zip.xml | 61 + .../service/docker/manager/tools/Generator.java | 96 + .../docker/manager/tools/TestServiceToManager.java | 86 + .../servers/docker/DcaeDockerServiceProvider.java | 342 ++ .../dockermanager/DcaeDockerManagerProvider.java | 172 + .../gui/DcaeGuiClientApiProvider.java | 78 + .../controller-service-docker-manager-controller | 138 + .../src/main/server/config/console.properties | 3 + .../src/main/server/config/gui.properties | 0 .../src/main/server/config/log4j.properties | 24 + .../src/main/server/config/makefile | 9 + .../src/main/server/config/manager.properties | 7 + .../src/main/server/config/pw.sh.sh | 15 + .../src/main/server/scripts/console.groovy | 27 + .../src/main/sirius-gen/DockerManager.yaml | 69 + .../src/main/sirius-gen/DockerService.yaml | 124 + .../src/main/sirius-gen/GuiClientApi.yaml | 69 + .../service/servers/docker/DcaeDockerFactory.java | 54 + .../service/servers/docker/DcaeDockerService.java | 356 ++ .../servers/docker/DcaeDockerServiceClient.java | 259 ++ .../servers/docker/DcaeDockerServiceConsole.java | 178 + .../docker/DcaeDockerServiceProviderTemplate.java | 131 + .../servers/docker/DcaeDockerServiceServer.java | 98 + .../docker/logging/DockerService.properties | 138 + .../docker/logging/DockerServiceMessageEnum.java | 57 + .../docker/logging/DockerServiceOperationEnum.java | 51 + .../servers/dockermanager/DcaeDockerManager.java | 226 ++ .../dockermanager/DcaeDockerManagerClient.java | 174 + .../dockermanager/DcaeDockerManagerConsole.java | 127 + .../DcaeDockerManagerProviderTemplate.java | 99 + .../dockermanager/DcaeDockerManagerServer.java | 115 + .../dockermanager/DcaeDockermanagerFactory.java | 54 + .../dockermanager/gui/DcaeGuiClientApi.java | 256 ++ .../dockermanager/gui/DcaeGuiClientApiClient.java | 175 + .../dockermanager/gui/DcaeGuiClientApiConsole.java | 123 + .../gui/DcaeGuiClientApiProviderTemplate.java | 78 + .../dockermanager/gui/DcaeModelFactory.java | 54 + .../gui/logging/GuiClientApi.properties | 78 + .../gui/logging/GuiClientApiMessageEnum.java | 47 + .../gui/logging/GuiClientApiOperationEnum.java | 41 + .../dockermanager/logging/DockerManager.properties | 78 + .../logging/DockerManagerMessageEnum.java | 47 + .../logging/DockerManagerOperationEnum.java | 41 + .../dcae-controller-service-docker-host/.gitignore | 1 + .../LICENSE.txt | 22 + .../.classpath | 27 + .../.gitignore | 4 + .../.project | 35 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.jdt.groovy.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 16 + .../build.properties | 3 + .../pom.xml | 203 + .../src/assembly/assemble_zip.xml | 61 + .../docker/host/manager/tools/Generator.java | 99 + .../docker/host/manager/tools/TestManager.java | 68 + .../host/manager/tools/TestManagerServer.java | 62 + .../manager/tools/TestRemoteManagerServer.java | 49 + .../host/manager/tools/TestServiceToManager.java | 46 + .../manager/DcaeDockerHostManagerProvider.java | 133 + .../servers/manager/DcaeDockerManagerProvider.java | 49 + .../manager/gui/DcaeGuiClientApiProvider.java | 78 + .../service/DcaeDockerHostServiceProvider.java | 111 + .../servers/service/DcaeDockerServiceProvider.java | 45 + ...ntroller-service-docker-host-manager-controller | 138 + .../src/main/server/bin/common.funcs | 32 + .../src/main/server/bin/generate-certs.sh | 70 + .../src/main/server/bin/get-ecomp-nexus-cert.sh | 40 + .../src/main/server/bin/install-docker.sh | 57 + .../src/main/server/bin/manager.sh | 62 + .../src/main/server/bin/setup-container-config.sh | 22 + .../src/main/server/config/console.properties | 3 + .../src/main/server/config/gui.properties | 0 .../src/main/server/config/log4j.properties | 24 + .../src/main/server/config/makefile | 9 + .../src/main/server/config/manager.properties | 7 + .../src/main/server/config/pw.sh.sh | 15 + .../src/main/server/scripts/console.groovy | 27 + .../src/main/sirius-gen/DockerHostManager.yaml | 234 ++ .../src/main/sirius-gen/DockerHostService.yaml | 135 + .../src/main/sirius-gen/GuiClientApi.yaml | 69 + .../servers/manager/DcaeDockerHostManager.java | 664 ++++ .../manager/DcaeDockerHostManagerClient.java | 429 ++ .../manager/DcaeDockerHostManagerConsole.java | 292 ++ .../DcaeDockerHostManagerProviderTemplate.java | 102 + .../manager/DcaeDockerHostManagerServer.java | 115 + .../host/servers/manager/DcaeManagerFactory.java | 54 + .../host/servers/manager/gui/DcaeGuiClientApi.java | 271 ++ .../manager/gui/DcaeGuiClientApiClient.java | 175 + .../manager/gui/DcaeGuiClientApiConsole.java | 123 + .../gui/DcaeGuiClientApiProviderTemplate.java | 78 + .../host/servers/manager/gui/DcaeModelFactory.java | 54 + .../manager/gui/logging/GuiClientApi.properties | 78 + .../gui/logging/GuiClientApiMessageEnum.java | 47 + .../gui/logging/GuiClientApiOperationEnum.java | 41 + .../manager/logging/DockerHostManager.properties | 258 ++ .../logging/DockerHostManagerMessageEnum.java | 77 + .../logging/DockerHostManagerOperationEnum.java | 71 + .../servers/service/DcaeDockerHostService.java | 408 ++ .../service/DcaeDockerHostServiceClient.java | 276 ++ .../service/DcaeDockerHostServiceConsole.java | 189 + .../DcaeDockerHostServiceProviderTemplate.java | 65 + .../service/DcaeDockerHostServiceServer.java | 98 + .../host/servers/service/DcaeServiceFactory.java | 54 + .../service/logging/DockerHostService.properties | 150 + .../logging/DockerHostServiceMessageEnum.java | 59 + .../logging/DockerHostServiceOperationEnum.java | 53 + .../.classpath | 17 + .../.gitignore | 2 + .../.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 30 + .../build.properties | 11 + .../plugin.properties | 4 + .../plugin.xml | 25 + .../pom.xml | 29 + .../docker/host/manager/DockerHostManager.java | 85 + .../service/docker/host/manager/DockerManager.java | 40 + .../docker/host/manager/ManagerFactory.java | 63 + .../docker/host/manager/ManagerPackage.java | 474 +++ .../host/manager/impl/DockerHostManagerImpl.java | 315 ++ .../host/manager/impl/ManagerFactoryImpl.java | 116 + .../host/manager/impl/ManagerPackageImpl.java | 270 ++ .../host/manager/util/ManagerAdapterFactory.java | 257 ++ .../docker/host/manager/util/ManagerSwitch.java | 235 ++ .../docker/host/service/DockerConfiguration.java | 74 + .../docker/host/service/DockerHostService.java | 39 + .../host/service/DockerHostServiceInstance.java | 39 + .../service/docker/host/service/DockerService.java | 40 + .../docker/host/service/DockerServiceInstance.java | 39 + .../docker/host/service/ServiceFactory.java | 81 + .../docker/host/service/ServicePackage.java | 739 ++++ .../host/service/impl/DockerConfigurationImpl.java | 198 + .../host/service/impl/DockerHostServiceImpl.java | 62 + .../impl/DockerHostServiceInstanceImpl.java | 232 ++ .../host/service/impl/ServiceFactoryImpl.java | 138 + .../host/service/impl/ServicePackageImpl.java | 289 ++ .../host/service/util/ServiceAdapterFactory.java | 294 ++ .../docker/host/service/util/ServiceSwitch.java | 280 ++ .../src/main/xcore/manager.xcore | 43 + .../src/main/xcore/service.xcore | 45 + .../dcae-controller-service-docker-host/pom.xml | 82 + .../.classpath | 17 + .../.gitignore | 2 + .../dcae-controller-service-docker-model/.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 31 + .../build.properties | 11 + .../plugin.properties | 4 + .../plugin.xml | 25 + .../dcae-controller-service-docker-model/pom.xml | 36 + .../service/docker/DockerConfiguration.java | 72 + .../controller/service/docker/DockerFactory.java | 90 + .../controller/service/docker/DockerPackage.java | 1131 ++++++ .../controller/service/docker/DockerService.java | 63 + .../service/docker/DockerServiceDescriptor.java | 233 ++ .../service/docker/DockerServiceInstance.java | 280 ++ .../docker/impl/DockerConfigurationImpl.java | 184 + .../service/docker/impl/DockerFactoryImpl.java | 149 + .../service/docker/impl/DockerPackageImpl.java | 516 +++ .../docker/impl/DockerServiceDescriptorImpl.java | 509 +++ .../service/docker/impl/DockerServiceImpl.java | 173 + .../docker/impl/DockerServiceInstanceImpl.java | 649 +++ .../service/docker/util/DockerAdapterFactory.java | 273 ++ .../service/docker/util/DockerSwitch.java | 266 ++ .../service/dockermanager/DockerManager.java | 72 + .../dockermanager/DockermanagerFactory.java | 63 + .../dockermanager/DockermanagerPackage.java | 256 ++ .../dockermanager/impl/DockerManagerImpl.java | 194 + .../impl/DockermanagerFactoryImpl.java | 116 + .../impl/DockermanagerPackageImpl.java | 207 + .../util/DockermanagerAdapterFactory.java | 161 + .../dockermanager/util/DockermanagerSwitch.java | 149 + .../src/main/xcore/manager.xcore | 34 + .../src/main/xcore/service.xcore | 72 + dcae-controller-service-docker/pom.xml | 83 + dcae-controller-service-vm/.gitignore | 1 + dcae-controller-service-vm/LICENSE.txt | 22 + .../dcae-controller-service-common-vm/.gitignore | 1 + .../dcae-controller-service-common-vm/LICENSE.txt | 22 + .../.classpath | 27 + .../.gitignore | 1 + .../.project | 35 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.jdt.groovy.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 14 + .../build.properties | 6 + .../config/console.properties | 3 + .../config/gui.properties | 0 .../config/manager.properties | 7 + .../config/managers.properties | 3 + .../pom.xml | 193 + .../src/assembly/assemble_zip.xml | 61 + .../service/common/vm/manager/tools/Generator.java | 99 + .../common/vm/manager/tools/TestManager.java | 70 + .../common/vm/manager/tools/TestManagerServer.java | 90 + .../vm/manager/tools/TestServiceToManager.java | 58 + .../manager/DcaeCommonVmManagerProvider.java | 119 + .../manager/gui/DcaeGuiClientApiProvider.java | 78 + .../service/DcaeCommonVmServiceProvider.java | 78 + ...controller-service-common-vm-manager-controller | 138 + .../src/main/server/bin/manager.sh | 55 + .../src/main/server/config/console.properties | 3 + .../src/main/server/config/gui.properties | 0 .../src/main/server/config/log4j.properties | 24 + .../src/main/server/config/makefile | 9 + .../src/main/server/config/manager.properties | 7 + .../src/main/server/config/pw.sh.sh | 15 + .../src/main/server/scripts/console.groovy | 27 + .../src/main/sirius-gen/CommonVmManager.yaml | 179 + .../src/main/sirius-gen/CommonVmService.yaml | 135 + .../src/main/sirius-gen/GuiClientApi.yaml | 69 + .../vm/servers/manager/DcaeCommonVmManager.java | 529 +++ .../servers/manager/DcaeCommonVmManagerClient.java | 344 ++ .../manager/DcaeCommonVmManagerConsole.java | 237 ++ .../DcaeCommonVmManagerProviderTemplate.java | 72 + .../servers/manager/DcaeCommonVmManagerServer.java | 112 + .../vm/servers/manager/DcaeManagerFactory.java | 54 + .../vm/servers/manager/gui/DcaeGuiClientApi.java | 271 ++ .../manager/gui/DcaeGuiClientApiClient.java | 175 + .../manager/gui/DcaeGuiClientApiConsole.java | 123 + .../gui/DcaeGuiClientApiProviderTemplate.java | 78 + .../vm/servers/manager/gui/DcaeModelFactory.java | 54 + .../manager/gui/logging/GuiClientApi.properties | 78 + .../gui/logging/GuiClientApiMessageEnum.java | 47 + .../gui/logging/GuiClientApiOperationEnum.java | 41 + .../manager/logging/CommonVmManager.properties | 198 + .../logging/CommonVmManagerMessageEnum.java | 67 + .../logging/CommonVmManagerOperationEnum.java | 61 + .../vm/servers/service/DcaeCommonVmService.java | 408 ++ .../servers/service/DcaeCommonVmServiceClient.java | 276 ++ .../service/DcaeCommonVmServiceConsole.java | 189 + .../DcaeCommonVmServiceProviderTemplate.java | 65 + .../servers/service/DcaeCommonVmServiceServer.java | 101 + .../vm/servers/service/DcaeServiceFactory.java | 54 + .../service/logging/CommonVmService.properties | 150 + .../logging/CommonVmServiceMessageEnum.java | 59 + .../logging/CommonVmServiceOperationEnum.java | 53 + .../.classpath | 17 + .../.gitignore | 2 + .../.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 29 + .../build.properties | 11 + .../plugin.properties | 4 + .../plugin.xml | 25 + .../pom.xml | 24 + .../service/common/vm/manager/CommonVmManager.java | 212 + .../service/common/vm/manager/ManagerFactory.java | 63 + .../service/common/vm/manager/ManagerPackage.java | 505 +++ .../vm/manager/impl/CommonVmManagerImpl.java | 473 +++ .../common/vm/manager/impl/ManagerFactoryImpl.java | 116 + .../common/vm/manager/impl/ManagerPackageImpl.java | 265 ++ .../vm/manager/util/ManagerAdapterFactory.java | 239 ++ .../common/vm/manager/util/ManagerSwitch.java | 219 + .../service/common/vm/service/CommonVmService.java | 39 + .../vm/service/CommonVmServiceConfiguration.java | 39 + .../common/vm/service/CommonVmServiceInstance.java | 210 + .../service/common/vm/service/ServiceFactory.java | 90 + .../service/common/vm/service/ServicePackage.java | 1003 +++++ .../service/common/vm/service/TommyVmService.java | 124 + .../vm/service/TommyVmServiceConfiguration.java | 124 + .../impl/CommonVmServiceConfigurationImpl.java | 62 + .../vm/service/impl/CommonVmServiceImpl.java | 62 + .../service/impl/CommonVmServiceInstanceImpl.java | 472 +++ .../common/vm/service/impl/ServiceFactoryImpl.java | 149 + .../common/vm/service/impl/ServicePackageImpl.java | 380 ++ .../impl/TommyVmServiceConfigurationImpl.java | 291 ++ .../vm/service/util/ServiceAdapterFactory.java | 312 ++ .../common/vm/service/util/ServiceSwitch.java | 301 ++ .../src/main/xcore/manager.xcore | 40 + .../src/main/xcore/service.xcore | 53 + .../dcae-controller-service-common-vm/pom.xml | 82 + .../dcae-controller-service-vm-adaptor/.classpath | 26 + .../dcae-controller-service-vm-adaptor/.gitignore | 1 + .../dcae-controller-service-vm-adaptor/.project | 35 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.jdt.groovy.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../dcae-controller-service-vm-adaptor/LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 14 + .../build.properties | 3 + .../dcae-controller-service-vm-adaptor/pom.xml | 188 + .../src/assembly/assemble_zip.xml | 61 + .../src/main/java/CLOUDINIT.userdata | 13 + .../src/main/java/HttpInstallationStep.userdata | 23 + .../java/MavenArtifactInstallationStep.userdata | 29 + .../src/main/java/ShellInstallationStep.userdata | 2 + .../vm/DcaeVirtualMachineServiceProvider.java | 872 ++++ .../DcaeVirtualMachineManagerProvider.java | 164 + .../service/vm/adaptor/tools/Generator.java | 91 + .../src/main/resources/DcaeController.yaml | 12 + .../bin/controller-service-vm-adaptor-controller | 138 + .../ControllerVirtualMachineServiceInstance.yaml | 3 + .../src/main/sirius-gen/VirtualMachineManager.yaml | 179 + .../src/main/sirius-gen/VirtualMachineService.yaml | 135 + .../servers/vm/DcaeVirtualMachineService.java | 408 ++ .../vm/DcaeVirtualMachineServiceClient.java | 276 ++ .../vm/DcaeVirtualMachineServiceConsole.java | 189 + .../DcaeVirtualMachineServiceProviderTemplate.java | 137 + .../vm/DcaeVirtualMachineServiceServer.java | 98 + .../service/servers/vm/DcaeVmFactory.java | 54 + .../vm/logging/VirtualMachineService.properties | 150 + .../logging/VirtualMachineServiceMessageEnum.java | 59 + .../VirtualMachineServiceOperationEnum.java | 53 + .../vmmanager/DcaeVirtualMachineManager.java | 529 +++ .../vmmanager/DcaeVirtualMachineManagerClient.java | 344 ++ .../DcaeVirtualMachineManagerConsole.java | 233 ++ .../DcaeVirtualMachineManagerProviderTemplate.java | 108 + .../vmmanager/DcaeVirtualMachineManagerServer.java | 98 + .../servers/vmmanager/DcaeVmmanagerFactory.java | 54 + .../logging/VirtualMachineManager.properties | 198 + .../logging/VirtualMachineManagerMessageEnum.java | 67 + .../VirtualMachineManagerOperationEnum.java | 61 + .../dcae-controller-service-vm-model/.classpath | 17 + .../dcae-controller-service-vm-model/.gitignore | 2 + .../dcae-controller-service-vm-model/.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../dcae-controller-service-vm-model/LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 27 + .../build.properties | 11 + .../plugin.properties | 4 + .../dcae-controller-service-vm-model/plugin.xml | 25 + .../dcae-controller-service-vm-model/pom.xml | 28 + .../vm/ControllerVirtualMachineService.java | 38 + .../ControllerVirtualMachineServiceInstance.java | 38 + .../service/vm/HttpInstallationStep.java | 178 + .../controller/service/vm/InstallationStep.java | 72 + .../service/vm/MavenArtifactInstallationStep.java | 178 + .../controller/service/vm/PhysicalMachine.java | 72 + .../service/vm/ShellInstallationStep.java | 70 + .../dcae/controller/service/vm/VirtualMachine.java | 152 + .../service/vm/VirtualMachineService.java | 102 + .../vm/VirtualMachineServiceConfiguration.java | 72 + .../vm/VirtualMachineServiceDescriptor.java | 268 ++ .../service/vm/VirtualMachineServiceInstance.java | 548 +++ .../dcae/controller/service/vm/VmFactory.java | 135 + .../dcae/controller/service/vm/VmPackage.java | 2813 +++++++++++++ .../service/vm/impl/HttpInstallationStepImpl.java | 399 ++ .../service/vm/impl/InstallationStepImpl.java | 182 + .../vm/impl/MavenArtifactInstallationStepImpl.java | 399 ++ .../service/vm/impl/PhysicalMachineImpl.java | 182 + .../service/vm/impl/ShellInstallationStepImpl.java | 183 + .../service/vm/impl/VirtualMachineImpl.java | 343 ++ .../VirtualMachineServiceConfigurationImpl.java | 184 + .../impl/VirtualMachineServiceDescriptorImpl.java | 585 +++ .../service/vm/impl/VirtualMachineServiceImpl.java | 285 ++ .../vm/impl/VirtualMachineServiceInstanceImpl.java | 1288 ++++++ .../controller/service/vm/impl/VmFactoryImpl.java | 204 + .../controller/service/vm/impl/VmPackageImpl.java | 1050 +++++ .../service/vm/util/VmAdapterFactory.java | 440 +++ .../dcae/controller/service/vm/util/VmSwitch.java | 458 +++ .../service/vmmanager/VirtualMachineManager.java | 40 + .../service/vmmanager/VmmanagerFactory.java | 63 + .../service/vmmanager/VmmanagerPackage.java | 336 ++ .../vmmanager/impl/VirtualMachineManagerImpl.java | 515 +++ .../vmmanager/impl/VmmanagerFactoryImpl.java | 116 + .../vmmanager/impl/VmmanagerPackageImpl.java | 219 + .../vmmanager/util/VmmanagerAdapterFactory.java | 218 + .../service/vmmanager/util/VmmanagerSwitch.java | 200 + .../src/main/xcore/manager.xcore | 34 + .../src/main/xcore/service.xcore | 132 + dcae-controller-service-vm/pom.xml | 86 + dcae-controller-service/.gitignore | 1 + dcae-controller-service/LICENSE.txt | 22 + .../dcae-controller-service-dmaap-drsub/.gitignore | 1 + .../LICENSE.txt | 22 + .../.classpath | 27 + .../.gitignore | 1 + .../.project | 35 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.jdt.groovy.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 15 + .../build.properties | 6 + .../pom.xml | 193 + .../src/assembly/assemble_zip.xml | 61 + .../dmaap/drsub/manager/tools/Generator.java | 99 + ...ControllerServiceDmaapDrsubManagerProvider.java | 203 + .../manager/gui/DcaeGuiClientApiProvider.java | 78 + ...ControllerServiceDmaapDrsubServiceProvider.java | 121 + ...ntroller-service-dmaap-drsub-manager-controller | 138 + .../src/main/server/bin/manager.sh | 54 + .../src/main/server/config/console.properties | 3 + .../src/main/server/config/gui.properties | 0 .../src/main/server/config/log4j.properties | 26 + .../src/main/server/config/makefile | 9 + .../src/main/server/config/manager.properties | 7 + .../src/main/server/config/pw.sh.sh | 15 + .../src/main/server/scripts/console.groovy | 27 + .../ControllerServiceDmaapDrsubManager.yaml | 179 + .../ControllerServiceDmaapDrsubService.yaml | 135 + .../src/main/sirius-gen/GuiClientApi.yaml | 69 + .../DcaeControllerServiceDmaapDrsubManager.java | 494 +++ ...aeControllerServiceDmaapDrsubManagerClient.java | 344 ++ ...eControllerServiceDmaapDrsubManagerConsole.java | 237 ++ ...erServiceDmaapDrsubManagerProviderTemplate.java | 72 + ...aeControllerServiceDmaapDrsubManagerServer.java | 112 + .../drsub/servers/manager/DcaeManagerFactory.java | 54 + .../servers/manager/gui/DcaeGuiClientApi.java | 256 ++ .../manager/gui/DcaeGuiClientApiClient.java | 175 + .../manager/gui/DcaeGuiClientApiConsole.java | 123 + .../gui/DcaeGuiClientApiProviderTemplate.java | 78 + .../servers/manager/gui/DcaeModelFactory.java | 54 + .../manager/gui/logging/GuiClientApi.properties | 78 + .../gui/logging/GuiClientApiMessageEnum.java | 47 + .../gui/logging/GuiClientApiOperationEnum.java | 41 + .../ControllerServiceDmaapDrsubManager.properties | 198 + ...trollerServiceDmaapDrsubManagerMessageEnum.java | 67 + ...ollerServiceDmaapDrsubManagerOperationEnum.java | 61 + .../DcaeControllerServiceDmaapDrsubService.java | 381 ++ ...aeControllerServiceDmaapDrsubServiceClient.java | 276 ++ ...eControllerServiceDmaapDrsubServiceConsole.java | 189 + ...erServiceDmaapDrsubServiceProviderTemplate.java | 65 + ...aeControllerServiceDmaapDrsubServiceServer.java | 101 + .../drsub/servers/service/DcaeServiceFactory.java | 54 + .../ControllerServiceDmaapDrsubService.properties | 150 + ...trollerServiceDmaapDrsubServiceMessageEnum.java | 59 + ...ollerServiceDmaapDrsubServiceOperationEnum.java | 53 + .../.classpath | 17 + .../.gitignore | 2 + .../.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 31 + .../build.properties | 11 + .../plugin.properties | 4 + .../plugin.xml | 25 + .../pom.xml | 29 + .../ControllerServiceDmaapDrsubManager.java | 42 + .../dmaap/drsub/manager/ManagerFactory.java | 63 + .../dmaap/drsub/manager/ManagerPackage.java | 433 ++ .../ControllerServiceDmaapDrsubManagerImpl.java | 777 ++++ .../drsub/manager/impl/ManagerFactoryImpl.java | 116 + .../drsub/manager/impl/ManagerPackageImpl.java | 196 + .../drsub/manager/util/ManagerAdapterFactory.java | 259 ++ .../dmaap/drsub/manager/util/ManagerSwitch.java | 237 ++ .../dmaap/drsub/service/ContrailController.java | 130 + .../ControllerServiceDmaapDrsubService.java | 40 + ...ollerServiceDmaapDrsubServiceConfiguration.java | 353 ++ ...ControllerServiceDmaapDrsubServiceInstance.java | 99 + .../dmaap/drsub/service/ServiceFactory.java | 81 + .../dmaap/drsub/service/ServicePackage.java | 1165 ++++++ ...rServiceDmaapDrsubServiceConfigurationImpl.java | 723 ++++ .../ControllerServiceDmaapDrsubServiceImpl.java | 60 + ...rollerServiceDmaapDrsubServiceInstanceImpl.java | 892 +++++ .../drsub/service/impl/ServiceFactoryImpl.java | 138 + .../drsub/service/impl/ServicePackageImpl.java | 484 +++ .../drsub/service/util/ServiceAdapterFactory.java | 294 ++ .../dmaap/drsub/service/util/ServiceSwitch.java | 280 ++ .../src/main/xcore/manager.xcore | 35 + .../src/main/xcore/service.xcore | 72 + .../dcae-controller-service-dmaap-drsub/pom.xml | 82 + .../.gitignore | 1 + .../LICENSE.txt | 22 + .../.classpath | 27 + .../.gitignore | 1 + .../.project | 35 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.jdt.groovy.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 15 + .../build.properties | 6 + .../pom.xml | 193 + .../src/assembly/assemble_zip.xml | 61 + .../manager/tools/Generator.java | 99 + ...rviceStandardeventcollectorManagerProvider.java | 468 +++ .../manager/gui/DcaeGuiClientApiProvider.java | 78 + ...rviceStandardeventcollectorServiceProvider.java | 73 + ...rvice-standardeventcollector-manager-controller | 138 + .../src/main/server/bin/Cec_controller_update.sh | 32 + .../src/main/server/bin/Cec_controller_update.sh~ | 0 .../src/main/server/config/console.properties | 3 + .../src/main/server/config/gui.properties | 0 .../src/main/server/config/log4j.properties | 24 + .../src/main/server/config/makefile | 9 + .../src/main/server/config/manager.properties | 7 + .../src/main/server/config/pw.sh.sh | 15 + .../src/main/server/scripts/console.groovy | 27 + ...rollerServiceStandardeventcollectorManager.yaml | 69 + ...rollerServiceStandardeventcollectorService.yaml | 124 + .../src/main/sirius-gen/GuiClientApi.yaml | 69 + ...rollerServiceStandardeventcollectorManager.java | 231 ++ ...ServiceStandardeventcollectorManagerClient.java | 174 + ...erviceStandardeventcollectorManagerConsole.java | 127 + ...ndardeventcollectorManagerProviderTemplate.java | 65 + ...ServiceStandardeventcollectorManagerServer.java | 112 + .../servers/manager/DcaeManagerFactory.java | 54 + .../servers/manager/gui/DcaeGuiClientApi.java | 256 ++ .../manager/gui/DcaeGuiClientApiClient.java | 175 + .../manager/gui/DcaeGuiClientApiConsole.java | 123 + .../gui/DcaeGuiClientApiProviderTemplate.java | 78 + .../servers/manager/gui/DcaeModelFactory.java | 54 + .../manager/gui/logging/GuiClientApi.properties | 78 + .../gui/logging/GuiClientApiMessageEnum.java | 47 + .../gui/logging/GuiClientApiOperationEnum.java | 41 + ...ServiceStandardeventcollectorManager.properties | 78 + ...ceStandardeventcollectorManagerMessageEnum.java | 47 + ...StandardeventcollectorManagerOperationEnum.java | 41 + ...rollerServiceStandardeventcollectorService.java | 356 ++ ...ServiceStandardeventcollectorServiceClient.java | 259 ++ ...erviceStandardeventcollectorServiceConsole.java | 178 + ...ndardeventcollectorServiceProviderTemplate.java | 65 + ...ServiceStandardeventcollectorServiceServer.java | 98 + .../servers/service/DcaeServiceFactory.java | 54 + ...ServiceStandardeventcollectorService.properties | 138 + ...ceStandardeventcollectorServiceMessageEnum.java | 57 + ...StandardeventcollectorServiceOperationEnum.java | 51 + .../.classpath | 17 + .../.gitignore | 2 + .../.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 32 + .../build.properties | 11 + .../plugin.properties | 4 + .../plugin.xml | 25 + .../pom.xml | 24 + ...rollerServiceStandardeventcollectorManager.java | 41 + .../manager/ManagerFactory.java | 63 + .../manager/ManagerPackage.java | 335 ++ ...erServiceStandardeventcollectorManagerImpl.java | 755 ++++ .../manager/impl/ManagerFactoryImpl.java | 116 + .../manager/impl/ManagerPackageImpl.java | 200 + .../manager/util/ManagerAdapterFactory.java | 201 + .../manager/util/ManagerSwitch.java | 185 + ...rollerServiceStandardeventcollectorService.java | 39 + ...StandardeventcollectorServiceConfiguration.java | 352 ++ ...rviceStandardeventcollectorServiceInstance.java | 39 + .../service/ServiceFactory.java | 81 + .../service/ServicePackage.java | 993 +++++ ...dardeventcollectorServiceConfigurationImpl.java | 701 ++++ ...erServiceStandardeventcollectorServiceImpl.java | 62 + ...eStandardeventcollectorServiceInstanceImpl.java | 754 ++++ .../service/impl/ServiceFactoryImpl.java | 138 + .../service/impl/ServicePackageImpl.java | 461 +++ .../service/util/ServiceAdapterFactory.java | 275 ++ .../service/util/ServiceSwitch.java | 263 ++ .../src/main/xcore/manager.xcore | 35 + .../src/main/xcore/service.xcore | 71 + .../pom.xml | 82 + .../.classpath | 17 + .../.gitignore | 2 + .../.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 27 + .../build.properties | 11 + .../plugin.properties | 4 + .../plugin.xml | 25 + .../pom.xml | 29 + .../service/storage/postgres/service/Contact.java | 71 + .../postgres/service/ContrailController.java | 130 + .../ControllerServiceStoragePostgresService.java | 40 + ...ServiceStoragePostgresServiceConfiguration.java | 185 + ...ollerServiceStoragePostgresServiceInstance.java | 39 + .../service/storage/postgres/service/Database.java | 134 + .../service/PostgresServiceConfiguration.java | 90 + .../service/storage/postgres/service/Role.java | 143 + .../storage/postgres/service/ServiceFactory.java | 90 + .../storage/postgres/service/ServicePackage.java | 716 ++++ .../storage/postgres/service/impl/ContactImpl.java | 185 + .../postgres/service/impl/DatabaseImpl.java | 335 ++ .../impl/PostgresServiceConfigurationImpl.java | 237 ++ .../storage/postgres/service/impl/RoleImpl.java | 333 ++ .../postgres/service/impl/ServiceFactoryImpl.java | 149 + .../postgres/service/impl/ServicePackageImpl.java | 420 ++ .../service/util/ServiceAdapterFactory.java | 230 ++ .../postgres/service/util/ServiceSwitch.java | 228 ++ .../src/main/xcore/service.xcore | 58 + dcae-controller-service/pom.xml | 82 + deptree.text | 1 + pom-complete-build.xml | 142 + pom.xml | 83 + pom.xml.versionsBackup | 83 + 1206 files changed, 170471 insertions(+) create mode 100644 .gitignore create mode 100644 .gitreview create mode 100644 LICENSE.txt create mode 100644 README.md create mode 100644 dcae-controller-core/.gitignore create mode 100644 dcae-controller-core/LICENSE.txt create mode 100644 dcae-controller-core/dcae-controller-core-model/.classpath create mode 100644 dcae-controller-core/dcae-controller-core-model/.gitignore create mode 100644 dcae-controller-core/dcae-controller-core-model/.project create mode 100644 dcae-controller-core/dcae-controller-core-model/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-core/dcae-controller-core-model/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-core/dcae-controller-core-model/LICENSE.txt create mode 100644 dcae-controller-core/dcae-controller-core-model/META-INF/MANIFEST.MF create mode 100644 dcae-controller-core/dcae-controller-core-model/build.properties create mode 100644 dcae-controller-core/dcae-controller-core-model/plugin.properties create mode 100644 dcae-controller-core/dcae-controller-core-model/plugin.xml create mode 100644 dcae-controller-core/dcae-controller-core-model/pom.xml create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/Hypervisor.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/HypervisorFactory.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/HypervisorPackage.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/impl/HypervisorFactoryImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/impl/HypervisorImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/impl/HypervisorPackageImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/util/HypervisorAdapterFactory.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/util/HypervisorSwitch.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/DcaeManager.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/ManagerFactory.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/ManagerPackage.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/impl/DcaeManagerImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/impl/ManagerFactoryImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/impl/ManagerPackageImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/util/ManagerAdapterFactory.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/util/ManagerSwitch.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ControllerCoreServer.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/DcaeBasicServer.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/DcaeBasicServerNetwork.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ServerFactory.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ServerPackage.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/DcaeBasicServerImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/DcaeBasicServerNetworkImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/ServerFactoryImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/ServerPackageImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/util/ServerAdapterFactory.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/util/ServerSwitch.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeLocation.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaePolicyEntity.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeService.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeServiceContainer.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeServiceDescriptor.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeServiceInstance.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/HealthTestResponse.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/HealthTestStatus.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/ServiceFactory.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/ServicePackage.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/User.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeLocationImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaePolicyEntityImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeServiceContainerImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeServiceDescriptorImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeServiceImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeServiceInstanceImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/HealthTestResponseImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/ServiceFactoryImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/ServicePackageImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/util/ServiceAdapterFactory.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/util/ServiceSwitch.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusDataRouterNode.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusEntity.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusLocation.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusMessageRouterCluster.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStream.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamFeed.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamFeedPublisher.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamFeedSubscriber.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamTopic.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamTopicAction.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamTopicClient.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStream.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamDefinition.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamExternalEndPoint.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamInternalEndPoint.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamPublisher.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamPublisherExternal.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamPublisherInternal.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamSubscriber.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamSubscriberExternal.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamSubscriberInternal.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DmaapStream.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamAuthentication.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamFactory.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamPackage.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusDataRouterNodeImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusEntityImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusLocationImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusMessageRouterClusterImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamFeedImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamFeedPublisherImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamFeedSubscriberImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamTopicClientImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamTopicImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamDefinitionImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamExternalEndPointImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamInternalEndPointImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamPublisherExternalImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamPublisherImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamPublisherInternalImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamSubscriberExternalImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamSubscriberImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamSubscriberInternalImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DmaapStreamImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/StreamFactoryImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/StreamPackageImpl.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/util/StreamAdapterFactory.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/util/StreamSwitch.java create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore/hypervisor.xcore create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore/manager.xcore create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore/server.xcore create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore/service.xcore create mode 100644 dcae-controller-core/dcae-controller-core-model/src/main/xcore/stream.xcore create mode 100644 dcae-controller-core/dcae-controller-core-utils/.classpath create mode 100644 dcae-controller-core/dcae-controller-core-utils/.gitignore create mode 100644 dcae-controller-core/dcae-controller-core-utils/.project create mode 100644 dcae-controller-core/dcae-controller-core-utils/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-core/dcae-controller-core-utils/.settings/org.eclipse.jdt.groovy.core.prefs create mode 100644 dcae-controller-core/dcae-controller-core-utils/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-core/dcae-controller-core-utils/LICENSE.txt create mode 100644 dcae-controller-core/dcae-controller-core-utils/META-INF/MANIFEST.MF create mode 100644 dcae-controller-core/dcae-controller-core-utils/build.properties create mode 100644 dcae-controller-core/dcae-controller-core-utils/pom.xml create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/assembly/assemble_zip.xml create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/main/java/org/openecomp/dcae/controller/core/utils/DcaeServiceProvider.java create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/.gitignore create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/certificate.sh create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/common.funcs create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/convert-to-open-ecomp-all.sh create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/dmaap_mr_prep.sh create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/docker_ca_cert.pem create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/docker_ca_key.pem create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/fs-init.py create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/generate-certs.sh create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/install-docker.sh create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/process-yaml.sh create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/setup-logrotation.sh create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/setup_https.sh create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/update-docker-opts.sh create mode 100644 dcae-controller-core/dcae-controller-core-utils/src/main/server/scripts/process-yaml.groovy create mode 100644 dcae-controller-core/dcae-controller-operation-utils/.classpath create mode 100644 dcae-controller-core/dcae-controller-operation-utils/.gitignore create mode 100644 dcae-controller-core/dcae-controller-operation-utils/.project create mode 100644 dcae-controller-core/dcae-controller-operation-utils/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-core/dcae-controller-operation-utils/.settings/org.eclipse.jdt.groovy.core.prefs create mode 100644 dcae-controller-core/dcae-controller-operation-utils/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-core/dcae-controller-operation-utils/LICENSE.txt create mode 100644 dcae-controller-core/dcae-controller-operation-utils/META-INF/MANIFEST.MF create mode 100644 dcae-controller-core/dcae-controller-operation-utils/build.properties create mode 100644 dcae-controller-core/dcae-controller-operation-utils/pom.xml create mode 100644 dcae-controller-core/dcae-controller-operation-utils/src/main/java/org/openecomp/dcae/controller/operation/utils/DcaePlatformConfiguration.groovy create mode 100644 dcae-controller-core/dcae-controller-operation-utils/src/main/java/org/openecomp/dcae/controller/operation/utils/DocUtils.java create mode 100644 dcae-controller-core/dcae-controller-operation-utils/src/main/java/org/openecomp/dcae/controller/operation/utils/GenControllerConfiguration.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-model/.classpath create mode 100644 dcae-controller-core/dcae-controller-platform-model/.gitignore create mode 100644 dcae-controller-core/dcae-controller-platform-model/.project create mode 100644 dcae-controller-core/dcae-controller-platform-model/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-core/dcae-controller-platform-model/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-core/dcae-controller-platform-model/LICENSE.txt create mode 100644 dcae-controller-core/dcae-controller-platform-model/META-INF/MANIFEST.MF create mode 100644 dcae-controller-core/dcae-controller-platform-model/build.properties create mode 100644 dcae-controller-core/dcae-controller-platform-model/plugin.properties create mode 100644 dcae-controller-core/dcae-controller-platform-model/plugin.xml create mode 100644 dcae-controller-core/dcae-controller-platform-model/pom.xml create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerCluster.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerClusterServer.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerClusterServerData.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerFactory.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerPackage.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerVirtualMachineService.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/DcaeDataBus.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/DcaePlatformController.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ServerRole.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerClusterImpl.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerClusterServerDataImpl.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerClusterServerImpl.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerFactoryImpl.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerPackageImpl.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerVirtualMachineServiceImpl.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/DcaeDataBusImpl.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/DcaePlatformControllerImpl.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/util/ControllerAdapterFactory.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/util/ControllerSwitch.java create mode 100644 dcae-controller-core/dcae-controller-platform-model/src/main/xcore/controller.xcore create mode 100644 dcae-controller-core/dcae-controller-platform-server/.classpath create mode 100644 dcae-controller-core/dcae-controller-platform-server/.gitignore create mode 100644 dcae-controller-core/dcae-controller-platform-server/.project create mode 100644 dcae-controller-core/dcae-controller-platform-server/.settings/org.eclipse.core.resources.prefs create mode 100644 dcae-controller-core/dcae-controller-platform-server/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-core/dcae-controller-platform-server/.settings/org.eclipse.jdt.groovy.core.prefs create mode 100644 dcae-controller-core/dcae-controller-platform-server/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-core/dcae-controller-platform-server/LICENSE.txt create mode 100644 dcae-controller-core/dcae-controller-platform-server/META-INF/MANIFEST.MF create mode 100644 dcae-controller-core/dcae-controller-platform-server/build.properties create mode 100644 dcae-controller-core/dcae-controller-platform-server/pom.xml create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/assembly/assemble_zip.xml create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/server/tools/Generator.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterProvider.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceProvider.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProvider.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiProvider.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/resources/DcaeController.yaml create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server-gen/bin/controller-platform-server-controller create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/bin/dcae-controller.sh create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/config/console.properties create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/config/controller.properties create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/config/gui.properties create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/config/log4j.properties create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/config/makefile create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/config/pw.sh.sh create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-dcae-location.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-openstack-location.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-openstack-project.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-service-instance.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-service.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/configure-service-instance.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/console.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/create-keypair.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/create-object.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/databus-refresh.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/decrypt-value.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/delete-object.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-descriptor.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-manual-vm-service-instance.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-service-instance.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-undeployed-descriptors.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-user.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-vmType.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/encrypt-file.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/encrypt-password.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/get-service-instance-configuration.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/get-service-instance-manager-configuration.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/init-controller.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/list-object.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/operation-service-instance.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/operation-service.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/rackspace-substitute.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/report.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/setup-openstack-bash-shell.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-configuration-from-directory.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-configuration.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-services-from-directory.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/tosca-add-blueprint.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/undeploy-service-instance-chef.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/undeploy-service-instance.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/undeploy-user.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/undeploy-vmType.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/update-configuration-from-policy-service-instance.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/update-object.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/wait-for.groovy create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerCluster.yaml create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerVirtualMachineService.yaml create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/DcaePlatformController.yaml create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/GuiClientApi.yaml create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerCluster.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterClient.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterConsole.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterProviderTemplate.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerFactory.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineService.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceClient.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceConsole.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceProviderTemplate.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformController.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerClient.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerConsole.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProviderTemplate.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerServer.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApi.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiClient.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiConsole.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiProviderTemplate.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeModelFactory.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApi.properties create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiMessageEnum.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiOperationEnum.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerCluster.properties create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterMessageEnum.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterOperationEnum.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineService.properties create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceMessageEnum.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceOperationEnum.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeController.properties create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerMessageEnum.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerOperationEnum.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformController.properties create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerMessageEnum.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerOperationEnum.java create mode 100644 dcae-controller-core/dcae-controller-platform-server/src/test/groovy/policy.groovy create mode 100644 dcae-controller-core/pom.xml create mode 100644 dcae-controller-service-cdap/.gitignore create mode 100644 dcae-controller-service-cdap/LICENSE.txt create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.classpath create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.gitignore create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.project create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.core.resources.prefs create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/LICENSE.txt create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/build.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/config/.gitignore create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/pom.xml create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/assembly/assemble_zip.xml create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/cdap/adaptor/tools/Generator.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceProvider.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdap/gui/DcaeGuiClientApiProvider.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerProvider.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiProvider.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server-gen/bin/controller-service-Cdap-manager-controller create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server-gen/bin/controller-service-cdap-adaptor-controller create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/adaptor.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/console.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/gui.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/log4j.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/makefile create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/pw.sh.sh create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/scripts/console.groovy create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/CdapManager.yaml create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/CdapService.yaml create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/GuiClientApi.yaml create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapFactory.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapService.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceClient.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceConsole.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceProviderTemplate.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceServer.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapService.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapServiceMessageEnum.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapServiceOperationEnum.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManager.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerClient.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerConsole.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerProviderTemplate.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerServer.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapmanagerFactory.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApi.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiClient.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiConsole.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiProviderTemplate.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeModelFactory.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApi.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApiMessageEnum.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApiOperationEnum.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManager.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManagerMessageEnum.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManagerOperationEnum.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/.gitignore create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/LICENSE.txt create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.classpath create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.gitignore create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.project create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.core.resources.prefs create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.jdt.groovy.core.prefs create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/LICENSE.txt create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/build.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/config/cdap.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/config/manager.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/pom.xml create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/assembly/assemble_zip.xml create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/Generator.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestManager.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestRemoteManager.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestServiceToManager.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProvider.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiProvider.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceProvider.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server-gen/bin/controller-service-cdap-cluster-manager-controller create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/cdap-cli.sh create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/manager.sh create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/console.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/gui.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/log4j.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/makefile create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/manager.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/pw.sh.sh create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/scripts/console.groovy create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/scripts/test.groovy create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterManager.yaml create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterService.yaml create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/GuiClientApi.yaml create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManager.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerClient.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerConsole.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProviderTemplate.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerServer.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeManagerFactory.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApi.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiClient.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiConsole.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeModelFactory.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApi.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiMessageEnum.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiOperationEnum.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManager.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerMessageEnum.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerOperationEnum.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterService.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceClient.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceConsole.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceProviderTemplate.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceServer.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeServiceFactory.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterService.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceMessageEnum.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceOperationEnum.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.classpath create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.gitignore create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.project create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/LICENSE.txt create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/build.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/plugin.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/plugin.xml create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/pom.xml create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/CdapClusterManager.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerFactory.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerPackage.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/CdapClusterManagerImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerFactoryImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerPackageImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerAdapterFactory.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerSwitch.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterConfiguration.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterService.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterServiceInstance.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServiceFactory.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServicePackage.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterConfigurationImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceInstanceImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServiceFactoryImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServicePackageImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceAdapterFactory.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceSwitch.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/manager.xcore create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/service.xcore create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/pom.xml create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/.classpath create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/.gitignore create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/.project create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/LICENSE.txt create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/build.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/plugin.properties create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/plugin.xml create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/pom.xml create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapApplication.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapArtifact.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapArtifacts.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapFactory.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapInternalApplicationConfiguration.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapPackage.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapService.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceDescriptor.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceInstance.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceInstanceConfiguration.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/ControllerServiceCdapAdaptor.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapApplicationImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapArtifactImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapFactoryImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapInternalApplicationConfigurationImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapPackageImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceDescriptorImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceInstanceConfigurationImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceInstanceImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/util/CdapAdapterFactory.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/util/CdapSwitch.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapManager.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapmanagerFactory.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapmanagerPackage.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/DockerManager.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapManagerImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapmanagerFactoryImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapmanagerPackageImpl.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/util/CdapmanagerAdapterFactory.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/util/CdapmanagerSwitch.java create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore/manager.xcore create mode 100644 dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore/service.xcore create mode 100644 dcae-controller-service-cdap/pom.xml create mode 100644 dcae-controller-service-docker/.gitignore create mode 100644 dcae-controller-service-docker/LICENSE.txt create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/.gitignore create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/LICENSE.txt create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.classpath create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.gitignore create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.project create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.core.resources.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.jdt.groovy.core.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.ltk.core.refactoring.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/LICENSE.txt create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/build.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/config/console.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/config/gui.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/config/manager.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/config/managers.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/pom.xml create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/assembly/assemble_zip.xml create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/java/org/openecomp/dcae/controller/service/common/docker/manager/tools/Generator.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/java/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerProvider.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/java/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApiProvider.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/java/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceProvider.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server-gen/bin/controller-service-common-docker-manager-controller create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server-gen/bin/controller-service-common-vm-manager-controller create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/bin/manager.sh create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/console.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/gui.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/log4j.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/makefile create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/manager.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/pw.sh.sh create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/scripts/console.groovy create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/CommonDockerManager.yaml create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/CommonDockerService.yaml create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/GuiClientApi.yaml create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManager.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerClient.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerConsole.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerProviderTemplate.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerServer.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeManagerFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApi.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApiClient.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApiConsole.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeModelFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/logging/GuiClientApi.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/logging/GuiClientApiMessageEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/logging/GuiClientApiOperationEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/logging/CommonDockerManager.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/logging/CommonDockerManagerMessageEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/logging/CommonDockerManagerOperationEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerService.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceClient.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceConsole.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceProviderTemplate.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceServer.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeServiceFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/logging/CommonDockerService.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/logging/CommonDockerServiceMessageEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/logging/CommonDockerServiceOperationEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.classpath create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.gitignore create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.project create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/LICENSE.txt create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/build.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/plugin.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/plugin.xml create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/pom.xml create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/CommonDockerManager.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/ManagerFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/ManagerPackage.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/impl/CommonDockerManagerImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/impl/ManagerFactoryImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/impl/ManagerPackageImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/util/ManagerAdapterFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/util/ManagerSwitch.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/CommonDockerService.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/CommonDockerServiceConfiguration.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/CommonDockerServiceInstance.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/ServiceFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/ServicePackage.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/TommyDockerServiceConfiguration.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/CommonDockerServiceConfigurationImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/CommonDockerServiceImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/CommonDockerServiceInstanceImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/ServiceFactoryImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/ServicePackageImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/TommyDockerServiceConfigurationImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/util/ServiceAdapterFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/util/ServiceSwitch.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore/manager.xcore create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore/service.xcore create mode 100644 dcae-controller-service-docker/dcae-controller-service-common-docker/pom.xml create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.classpath create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.gitignore create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.project create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.settings/org.eclipse.core.resources.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/LICENSE.txt create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/build.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/config/managers.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/pom.xml create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/assembly/assemble_zip.xml create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/docker/manager/tools/Generator.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/docker/manager/tools/TestServiceToManager.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceProvider.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerProvider.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApiProvider.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server-gen/bin/controller-service-docker-manager-controller create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/console.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/gui.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/log4j.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/makefile create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/manager.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/pw.sh.sh create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/scripts/console.groovy create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/DockerManager.yaml create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/DockerService.yaml create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/GuiClientApi.yaml create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerService.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceClient.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceConsole.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceProviderTemplate.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceServer.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/logging/DockerService.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/logging/DockerServiceMessageEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/logging/DockerServiceOperationEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManager.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerClient.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerConsole.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerProviderTemplate.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerServer.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockermanagerFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApi.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApiClient.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApiConsole.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApiProviderTemplate.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeModelFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/logging/GuiClientApi.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/logging/GuiClientApiMessageEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/logging/GuiClientApiOperationEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/logging/DockerManager.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/logging/DockerManagerMessageEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/logging/DockerManagerOperationEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/.gitignore create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/LICENSE.txt create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.classpath create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.gitignore create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.project create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.settings/org.eclipse.core.resources.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.settings/org.eclipse.jdt.groovy.core.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/LICENSE.txt create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/build.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/pom.xml create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/assembly/assemble_zip.xml create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/Generator.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/TestManager.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/TestManagerServer.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/TestRemoteManagerServer.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/TestServiceToManager.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerProvider.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerManagerProvider.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApiProvider.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceProvider.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerServiceProvider.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server-gen/bin/controller-service-docker-host-manager-controller create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/common.funcs create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/generate-certs.sh create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/get-ecomp-nexus-cert.sh create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/install-docker.sh create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/manager.sh create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/setup-container-config.sh create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/console.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/gui.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/log4j.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/makefile create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/manager.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/pw.sh.sh create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/scripts/console.groovy create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/DockerHostManager.yaml create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/DockerHostService.yaml create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/GuiClientApi.yaml create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManager.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerClient.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerConsole.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerProviderTemplate.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerServer.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeManagerFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApi.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApiClient.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApiConsole.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeModelFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/logging/GuiClientApi.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/logging/GuiClientApiMessageEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/logging/GuiClientApiOperationEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/logging/DockerHostManager.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/logging/DockerHostManagerMessageEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/logging/DockerHostManagerOperationEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostService.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceClient.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceConsole.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceProviderTemplate.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceServer.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeServiceFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/logging/DockerHostService.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/logging/DockerHostServiceMessageEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/logging/DockerHostServiceOperationEnum.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.classpath create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.gitignore create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.project create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/LICENSE.txt create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/build.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/plugin.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/plugin.xml create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/pom.xml create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/DockerHostManager.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/DockerManager.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/ManagerFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/ManagerPackage.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/impl/DockerHostManagerImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/impl/ManagerFactoryImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/impl/ManagerPackageImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/util/ManagerAdapterFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/util/ManagerSwitch.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerConfiguration.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerHostService.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerHostServiceInstance.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerService.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerServiceInstance.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/ServiceFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/ServicePackage.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/DockerConfigurationImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/DockerHostServiceImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/DockerHostServiceInstanceImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/ServiceFactoryImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/ServicePackageImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/util/ServiceAdapterFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/util/ServiceSwitch.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore/manager.xcore create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore/service.xcore create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-host/pom.xml create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/.classpath create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/.gitignore create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/.project create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/LICENSE.txt create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/build.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/plugin.properties create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/plugin.xml create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/pom.xml create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerConfiguration.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerPackage.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerService.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerServiceDescriptor.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerServiceInstance.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerConfigurationImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerFactoryImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerPackageImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerServiceDescriptorImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerServiceImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerServiceInstanceImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/util/DockerAdapterFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/util/DockerSwitch.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/DockerManager.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/DockermanagerFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/DockermanagerPackage.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/impl/DockerManagerImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/impl/DockermanagerFactoryImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/impl/DockermanagerPackageImpl.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/util/DockermanagerAdapterFactory.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/util/DockermanagerSwitch.java create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore/manager.xcore create mode 100644 dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore/service.xcore create mode 100644 dcae-controller-service-docker/pom.xml create mode 100644 dcae-controller-service-vm/.gitignore create mode 100644 dcae-controller-service-vm/LICENSE.txt create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/.gitignore create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/LICENSE.txt create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.classpath create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.gitignore create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.project create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.core.resources.prefs create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.jdt.groovy.core.prefs create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/LICENSE.txt create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/build.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/console.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/gui.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/manager.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/managers.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/pom.xml create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/assembly/assemble_zip.xml create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/Generator.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestManager.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestManagerServer.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestServiceToManager.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProvider.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiProvider.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProvider.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server-gen/bin/controller-service-common-vm-manager-controller create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/bin/manager.sh create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/console.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/gui.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/log4j.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/makefile create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/manager.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/pw.sh.sh create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/scripts/console.groovy create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmManager.yaml create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmService.yaml create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/GuiClientApi.yaml create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManager.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerClient.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerConsole.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProviderTemplate.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerServer.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeManagerFactory.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApi.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiClient.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiConsole.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeModelFactory.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApi.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiMessageEnum.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiOperationEnum.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManager.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerMessageEnum.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerOperationEnum.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmService.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceClient.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceConsole.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProviderTemplate.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceServer.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeServiceFactory.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmService.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceMessageEnum.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceOperationEnum.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.classpath create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.gitignore create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.project create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/LICENSE.txt create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/build.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/plugin.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/plugin.xml create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/pom.xml create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/CommonVmManager.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/ManagerFactory.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/ManagerPackage.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/CommonVmManagerImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/ManagerFactoryImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/ManagerPackageImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/util/ManagerAdapterFactory.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/util/ManagerSwitch.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmService.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmServiceConfiguration.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmServiceInstance.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/ServiceFactory.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/ServicePackage.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/TommyVmService.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/TommyVmServiceConfiguration.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceConfigurationImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceInstanceImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/ServiceFactoryImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/ServicePackageImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/TommyVmServiceConfigurationImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/util/ServiceAdapterFactory.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/util/ServiceSwitch.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore/manager.xcore create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore/service.xcore create mode 100644 dcae-controller-service-vm/dcae-controller-service-common-vm/pom.xml create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.classpath create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.gitignore create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.project create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.core.resources.prefs create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/LICENSE.txt create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/build.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/pom.xml create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/assembly/assemble_zip.xml create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/CLOUDINIT.userdata create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/HttpInstallationStep.userdata create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/MavenArtifactInstallationStep.userdata create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/ShellInstallationStep.userdata create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceProvider.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerProvider.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/vm/adaptor/tools/Generator.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/resources/DcaeController.yaml create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/server-gen/bin/controller-service-vm-adaptor-controller create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/ControllerVirtualMachineServiceInstance.yaml create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/VirtualMachineManager.yaml create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/VirtualMachineService.yaml create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineService.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceClient.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceConsole.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceProviderTemplate.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceServer.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVmFactory.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineService.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineServiceMessageEnum.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineServiceOperationEnum.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManager.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerClient.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerConsole.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerProviderTemplate.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerServer.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVmmanagerFactory.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManager.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManagerMessageEnum.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManagerOperationEnum.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/.classpath create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/.gitignore create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/.project create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/LICENSE.txt create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/build.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/plugin.properties create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/plugin.xml create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/pom.xml create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ControllerVirtualMachineService.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ControllerVirtualMachineServiceInstance.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/HttpInstallationStep.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/InstallationStep.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/MavenArtifactInstallationStep.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/PhysicalMachine.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ShellInstallationStep.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachine.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineService.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceConfiguration.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceDescriptor.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceInstance.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VmFactory.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VmPackage.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/HttpInstallationStepImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/InstallationStepImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/MavenArtifactInstallationStepImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/PhysicalMachineImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/ShellInstallationStepImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceConfigurationImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceDescriptorImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceInstanceImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VmFactoryImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VmPackageImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/util/VmAdapterFactory.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/util/VmSwitch.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VirtualMachineManager.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VmmanagerFactory.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VmmanagerPackage.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VirtualMachineManagerImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VmmanagerFactoryImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VmmanagerPackageImpl.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/util/VmmanagerAdapterFactory.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/util/VmmanagerSwitch.java create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore/manager.xcore create mode 100644 dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore/service.xcore create mode 100644 dcae-controller-service-vm/pom.xml create mode 100644 dcae-controller-service/.gitignore create mode 100644 dcae-controller-service/LICENSE.txt create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/.gitignore create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/LICENSE.txt create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.classpath create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.gitignore create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.project create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.settings/org.eclipse.core.resources.prefs create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.settings/org.eclipse.jdt.groovy.core.prefs create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/LICENSE.txt create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/build.properties create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/pom.xml create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/assembly/assemble_zip.xml create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/java/org/openecomp/dcae/controller/service/dmaap/drsub/manager/tools/Generator.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/java/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerProvider.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/java/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApiProvider.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/java/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceProvider.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server-gen/bin/controller-service-dmaap-drsub-manager-controller create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/bin/manager.sh create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/console.properties create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/gui.properties create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/log4j.properties create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/makefile create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/manager.properties create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/pw.sh.sh create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/scripts/console.groovy create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/ControllerServiceDmaapDrsubManager.yaml create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/ControllerServiceDmaapDrsubService.yaml create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/GuiClientApi.yaml create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManager.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerClient.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerConsole.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerProviderTemplate.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerServer.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeManagerFactory.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApi.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApiClient.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApiConsole.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeModelFactory.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/logging/GuiClientApi.properties create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/logging/GuiClientApiMessageEnum.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/logging/GuiClientApiOperationEnum.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/logging/ControllerServiceDmaapDrsubManager.properties create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/logging/ControllerServiceDmaapDrsubManagerMessageEnum.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/logging/ControllerServiceDmaapDrsubManagerOperationEnum.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubService.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceClient.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceConsole.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceProviderTemplate.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceServer.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeServiceFactory.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/logging/ControllerServiceDmaapDrsubService.properties create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/logging/ControllerServiceDmaapDrsubServiceMessageEnum.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/logging/ControllerServiceDmaapDrsubServiceOperationEnum.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.classpath create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.gitignore create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.project create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/LICENSE.txt create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/build.properties create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/plugin.properties create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/plugin.xml create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/pom.xml create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/ControllerServiceDmaapDrsubManager.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/ManagerFactory.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/ManagerPackage.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/impl/ControllerServiceDmaapDrsubManagerImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/impl/ManagerFactoryImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/impl/ManagerPackageImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/util/ManagerAdapterFactory.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/util/ManagerSwitch.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ContrailController.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ControllerServiceDmaapDrsubService.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ControllerServiceDmaapDrsubServiceConfiguration.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ControllerServiceDmaapDrsubServiceInstance.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ServiceFactory.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ServicePackage.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ControllerServiceDmaapDrsubServiceConfigurationImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ControllerServiceDmaapDrsubServiceImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ControllerServiceDmaapDrsubServiceInstanceImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ServiceFactoryImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ServicePackageImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/util/ServiceAdapterFactory.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/util/ServiceSwitch.java create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore/manager.xcore create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore/service.xcore create mode 100644 dcae-controller-service/dcae-controller-service-dmaap-drsub/pom.xml create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/.gitignore create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/LICENSE.txt create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.classpath create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.gitignore create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.project create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.settings/org.eclipse.core.resources.prefs create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.settings/org.eclipse.jdt.groovy.core.prefs create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/LICENSE.txt create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/build.properties create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/pom.xml create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/assembly/assemble_zip.xml create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/manager/tools/Generator.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerProvider.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApiProvider.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceProvider.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server-gen/bin/controller-service-standardeventcollector-manager-controller create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/bin/Cec_controller_update.sh create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/bin/Cec_controller_update.sh~ create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/console.properties create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/gui.properties create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/log4j.properties create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/makefile create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/manager.properties create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/pw.sh.sh create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/scripts/console.groovy create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/ControllerServiceStandardeventcollectorManager.yaml create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/ControllerServiceStandardeventcollectorService.yaml create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/GuiClientApi.yaml create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManager.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerClient.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerConsole.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerProviderTemplate.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerServer.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeManagerFactory.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApi.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApiClient.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApiConsole.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeModelFactory.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/logging/GuiClientApi.properties create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/logging/GuiClientApiMessageEnum.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/logging/GuiClientApiOperationEnum.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/logging/ControllerServiceStandardeventcollectorManager.properties create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/logging/ControllerServiceStandardeventcollectorManagerMessageEnum.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/logging/ControllerServiceStandardeventcollectorManagerOperationEnum.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorService.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceClient.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceConsole.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceProviderTemplate.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceServer.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeServiceFactory.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/logging/ControllerServiceStandardeventcollectorService.properties create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/logging/ControllerServiceStandardeventcollectorServiceMessageEnum.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/logging/ControllerServiceStandardeventcollectorServiceOperationEnum.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.classpath create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.gitignore create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.project create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/LICENSE.txt create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/build.properties create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/plugin.properties create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/plugin.xml create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/pom.xml create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/ControllerServiceStandardeventcollectorManager.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/ManagerFactory.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/ManagerPackage.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/impl/ControllerServiceStandardeventcollectorManagerImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/impl/ManagerFactoryImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/impl/ManagerPackageImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/util/ManagerAdapterFactory.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/util/ManagerSwitch.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ControllerServiceStandardeventcollectorService.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ControllerServiceStandardeventcollectorServiceConfiguration.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ControllerServiceStandardeventcollectorServiceInstance.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ServiceFactory.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ServicePackage.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceConfigurationImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceInstanceImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ServiceFactoryImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ServicePackageImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/util/ServiceAdapterFactory.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/util/ServiceSwitch.java create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore/manager.xcore create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore/service.xcore create mode 100644 dcae-controller-service/dcae-controller-service-standardeventcollector/pom.xml create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/.classpath create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/.gitignore create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/.project create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/.settings/org.eclipse.jdt.core.prefs create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/.settings/org.eclipse.m2e.core.prefs create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/LICENSE.txt create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/META-INF/MANIFEST.MF create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/build.properties create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/plugin.properties create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/plugin.xml create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/pom.xml create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/Contact.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ContrailController.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ControllerServiceStoragePostgresService.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ControllerServiceStoragePostgresServiceConfiguration.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ControllerServiceStoragePostgresServiceInstance.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/Database.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/PostgresServiceConfiguration.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/Role.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ServiceFactory.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ServicePackage.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/ContactImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/DatabaseImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/PostgresServiceConfigurationImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/RoleImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/ServiceFactoryImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/ServicePackageImpl.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/util/ServiceAdapterFactory.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/util/ServiceSwitch.java create mode 100644 dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore/service.xcore create mode 100644 dcae-controller-service/pom.xml create mode 100644 deptree.text create mode 100644 pom-complete-build.xml create mode 100644 pom.xml create mode 100644 pom.xml.versionsBackup diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..7f4d05c --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=gerrit.openecomp.org +port=29418 +project=dcae/controller.git diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/README.md b/README.md new file mode 100644 index 0000000..aa03559 --- /dev/null +++ b/README.md @@ -0,0 +1,132 @@ + +Contains the Code related to the DCAE Controller. + +This project hosts the build the Open eCOMP DCAE Controller. + +# Code repositories + +The DCAE controller code is a little more complex than most Maven setups, since the code is located in multiple GIT repositories. This is the list of repositories that need to be cloned into the same local directory (e.g., GITROOT): + + dcae-org.openecomp.dcae.analytics + dcae-org.openecomp.dcae.configuration + dcae-org.openecomp.dcae.controller + dcae-org.openecomp.dcae.controller.operation + dcae-org.openecomp.ncomp.cdap + dcae-org.openecomp.ncomp.core + dcae-org.openecomp.ncomp.docker + dcae-org.openecomp.ncomp.maven + dcae-org.openecomp.ncomp.openstack + dcae-org.openecomp.ncomp.sirius.manager + dcae-org.openecomp.ncomp.utils + dcae-org.openecomp.operation.utils + +# Build Environmental setup + +The file `dcae-org.openecomp.dcae.controller/dcae-controller-opensource/src/main/resources/settings.xml` contains the Maven Setting that is required. + +# Build Complete Controller + + cd GITROOT + cp dcae-org.openecomp.dcae.controller/pom-complete-build.xml pom.xml + mvn clean install + + +# Build Environment Setup + +TBD + +Maven repositories: TDB + +Maven property values: + +1. openecomp.nexus.user. Nexus user id. +2. openecomp.nexus.password. Nexus password. +3. maven.wagon.http.ssl.insecure. Allow insecure HTTPS connection. E.g., true +4. maven.wagon.http.ssl.allowall. Allow insecure HTTPS connection. E.g., true +5. site.urlroot. Location to store Maven site:deploy files. E.g., file:$HOME/site +6. openecomp.nexus.snapshots. Repository to upload SNAPSHOT builds to. +7. openecomp.nexus.releases. Repository to upload release builds to. + + +# Complete DCAE Controller Build instructions + + +# Build instructions + +1. Clone the repository +2. Build using Maven: mvn clean install + +# Build and Deploy DCAE Controller Docker Image to Nexus/Maven Repository + + cd GITROOT/dcae-org.openecomp.dcae.controller/dcae-controller-opensource/src/main/docker-build + bash build.sh + bash push.sh DOCKERREGISTRY USER PASSWORD + +# Development Environment Instructions + +DCAE controller developement need a very specific development environment. + +1. Eclipse Luna with Eclipse Modeling Tools. Download http://www.eclipse.org/downloads/packages/eclipse-modeling-tools/lunasr2 +2. Xtext 2.7.3 Plugin +3. Groovy-Eclipse Feature 2.9.2 +4. XCore 1.2.2 Plugin + + +# Overview of DCAE Controller components + +## Core DCAE Controller Platform +### dcae-controller +### dcae-controller-core-model +### dcae-controller-core-utils +### dcae-controller-opensource +### dcae-controller-platform-model +### dcae-controller-platform-server +### dcae-controller-service-vm-adaptor +### dcae-controller-service-vm-model + +## DCAE Controller VM Common Manager + +### dcae-controller-service-common-vm +### dcae-controller-service-common-vm-manager +### dcae-controller-service-common-vm-model + +## DCAE Controller CDAP Sub System + +### dcae-controller-service-cdap +### dcae-controller-service-cdap-adaptor +### dcae-controller-service-cdap-cluster +### dcae-controller-service-cdap-cluster-manager +### dcae-controller-service-cdap-cluster-model +### dcae-controller-service-cdap-model + +## DCAE Controller Docker Sub System + +### dcae-controller-service-docker +### dcae-controller-service-docker-adaptor +### dcae-controller-service-docker-model +### dcae-controller-service-docker-host +### dcae-controller-service-docker-host-manager +### dcae-controller-service-docker-host-model + +## DCAE Controller Docker Common Manager + +### dcae-controller-service-common-docker +### dcae-controller-service-common-docker-manager +### dcae-controller-service-common-docker-model + +## VES collector Manager + +### dcae-controller-service-standardeventcollector +### dcae-controller-service-standardeventcollector-manager +### dcae-controller-service-standardeventcollector-model + +## POSTGRES service Model + +### dcae-controller-service-storage-postgres-model + +## DMAAP Data Router Manager + +### dcae-controller-service-dmaap-drsub +### dcae-controller-service-dmaap-drsub-manager +### dcae-controller-service-dmaap-drsub-model + diff --git a/dcae-controller-core/.gitignore b/dcae-controller-core/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-core/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-core/LICENSE.txt b/dcae-controller-core/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-core/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-core/dcae-controller-core-model/.classpath b/dcae-controller-core/dcae-controller-core-model/.classpath new file mode 100644 index 0000000..17b1da0 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/.classpath @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/dcae-controller-core/dcae-controller-core-model/.gitignore b/dcae-controller-core/dcae-controller-core-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/dcae-controller-core/dcae-controller-core-model/.project b/dcae-controller-core/dcae-controller-core-model/.project new file mode 100644 index 0000000..8e3ca28 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/.project @@ -0,0 +1,34 @@ + + + dcae-controller-core-model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dcae-controller-core/dcae-controller-core-model/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-core/dcae-controller-core-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..45a6e0e --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/dcae-controller-core/dcae-controller-core-model/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-core/dcae-controller-core-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-core/dcae-controller-core-model/LICENSE.txt b/dcae-controller-core/dcae-controller-core-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-core/dcae-controller-core-model/META-INF/MANIFEST.MF b/dcae-controller-core/dcae-controller-core-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..97afb49 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/META-INF/MANIFEST.MF @@ -0,0 +1,36 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: dcae-controller-core-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Export-Package: org.openecomp.dcae.controller.core.server, + org.openecomp.dcae.controller.core.server.impl, + org.openecomp.dcae.controller.core.server.util, + org.openecomp.dcae.controller.core.hypervisor, + org.openecomp.dcae.controller.core.hypervisor.impl, + org.openecomp.dcae.controller.core.hypervisor.util, + org.openecomp.dcae.controller.core.service, + org.openecomp.dcae.controller.core.service.impl, + org.openecomp.dcae.controller.core.service.util, + org.openecomp.dcae.controller.core.stream, + org.openecomp.dcae.controller.core.stream.impl, + org.openecomp.dcae.controller.core.stream.util, + org.openecomp.dcae.controller.core.manager, + org.openecomp.dcae.controller.core.manager.impl, + org.openecomp.dcae.controller.core.manager.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + dcae-controller-core-model;visibility:=reexport, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + ncomp-openstack-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-agent-model;bundle-version="0.1.0";visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dcae-controller-core/dcae-controller-core-model/build.properties b/dcae-controller-core/dcae-controller-core-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/build.properties @@ -0,0 +1,11 @@ +# + +bin.includes = .,\ + src/main/xcore/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/xcore-gen/,\ + src/main/xcore/ +output.. = target/classes/ diff --git a/dcae-controller-core/dcae-controller-core-model/plugin.properties b/dcae-controller-core/dcae-controller-core-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/dcae-controller-core/dcae-controller-core-model/plugin.xml b/dcae-controller-core/dcae-controller-core-model/plugin.xml new file mode 100644 index 0000000..6b4da95 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/plugin.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-core/dcae-controller-core-model/pom.xml b/dcae-controller-core/dcae-controller-core-model/pom.xml new file mode 100644 index 0000000..024ba7b --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/pom.xml @@ -0,0 +1,28 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-core-model + + org.openecomp.ncomp.maven + ncomp-maven-xcore + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore + + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + ${project.version} + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-agent-model + ${project.version} + + + org.openecomp.ncomp.openstack + ncomp-openstack-model + ${project.version} + + + diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/Hypervisor.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/Hypervisor.java new file mode 100644 index 0000000..7185bdd --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/Hypervisor.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.hypervisor; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Hypervisor'. + * + * + * + * @see org.openecomp.dcae.controller.core.hypervisor.HypervisorPackage#getHypervisor() + * @model + * @generated + */ +public interface Hypervisor extends NamedEntity { +} // Hypervisor diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/HypervisorFactory.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/HypervisorFactory.java new file mode 100644 index 0000000..2d3cee1 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/HypervisorFactory.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.hypervisor; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.core.hypervisor.HypervisorPackage + * @generated + */ +public interface HypervisorFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + HypervisorFactory eINSTANCE = org.openecomp.dcae.controller.core.hypervisor.impl.HypervisorFactoryImpl.init(); + + /** + * Returns a new object of class 'Hypervisor'. + * + * + * @return a new object of class 'Hypervisor'. + * @generated + */ + Hypervisor createHypervisor(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + HypervisorPackage getHypervisorPackage(); + +} //HypervisorFactory diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/HypervisorPackage.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/HypervisorPackage.java new file mode 100644 index 0000000..ffb9939 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/HypervisorPackage.java @@ -0,0 +1,191 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.hypervisor; + +import org.openecomp.ncomp.core.CorePackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + * + * + * @see org.openecomp.dcae.controller.core.hypervisor.HypervisorFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-core-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.core'" + * @generated + */ +public interface HypervisorPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "hypervisor"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.core.hypervisor"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "hypervisor"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + HypervisorPackage eINSTANCE = org.openecomp.dcae.controller.core.hypervisor.impl.HypervisorPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.hypervisor.impl.HypervisorImpl Hypervisor}' class. + * + * + * @see org.openecomp.dcae.controller.core.hypervisor.impl.HypervisorImpl + * @see org.openecomp.dcae.controller.core.hypervisor.impl.HypervisorPackageImpl#getHypervisor() + * @generated + */ + int HYPERVISOR = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int HYPERVISOR__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int HYPERVISOR__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int HYPERVISOR__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int HYPERVISOR__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The number of structural features of the 'Hypervisor' class. + * + * + * @generated + * @ordered + */ + int HYPERVISOR_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Hypervisor' class. + * + * + * @generated + * @ordered + */ + int HYPERVISOR_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.hypervisor.Hypervisor Hypervisor}'. + * + * + * @return the meta object for class 'Hypervisor'. + * @see org.openecomp.dcae.controller.core.hypervisor.Hypervisor + * @generated + */ + EClass getHypervisor(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + HypervisorFactory getHypervisorFactory(); + + /** + * + * Defines literals for the meta objects that represent + * + * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.hypervisor.impl.HypervisorImpl Hypervisor}' class. + * + * + * @see org.openecomp.dcae.controller.core.hypervisor.impl.HypervisorImpl + * @see org.openecomp.dcae.controller.core.hypervisor.impl.HypervisorPackageImpl#getHypervisor() + * @generated + */ + EClass HYPERVISOR = eINSTANCE.getHypervisor(); + + } + +} //HypervisorPackage diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/impl/HypervisorFactoryImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/impl/HypervisorFactoryImpl.java new file mode 100644 index 0000000..b99acb4 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/impl/HypervisorFactoryImpl.java @@ -0,0 +1,116 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.hypervisor.impl; + +import org.openecomp.dcae.controller.core.hypervisor.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class HypervisorFactoryImpl extends EFactoryImpl implements HypervisorFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static HypervisorFactory init() { + try { + HypervisorFactory theHypervisorFactory = (HypervisorFactory)EPackage.Registry.INSTANCE.getEFactory(HypervisorPackage.eNS_URI); + if (theHypervisorFactory != null) { + return theHypervisorFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new HypervisorFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public HypervisorFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case HypervisorPackage.HYPERVISOR: return createHypervisor(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public Hypervisor createHypervisor() { + HypervisorImpl hypervisor = new HypervisorImpl(); + return hypervisor; + } + + /** + * + * + * @generated + */ + public HypervisorPackage getHypervisorPackage() { + return (HypervisorPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static HypervisorPackage getPackage() { + return HypervisorPackage.eINSTANCE; + } + +} //HypervisorFactoryImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/impl/HypervisorImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/impl/HypervisorImpl.java new file mode 100644 index 0000000..eb1716b --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/impl/HypervisorImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.hypervisor.impl; + +import org.openecomp.dcae.controller.core.hypervisor.Hypervisor; +import org.openecomp.dcae.controller.core.hypervisor.HypervisorPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Hypervisor'. + * + *

+ *

+ * + * @generated + */ +public class HypervisorImpl extends NamedEntityImpl implements Hypervisor { + /** + * + * + * @generated + */ + protected HypervisorImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return HypervisorPackage.Literals.HYPERVISOR; + } + +} //HypervisorImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/impl/HypervisorPackageImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/impl/HypervisorPackageImpl.java new file mode 100644 index 0000000..6dc6967 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/impl/HypervisorPackageImpl.java @@ -0,0 +1,195 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.hypervisor.impl; + +import org.openecomp.dcae.controller.core.hypervisor.Hypervisor; +import org.openecomp.dcae.controller.core.hypervisor.HypervisorFactory; +import org.openecomp.dcae.controller.core.hypervisor.HypervisorPackage; + +import org.openecomp.ncomp.core.CorePackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class HypervisorPackageImpl extends EPackageImpl implements HypervisorPackage { + /** + * + * + * @generated + */ + private EClass hypervisorEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.core.hypervisor.HypervisorPackage#eNS_URI + * @see #init() + * @generated + */ + private HypervisorPackageImpl() { + super(eNS_URI, HypervisorFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link HypervisorPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static HypervisorPackage init() { + if (isInited) return (HypervisorPackage)EPackage.Registry.INSTANCE.getEPackage(HypervisorPackage.eNS_URI); + + // Obtain or create and register package + HypervisorPackageImpl theHypervisorPackage = (HypervisorPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof HypervisorPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new HypervisorPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + CorePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theHypervisorPackage.createPackageContents(); + + // Initialize created meta-data + theHypervisorPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theHypervisorPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(HypervisorPackage.eNS_URI, theHypervisorPackage); + return theHypervisorPackage; + } + + /** + * + * + * @generated + */ + public EClass getHypervisor() { + return hypervisorEClass; + } + + /** + * + * + * @generated + */ + public HypervisorFactory getHypervisorFactory() { + return (HypervisorFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + hypervisorEClass = createEClass(HYPERVISOR); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + hypervisorEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + + // Initialize classes, features, and operations; add parameters + initEClass(hypervisorEClass, Hypervisor.class, "Hypervisor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //HypervisorPackageImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/util/HypervisorAdapterFactory.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/util/HypervisorAdapterFactory.java new file mode 100644 index 0000000..a7d175f --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/util/HypervisorAdapterFactory.java @@ -0,0 +1,161 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.hypervisor.util; + +import org.openecomp.dcae.controller.core.hypervisor.*; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.core.hypervisor.HypervisorPackage + * @generated + */ +public class HypervisorAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static HypervisorPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public HypervisorAdapterFactory() { + if (modelPackage == null) { + modelPackage = HypervisorPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected HypervisorSwitch modelSwitch = + new HypervisorSwitch() { + @Override + public Adapter caseHypervisor(Hypervisor object) { + return createHypervisorAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.hypervisor.Hypervisor Hypervisor}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.hypervisor.Hypervisor + * @generated + */ + public Adapter createHypervisorAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //HypervisorAdapterFactory diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/util/HypervisorSwitch.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/util/HypervisorSwitch.java new file mode 100644 index 0000000..990ad99 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/hypervisor/util/HypervisorSwitch.java @@ -0,0 +1,149 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.hypervisor.util; + +import org.openecomp.dcae.controller.core.hypervisor.*; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.core.hypervisor.HypervisorPackage + * @generated + */ +public class HypervisorSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static HypervisorPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public HypervisorSwitch() { + if (modelPackage == null) { + modelPackage = HypervisorPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case HypervisorPackage.HYPERVISOR: { + Hypervisor hypervisor = (Hypervisor)theEObject; + T result = caseHypervisor(hypervisor); + if (result == null) result = caseNamedEntity(hypervisor); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Hypervisor'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Hypervisor'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseHypervisor(Hypervisor object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //HypervisorSwitch diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/DcaeManager.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/DcaeManager.java new file mode 100644 index 0000000..a1f6c81 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/DcaeManager.java @@ -0,0 +1,131 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.manager; + +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.stream.DcaeStream; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Dcae Manager'. + * + * + *

+ * The following features are supported: + *

+ *

+ * + * @see org.openecomp.dcae.controller.core.manager.ManagerPackage#getDcaeManager() + * @model abstract="true" + * @generated + */ +public interface DcaeManager extends EObject { + /** + * Returns the value of the 'Input Streams' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.stream.DcaeStream}. + * + *

+ * If the meaning of the 'Input Streams' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Input Streams' containment reference list. + * @see org.openecomp.dcae.controller.core.manager.ManagerPackage#getDcaeManager_InputStreams() + * @model containment="true" + * @generated + */ + EList getInputStreams(); + + /** + * Returns the value of the 'Output Streams' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.stream.DcaeStream}. + * + *

+ * If the meaning of the 'Output Streams' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Output Streams' containment reference list. + * @see org.openecomp.dcae.controller.core.manager.ManagerPackage#getDcaeManager_OutputStreams() + * @model containment="true" + * @generated + */ + EList getOutputStreams(); + + /** + * + * + * @model unique="false" + * @generated + */ + HealthTestResponse test(); + + /** + * + * + * @model + * @generated + */ + void suspend(); + + /** + * + * + * @model + * @generated + */ + void resume(); + + /** + * + * + * @model unique="false" + * @generated + */ + String publicKey(); + + /** + * + * + * @model + * @generated + */ + void configurationChanged(); + + /** + * + * + * @model inputStreamsUnique="false" inputStreamsMany="true" outputStreamsUnique="false" outputStreamsMany="true" + * @generated + */ + void updateStreams(EList inputStreams, EList outputStreams); + +} // DcaeManager diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/ManagerFactory.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/ManagerFactory.java new file mode 100644 index 0000000..346e923 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/ManagerFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.manager; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.core.manager.ManagerPackage + * @generated + */ +public interface ManagerFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ManagerFactory eINSTANCE = org.openecomp.dcae.controller.core.manager.impl.ManagerFactoryImpl.init(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ManagerPackage getManagerPackage(); + +} //ManagerFactory diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/ManagerPackage.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/ManagerPackage.java new file mode 100644 index 0000000..46a5821 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/ManagerPackage.java @@ -0,0 +1,374 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.manager; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.core.manager.ManagerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-core-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.core'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org'" + * @generated + */ +public interface ManagerPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "manager"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.core.manager"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "manager"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ManagerPackage eINSTANCE = org.openecomp.dcae.controller.core.manager.impl.ManagerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.manager.impl.DcaeManagerImpl Dcae Manager}' class. + * + * + * @see org.openecomp.dcae.controller.core.manager.impl.DcaeManagerImpl + * @see org.openecomp.dcae.controller.core.manager.impl.ManagerPackageImpl#getDcaeManager() + * @generated + */ + int DCAE_MANAGER = 0; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_MANAGER__INPUT_STREAMS = 0; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_MANAGER__OUTPUT_STREAMS = 1; + + /** + * The number of structural features of the 'Dcae Manager' class. + * + * + * @generated + * @ordered + */ + int DCAE_MANAGER_FEATURE_COUNT = 2; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int DCAE_MANAGER___TEST = 0; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int DCAE_MANAGER___SUSPEND = 1; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int DCAE_MANAGER___RESUME = 2; + + /** + * The operation id for the 'Public Key' operation. + * + * + * @generated + * @ordered + */ + int DCAE_MANAGER___PUBLIC_KEY = 3; + + /** + * The operation id for the 'Configuration Changed' operation. + * + * + * @generated + * @ordered + */ + int DCAE_MANAGER___CONFIGURATION_CHANGED = 4; + + /** + * The operation id for the 'Update Streams' operation. + * + * + * @generated + * @ordered + */ + int DCAE_MANAGER___UPDATE_STREAMS__ELIST_ELIST = 5; + + /** + * The number of operations of the 'Dcae Manager' class. + * + * + * @generated + * @ordered + */ + int DCAE_MANAGER_OPERATION_COUNT = 6; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.manager.DcaeManager Dcae Manager}'. + * + * + * @return the meta object for class 'Dcae Manager'. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager + * @generated + */ + EClass getDcaeManager(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.core.manager.DcaeManager#getInputStreams Input Streams}'. + * + * + * @return the meta object for the containment reference list 'Input Streams'. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager#getInputStreams() + * @see #getDcaeManager() + * @generated + */ + EReference getDcaeManager_InputStreams(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.core.manager.DcaeManager#getOutputStreams Output Streams}'. + * + * + * @return the meta object for the containment reference list 'Output Streams'. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager#getOutputStreams() + * @see #getDcaeManager() + * @generated + */ + EReference getDcaeManager_OutputStreams(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.manager.DcaeManager#test() Test}' operation. + * + * + * @return the meta object for the 'Test' operation. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager#test() + * @generated + */ + EOperation getDcaeManager__Test(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.manager.DcaeManager#suspend() Suspend}' operation. + * + * + * @return the meta object for the 'Suspend' operation. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager#suspend() + * @generated + */ + EOperation getDcaeManager__Suspend(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.manager.DcaeManager#resume() Resume}' operation. + * + * + * @return the meta object for the 'Resume' operation. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager#resume() + * @generated + */ + EOperation getDcaeManager__Resume(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.manager.DcaeManager#publicKey() Public Key}' operation. + * + * + * @return the meta object for the 'Public Key' operation. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager#publicKey() + * @generated + */ + EOperation getDcaeManager__PublicKey(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.manager.DcaeManager#configurationChanged() Configuration Changed}' operation. + * + * + * @return the meta object for the 'Configuration Changed' operation. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager#configurationChanged() + * @generated + */ + EOperation getDcaeManager__ConfigurationChanged(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.manager.DcaeManager#updateStreams(org.eclipse.emf.common.util.EList, org.eclipse.emf.common.util.EList) Update Streams}' operation. + * + * + * @return the meta object for the 'Update Streams' operation. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager#updateStreams(org.eclipse.emf.common.util.EList, org.eclipse.emf.common.util.EList) + * @generated + */ + EOperation getDcaeManager__UpdateStreams__EList_EList(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ManagerFactory getManagerFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.manager.impl.DcaeManagerImpl Dcae Manager}' class. + * + * + * @see org.openecomp.dcae.controller.core.manager.impl.DcaeManagerImpl + * @see org.openecomp.dcae.controller.core.manager.impl.ManagerPackageImpl#getDcaeManager() + * @generated + */ + EClass DCAE_MANAGER = eINSTANCE.getDcaeManager(); + + /** + * The meta object literal for the 'Input Streams' containment reference list feature. + * + * + * @generated + */ + EReference DCAE_MANAGER__INPUT_STREAMS = eINSTANCE.getDcaeManager_InputStreams(); + + /** + * The meta object literal for the 'Output Streams' containment reference list feature. + * + * + * @generated + */ + EReference DCAE_MANAGER__OUTPUT_STREAMS = eINSTANCE.getDcaeManager_OutputStreams(); + + /** + * The meta object literal for the 'Test' operation. + * + * + * @generated + */ + EOperation DCAE_MANAGER___TEST = eINSTANCE.getDcaeManager__Test(); + + /** + * The meta object literal for the 'Suspend' operation. + * + * + * @generated + */ + EOperation DCAE_MANAGER___SUSPEND = eINSTANCE.getDcaeManager__Suspend(); + + /** + * The meta object literal for the 'Resume' operation. + * + * + * @generated + */ + EOperation DCAE_MANAGER___RESUME = eINSTANCE.getDcaeManager__Resume(); + + /** + * The meta object literal for the 'Public Key' operation. + * + * + * @generated + */ + EOperation DCAE_MANAGER___PUBLIC_KEY = eINSTANCE.getDcaeManager__PublicKey(); + + /** + * The meta object literal for the 'Configuration Changed' operation. + * + * + * @generated + */ + EOperation DCAE_MANAGER___CONFIGURATION_CHANGED = eINSTANCE.getDcaeManager__ConfigurationChanged(); + + /** + * The meta object literal for the 'Update Streams' operation. + * + * + * @generated + */ + EOperation DCAE_MANAGER___UPDATE_STREAMS__ELIST_ELIST = eINSTANCE.getDcaeManager__UpdateStreams__EList_EList(); + + } + +} //ManagerPackage diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/impl/DcaeManagerImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/impl/DcaeManagerImpl.java new file mode 100644 index 0000000..1ed926b --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/impl/DcaeManagerImpl.java @@ -0,0 +1,308 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.manager.impl; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; +import org.openecomp.dcae.controller.core.manager.ManagerPackage; + +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.stream.DcaeStream; + +import java.lang.reflect.InvocationTargetException; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Dcae Manager'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.manager.impl.DcaeManagerImpl#getInputStreams Input Streams}
  • + *
  • {@link org.openecomp.dcae.controller.core.manager.impl.DcaeManagerImpl#getOutputStreams Output Streams}
  • + *
+ *

+ * + * @generated + */ +public abstract class DcaeManagerImpl extends MinimalEObjectImpl.Container implements DcaeManager { + /** + * The cached value of the '{@link #getInputStreams() Input Streams}' containment reference list. + * + * + * @see #getInputStreams() + * @generated + * @ordered + */ + protected EList inputStreams; + + /** + * The cached value of the '{@link #getOutputStreams() Output Streams}' containment reference list. + * + * + * @see #getOutputStreams() + * @generated + * @ordered + */ + protected EList outputStreams; + + /** + * + * + * @generated + */ + protected DcaeManagerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ManagerPackage.Literals.DCAE_MANAGER; + } + + /** + * + * + * @generated + */ + public EList getInputStreams() { + if (inputStreams == null) { + inputStreams = new EObjectContainmentEList(DcaeStream.class, this, ManagerPackage.DCAE_MANAGER__INPUT_STREAMS); + } + return inputStreams; + } + + /** + * + * + * @generated + */ + public EList getOutputStreams() { + if (outputStreams == null) { + outputStreams = new EObjectContainmentEList(DcaeStream.class, this, ManagerPackage.DCAE_MANAGER__OUTPUT_STREAMS); + } + return outputStreams; + } + + /** + * + * + * @generated + */ + public HealthTestResponse test() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void suspend() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void resume() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String publicKey() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void configurationChanged() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void updateStreams(EList inputStreams, EList outputStreams) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ManagerPackage.DCAE_MANAGER__INPUT_STREAMS: + return ((InternalEList)getInputStreams()).basicRemove(otherEnd, msgs); + case ManagerPackage.DCAE_MANAGER__OUTPUT_STREAMS: + return ((InternalEList)getOutputStreams()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ManagerPackage.DCAE_MANAGER__INPUT_STREAMS: + return getInputStreams(); + case ManagerPackage.DCAE_MANAGER__OUTPUT_STREAMS: + return getOutputStreams(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ManagerPackage.DCAE_MANAGER__INPUT_STREAMS: + getInputStreams().clear(); + getInputStreams().addAll((Collection)newValue); + return; + case ManagerPackage.DCAE_MANAGER__OUTPUT_STREAMS: + getOutputStreams().clear(); + getOutputStreams().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ManagerPackage.DCAE_MANAGER__INPUT_STREAMS: + getInputStreams().clear(); + return; + case ManagerPackage.DCAE_MANAGER__OUTPUT_STREAMS: + getOutputStreams().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ManagerPackage.DCAE_MANAGER__INPUT_STREAMS: + return inputStreams != null && !inputStreams.isEmpty(); + case ManagerPackage.DCAE_MANAGER__OUTPUT_STREAMS: + return outputStreams != null && !outputStreams.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + @SuppressWarnings("unchecked") + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ManagerPackage.DCAE_MANAGER___TEST: + return test(); + case ManagerPackage.DCAE_MANAGER___SUSPEND: + suspend(); + return null; + case ManagerPackage.DCAE_MANAGER___RESUME: + resume(); + return null; + case ManagerPackage.DCAE_MANAGER___PUBLIC_KEY: + return publicKey(); + case ManagerPackage.DCAE_MANAGER___CONFIGURATION_CHANGED: + configurationChanged(); + return null; + case ManagerPackage.DCAE_MANAGER___UPDATE_STREAMS__ELIST_ELIST: + updateStreams((EList)arguments.get(0), (EList)arguments.get(1)); + return null; + } + return super.eInvoke(operationID, arguments); + } + +} //DcaeManagerImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/impl/ManagerFactoryImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/impl/ManagerFactoryImpl.java new file mode 100644 index 0000000..f9aaeaf --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/impl/ManagerFactoryImpl.java @@ -0,0 +1,105 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.manager.impl; + +import org.openecomp.dcae.controller.core.manager.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ManagerFactoryImpl extends EFactoryImpl implements ManagerFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ManagerFactory init() { + try { + ManagerFactory theManagerFactory = (ManagerFactory)EPackage.Registry.INSTANCE.getEFactory(ManagerPackage.eNS_URI); + if (theManagerFactory != null) { + return theManagerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ManagerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ManagerFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public ManagerPackage getManagerPackage() { + return (ManagerPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ManagerPackage getPackage() { + return ManagerPackage.eINSTANCE; + } + +} //ManagerFactoryImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/impl/ManagerPackageImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/impl/ManagerPackageImpl.java new file mode 100644 index 0000000..c2bc26b --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/impl/ManagerPackageImpl.java @@ -0,0 +1,316 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.manager.impl; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; +import org.openecomp.dcae.controller.core.manager.ManagerFactory; +import org.openecomp.dcae.controller.core.manager.ManagerPackage; + +import org.openecomp.dcae.controller.core.service.ServicePackage; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ManagerPackageImpl extends EPackageImpl implements ManagerPackage { + /** + * + * + * @generated + */ + private EClass dcaeManagerEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.core.manager.ManagerPackage#eNS_URI + * @see #init() + * @generated + */ + private ManagerPackageImpl() { + super(eNS_URI, ManagerFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ManagerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ManagerPackage init() { + if (isInited) return (ManagerPackage)EPackage.Registry.INSTANCE.getEPackage(ManagerPackage.eNS_URI); + + // Obtain or create and register package + ManagerPackageImpl theManagerPackage = (ManagerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ManagerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ManagerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + ServicePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theManagerPackage.createPackageContents(); + + // Initialize created meta-data + theManagerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theManagerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ManagerPackage.eNS_URI, theManagerPackage); + return theManagerPackage; + } + + /** + * + * + * @generated + */ + public EClass getDcaeManager() { + return dcaeManagerEClass; + } + + /** + * + * + * @generated + */ + public EReference getDcaeManager_InputStreams() { + return (EReference)dcaeManagerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getDcaeManager_OutputStreams() { + return (EReference)dcaeManagerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EOperation getDcaeManager__Test() { + return dcaeManagerEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EOperation getDcaeManager__Suspend() { + return dcaeManagerEClass.getEOperations().get(1); + } + + /** + * + * + * @generated + */ + public EOperation getDcaeManager__Resume() { + return dcaeManagerEClass.getEOperations().get(2); + } + + /** + * + * + * @generated + */ + public EOperation getDcaeManager__PublicKey() { + return dcaeManagerEClass.getEOperations().get(3); + } + + /** + * + * + * @generated + */ + public EOperation getDcaeManager__ConfigurationChanged() { + return dcaeManagerEClass.getEOperations().get(4); + } + + /** + * + * + * @generated + */ + public EOperation getDcaeManager__UpdateStreams__EList_EList() { + return dcaeManagerEClass.getEOperations().get(5); + } + + /** + * + * + * @generated + */ + public ManagerFactory getManagerFactory() { + return (ManagerFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + dcaeManagerEClass = createEClass(DCAE_MANAGER); + createEReference(dcaeManagerEClass, DCAE_MANAGER__INPUT_STREAMS); + createEReference(dcaeManagerEClass, DCAE_MANAGER__OUTPUT_STREAMS); + createEOperation(dcaeManagerEClass, DCAE_MANAGER___TEST); + createEOperation(dcaeManagerEClass, DCAE_MANAGER___SUSPEND); + createEOperation(dcaeManagerEClass, DCAE_MANAGER___RESUME); + createEOperation(dcaeManagerEClass, DCAE_MANAGER___PUBLIC_KEY); + createEOperation(dcaeManagerEClass, DCAE_MANAGER___CONFIGURATION_CHANGED); + createEOperation(dcaeManagerEClass, DCAE_MANAGER___UPDATE_STREAMS__ELIST_ELIST); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + StreamPackage theStreamPackage = (StreamPackage)EPackage.Registry.INSTANCE.getEPackage(StreamPackage.eNS_URI); + ServicePackage theServicePackage = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + + // Initialize classes, features, and operations; add parameters + initEClass(dcaeManagerEClass, DcaeManager.class, "DcaeManager", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDcaeManager_InputStreams(), theStreamPackage.getDcaeStream(), null, "inputStreams", null, 0, -1, DcaeManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDcaeManager_OutputStreams(), theStreamPackage.getDcaeStream(), null, "outputStreams", null, 0, -1, DcaeManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getDcaeManager__Test(), theServicePackage.getHealthTestResponse(), "test", 0, 1, !IS_UNIQUE, IS_ORDERED); + + initEOperation(getDcaeManager__Suspend(), null, "suspend", 0, 1, !IS_UNIQUE, IS_ORDERED); + + initEOperation(getDcaeManager__Resume(), null, "resume", 0, 1, !IS_UNIQUE, IS_ORDERED); + + initEOperation(getDcaeManager__PublicKey(), theEcorePackage.getEString(), "publicKey", 0, 1, !IS_UNIQUE, IS_ORDERED); + + initEOperation(getDcaeManager__ConfigurationChanged(), null, "configurationChanged", 0, 1, !IS_UNIQUE, IS_ORDERED); + + EOperation op = initEOperation(getDcaeManager__UpdateStreams__EList_EList(), null, "updateStreams", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theStreamPackage.getDcaeStream(), "inputStreams", 0, -1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theStreamPackage.getDcaeStream(), "outputStreams", 0, -1, !IS_UNIQUE, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "ecomp", "http://openecomp.org" + }); + } + +} //ManagerPackageImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/util/ManagerAdapterFactory.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/util/ManagerAdapterFactory.java new file mode 100644 index 0000000..9f0c9b2 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/util/ManagerAdapterFactory.java @@ -0,0 +1,141 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.manager.util; + +import org.openecomp.dcae.controller.core.manager.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.core.manager.ManagerPackage + * @generated + */ +public class ManagerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ManagerAdapterFactory() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ManagerSwitch modelSwitch = + new ManagerSwitch() { + @Override + public Adapter caseDcaeManager(DcaeManager object) { + return createDcaeManagerAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.manager.DcaeManager Dcae Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager + * @generated + */ + public Adapter createDcaeManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ManagerAdapterFactory diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/util/ManagerSwitch.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/util/ManagerSwitch.java new file mode 100644 index 0000000..81ff606 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/manager/util/ManagerSwitch.java @@ -0,0 +1,131 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.manager.util; + +import org.openecomp.dcae.controller.core.manager.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.core.manager.ManagerPackage + * @generated + */ +public class ManagerSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ManagerSwitch() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ManagerPackage.DCAE_MANAGER: { + DcaeManager dcaeManager = (DcaeManager)theEObject; + T result = caseDcaeManager(dcaeManager); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeManager(DcaeManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ManagerSwitch diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ControllerCoreServer.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ControllerCoreServer.java new file mode 100644 index 0000000..e53eb88 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ControllerCoreServer.java @@ -0,0 +1,40 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.server; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +/** + * + * A representation of the model object 'Controller Core Server'. + * + * + * + * @see org.openecomp.dcae.controller.core.server.ServerPackage#getControllerCoreServer() + * @model + * @generated + */ +public interface ControllerCoreServer extends SouthBoundApiWithProxy, AbstractManagementServer { +} // ControllerCoreServer diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/DcaeBasicServer.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/DcaeBasicServer.java new file mode 100644 index 0000000..5c1beb3 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/DcaeBasicServer.java @@ -0,0 +1,331 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.server; + +import org.openecomp.ncomp.core.HasOperationalState; +import org.openecomp.ncomp.core.NamedEntity; +import org.openecomp.ncomp.core.logs.LogMessageContainer; +import org.openecomp.ncomp.core.types.metrics.DateMetricAttribute; +import org.openecomp.ncomp.openstack.compute.Server; +import org.openecomp.ncomp.openstack.core.VirtualMachineType; +import org.openecomp.ncomp.openstack.location.Hypervisor; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer; +import org.openecomp.ncomp.sirius.manager.properties.Module; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Dcae Basic Server'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getPrivateIp Private Ip}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getPublicIp Public Ip}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getCollectd Collectd}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getModules Modules}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getNetworks Networks}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getLastUpdate Last Update}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#isUsingMonitoringAgent Using Monitoring Agent}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getServer Server}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getHypervisor Hypervisor}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getVmType Vm Type}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getCertificatePassword Certificate Password}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServer() + * @model + * @generated + */ +public interface DcaeBasicServer extends NamedEntity, HasOperationalState, LogMessageContainer { + /** + * Returns the value of the 'Private Ip' attribute. + * + *

+ * If the meaning of the 'Private Ip' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Private Ip' attribute. + * @see #setPrivateIp(String) + * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServer_PrivateIp() + * @model unique="false" + * @generated + */ + String getPrivateIp(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getPrivateIp Private Ip}' attribute. + * + * + * @param value the new value of the 'Private Ip' attribute. + * @see #getPrivateIp() + * @generated + */ + void setPrivateIp(String value); + + /** + * Returns the value of the 'Public Ip' attribute. + * + *

+ * If the meaning of the 'Public Ip' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Public Ip' attribute. + * @see #setPublicIp(String) + * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServer_PublicIp() + * @model unique="false" + * @generated + */ + String getPublicIp(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getPublicIp Public Ip}' attribute. + * + * + * @param value the new value of the 'Public Ip' attribute. + * @see #getPublicIp() + * @generated + */ + void setPublicIp(String value); + + /** + * Returns the value of the 'Collectd' containment reference. + * + *

+ * If the meaning of the 'Collectd' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Collectd' containment reference. + * @see #setCollectd(CollectdServer) + * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServer_Collectd() + * @model containment="true" + * @generated + */ + CollectdServer getCollectd(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getCollectd Collectd}' containment reference. + * + * + * @param value the new value of the 'Collectd' containment reference. + * @see #getCollectd() + * @generated + */ + void setCollectd(CollectdServer value); + + /** + * Returns the value of the 'Modules' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.properties.Module}. + * + *

+ * If the meaning of the 'Modules' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Modules' containment reference list. + * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServer_Modules() + * @model containment="true" ordered="false" + * @generated + */ + EList getModules(); + + /** + * Returns the value of the 'Networks' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork}. + * + *

+ * If the meaning of the 'Networks' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Networks' containment reference list. + * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServer_Networks() + * @model containment="true" ordered="false" + * @generated + */ + EList getNetworks(); + + /** + * Returns the value of the 'Last Update' attribute. + * + *

+ * If the meaning of the 'Last Update' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Last Update' attribute. + * @see #setLastUpdate(DateMetricAttribute) + * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServer_LastUpdate() + * @model unique="false" dataType="org.openecomp.ncomp.core.DateMetricAttribute" transient="true" + * @generated + */ + DateMetricAttribute getLastUpdate(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getLastUpdate Last Update}' attribute. + * + * + * @param value the new value of the 'Last Update' attribute. + * @see #getLastUpdate() + * @generated + */ + void setLastUpdate(DateMetricAttribute value); + + /** + * Returns the value of the 'Using Monitoring Agent' attribute. + * The default value is "true". + * + *

+ * If the meaning of the 'Using Monitoring Agent' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Using Monitoring Agent' attribute. + * @see #setUsingMonitoringAgent(boolean) + * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServer_UsingMonitoringAgent() + * @model default="true" unique="false" + * @generated + */ + boolean isUsingMonitoringAgent(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#isUsingMonitoringAgent Using Monitoring Agent}' attribute. + * + * + * @param value the new value of the 'Using Monitoring Agent' attribute. + * @see #isUsingMonitoringAgent() + * @generated + */ + void setUsingMonitoringAgent(boolean value); + + /** + * Returns the value of the 'Server' reference. + * + *

+ * If the meaning of the 'Server' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Server' reference. + * @see #setServer(Server) + * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServer_Server() + * @model + * @generated + */ + Server getServer(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getServer Server}' reference. + * + * + * @param value the new value of the 'Server' reference. + * @see #getServer() + * @generated + */ + void setServer(Server value); + + /** + * Returns the value of the 'Hypervisor' reference. + * + *

+ * If the meaning of the 'Hypervisor' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Hypervisor' reference. + * @see #setHypervisor(Hypervisor) + * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServer_Hypervisor() + * @model + * @generated + */ + Hypervisor getHypervisor(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getHypervisor Hypervisor}' reference. + * + * + * @param value the new value of the 'Hypervisor' reference. + * @see #getHypervisor() + * @generated + */ + void setHypervisor(Hypervisor value); + + /** + * Returns the value of the 'Vm Type' reference. + * + *

+ * If the meaning of the 'Vm Type' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Vm Type' reference. + * @see #setVmType(VirtualMachineType) + * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServer_VmType() + * @model + * @generated + */ + VirtualMachineType getVmType(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getVmType Vm Type}' reference. + * + * + * @param value the new value of the 'Vm Type' reference. + * @see #getVmType() + * @generated + */ + void setVmType(VirtualMachineType value); + + /** + * Returns the value of the 'Certificate Password' attribute. + * + *

+ * If the meaning of the 'Certificate Password' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Certificate Password' attribute. + * @see #setCertificatePassword(String) + * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServer_CertificatePassword() + * @model unique="false" + * @generated + */ + String getCertificatePassword(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getCertificatePassword Certificate Password}' attribute. + * + * + * @param value the new value of the 'Certificate Password' attribute. + * @see #getCertificatePassword() + * @generated + */ + void setCertificatePassword(String value); + +} // DcaeBasicServer diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/DcaeBasicServerNetwork.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/DcaeBasicServerNetwork.java new file mode 100644 index 0000000..2b699cb --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/DcaeBasicServerNetwork.java @@ -0,0 +1,98 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.server; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Dcae Basic Server Network'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork#getIp Ip}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork#getDnsName Dns Name}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServerNetwork() + * @model + * @generated + */ +public interface DcaeBasicServerNetwork extends NamedEntity { + /** + * Returns the value of the 'Ip' attribute. + * + *

+ * If the meaning of the 'Ip' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Ip' attribute. + * @see #setIp(String) + * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServerNetwork_Ip() + * @model unique="false" + * @generated + */ + String getIp(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork#getIp Ip}' attribute. + * + * + * @param value the new value of the 'Ip' attribute. + * @see #getIp() + * @generated + */ + void setIp(String value); + + /** + * Returns the value of the 'Dns Name' attribute. + * + *

+ * If the meaning of the 'Dns Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dns Name' attribute. + * @see #setDnsName(String) + * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServerNetwork_DnsName() + * @model unique="false" + * @generated + */ + String getDnsName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork#getDnsName Dns Name}' attribute. + * + * + * @param value the new value of the 'Dns Name' attribute. + * @see #getDnsName() + * @generated + */ + void setDnsName(String value); + +} // DcaeBasicServerNetwork diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ServerFactory.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ServerFactory.java new file mode 100644 index 0000000..7740d44 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ServerFactory.java @@ -0,0 +1,72 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.server; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.core.server.ServerPackage + * @generated + */ +public interface ServerFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ServerFactory eINSTANCE = org.openecomp.dcae.controller.core.server.impl.ServerFactoryImpl.init(); + + /** + * Returns a new object of class 'Dcae Basic Server'. + * + * + * @return a new object of class 'Dcae Basic Server'. + * @generated + */ + DcaeBasicServer createDcaeBasicServer(); + + /** + * Returns a new object of class 'Dcae Basic Server Network'. + * + * + * @return a new object of class 'Dcae Basic Server Network'. + * @generated + */ + DcaeBasicServerNetwork createDcaeBasicServerNetwork(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ServerPackage getServerPackage(); + +} //ServerFactory diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ServerPackage.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ServerPackage.java new file mode 100644 index 0000000..31ca18d --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ServerPackage.java @@ -0,0 +1,663 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.server; + +import org.openecomp.ncomp.core.CorePackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.core.server.ServerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-core-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.core'" + * @generated + */ +public interface ServerPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "server"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.core.server"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "server"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ServerPackage eINSTANCE = org.openecomp.dcae.controller.core.server.impl.ServerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl Dcae Basic Server}' class. + * + * + * @see org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl + * @see org.openecomp.dcae.controller.core.server.impl.ServerPackageImpl#getDcaeBasicServer() + * @generated + */ + int DCAE_BASIC_SERVER = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Operational State' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__OPERATIONAL_STATE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Log Message Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__LOG_MESSAGE_CONFIGURATION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Log Message Categories' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__LOG_MESSAGE_CATEGORIES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Log Message Stats' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__LOG_MESSAGE_STATS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Private Ip' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__PRIVATE_IP = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Public Ip' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__PUBLIC_IP = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Collectd' containment reference. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__COLLECTD = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Modules' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__MODULES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Networks' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__NETWORKS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 8; + + /** + * The feature id for the 'Last Update' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__LAST_UPDATE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 9; + + /** + * The feature id for the 'Using Monitoring Agent' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__USING_MONITORING_AGENT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 10; + + /** + * The feature id for the 'Server' reference. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__SERVER = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 11; + + /** + * The feature id for the 'Hypervisor' reference. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__HYPERVISOR = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 12; + + /** + * The feature id for the 'Vm Type' reference. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__VM_TYPE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 13; + + /** + * The feature id for the 'Certificate Password' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 14; + + /** + * The number of structural features of the 'Dcae Basic Server' class. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 15; + + /** + * The number of operations of the 'Dcae Basic Server' class. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerNetworkImpl Dcae Basic Server Network}' class. + * + * + * @see org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerNetworkImpl + * @see org.openecomp.dcae.controller.core.server.impl.ServerPackageImpl#getDcaeBasicServerNetwork() + * @generated + */ + int DCAE_BASIC_SERVER_NETWORK = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER_NETWORK__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER_NETWORK__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER_NETWORK__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER_NETWORK__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Ip' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER_NETWORK__IP = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Dns Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER_NETWORK__DNS_NAME = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Dcae Basic Server Network' class. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER_NETWORK_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Dcae Basic Server Network' class. + * + * + * @generated + * @ordered + */ + int DCAE_BASIC_SERVER_NETWORK_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer Dcae Basic Server}'. + * + * + * @return the meta object for class 'Dcae Basic Server'. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer + * @generated + */ + EClass getDcaeBasicServer(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getPrivateIp Private Ip}'. + * + * + * @return the meta object for the attribute 'Private Ip'. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer#getPrivateIp() + * @see #getDcaeBasicServer() + * @generated + */ + EAttribute getDcaeBasicServer_PrivateIp(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getPublicIp Public Ip}'. + * + * + * @return the meta object for the attribute 'Public Ip'. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer#getPublicIp() + * @see #getDcaeBasicServer() + * @generated + */ + EAttribute getDcaeBasicServer_PublicIp(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getCollectd Collectd}'. + * + * + * @return the meta object for the containment reference 'Collectd'. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer#getCollectd() + * @see #getDcaeBasicServer() + * @generated + */ + EReference getDcaeBasicServer_Collectd(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getModules Modules}'. + * + * + * @return the meta object for the containment reference list 'Modules'. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer#getModules() + * @see #getDcaeBasicServer() + * @generated + */ + EReference getDcaeBasicServer_Modules(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getNetworks Networks}'. + * + * + * @return the meta object for the containment reference list 'Networks'. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer#getNetworks() + * @see #getDcaeBasicServer() + * @generated + */ + EReference getDcaeBasicServer_Networks(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getLastUpdate Last Update}'. + * + * + * @return the meta object for the attribute 'Last Update'. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer#getLastUpdate() + * @see #getDcaeBasicServer() + * @generated + */ + EAttribute getDcaeBasicServer_LastUpdate(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#isUsingMonitoringAgent Using Monitoring Agent}'. + * + * + * @return the meta object for the attribute 'Using Monitoring Agent'. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer#isUsingMonitoringAgent() + * @see #getDcaeBasicServer() + * @generated + */ + EAttribute getDcaeBasicServer_UsingMonitoringAgent(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getServer Server}'. + * + * + * @return the meta object for the reference 'Server'. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer#getServer() + * @see #getDcaeBasicServer() + * @generated + */ + EReference getDcaeBasicServer_Server(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getHypervisor Hypervisor}'. + * + * + * @return the meta object for the reference 'Hypervisor'. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer#getHypervisor() + * @see #getDcaeBasicServer() + * @generated + */ + EReference getDcaeBasicServer_Hypervisor(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getVmType Vm Type}'. + * + * + * @return the meta object for the reference 'Vm Type'. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer#getVmType() + * @see #getDcaeBasicServer() + * @generated + */ + EReference getDcaeBasicServer_VmType(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getCertificatePassword Certificate Password}'. + * + * + * @return the meta object for the attribute 'Certificate Password'. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer#getCertificatePassword() + * @see #getDcaeBasicServer() + * @generated + */ + EAttribute getDcaeBasicServer_CertificatePassword(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork Dcae Basic Server Network}'. + * + * + * @return the meta object for class 'Dcae Basic Server Network'. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork + * @generated + */ + EClass getDcaeBasicServerNetwork(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork#getIp Ip}'. + * + * + * @return the meta object for the attribute 'Ip'. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork#getIp() + * @see #getDcaeBasicServerNetwork() + * @generated + */ + EAttribute getDcaeBasicServerNetwork_Ip(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork#getDnsName Dns Name}'. + * + * + * @return the meta object for the attribute 'Dns Name'. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork#getDnsName() + * @see #getDcaeBasicServerNetwork() + * @generated + */ + EAttribute getDcaeBasicServerNetwork_DnsName(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ServerFactory getServerFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl Dcae Basic Server}' class. + * + * + * @see org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl + * @see org.openecomp.dcae.controller.core.server.impl.ServerPackageImpl#getDcaeBasicServer() + * @generated + */ + EClass DCAE_BASIC_SERVER = eINSTANCE.getDcaeBasicServer(); + /** + * The meta object literal for the 'Private Ip' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_BASIC_SERVER__PRIVATE_IP = eINSTANCE.getDcaeBasicServer_PrivateIp(); + /** + * The meta object literal for the 'Public Ip' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_BASIC_SERVER__PUBLIC_IP = eINSTANCE.getDcaeBasicServer_PublicIp(); + /** + * The meta object literal for the 'Collectd' containment reference feature. + * + * + * @generated + */ + EReference DCAE_BASIC_SERVER__COLLECTD = eINSTANCE.getDcaeBasicServer_Collectd(); + /** + * The meta object literal for the 'Modules' containment reference list feature. + * + * + * @generated + */ + EReference DCAE_BASIC_SERVER__MODULES = eINSTANCE.getDcaeBasicServer_Modules(); + /** + * The meta object literal for the 'Networks' containment reference list feature. + * + * + * @generated + */ + EReference DCAE_BASIC_SERVER__NETWORKS = eINSTANCE.getDcaeBasicServer_Networks(); + /** + * The meta object literal for the 'Last Update' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_BASIC_SERVER__LAST_UPDATE = eINSTANCE.getDcaeBasicServer_LastUpdate(); + /** + * The meta object literal for the 'Using Monitoring Agent' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_BASIC_SERVER__USING_MONITORING_AGENT = eINSTANCE.getDcaeBasicServer_UsingMonitoringAgent(); + /** + * The meta object literal for the 'Server' reference feature. + * + * + * @generated + */ + EReference DCAE_BASIC_SERVER__SERVER = eINSTANCE.getDcaeBasicServer_Server(); + /** + * The meta object literal for the 'Hypervisor' reference feature. + * + * + * @generated + */ + EReference DCAE_BASIC_SERVER__HYPERVISOR = eINSTANCE.getDcaeBasicServer_Hypervisor(); + /** + * The meta object literal for the 'Vm Type' reference feature. + * + * + * @generated + */ + EReference DCAE_BASIC_SERVER__VM_TYPE = eINSTANCE.getDcaeBasicServer_VmType(); + /** + * The meta object literal for the 'Certificate Password' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD = eINSTANCE.getDcaeBasicServer_CertificatePassword(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerNetworkImpl Dcae Basic Server Network}' class. + * + * + * @see org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerNetworkImpl + * @see org.openecomp.dcae.controller.core.server.impl.ServerPackageImpl#getDcaeBasicServerNetwork() + * @generated + */ + EClass DCAE_BASIC_SERVER_NETWORK = eINSTANCE.getDcaeBasicServerNetwork(); + /** + * The meta object literal for the 'Ip' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_BASIC_SERVER_NETWORK__IP = eINSTANCE.getDcaeBasicServerNetwork_Ip(); + /** + * The meta object literal for the 'Dns Name' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_BASIC_SERVER_NETWORK__DNS_NAME = eINSTANCE.getDcaeBasicServerNetwork_DnsName(); + + } + +} //ServerPackage diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/DcaeBasicServerImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/DcaeBasicServerImpl.java new file mode 100644 index 0000000..3da755c --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/DcaeBasicServerImpl.java @@ -0,0 +1,989 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.server.impl; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; +import org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork; +import org.openecomp.dcae.controller.core.server.ServerPackage; +import org.openecomp.ncomp.core.CorePackage; +import org.openecomp.ncomp.core.HasOperationalState; +import org.openecomp.ncomp.core.OperationalState; +import org.openecomp.ncomp.core.impl.NamedEntityImpl; +import org.openecomp.ncomp.core.logs.LogMessageCategory; +import org.openecomp.ncomp.core.logs.LogMessageContainer; +import org.openecomp.ncomp.core.logs.LogMessageContainerConfiguration; +import org.openecomp.ncomp.core.logs.LogMessageStats; +import org.openecomp.ncomp.core.logs.LogsPackage; +import org.openecomp.ncomp.core.types.metrics.DateMetricAttribute; +import org.openecomp.ncomp.openstack.compute.Server; +import org.openecomp.ncomp.openstack.core.VirtualMachineType; +import org.openecomp.ncomp.openstack.location.Hypervisor; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer; +import org.openecomp.ncomp.sirius.manager.properties.Module; +import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Dcae Basic Server'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getOperationalState Operational State}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getLogMessageConfiguration Log Message Configuration}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getLogMessageCategories Log Message Categories}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getLogMessageStats Log Message Stats}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getPrivateIp Private Ip}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getPublicIp Public Ip}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getCollectd Collectd}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getModules Modules}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getNetworks Networks}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getLastUpdate Last Update}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#isUsingMonitoringAgent Using Monitoring Agent}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getServer Server}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getHypervisor Hypervisor}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getVmType Vm Type}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getCertificatePassword Certificate Password}
  • + *
+ *

+ * + * @generated + */ +public class DcaeBasicServerImpl extends NamedEntityImpl implements DcaeBasicServer { + /** + * The default value of the '{@link #getOperationalState() Operational State}' attribute. + * + * + * @see #getOperationalState() + * @generated + * @ordered + */ + protected static final OperationalState OPERATIONAL_STATE_EDEFAULT = OperationalState.OPERATIONAL; + + /** + * The cached value of the '{@link #getOperationalState() Operational State}' attribute. + * + * + * @see #getOperationalState() + * @generated + * @ordered + */ + protected OperationalState operationalState = OPERATIONAL_STATE_EDEFAULT; + + /** + * The cached value of the '{@link #getLogMessageConfiguration() Log Message Configuration}' containment reference. + * + * + * @see #getLogMessageConfiguration() + * @generated + * @ordered + */ + protected LogMessageContainerConfiguration logMessageConfiguration; + + /** + * The cached value of the '{@link #getLogMessageCategories() Log Message Categories}' containment reference list. + * + * + * @see #getLogMessageCategories() + * @generated + * @ordered + */ + protected EList logMessageCategories; + + /** + * The cached value of the '{@link #getLogMessageStats() Log Message Stats}' containment reference list. + * + * + * @see #getLogMessageStats() + * @generated + * @ordered + */ + protected EList logMessageStats; + + /** + * The default value of the '{@link #getPrivateIp() Private Ip}' attribute. + * + * + * @see #getPrivateIp() + * @generated + * @ordered + */ + protected static final String PRIVATE_IP_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPrivateIp() Private Ip}' attribute. + * + * + * @see #getPrivateIp() + * @generated + * @ordered + */ + protected String privateIp = PRIVATE_IP_EDEFAULT; + + /** + * The default value of the '{@link #getPublicIp() Public Ip}' attribute. + * + * + * @see #getPublicIp() + * @generated + * @ordered + */ + protected static final String PUBLIC_IP_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPublicIp() Public Ip}' attribute. + * + * + * @see #getPublicIp() + * @generated + * @ordered + */ + protected String publicIp = PUBLIC_IP_EDEFAULT; + + /** + * The cached value of the '{@link #getCollectd() Collectd}' containment reference. + * + * + * @see #getCollectd() + * @generated + * @ordered + */ + protected CollectdServer collectd; + + /** + * The cached value of the '{@link #getModules() Modules}' containment reference list. + * + * + * @see #getModules() + * @generated + * @ordered + */ + protected EList modules; + + /** + * The cached value of the '{@link #getNetworks() Networks}' containment reference list. + * + * + * @see #getNetworks() + * @generated + * @ordered + */ + protected EList networks; + + /** + * The default value of the '{@link #getLastUpdate() Last Update}' attribute. + * + * + * @see #getLastUpdate() + * @generated + * @ordered + */ + protected static final DateMetricAttribute LAST_UPDATE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLastUpdate() Last Update}' attribute. + * + * + * @see #getLastUpdate() + * @generated + * @ordered + */ + protected DateMetricAttribute lastUpdate = LAST_UPDATE_EDEFAULT; + + /** + * The default value of the '{@link #isUsingMonitoringAgent() Using Monitoring Agent}' attribute. + * + * + * @see #isUsingMonitoringAgent() + * @generated + * @ordered + */ + protected static final boolean USING_MONITORING_AGENT_EDEFAULT = true; + + /** + * The cached value of the '{@link #isUsingMonitoringAgent() Using Monitoring Agent}' attribute. + * + * + * @see #isUsingMonitoringAgent() + * @generated + * @ordered + */ + protected boolean usingMonitoringAgent = USING_MONITORING_AGENT_EDEFAULT; + + /** + * The cached value of the '{@link #getServer() Server}' reference. + * + * + * @see #getServer() + * @generated + * @ordered + */ + protected Server server; + + /** + * The cached value of the '{@link #getHypervisor() Hypervisor}' reference. + * + * + * @see #getHypervisor() + * @generated + * @ordered + */ + protected Hypervisor hypervisor; + + /** + * The cached value of the '{@link #getVmType() Vm Type}' reference. + * + * + * @see #getVmType() + * @generated + * @ordered + */ + protected VirtualMachineType vmType; + + /** + * The default value of the '{@link #getCertificatePassword() Certificate Password}' attribute. + * + * + * @see #getCertificatePassword() + * @generated + * @ordered + */ + protected static final String CERTIFICATE_PASSWORD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCertificatePassword() Certificate Password}' attribute. + * + * + * @see #getCertificatePassword() + * @generated + * @ordered + */ + protected String certificatePassword = CERTIFICATE_PASSWORD_EDEFAULT; + + /** + * + * + * @generated + */ + protected DcaeBasicServerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServerPackage.Literals.DCAE_BASIC_SERVER; + } + + /** + * + * + * @generated + */ + public OperationalState getOperationalState() { + return operationalState; + } + + /** + * + * + * @generated + */ + public void setOperationalState(OperationalState newOperationalState) { + OperationalState oldOperationalState = operationalState; + operationalState = newOperationalState == null ? OPERATIONAL_STATE_EDEFAULT : newOperationalState; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER__OPERATIONAL_STATE, oldOperationalState, operationalState)); + } + + /** + * + * + * @generated + */ + public LogMessageContainerConfiguration getLogMessageConfiguration() { + return logMessageConfiguration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetLogMessageConfiguration(LogMessageContainerConfiguration newLogMessageConfiguration, NotificationChain msgs) { + LogMessageContainerConfiguration oldLogMessageConfiguration = logMessageConfiguration; + logMessageConfiguration = newLogMessageConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CONFIGURATION, oldLogMessageConfiguration, newLogMessageConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setLogMessageConfiguration(LogMessageContainerConfiguration newLogMessageConfiguration) { + if (newLogMessageConfiguration != logMessageConfiguration) { + NotificationChain msgs = null; + if (logMessageConfiguration != null) + msgs = ((InternalEObject)logMessageConfiguration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CONFIGURATION, null, msgs); + if (newLogMessageConfiguration != null) + msgs = ((InternalEObject)newLogMessageConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CONFIGURATION, null, msgs); + msgs = basicSetLogMessageConfiguration(newLogMessageConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CONFIGURATION, newLogMessageConfiguration, newLogMessageConfiguration)); + } + + /** + * + * + * @generated + */ + public EList getLogMessageCategories() { + if (logMessageCategories == null) { + logMessageCategories = new EObjectContainmentEList(LogMessageCategory.class, this, ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CATEGORIES); + } + return logMessageCategories; + } + + /** + * + * + * @generated + */ + public EList getLogMessageStats() { + if (logMessageStats == null) { + logMessageStats = new EObjectContainmentEList(LogMessageStats.class, this, ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_STATS); + } + return logMessageStats; + } + + /** + * + * + * @generated + */ + public String getPrivateIp() { + return privateIp; + } + + /** + * + * + * @generated + */ + public void setPrivateIp(String newPrivateIp) { + String oldPrivateIp = privateIp; + privateIp = newPrivateIp; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER__PRIVATE_IP, oldPrivateIp, privateIp)); + } + + /** + * + * + * @generated + */ + public String getPublicIp() { + return publicIp; + } + + /** + * + * + * @generated + */ + public void setPublicIp(String newPublicIp) { + String oldPublicIp = publicIp; + publicIp = newPublicIp; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER__PUBLIC_IP, oldPublicIp, publicIp)); + } + + /** + * + * + * @generated + */ + public CollectdServer getCollectd() { + return collectd; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetCollectd(CollectdServer newCollectd, NotificationChain msgs) { + CollectdServer oldCollectd = collectd; + collectd = newCollectd; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER__COLLECTD, oldCollectd, newCollectd); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setCollectd(CollectdServer newCollectd) { + if (newCollectd != collectd) { + NotificationChain msgs = null; + if (collectd != null) + msgs = ((InternalEObject)collectd).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServerPackage.DCAE_BASIC_SERVER__COLLECTD, null, msgs); + if (newCollectd != null) + msgs = ((InternalEObject)newCollectd).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServerPackage.DCAE_BASIC_SERVER__COLLECTD, null, msgs); + msgs = basicSetCollectd(newCollectd, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER__COLLECTD, newCollectd, newCollectd)); + } + + /** + * + * + * @generated + */ + public EList getModules() { + if (modules == null) { + modules = new EObjectContainmentEList(Module.class, this, ServerPackage.DCAE_BASIC_SERVER__MODULES); + } + return modules; + } + + /** + * + * + * @generated + */ + public EList getNetworks() { + if (networks == null) { + networks = new EObjectContainmentEList(DcaeBasicServerNetwork.class, this, ServerPackage.DCAE_BASIC_SERVER__NETWORKS); + } + return networks; + } + + /** + * + * + * @generated + */ + public DateMetricAttribute getLastUpdate() { + return lastUpdate; + } + + /** + * + * + * @generated + */ + public void setLastUpdate(DateMetricAttribute newLastUpdate) { + DateMetricAttribute oldLastUpdate = lastUpdate; + lastUpdate = newLastUpdate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER__LAST_UPDATE, oldLastUpdate, lastUpdate)); + } + + /** + * + * + * @generated + */ + public boolean isUsingMonitoringAgent() { + return usingMonitoringAgent; + } + + /** + * + * + * @generated + */ + public void setUsingMonitoringAgent(boolean newUsingMonitoringAgent) { + boolean oldUsingMonitoringAgent = usingMonitoringAgent; + usingMonitoringAgent = newUsingMonitoringAgent; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER__USING_MONITORING_AGENT, oldUsingMonitoringAgent, usingMonitoringAgent)); + } + + /** + * + * + * @generated + */ + public Server getServer() { + if (server != null && server.eIsProxy()) { + InternalEObject oldServer = (InternalEObject)server; + server = (Server)eResolveProxy(oldServer); + if (server != oldServer) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ServerPackage.DCAE_BASIC_SERVER__SERVER, oldServer, server)); + } + } + return server; + } + + /** + * + * + * @generated + */ + public Server basicGetServer() { + return server; + } + + /** + * + * + * @generated + */ + public void setServer(Server newServer) { + Server oldServer = server; + server = newServer; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER__SERVER, oldServer, server)); + } + + /** + * + * + * @generated + */ + public Hypervisor getHypervisor() { + if (hypervisor != null && hypervisor.eIsProxy()) { + InternalEObject oldHypervisor = (InternalEObject)hypervisor; + hypervisor = (Hypervisor)eResolveProxy(oldHypervisor); + if (hypervisor != oldHypervisor) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ServerPackage.DCAE_BASIC_SERVER__HYPERVISOR, oldHypervisor, hypervisor)); + } + } + return hypervisor; + } + + /** + * + * + * @generated + */ + public Hypervisor basicGetHypervisor() { + return hypervisor; + } + + /** + * + * + * @generated + */ + public void setHypervisor(Hypervisor newHypervisor) { + Hypervisor oldHypervisor = hypervisor; + hypervisor = newHypervisor; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER__HYPERVISOR, oldHypervisor, hypervisor)); + } + + /** + * + * + * @generated + */ + public VirtualMachineType getVmType() { + if (vmType != null && vmType.eIsProxy()) { + InternalEObject oldVmType = (InternalEObject)vmType; + vmType = (VirtualMachineType)eResolveProxy(oldVmType); + if (vmType != oldVmType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ServerPackage.DCAE_BASIC_SERVER__VM_TYPE, oldVmType, vmType)); + } + } + return vmType; + } + + /** + * + * + * @generated + */ + public VirtualMachineType basicGetVmType() { + return vmType; + } + + /** + * + * + * @generated + */ + public void setVmType(VirtualMachineType newVmType) { + VirtualMachineType oldVmType = vmType; + vmType = newVmType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER__VM_TYPE, oldVmType, vmType)); + } + + /** + * + * + * @generated + */ + public String getCertificatePassword() { + return certificatePassword; + } + + /** + * + * + * @generated + */ + public void setCertificatePassword(String newCertificatePassword) { + String oldCertificatePassword = certificatePassword; + certificatePassword = newCertificatePassword; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD, oldCertificatePassword, certificatePassword)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CONFIGURATION: + return basicSetLogMessageConfiguration(null, msgs); + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CATEGORIES: + return ((InternalEList)getLogMessageCategories()).basicRemove(otherEnd, msgs); + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_STATS: + return ((InternalEList)getLogMessageStats()).basicRemove(otherEnd, msgs); + case ServerPackage.DCAE_BASIC_SERVER__COLLECTD: + return basicSetCollectd(null, msgs); + case ServerPackage.DCAE_BASIC_SERVER__MODULES: + return ((InternalEList)getModules()).basicRemove(otherEnd, msgs); + case ServerPackage.DCAE_BASIC_SERVER__NETWORKS: + return ((InternalEList)getNetworks()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServerPackage.DCAE_BASIC_SERVER__OPERATIONAL_STATE: + return getOperationalState(); + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CONFIGURATION: + return getLogMessageConfiguration(); + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CATEGORIES: + return getLogMessageCategories(); + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_STATS: + return getLogMessageStats(); + case ServerPackage.DCAE_BASIC_SERVER__PRIVATE_IP: + return getPrivateIp(); + case ServerPackage.DCAE_BASIC_SERVER__PUBLIC_IP: + return getPublicIp(); + case ServerPackage.DCAE_BASIC_SERVER__COLLECTD: + return getCollectd(); + case ServerPackage.DCAE_BASIC_SERVER__MODULES: + return getModules(); + case ServerPackage.DCAE_BASIC_SERVER__NETWORKS: + return getNetworks(); + case ServerPackage.DCAE_BASIC_SERVER__LAST_UPDATE: + return getLastUpdate(); + case ServerPackage.DCAE_BASIC_SERVER__USING_MONITORING_AGENT: + return isUsingMonitoringAgent(); + case ServerPackage.DCAE_BASIC_SERVER__SERVER: + if (resolve) return getServer(); + return basicGetServer(); + case ServerPackage.DCAE_BASIC_SERVER__HYPERVISOR: + if (resolve) return getHypervisor(); + return basicGetHypervisor(); + case ServerPackage.DCAE_BASIC_SERVER__VM_TYPE: + if (resolve) return getVmType(); + return basicGetVmType(); + case ServerPackage.DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD: + return getCertificatePassword(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServerPackage.DCAE_BASIC_SERVER__OPERATIONAL_STATE: + setOperationalState((OperationalState)newValue); + return; + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CONFIGURATION: + setLogMessageConfiguration((LogMessageContainerConfiguration)newValue); + return; + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CATEGORIES: + getLogMessageCategories().clear(); + getLogMessageCategories().addAll((Collection)newValue); + return; + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_STATS: + getLogMessageStats().clear(); + getLogMessageStats().addAll((Collection)newValue); + return; + case ServerPackage.DCAE_BASIC_SERVER__PRIVATE_IP: + setPrivateIp((String)newValue); + return; + case ServerPackage.DCAE_BASIC_SERVER__PUBLIC_IP: + setPublicIp((String)newValue); + return; + case ServerPackage.DCAE_BASIC_SERVER__COLLECTD: + setCollectd((CollectdServer)newValue); + return; + case ServerPackage.DCAE_BASIC_SERVER__MODULES: + getModules().clear(); + getModules().addAll((Collection)newValue); + return; + case ServerPackage.DCAE_BASIC_SERVER__NETWORKS: + getNetworks().clear(); + getNetworks().addAll((Collection)newValue); + return; + case ServerPackage.DCAE_BASIC_SERVER__LAST_UPDATE: + setLastUpdate((DateMetricAttribute)newValue); + return; + case ServerPackage.DCAE_BASIC_SERVER__USING_MONITORING_AGENT: + setUsingMonitoringAgent((Boolean)newValue); + return; + case ServerPackage.DCAE_BASIC_SERVER__SERVER: + setServer((Server)newValue); + return; + case ServerPackage.DCAE_BASIC_SERVER__HYPERVISOR: + setHypervisor((Hypervisor)newValue); + return; + case ServerPackage.DCAE_BASIC_SERVER__VM_TYPE: + setVmType((VirtualMachineType)newValue); + return; + case ServerPackage.DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD: + setCertificatePassword((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServerPackage.DCAE_BASIC_SERVER__OPERATIONAL_STATE: + setOperationalState(OPERATIONAL_STATE_EDEFAULT); + return; + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CONFIGURATION: + setLogMessageConfiguration((LogMessageContainerConfiguration)null); + return; + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CATEGORIES: + getLogMessageCategories().clear(); + return; + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_STATS: + getLogMessageStats().clear(); + return; + case ServerPackage.DCAE_BASIC_SERVER__PRIVATE_IP: + setPrivateIp(PRIVATE_IP_EDEFAULT); + return; + case ServerPackage.DCAE_BASIC_SERVER__PUBLIC_IP: + setPublicIp(PUBLIC_IP_EDEFAULT); + return; + case ServerPackage.DCAE_BASIC_SERVER__COLLECTD: + setCollectd((CollectdServer)null); + return; + case ServerPackage.DCAE_BASIC_SERVER__MODULES: + getModules().clear(); + return; + case ServerPackage.DCAE_BASIC_SERVER__NETWORKS: + getNetworks().clear(); + return; + case ServerPackage.DCAE_BASIC_SERVER__LAST_UPDATE: + setLastUpdate(LAST_UPDATE_EDEFAULT); + return; + case ServerPackage.DCAE_BASIC_SERVER__USING_MONITORING_AGENT: + setUsingMonitoringAgent(USING_MONITORING_AGENT_EDEFAULT); + return; + case ServerPackage.DCAE_BASIC_SERVER__SERVER: + setServer((Server)null); + return; + case ServerPackage.DCAE_BASIC_SERVER__HYPERVISOR: + setHypervisor((Hypervisor)null); + return; + case ServerPackage.DCAE_BASIC_SERVER__VM_TYPE: + setVmType((VirtualMachineType)null); + return; + case ServerPackage.DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD: + setCertificatePassword(CERTIFICATE_PASSWORD_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServerPackage.DCAE_BASIC_SERVER__OPERATIONAL_STATE: + return operationalState != OPERATIONAL_STATE_EDEFAULT; + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CONFIGURATION: + return logMessageConfiguration != null; + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CATEGORIES: + return logMessageCategories != null && !logMessageCategories.isEmpty(); + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_STATS: + return logMessageStats != null && !logMessageStats.isEmpty(); + case ServerPackage.DCAE_BASIC_SERVER__PRIVATE_IP: + return PRIVATE_IP_EDEFAULT == null ? privateIp != null : !PRIVATE_IP_EDEFAULT.equals(privateIp); + case ServerPackage.DCAE_BASIC_SERVER__PUBLIC_IP: + return PUBLIC_IP_EDEFAULT == null ? publicIp != null : !PUBLIC_IP_EDEFAULT.equals(publicIp); + case ServerPackage.DCAE_BASIC_SERVER__COLLECTD: + return collectd != null; + case ServerPackage.DCAE_BASIC_SERVER__MODULES: + return modules != null && !modules.isEmpty(); + case ServerPackage.DCAE_BASIC_SERVER__NETWORKS: + return networks != null && !networks.isEmpty(); + case ServerPackage.DCAE_BASIC_SERVER__LAST_UPDATE: + return LAST_UPDATE_EDEFAULT == null ? lastUpdate != null : !LAST_UPDATE_EDEFAULT.equals(lastUpdate); + case ServerPackage.DCAE_BASIC_SERVER__USING_MONITORING_AGENT: + return usingMonitoringAgent != USING_MONITORING_AGENT_EDEFAULT; + case ServerPackage.DCAE_BASIC_SERVER__SERVER: + return server != null; + case ServerPackage.DCAE_BASIC_SERVER__HYPERVISOR: + return hypervisor != null; + case ServerPackage.DCAE_BASIC_SERVER__VM_TYPE: + return vmType != null; + case ServerPackage.DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD: + return CERTIFICATE_PASSWORD_EDEFAULT == null ? certificatePassword != null : !CERTIFICATE_PASSWORD_EDEFAULT.equals(certificatePassword); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == HasOperationalState.class) { + switch (derivedFeatureID) { + case ServerPackage.DCAE_BASIC_SERVER__OPERATIONAL_STATE: return CorePackage.HAS_OPERATIONAL_STATE__OPERATIONAL_STATE; + default: return -1; + } + } + if (baseClass == LogMessageContainer.class) { + switch (derivedFeatureID) { + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CONFIGURATION: return LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CONFIGURATION; + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CATEGORIES: return LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CATEGORIES; + case ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_STATS: return LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_STATS; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == HasOperationalState.class) { + switch (baseFeatureID) { + case CorePackage.HAS_OPERATIONAL_STATE__OPERATIONAL_STATE: return ServerPackage.DCAE_BASIC_SERVER__OPERATIONAL_STATE; + default: return -1; + } + } + if (baseClass == LogMessageContainer.class) { + switch (baseFeatureID) { + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CONFIGURATION: return ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CONFIGURATION; + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CATEGORIES: return ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CATEGORIES; + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_STATS: return ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_STATS; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (operationalState: "); + result.append(operationalState); + result.append(", privateIp: "); + result.append(privateIp); + result.append(", publicIp: "); + result.append(publicIp); + result.append(", lastUpdate: "); + result.append(lastUpdate); + result.append(", usingMonitoringAgent: "); + result.append(usingMonitoringAgent); + result.append(", certificatePassword: "); + result.append(certificatePassword); + result.append(')'); + return result.toString(); + } + +} //DcaeBasicServerImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/DcaeBasicServerNetworkImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/DcaeBasicServerNetworkImpl.java new file mode 100644 index 0000000..7c25664 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/DcaeBasicServerNetworkImpl.java @@ -0,0 +1,239 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.server.impl; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork; +import org.openecomp.dcae.controller.core.server.ServerPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Dcae Basic Server Network'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerNetworkImpl#getIp Ip}
  • + *
  • {@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerNetworkImpl#getDnsName Dns Name}
  • + *
+ *

+ * + * @generated + */ +public class DcaeBasicServerNetworkImpl extends NamedEntityImpl implements DcaeBasicServerNetwork { + /** + * The default value of the '{@link #getIp() Ip}' attribute. + * + * + * @see #getIp() + * @generated + * @ordered + */ + protected static final String IP_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIp() Ip}' attribute. + * + * + * @see #getIp() + * @generated + * @ordered + */ + protected String ip = IP_EDEFAULT; + + /** + * The default value of the '{@link #getDnsName() Dns Name}' attribute. + * + * + * @see #getDnsName() + * @generated + * @ordered + */ + protected static final String DNS_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDnsName() Dns Name}' attribute. + * + * + * @see #getDnsName() + * @generated + * @ordered + */ + protected String dnsName = DNS_NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected DcaeBasicServerNetworkImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServerPackage.Literals.DCAE_BASIC_SERVER_NETWORK; + } + + /** + * + * + * @generated + */ + public String getIp() { + return ip; + } + + /** + * + * + * @generated + */ + public void setIp(String newIp) { + String oldIp = ip; + ip = newIp; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER_NETWORK__IP, oldIp, ip)); + } + + /** + * + * + * @generated + */ + public String getDnsName() { + return dnsName; + } + + /** + * + * + * @generated + */ + public void setDnsName(String newDnsName) { + String oldDnsName = dnsName; + dnsName = newDnsName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER_NETWORK__DNS_NAME, oldDnsName, dnsName)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServerPackage.DCAE_BASIC_SERVER_NETWORK__IP: + return getIp(); + case ServerPackage.DCAE_BASIC_SERVER_NETWORK__DNS_NAME: + return getDnsName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServerPackage.DCAE_BASIC_SERVER_NETWORK__IP: + setIp((String)newValue); + return; + case ServerPackage.DCAE_BASIC_SERVER_NETWORK__DNS_NAME: + setDnsName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServerPackage.DCAE_BASIC_SERVER_NETWORK__IP: + setIp(IP_EDEFAULT); + return; + case ServerPackage.DCAE_BASIC_SERVER_NETWORK__DNS_NAME: + setDnsName(DNS_NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServerPackage.DCAE_BASIC_SERVER_NETWORK__IP: + return IP_EDEFAULT == null ? ip != null : !IP_EDEFAULT.equals(ip); + case ServerPackage.DCAE_BASIC_SERVER_NETWORK__DNS_NAME: + return DNS_NAME_EDEFAULT == null ? dnsName != null : !DNS_NAME_EDEFAULT.equals(dnsName); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (ip: "); + result.append(ip); + result.append(", dnsName: "); + result.append(dnsName); + result.append(')'); + return result.toString(); + } + +} //DcaeBasicServerNetworkImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/ServerFactoryImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/ServerFactoryImpl.java new file mode 100644 index 0000000..d265222 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/ServerFactoryImpl.java @@ -0,0 +1,127 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.server.impl; + +import org.openecomp.dcae.controller.core.server.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ServerFactoryImpl extends EFactoryImpl implements ServerFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ServerFactory init() { + try { + ServerFactory theServerFactory = (ServerFactory)EPackage.Registry.INSTANCE.getEFactory(ServerPackage.eNS_URI); + if (theServerFactory != null) { + return theServerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ServerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ServerFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ServerPackage.DCAE_BASIC_SERVER: return createDcaeBasicServer(); + case ServerPackage.DCAE_BASIC_SERVER_NETWORK: return createDcaeBasicServerNetwork(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public DcaeBasicServer createDcaeBasicServer() { + DcaeBasicServerImpl dcaeBasicServer = new DcaeBasicServerImpl(); + return dcaeBasicServer; + } + + /** + * + * + * @generated + */ + public DcaeBasicServerNetwork createDcaeBasicServerNetwork() { + DcaeBasicServerNetworkImpl dcaeBasicServerNetwork = new DcaeBasicServerNetworkImpl(); + return dcaeBasicServerNetwork; + } + + /** + * + * + * @generated + */ + public ServerPackage getServerPackage() { + return (ServerPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ServerPackage getPackage() { + return ServerPackage.eINSTANCE; + } + +} //ServerFactoryImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/ServerPackageImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/ServerPackageImpl.java new file mode 100644 index 0000000..1ed91e4 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/ServerPackageImpl.java @@ -0,0 +1,374 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.server.impl; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; +import org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork; +import org.openecomp.dcae.controller.core.server.ServerFactory; +import org.openecomp.dcae.controller.core.server.ServerPackage; +import org.openecomp.ncomp.core.CorePackage; +import org.openecomp.ncomp.core.logs.LogsPackage; +import org.openecomp.ncomp.openstack.compute.ComputePackage; +import org.openecomp.ncomp.openstack.location.LocationPackage; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage; +import org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ServerPackageImpl extends EPackageImpl implements ServerPackage { + /** + * + * + * @generated + */ + private EClass dcaeBasicServerEClass = null; + /** + * + * + * @generated + */ + private EClass dcaeBasicServerNetworkEClass = null; + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.core.server.ServerPackage#eNS_URI + * @see #init() + * @generated + */ + private ServerPackageImpl() { + super(eNS_URI, ServerFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ServerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ServerPackage init() { + if (isInited) return (ServerPackage)EPackage.Registry.INSTANCE.getEPackage(ServerPackage.eNS_URI); + + // Obtain or create and register package + ServerPackageImpl theServerPackage = (ServerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ServerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ServerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + CollectdPackage.eINSTANCE.eClass(); + PropertiesPackage.eINSTANCE.eClass(); + LocationPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theServerPackage.createPackageContents(); + + // Initialize created meta-data + theServerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theServerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ServerPackage.eNS_URI, theServerPackage); + return theServerPackage; + } + + /** + * + * + * @generated + */ + public EClass getDcaeBasicServer() { + return dcaeBasicServerEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeBasicServer_PrivateIp() { + return (EAttribute)dcaeBasicServerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeBasicServer_PublicIp() { + return (EAttribute)dcaeBasicServerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getDcaeBasicServer_Collectd() { + return (EReference)dcaeBasicServerEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getDcaeBasicServer_Modules() { + return (EReference)dcaeBasicServerEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getDcaeBasicServer_Networks() { + return (EReference)dcaeBasicServerEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeBasicServer_LastUpdate() { + return (EAttribute)dcaeBasicServerEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeBasicServer_UsingMonitoringAgent() { + return (EAttribute)dcaeBasicServerEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EReference getDcaeBasicServer_Server() { + return (EReference)dcaeBasicServerEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EReference getDcaeBasicServer_Hypervisor() { + return (EReference)dcaeBasicServerEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EReference getDcaeBasicServer_VmType() { + return (EReference)dcaeBasicServerEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeBasicServer_CertificatePassword() { + return (EAttribute)dcaeBasicServerEClass.getEStructuralFeatures().get(10); + } + + /** + * + * + * @generated + */ + public EClass getDcaeBasicServerNetwork() { + return dcaeBasicServerNetworkEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeBasicServerNetwork_Ip() { + return (EAttribute)dcaeBasicServerNetworkEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeBasicServerNetwork_DnsName() { + return (EAttribute)dcaeBasicServerNetworkEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public ServerFactory getServerFactory() { + return (ServerFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + dcaeBasicServerEClass = createEClass(DCAE_BASIC_SERVER); + createEAttribute(dcaeBasicServerEClass, DCAE_BASIC_SERVER__PRIVATE_IP); + createEAttribute(dcaeBasicServerEClass, DCAE_BASIC_SERVER__PUBLIC_IP); + createEReference(dcaeBasicServerEClass, DCAE_BASIC_SERVER__COLLECTD); + createEReference(dcaeBasicServerEClass, DCAE_BASIC_SERVER__MODULES); + createEReference(dcaeBasicServerEClass, DCAE_BASIC_SERVER__NETWORKS); + createEAttribute(dcaeBasicServerEClass, DCAE_BASIC_SERVER__LAST_UPDATE); + createEAttribute(dcaeBasicServerEClass, DCAE_BASIC_SERVER__USING_MONITORING_AGENT); + createEReference(dcaeBasicServerEClass, DCAE_BASIC_SERVER__SERVER); + createEReference(dcaeBasicServerEClass, DCAE_BASIC_SERVER__HYPERVISOR); + createEReference(dcaeBasicServerEClass, DCAE_BASIC_SERVER__VM_TYPE); + createEAttribute(dcaeBasicServerEClass, DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD); + + dcaeBasicServerNetworkEClass = createEClass(DCAE_BASIC_SERVER_NETWORK); + createEAttribute(dcaeBasicServerNetworkEClass, DCAE_BASIC_SERVER_NETWORK__IP); + createEAttribute(dcaeBasicServerNetworkEClass, DCAE_BASIC_SERVER_NETWORK__DNS_NAME); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + LogsPackage theLogsPackage = (LogsPackage)EPackage.Registry.INSTANCE.getEPackage(LogsPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + CollectdPackage theCollectdPackage = (CollectdPackage)EPackage.Registry.INSTANCE.getEPackage(CollectdPackage.eNS_URI); + PropertiesPackage thePropertiesPackage = (PropertiesPackage)EPackage.Registry.INSTANCE.getEPackage(PropertiesPackage.eNS_URI); + ComputePackage theComputePackage = (ComputePackage)EPackage.Registry.INSTANCE.getEPackage(ComputePackage.eNS_URI); + LocationPackage theLocationPackage = (LocationPackage)EPackage.Registry.INSTANCE.getEPackage(LocationPackage.eNS_URI); + org.openecomp.ncomp.openstack.core.CorePackage theCorePackage_1 = (org.openecomp.ncomp.openstack.core.CorePackage)EPackage.Registry.INSTANCE.getEPackage(org.openecomp.ncomp.openstack.core.CorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + dcaeBasicServerEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + dcaeBasicServerEClass.getESuperTypes().add(theCorePackage.getHasOperationalState()); + dcaeBasicServerEClass.getESuperTypes().add(theLogsPackage.getLogMessageContainer()); + dcaeBasicServerNetworkEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + + // Initialize classes, features, and operations; add parameters + initEClass(dcaeBasicServerEClass, DcaeBasicServer.class, "DcaeBasicServer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDcaeBasicServer_PrivateIp(), theEcorePackage.getEString(), "privateIp", null, 0, 1, DcaeBasicServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaeBasicServer_PublicIp(), theEcorePackage.getEString(), "publicIp", null, 0, 1, DcaeBasicServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDcaeBasicServer_Collectd(), theCollectdPackage.getCollectdServer(), null, "collectd", null, 0, 1, DcaeBasicServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDcaeBasicServer_Modules(), thePropertiesPackage.getModule(), null, "modules", null, 0, -1, DcaeBasicServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getDcaeBasicServer_Networks(), this.getDcaeBasicServerNetwork(), null, "networks", null, 0, -1, DcaeBasicServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEAttribute(getDcaeBasicServer_LastUpdate(), theCorePackage.getDateMetricAttribute(), "lastUpdate", null, 0, 1, DcaeBasicServer.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaeBasicServer_UsingMonitoringAgent(), theEcorePackage.getEBoolean(), "usingMonitoringAgent", "true", 0, 1, DcaeBasicServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDcaeBasicServer_Server(), theComputePackage.getServer(), null, "server", null, 0, 1, DcaeBasicServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDcaeBasicServer_Hypervisor(), theLocationPackage.getHypervisor(), null, "hypervisor", null, 0, 1, DcaeBasicServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDcaeBasicServer_VmType(), theCorePackage_1.getVirtualMachineType(), null, "vmType", null, 0, 1, DcaeBasicServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaeBasicServer_CertificatePassword(), theEcorePackage.getEString(), "certificatePassword", null, 0, 1, DcaeBasicServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(dcaeBasicServerNetworkEClass, DcaeBasicServerNetwork.class, "DcaeBasicServerNetwork", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDcaeBasicServerNetwork_Ip(), theEcorePackage.getEString(), "ip", null, 0, 1, DcaeBasicServerNetwork.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaeBasicServerNetwork_DnsName(), theEcorePackage.getEString(), "dnsName", null, 0, 1, DcaeBasicServerNetwork.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //ServerPackageImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/util/ServerAdapterFactory.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/util/ServerAdapterFactory.java new file mode 100644 index 0000000..a448cca --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/util/ServerAdapterFactory.java @@ -0,0 +1,213 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.server.util; + +import org.openecomp.dcae.controller.core.server.*; +import org.openecomp.ncomp.core.HasOperationalState; +import org.openecomp.ncomp.core.NamedEntity; +import org.openecomp.ncomp.core.logs.LogMessageContainer; +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.core.server.ServerPackage + * @generated + */ +public class ServerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ServerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ServerAdapterFactory() { + if (modelPackage == null) { + modelPackage = ServerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ServerSwitch modelSwitch = + new ServerSwitch() { + @Override + public Adapter caseDcaeBasicServer(DcaeBasicServer object) { + return createDcaeBasicServerAdapter(); + } + @Override + public Adapter caseDcaeBasicServerNetwork(DcaeBasicServerNetwork object) { + return createDcaeBasicServerNetworkAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseHasOperationalState(HasOperationalState object) { + return createHasOperationalStateAdapter(); + } + @Override + public Adapter caseLogMessageContainer(LogMessageContainer object) { + return createLogMessageContainerAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer Dcae Basic Server}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer + * @generated + */ + public Adapter createDcaeBasicServerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork Dcae Basic Server Network}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork + * @generated + */ + public Adapter createDcaeBasicServerNetworkAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.HasOperationalState Has Operational State}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.HasOperationalState + * @generated + */ + public Adapter createHasOperationalStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.logs.LogMessageContainer Log Message Container}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.logs.LogMessageContainer + * @generated + */ + public Adapter createLogMessageContainerAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ServerAdapterFactory diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/util/ServerSwitch.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/util/ServerSwitch.java new file mode 100644 index 0000000..964f0cb --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/util/ServerSwitch.java @@ -0,0 +1,202 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.server.util; + +import org.openecomp.dcae.controller.core.server.*; +import org.openecomp.ncomp.core.HasOperationalState; +import org.openecomp.ncomp.core.NamedEntity; +import org.openecomp.ncomp.core.logs.LogMessageContainer; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.core.server.ServerPackage + * @generated + */ +public class ServerSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ServerPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ServerSwitch() { + if (modelPackage == null) { + modelPackage = ServerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ServerPackage.DCAE_BASIC_SERVER: { + DcaeBasicServer dcaeBasicServer = (DcaeBasicServer)theEObject; + T result = caseDcaeBasicServer(dcaeBasicServer); + if (result == null) result = caseNamedEntity(dcaeBasicServer); + if (result == null) result = caseHasOperationalState(dcaeBasicServer); + if (result == null) result = caseLogMessageContainer(dcaeBasicServer); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServerPackage.DCAE_BASIC_SERVER_NETWORK: { + DcaeBasicServerNetwork dcaeBasicServerNetwork = (DcaeBasicServerNetwork)theEObject; + T result = caseDcaeBasicServerNetwork(dcaeBasicServerNetwork); + if (result == null) result = caseNamedEntity(dcaeBasicServerNetwork); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Basic Server'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Basic Server'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeBasicServer(DcaeBasicServer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Basic Server Network'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Basic Server Network'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeBasicServerNetwork(DcaeBasicServerNetwork object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Has Operational State'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Has Operational State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseHasOperationalState(HasOperationalState object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Log Message Container'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Log Message Container'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLogMessageContainer(LogMessageContainer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ServerSwitch diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeLocation.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeLocation.java new file mode 100644 index 0000000..25ea31c --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeLocation.java @@ -0,0 +1,99 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service; + +import org.openecomp.ncomp.openstack.location.OpenStackProject; + + +/** + * + * A representation of the model object 'Dcae Location'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.service.DcaeLocation#getLocationType Location Type}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.DcaeLocation#getOpenstackProject Openstack Project}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeLocation() + * @model + * @generated + */ +public interface DcaeLocation extends DcaeServiceContainer { + + /** + * Returns the value of the 'Location Type' attribute. + * + *

+ * If the meaning of the 'Location Type' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Location Type' attribute. + * @see #setLocationType(String) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeLocation_LocationType() + * @model unique="false" + * @generated + */ + String getLocationType(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaeLocation#getLocationType Location Type}' attribute. + * + * + * @param value the new value of the 'Location Type' attribute. + * @see #getLocationType() + * @generated + */ + void setLocationType(String value); + + /** + * Returns the value of the 'Openstack Project' reference. + * + *

+ * If the meaning of the 'Openstack Project' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Openstack Project' reference. + * @see #setOpenstackProject(OpenStackProject) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeLocation_OpenstackProject() + * @model + * @generated + */ + OpenStackProject getOpenstackProject(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaeLocation#getOpenstackProject Openstack Project}' reference. + * + * + * @param value the new value of the 'Openstack Project' reference. + * @see #getOpenstackProject() + * @generated + */ + void setOpenstackProject(OpenStackProject value); +} // DcaeLocation diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaePolicyEntity.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaePolicyEntity.java new file mode 100644 index 0000000..3bbb77e --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaePolicyEntity.java @@ -0,0 +1,240 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Dcae Policy Entity'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyName Policy Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyDescription Policy Description}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyConfigName Policy Config Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyTemplateVersion Policy Template Version}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyVersion Policy Version}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyPriority Policy Priority}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyScope Policy Scope}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaePolicyEntity() + * @model abstract="true" + * @generated + */ +public interface DcaePolicyEntity extends EObject { + /** + * Returns the value of the 'Policy Name' attribute. + * + *

+ * If the meaning of the 'Policy Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Policy Name' attribute. + * @see #setPolicyName(String) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaePolicyEntity_PolicyName() + * @model unique="false" + * annotation="http://openecomp.org/cdap destination='namespace-prefs::${path}.policyName'" + * @generated + */ + String getPolicyName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyName Policy Name}' attribute. + * + * + * @param value the new value of the 'Policy Name' attribute. + * @see #getPolicyName() + * @generated + */ + void setPolicyName(String value); + + /** + * Returns the value of the 'Policy Description' attribute. + * + *

+ * If the meaning of the 'Policy Description' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Policy Description' attribute. + * @see #setPolicyDescription(String) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaePolicyEntity_PolicyDescription() + * @model unique="false" + * annotation="http://openecomp.org/cdap destination='namespace-prefs::${path}.policyDescription'" + * @generated + */ + String getPolicyDescription(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyDescription Policy Description}' attribute. + * + * + * @param value the new value of the 'Policy Description' attribute. + * @see #getPolicyDescription() + * @generated + */ + void setPolicyDescription(String value); + + /** + * Returns the value of the 'Policy Config Name' attribute. + * + *

+ * If the meaning of the 'Policy Config Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Policy Config Name' attribute. + * @see #setPolicyConfigName(String) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaePolicyEntity_PolicyConfigName() + * @model unique="false" + * annotation="http://openecomp.org/cdap destination='namespace-prefs::${path}.policyConfigName'" + * @generated + */ + String getPolicyConfigName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyConfigName Policy Config Name}' attribute. + * + * + * @param value the new value of the 'Policy Config Name' attribute. + * @see #getPolicyConfigName() + * @generated + */ + void setPolicyConfigName(String value); + + /** + * Returns the value of the 'Policy Template Version' attribute. + * + *

+ * If the meaning of the 'Policy Template Version' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Policy Template Version' attribute. + * @see #setPolicyTemplateVersion(String) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaePolicyEntity_PolicyTemplateVersion() + * @model unique="false" + * annotation="http://openecomp.org/cdap destination='namespace-prefs::${path}.policyTemplateVersion'" + * @generated + */ + String getPolicyTemplateVersion(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyTemplateVersion Policy Template Version}' attribute. + * + * + * @param value the new value of the 'Policy Template Version' attribute. + * @see #getPolicyTemplateVersion() + * @generated + */ + void setPolicyTemplateVersion(String value); + + /** + * Returns the value of the 'Policy Version' attribute. + * + *

+ * If the meaning of the 'Policy Version' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Policy Version' attribute. + * @see #setPolicyVersion(String) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaePolicyEntity_PolicyVersion() + * @model unique="false" + * annotation="http://openecomp.org/cdap destination='namespace-prefs::${path}.policyVersion'" + * @generated + */ + String getPolicyVersion(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyVersion Policy Version}' attribute. + * + * + * @param value the new value of the 'Policy Version' attribute. + * @see #getPolicyVersion() + * @generated + */ + void setPolicyVersion(String value); + + /** + * Returns the value of the 'Policy Priority' attribute. + * + *

+ * If the meaning of the 'Policy Priority' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Policy Priority' attribute. + * @see #setPolicyPriority(String) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaePolicyEntity_PolicyPriority() + * @model unique="false" + * annotation="http://openecomp.org/cdap destination='namespace-prefs::${path}.policyPriority'" + * @generated + */ + String getPolicyPriority(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyPriority Policy Priority}' attribute. + * + * + * @param value the new value of the 'Policy Priority' attribute. + * @see #getPolicyPriority() + * @generated + */ + void setPolicyPriority(String value); + + /** + * Returns the value of the 'Policy Scope' attribute. + * + *

+ * If the meaning of the 'Policy Scope' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Policy Scope' attribute. + * @see #setPolicyScope(String) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaePolicyEntity_PolicyScope() + * @model unique="false" + * annotation="http://openecomp.org/cdap destination='namespace-prefs::${path}.policyScope'" + * @generated + */ + String getPolicyScope(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyScope Policy Scope}' attribute. + * + * + * @param value the new value of the 'Policy Scope' attribute. + * @see #getPolicyScope() + * @generated + */ + void setPolicyScope(String value); + +} // DcaePolicyEntity diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeService.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeService.java new file mode 100644 index 0000000..9f4941f --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeService.java @@ -0,0 +1,129 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service; + +import org.openecomp.ncomp.core.NamedEntity; +import org.eclipse.emf.ecore.EObject; +import org.json.JSONObject; + +/** + * + * A representation of the model object 'Dcae Service'. + * + * + * + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeService() + * @model abstract="true" + * @generated + */ +public interface DcaeService extends NamedEntity { + + /** + * + * + * @model instanceNameUnique="false" containerPathUnique="false" + * @generated + */ + void deploy(String instanceName, String containerPath); + + /** + * + * + * @model instanceNameUnique="false" + * @generated + */ + void undeploy(String instanceName); + + /** + * + * + * @model unique="false" instanceNameUnique="false" + * @generated + */ + HealthTestResponse test(String instanceName); + + /** + * + * + * @model instanceNameUnique="false" + * @generated + */ + void suspend(String instanceName); + + /** + * + * + * @model instanceNameUnique="false" + * @generated + */ + void resume(String instanceName); + + /** + * + * + * @model instanceNameUnique="false" + * @generated + */ + void pushManagerConfiguration(String instanceName); + + /** + * + * + * @model instanceNameUnique="false" + * @generated + */ + void pollManagerConfiguration(String instanceName); + + /** + * + * + * @model unique="false" instanceNameUnique="false" + * @generated + */ + EObject managerConfiguration(String instanceName); + + /** + * + * + * @model dataType="org.openecomp.ncomp.core.JsonObject" unique="false" instanceNameUnique="false" operationUnique="false" parametersDataType="org.openecomp.ncomp.core.JsonObject" parametersUnique="false" + * @generated + */ + JSONObject managerOperation(String instanceName, String operation, JSONObject parameters); + + /** + * + * + * @model instanceNameUnique="false" + * @generated + */ + void updateConfigurationFromPolicy(String instanceName); + + /** + * + * + * @model + * @generated + */ + void runHealthTests(); +} // DcaeService diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeServiceContainer.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeServiceContainer.java new file mode 100644 index 0000000..def3b75 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeServiceContainer.java @@ -0,0 +1,65 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Dcae Service Container'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.service.DcaeServiceContainer#getInstances Instances}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeServiceContainer() + * @model abstract="true" + * @generated + */ +public interface DcaeServiceContainer extends NamedEntity { + /** + * Returns the value of the 'Instances' reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance}. + * It is bidirectional and its opposite is '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getServiceContainer Service Container}'. + * + *

+ * If the meaning of the 'Instances' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Instances' reference list. + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeServiceContainer_Instances() + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getServiceContainer + * @model opposite="serviceContainer" + * @generated + */ + EList getInstances(); + +} // DcaeServiceContainer diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeServiceDescriptor.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeServiceDescriptor.java new file mode 100644 index 0000000..dc920ac --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeServiceDescriptor.java @@ -0,0 +1,125 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Dcae Service Descriptor'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor#getGroupId Group Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor#getArtifact Artifact}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor#getVersion Version}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeServiceDescriptor() + * @model + * @generated + */ +public interface DcaeServiceDescriptor extends NamedEntity { + /** + * Returns the value of the 'Group Id' attribute. + * + *

+ * If the meaning of the 'Group Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Group Id' attribute. + * @see #setGroupId(String) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeServiceDescriptor_GroupId() + * @model unique="false" + * @generated + */ + String getGroupId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor#getGroupId Group Id}' attribute. + * + * + * @param value the new value of the 'Group Id' attribute. + * @see #getGroupId() + * @generated + */ + void setGroupId(String value); + + /** + * Returns the value of the 'Artifact' attribute. + * + *

+ * If the meaning of the 'Artifact' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Artifact' attribute. + * @see #setArtifact(String) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeServiceDescriptor_Artifact() + * @model unique="false" + * @generated + */ + String getArtifact(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor#getArtifact Artifact}' attribute. + * + * + * @param value the new value of the 'Artifact' attribute. + * @see #getArtifact() + * @generated + */ + void setArtifact(String value); + + /** + * Returns the value of the 'Version' attribute. + * + *

+ * If the meaning of the 'Version' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Version' attribute. + * @see #setVersion(String) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeServiceDescriptor_Version() + * @model unique="false" + * @generated + */ + String getVersion(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor#getVersion Version}' attribute. + * + * + * @param value the new value of the 'Version' attribute. + * @see #getVersion() + * @generated + */ + void setVersion(String value); + +} // DcaeServiceDescriptor diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeServiceInstance.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeServiceInstance.java new file mode 100644 index 0000000..2475f84 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/DcaeServiceInstance.java @@ -0,0 +1,229 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service; + +import org.openecomp.dcae.controller.core.stream.DcaeStream; +import org.openecomp.ncomp.core.DeploymentStatus; +import org.openecomp.ncomp.core.NamedEntity; +import org.openecomp.ncomp.core.types.metrics.DateMetricAttribute; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Dcae Service Instance'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getServiceContainer Service Container}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getStatus Status}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getInputStreams Input Streams}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getOutputStreams Output Streams}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getLastHealthTest Last Health Test}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getHealthTestStatus Health Test Status}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getHealthTestMessageCode Health Test Message Code}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeServiceInstance() + * @model abstract="true" + * @generated + */ +public interface DcaeServiceInstance extends NamedEntity { + /** + * Returns the value of the 'Service Container' reference. + * It is bidirectional and its opposite is '{@link org.openecomp.dcae.controller.core.service.DcaeServiceContainer#getInstances Instances}'. + * + *

+ * If the meaning of the 'Service Container' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Service Container' reference. + * @see #setServiceContainer(DcaeServiceContainer) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeServiceInstance_ServiceContainer() + * @see org.openecomp.dcae.controller.core.service.DcaeServiceContainer#getInstances + * @model opposite="instances" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + DcaeServiceContainer getServiceContainer(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getServiceContainer Service Container}' reference. + * + * + * @param value the new value of the 'Service Container' reference. + * @see #getServiceContainer() + * @generated + */ + void setServiceContainer(DcaeServiceContainer value); + + /** + * Returns the value of the 'Status' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.DeploymentStatus}. + * + *

+ * If the meaning of the 'Status' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Status' attribute. + * @see org.openecomp.ncomp.core.DeploymentStatus + * @see #setStatus(DeploymentStatus) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeServiceInstance_Status() + * @model unique="false" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + DeploymentStatus getStatus(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getStatus Status}' attribute. + * + * + * @param value the new value of the 'Status' attribute. + * @see org.openecomp.ncomp.core.DeploymentStatus + * @see #getStatus() + * @generated + */ + void setStatus(DeploymentStatus value); + + /** + * Returns the value of the 'Input Streams' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.stream.DcaeStream}. + * + *

+ * If the meaning of the 'Input Streams' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Input Streams' containment reference list. + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeServiceInstance_InputStreams() + * @model containment="true" + * annotation="http://openecomp.org type='service'" + * @generated + */ + EList getInputStreams(); + + /** + * Returns the value of the 'Output Streams' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.stream.DcaeStream}. + * + *

+ * If the meaning of the 'Output Streams' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Output Streams' containment reference list. + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeServiceInstance_OutputStreams() + * @model containment="true" + * annotation="http://openecomp.org type='service'" + * @generated + */ + EList getOutputStreams(); + + /** + * Returns the value of the 'Last Health Test' attribute. + * + *

+ * If the meaning of the 'Last Health Test' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Last Health Test' attribute. + * @see #setLastHealthTest(DateMetricAttribute) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeServiceInstance_LastHealthTest() + * @model unique="false" dataType="org.openecomp.ncomp.core.DateMetricAttribute" transient="true" + * @generated + */ + DateMetricAttribute getLastHealthTest(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getLastHealthTest Last Health Test}' attribute. + * + * + * @param value the new value of the 'Last Health Test' attribute. + * @see #getLastHealthTest() + * @generated + */ + void setLastHealthTest(DateMetricAttribute value); + + /** + * Returns the value of the 'Health Test Status' attribute. + * The literals are from the enumeration {@link org.openecomp.dcae.controller.core.service.HealthTestStatus}. + * + *

+ * If the meaning of the 'Health Test Status' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Health Test Status' attribute. + * @see org.openecomp.dcae.controller.core.service.HealthTestStatus + * @see #setHealthTestStatus(HealthTestStatus) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeServiceInstance_HealthTestStatus() + * @model unique="false" + * @generated + */ + HealthTestStatus getHealthTestStatus(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getHealthTestStatus Health Test Status}' attribute. + * + * + * @param value the new value of the 'Health Test Status' attribute. + * @see org.openecomp.dcae.controller.core.service.HealthTestStatus + * @see #getHealthTestStatus() + * @generated + */ + void setHealthTestStatus(HealthTestStatus value); + + /** + * Returns the value of the 'Health Test Message Code' attribute. + * + *

+ * If the meaning of the 'Health Test Message Code' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Health Test Message Code' attribute. + * @see #setHealthTestMessageCode(String) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getDcaeServiceInstance_HealthTestMessageCode() + * @model unique="false" + * @generated + */ + String getHealthTestMessageCode(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getHealthTestMessageCode Health Test Message Code}' attribute. + * + * + * @param value the new value of the 'Health Test Message Code' attribute. + * @see #getHealthTestMessageCode() + * @generated + */ + void setHealthTestMessageCode(String value); + +} // DcaeServiceInstance diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/HealthTestResponse.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/HealthTestResponse.java new file mode 100644 index 0000000..0eaab17 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/HealthTestResponse.java @@ -0,0 +1,101 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Healt Test Response'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.service.HealthTestResponse#getStatus Status}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.HealthTestResponse#getMessageCode Message Code}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getHealthTestResponse() + * @model + * @generated + */ +public interface HealthTestResponse extends EObject { + /** + * Returns the value of the 'Status' attribute. + * The literals are from the enumeration {@link org.openecomp.dcae.controller.core.service.HealthTestStatus}. + * + *

+ * If the meaning of the 'Status' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Status' attribute. + * @see org.openecomp.dcae.controller.core.service.HealthTestStatus + * @see #setStatus(HealthTestStatus) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getHealthTestResponse_Status() + * @model unique="false" + * @generated + */ + HealthTestStatus getStatus(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.HealthTestResponse#getStatus Status}' attribute. + * + * + * @param value the new value of the 'Status' attribute. + * @see org.openecomp.dcae.controller.core.service.HealthTestStatus + * @see #getStatus() + * @generated + */ + void setStatus(HealthTestStatus value); + + /** + * Returns the value of the 'Message Code' attribute. + * + *

+ * If the meaning of the 'Message Code' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Message Code' attribute. + * @see #setMessageCode(String) + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getHealthTestResponse_MessageCode() + * @model unique="false" + * @generated + */ + String getMessageCode(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.service.HealthTestResponse#getMessageCode Message Code}' attribute. + * + * + * @param value the new value of the 'Message Code' attribute. + * @see #getMessageCode() + * @generated + */ + void setMessageCode(String value); + +} // HealtTestResponse diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/HealthTestStatus.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/HealthTestStatus.java new file mode 100644 index 0000000..be353a2 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/HealthTestStatus.java @@ -0,0 +1,254 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Health Test Status', + * and utility methods for working with them. + * + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getHealthTestStatus() + * @model + * @generated + */ +public enum HealthTestStatus implements Enumerator { + /** + * The 'GREEN' literal object. + * + * + * @see #GREEN_VALUE + * @generated + * @ordered + */ + GREEN(0, "GREEN", "GREEN"), + + /** + * The 'YELLOW' literal object. + * + * + * @see #YELLOW_VALUE + * @generated + * @ordered + */ + YELLOW(0, "YELLOW", "YELLOW"), + + /** + * The 'RED' literal object. + * + * + * @see #RED_VALUE + * @generated + * @ordered + */ + RED(0, "RED", "RED"); + + /** + * The 'GREEN' literal value. + * + *

+ * If the meaning of 'GREEN' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #GREEN + * @model + * @generated + * @ordered + */ + public static final int GREEN_VALUE = 0; + + /** + * The 'YELLOW' literal value. + * + *

+ * If the meaning of 'YELLOW' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #YELLOW + * @model + * @generated + * @ordered + */ + public static final int YELLOW_VALUE = 0; + + /** + * The 'RED' literal value. + * + *

+ * If the meaning of 'RED' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #RED + * @model + * @generated + * @ordered + */ + public static final int RED_VALUE = 0; + + /** + * An array of all the 'Health Test Status' enumerators. + * + * + * @generated + */ + private static final HealthTestStatus[] VALUES_ARRAY = + new HealthTestStatus[] { + GREEN, + YELLOW, + RED, + }; + + /** + * A public read-only list of all the 'Health Test Status' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Health Test Status' literal with the specified literal value. + * + * + * @generated + */ + public static HealthTestStatus get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + HealthTestStatus result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Health Test Status' literal with the specified name. + * + * + * @generated + */ + public static HealthTestStatus getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + HealthTestStatus result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Health Test Status' literal with the specified integer value. + * + * + * @generated + */ + public static HealthTestStatus get(int value) { + switch (value) { + case GREEN_VALUE: return GREEN; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private HealthTestStatus(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //HealthTestStatus diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/ServiceFactory.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/ServiceFactory.java new file mode 100644 index 0000000..2ad75f5 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/ServiceFactory.java @@ -0,0 +1,81 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.core.service.ServicePackage + * @generated + */ +public interface ServiceFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ServiceFactory eINSTANCE = org.openecomp.dcae.controller.core.service.impl.ServiceFactoryImpl.init(); + + /** + * Returns a new object of class 'Dcae Location'. + * + * + * @return a new object of class 'Dcae Location'. + * @generated + */ + DcaeLocation createDcaeLocation(); + + /** + * Returns a new object of class 'Dcae Service Descriptor'. + * + * + * @return a new object of class 'Dcae Service Descriptor'. + * @generated + */ + DcaeServiceDescriptor createDcaeServiceDescriptor(); + + /** + * Returns a new object of class 'Health Test Response'. + * + * + * @return a new object of class 'Health Test Response'. + * @generated + */ + HealthTestResponse createHealthTestResponse(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ServicePackage getServicePackage(); + +} //ServiceFactory diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/ServicePackage.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/ServicePackage.java new file mode 100644 index 0000000..74f5786 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/ServicePackage.java @@ -0,0 +1,1579 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service; + +import org.openecomp.ncomp.core.CorePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.core.service.ServiceFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-core-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.core'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org' cdap='http://openecomp.org/cdap'" + * @generated + */ +public interface ServicePackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "service"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.core.service"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "service"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ServicePackage eINSTANCE = org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceImpl Dcae Service}' class. + * + * + * @see org.openecomp.dcae.controller.core.service.impl.DcaeServiceImpl + * @see org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl#getDcaeService() + * @generated + */ + int DCAE_SERVICE = 1; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceContainerImpl Dcae Service Container}' class. + * + * + * @see org.openecomp.dcae.controller.core.service.impl.DcaeServiceContainerImpl + * @see org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl#getDcaeServiceContainer() + * @generated + */ + int DCAE_SERVICE_CONTAINER = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_CONTAINER__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_CONTAINER__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_CONTAINER__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_CONTAINER__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Instances' reference list. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_CONTAINER__INSTANCES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Dcae Service Container' class. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_CONTAINER_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Dcae Service Container' class. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_CONTAINER_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The number of structural features of the 'Dcae Service' class. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The operation id for the 'Deploy' operation. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE___DEPLOY__STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The operation id for the 'Undeploy' operation. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE___UNDEPLOY__STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 1; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE___TEST__STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 2; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE___SUSPEND__STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 3; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE___RESUME__STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 4; + + /** + * The operation id for the 'Push Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 5; + + /** + * The operation id for the 'Poll Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE___POLL_MANAGER_CONFIGURATION__STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 6; + + /** + * The operation id for the 'Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE___MANAGER_CONFIGURATION__STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 7; + + /** + * The operation id for the 'Manager Operation' operation. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 8; + + /** + * The operation id for the 'Update Configuration From Policy' operation. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 9; + + /** + * The operation id for the 'Run Health Tests' operation. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE___RUN_HEALTH_TESTS = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 10; + + /** + * The number of operations of the 'Dcae Service' class. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 11; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceInstanceImpl Dcae Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.core.service.impl.DcaeServiceInstanceImpl + * @see org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl#getDcaeServiceInstance() + * @generated + */ + int DCAE_SERVICE_INSTANCE = 2; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_INSTANCE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_INSTANCE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_INSTANCE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_INSTANCE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Service Container' reference. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_INSTANCE__SERVICE_CONTAINER = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_INSTANCE__STATUS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_INSTANCE__INPUT_STREAMS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_INSTANCE__OUTPUT_STREAMS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Last Health Test' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_INSTANCE__LAST_HEALTH_TEST = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Health Test Status' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_INSTANCE__HEALTH_TEST_STATUS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Health Test Message Code' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 6; + + /** + * The number of structural features of the 'Dcae Service Instance' class. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_INSTANCE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 7; + + /** + * The number of operations of the 'Dcae Service Instance' class. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_INSTANCE_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.service.impl.DcaeLocationImpl Dcae Location}' class. + * + * + * @see org.openecomp.dcae.controller.core.service.impl.DcaeLocationImpl + * @see org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl#getDcaeLocation() + * @generated + */ + int DCAE_LOCATION = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_LOCATION__NAME = DCAE_SERVICE_CONTAINER__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_LOCATION__LAST_POLLED = DCAE_SERVICE_CONTAINER__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_LOCATION__LAST_CHANGED = DCAE_SERVICE_CONTAINER__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_LOCATION__CREATED = DCAE_SERVICE_CONTAINER__CREATED; + + /** + * The feature id for the 'Instances' reference list. + * + * + * @generated + * @ordered + */ + int DCAE_LOCATION__INSTANCES = DCAE_SERVICE_CONTAINER__INSTANCES; + + /** + * The feature id for the 'Location Type' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_LOCATION__LOCATION_TYPE = DCAE_SERVICE_CONTAINER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Openstack Project' reference. + * + * + * @generated + * @ordered + */ + int DCAE_LOCATION__OPENSTACK_PROJECT = DCAE_SERVICE_CONTAINER_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Dcae Location' class. + * + * + * @generated + * @ordered + */ + int DCAE_LOCATION_FEATURE_COUNT = DCAE_SERVICE_CONTAINER_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Dcae Location' class. + * + * + * @generated + * @ordered + */ + int DCAE_LOCATION_OPERATION_COUNT = DCAE_SERVICE_CONTAINER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceDescriptorImpl Dcae Service Descriptor}' class. + * + * + * @see org.openecomp.dcae.controller.core.service.impl.DcaeServiceDescriptorImpl + * @see org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl#getDcaeServiceDescriptor() + * @generated + */ + int DCAE_SERVICE_DESCRIPTOR = 4; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_DESCRIPTOR__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_DESCRIPTOR__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_DESCRIPTOR__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_DESCRIPTOR__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Group Id' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_DESCRIPTOR__GROUP_ID = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Artifact' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_DESCRIPTOR__ARTIFACT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Version' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_DESCRIPTOR__VERSION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Dcae Service Descriptor' class. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Dcae Service Descriptor' class. + * + * + * @generated + * @ordered + */ + int DCAE_SERVICE_DESCRIPTOR_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.service.impl.HealthTestResponseImpl Health Test Response}' class. + * + * + * @see org.openecomp.dcae.controller.core.service.impl.HealthTestResponseImpl + * @see org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl#getHealthTestResponse() + * @generated + */ + int HEALTH_TEST_RESPONSE = 5; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int HEALTH_TEST_RESPONSE__STATUS = 0; + + /** + * The feature id for the 'Message Code' attribute. + * + * + * @generated + * @ordered + */ + int HEALTH_TEST_RESPONSE__MESSAGE_CODE = 1; + + /** + * The number of structural features of the 'Health Test Response' class. + * + * + * @generated + * @ordered + */ + int HEALTH_TEST_RESPONSE_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Health Test Response' class. + * + * + * @generated + * @ordered + */ + int HEALTH_TEST_RESPONSE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.service.impl.DcaePolicyEntityImpl Dcae Policy Entity}' class. + * + * + * @see org.openecomp.dcae.controller.core.service.impl.DcaePolicyEntityImpl + * @see org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl#getDcaePolicyEntity() + * @generated + */ + int DCAE_POLICY_ENTITY = 6; + + /** + * The feature id for the 'Policy Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_POLICY_ENTITY__POLICY_NAME = 0; + + /** + * The feature id for the 'Policy Description' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_POLICY_ENTITY__POLICY_DESCRIPTION = 1; + + /** + * The feature id for the 'Policy Config Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_POLICY_ENTITY__POLICY_CONFIG_NAME = 2; + + /** + * The feature id for the 'Policy Template Version' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_POLICY_ENTITY__POLICY_TEMPLATE_VERSION = 3; + + /** + * The feature id for the 'Policy Version' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_POLICY_ENTITY__POLICY_VERSION = 4; + + /** + * The feature id for the 'Policy Priority' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_POLICY_ENTITY__POLICY_PRIORITY = 5; + + /** + * The feature id for the 'Policy Scope' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_POLICY_ENTITY__POLICY_SCOPE = 6; + + /** + * The number of structural features of the 'Dcae Policy Entity' class. + * + * + * @generated + * @ordered + */ + int DCAE_POLICY_ENTITY_FEATURE_COUNT = 7; + + /** + * The number of operations of the 'Dcae Policy Entity' class. + * + * + * @generated + * @ordered + */ + int DCAE_POLICY_ENTITY_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.service.HealthTestStatus Health Test Status}' enum. + * + * + * @see org.openecomp.dcae.controller.core.service.HealthTestStatus + * @see org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl#getHealthTestStatus() + * @generated + */ + int HEALTH_TEST_STATUS = 7; + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.service.DcaeService Dcae Service}'. + * + * + * @return the meta object for class 'Dcae Service'. + * @see org.openecomp.dcae.controller.core.service.DcaeService + * @generated + */ + EClass getDcaeService(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.service.DcaeService#deploy(java.lang.String, java.lang.String) Deploy}' operation. + * + * + * @return the meta object for the 'Deploy' operation. + * @see org.openecomp.dcae.controller.core.service.DcaeService#deploy(java.lang.String, java.lang.String) + * @generated + */ + EOperation getDcaeService__Deploy__String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.service.DcaeService#undeploy(java.lang.String) Undeploy}' operation. + * + * + * @return the meta object for the 'Undeploy' operation. + * @see org.openecomp.dcae.controller.core.service.DcaeService#undeploy(java.lang.String) + * @generated + */ + EOperation getDcaeService__Undeploy__String(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.service.DcaeService#test(java.lang.String) Test}' operation. + * + * + * @return the meta object for the 'Test' operation. + * @see org.openecomp.dcae.controller.core.service.DcaeService#test(java.lang.String) + * @generated + */ + EOperation getDcaeService__Test__String(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.service.DcaeService#suspend(java.lang.String) Suspend}' operation. + * + * + * @return the meta object for the 'Suspend' operation. + * @see org.openecomp.dcae.controller.core.service.DcaeService#suspend(java.lang.String) + * @generated + */ + EOperation getDcaeService__Suspend__String(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.service.DcaeService#resume(java.lang.String) Resume}' operation. + * + * + * @return the meta object for the 'Resume' operation. + * @see org.openecomp.dcae.controller.core.service.DcaeService#resume(java.lang.String) + * @generated + */ + EOperation getDcaeService__Resume__String(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.service.DcaeService#pushManagerConfiguration(java.lang.String) Push Manager Configuration}' operation. + * + * + * @return the meta object for the 'Push Manager Configuration' operation. + * @see org.openecomp.dcae.controller.core.service.DcaeService#pushManagerConfiguration(java.lang.String) + * @generated + */ + EOperation getDcaeService__PushManagerConfiguration__String(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.service.DcaeService#pollManagerConfiguration(java.lang.String) Poll Manager Configuration}' operation. + * + * + * @return the meta object for the 'Poll Manager Configuration' operation. + * @see org.openecomp.dcae.controller.core.service.DcaeService#pollManagerConfiguration(java.lang.String) + * @generated + */ + EOperation getDcaeService__PollManagerConfiguration__String(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.service.DcaeService#managerConfiguration(java.lang.String) Manager Configuration}' operation. + * + * + * @return the meta object for the 'Manager Configuration' operation. + * @see org.openecomp.dcae.controller.core.service.DcaeService#managerConfiguration(java.lang.String) + * @generated + */ + EOperation getDcaeService__ManagerConfiguration__String(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.service.DcaeService#managerOperation(java.lang.String, java.lang.String, org.json.JSONObject) Manager Operation}' operation. + * + * + * @return the meta object for the 'Manager Operation' operation. + * @see org.openecomp.dcae.controller.core.service.DcaeService#managerOperation(java.lang.String, java.lang.String, org.json.JSONObject) + * @generated + */ + EOperation getDcaeService__ManagerOperation__String_String_JSONObject(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.service.DcaeService#updateConfigurationFromPolicy(java.lang.String) Update Configuration From Policy}' operation. + * + * + * @return the meta object for the 'Update Configuration From Policy' operation. + * @see org.openecomp.dcae.controller.core.service.DcaeService#updateConfigurationFromPolicy(java.lang.String) + * @generated + */ + EOperation getDcaeService__UpdateConfigurationFromPolicy__String(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.core.service.DcaeService#runHealthTests() Run Health Tests}' operation. + * + * + * @return the meta object for the 'Run Health Tests' operation. + * @see org.openecomp.dcae.controller.core.service.DcaeService#runHealthTests() + * @generated + */ + EOperation getDcaeService__RunHealthTests(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceContainer Dcae Service Container}'. + * + * + * @return the meta object for class 'Dcae Service Container'. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceContainer + * @generated + */ + EClass getDcaeServiceContainer(); + + /** + * Returns the meta object for the reference list '{@link org.openecomp.dcae.controller.core.service.DcaeServiceContainer#getInstances Instances}'. + * + * + * @return the meta object for the reference list 'Instances'. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceContainer#getInstances() + * @see #getDcaeServiceContainer() + * @generated + */ + EReference getDcaeServiceContainer_Instances(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance Dcae Service Instance}'. + * + * + * @return the meta object for class 'Dcae Service Instance'. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance + * @generated + */ + EClass getDcaeServiceInstance(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getServiceContainer Service Container}'. + * + * + * @return the meta object for the reference 'Service Container'. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getServiceContainer() + * @see #getDcaeServiceInstance() + * @generated + */ + EReference getDcaeServiceInstance_ServiceContainer(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getStatus Status}'. + * + * + * @return the meta object for the attribute 'Status'. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getStatus() + * @see #getDcaeServiceInstance() + * @generated + */ + EAttribute getDcaeServiceInstance_Status(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getInputStreams Input Streams}'. + * + * + * @return the meta object for the containment reference list 'Input Streams'. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getInputStreams() + * @see #getDcaeServiceInstance() + * @generated + */ + EReference getDcaeServiceInstance_InputStreams(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getOutputStreams Output Streams}'. + * + * + * @return the meta object for the containment reference list 'Output Streams'. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getOutputStreams() + * @see #getDcaeServiceInstance() + * @generated + */ + EReference getDcaeServiceInstance_OutputStreams(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getLastHealthTest Last Health Test}'. + * + * + * @return the meta object for the attribute 'Last Health Test'. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getLastHealthTest() + * @see #getDcaeServiceInstance() + * @generated + */ + EAttribute getDcaeServiceInstance_LastHealthTest(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getHealthTestStatus Health Test Status}'. + * + * + * @return the meta object for the attribute 'Health Test Status'. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getHealthTestStatus() + * @see #getDcaeServiceInstance() + * @generated + */ + EAttribute getDcaeServiceInstance_HealthTestStatus(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getHealthTestMessageCode Health Test Message Code}'. + * + * + * @return the meta object for the attribute 'Health Test Message Code'. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance#getHealthTestMessageCode() + * @see #getDcaeServiceInstance() + * @generated + */ + EAttribute getDcaeServiceInstance_HealthTestMessageCode(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.service.DcaeLocation Dcae Location}'. + * + * + * @return the meta object for class 'Dcae Location'. + * @see org.openecomp.dcae.controller.core.service.DcaeLocation + * @generated + */ + EClass getDcaeLocation(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.DcaeLocation#getLocationType Location Type}'. + * + * + * @return the meta object for the attribute 'Location Type'. + * @see org.openecomp.dcae.controller.core.service.DcaeLocation#getLocationType() + * @see #getDcaeLocation() + * @generated + */ + EAttribute getDcaeLocation_LocationType(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.core.service.DcaeLocation#getOpenstackProject Openstack Project}'. + * + * + * @return the meta object for the reference 'Openstack Project'. + * @see org.openecomp.dcae.controller.core.service.DcaeLocation#getOpenstackProject() + * @see #getDcaeLocation() + * @generated + */ + EReference getDcaeLocation_OpenstackProject(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor Dcae Service Descriptor}'. + * + * + * @return the meta object for class 'Dcae Service Descriptor'. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor + * @generated + */ + EClass getDcaeServiceDescriptor(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor#getGroupId Group Id}'. + * + * + * @return the meta object for the attribute 'Group Id'. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor#getGroupId() + * @see #getDcaeServiceDescriptor() + * @generated + */ + EAttribute getDcaeServiceDescriptor_GroupId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor#getArtifact Artifact}'. + * + * + * @return the meta object for the attribute 'Artifact'. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor#getArtifact() + * @see #getDcaeServiceDescriptor() + * @generated + */ + EAttribute getDcaeServiceDescriptor_Artifact(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor#getVersion Version}'. + * + * + * @return the meta object for the attribute 'Version'. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor#getVersion() + * @see #getDcaeServiceDescriptor() + * @generated + */ + EAttribute getDcaeServiceDescriptor_Version(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.service.HealthTestResponse Health Test Response}'. + * + * + * @return the meta object for class 'Health Test Response'. + * @see org.openecomp.dcae.controller.core.service.HealthTestResponse + * @generated + */ + EClass getHealthTestResponse(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.HealthTestResponse#getStatus Status}'. + * + * + * @return the meta object for the attribute 'Status'. + * @see org.openecomp.dcae.controller.core.service.HealthTestResponse#getStatus() + * @see #getHealthTestResponse() + * @generated + */ + EAttribute getHealthTestResponse_Status(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.HealthTestResponse#getMessageCode Message Code}'. + * + * + * @return the meta object for the attribute 'Message Code'. + * @see org.openecomp.dcae.controller.core.service.HealthTestResponse#getMessageCode() + * @see #getHealthTestResponse() + * @generated + */ + EAttribute getHealthTestResponse_MessageCode(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity Dcae Policy Entity}'. + * + * + * @return the meta object for class 'Dcae Policy Entity'. + * @see org.openecomp.dcae.controller.core.service.DcaePolicyEntity + * @generated + */ + EClass getDcaePolicyEntity(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyName Policy Name}'. + * + * + * @return the meta object for the attribute 'Policy Name'. + * @see org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyName() + * @see #getDcaePolicyEntity() + * @generated + */ + EAttribute getDcaePolicyEntity_PolicyName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyDescription Policy Description}'. + * + * + * @return the meta object for the attribute 'Policy Description'. + * @see org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyDescription() + * @see #getDcaePolicyEntity() + * @generated + */ + EAttribute getDcaePolicyEntity_PolicyDescription(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyConfigName Policy Config Name}'. + * + * + * @return the meta object for the attribute 'Policy Config Name'. + * @see org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyConfigName() + * @see #getDcaePolicyEntity() + * @generated + */ + EAttribute getDcaePolicyEntity_PolicyConfigName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyTemplateVersion Policy Template Version}'. + * + * + * @return the meta object for the attribute 'Policy Template Version'. + * @see org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyTemplateVersion() + * @see #getDcaePolicyEntity() + * @generated + */ + EAttribute getDcaePolicyEntity_PolicyTemplateVersion(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyVersion Policy Version}'. + * + * + * @return the meta object for the attribute 'Policy Version'. + * @see org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyVersion() + * @see #getDcaePolicyEntity() + * @generated + */ + EAttribute getDcaePolicyEntity_PolicyVersion(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyPriority Policy Priority}'. + * + * + * @return the meta object for the attribute 'Policy Priority'. + * @see org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyPriority() + * @see #getDcaePolicyEntity() + * @generated + */ + EAttribute getDcaePolicyEntity_PolicyPriority(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyScope Policy Scope}'. + * + * + * @return the meta object for the attribute 'Policy Scope'. + * @see org.openecomp.dcae.controller.core.service.DcaePolicyEntity#getPolicyScope() + * @see #getDcaePolicyEntity() + * @generated + */ + EAttribute getDcaePolicyEntity_PolicyScope(); + + /** + * Returns the meta object for enum '{@link org.openecomp.dcae.controller.core.service.HealthTestStatus Health Test Status}'. + * + * + * @return the meta object for enum 'Health Test Status'. + * @see org.openecomp.dcae.controller.core.service.HealthTestStatus + * @generated + */ + EEnum getHealthTestStatus(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ServiceFactory getServiceFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceImpl Dcae Service}' class. + * + * + * @see org.openecomp.dcae.controller.core.service.impl.DcaeServiceImpl + * @see org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl#getDcaeService() + * @generated + */ + EClass DCAE_SERVICE = eINSTANCE.getDcaeService(); + + /** + * The meta object literal for the 'Deploy' operation. + * + * + * @generated + */ + EOperation DCAE_SERVICE___DEPLOY__STRING_STRING = eINSTANCE.getDcaeService__Deploy__String_String(); + + /** + * The meta object literal for the 'Undeploy' operation. + * + * + * @generated + */ + EOperation DCAE_SERVICE___UNDEPLOY__STRING = eINSTANCE.getDcaeService__Undeploy__String(); + + /** + * The meta object literal for the 'Test' operation. + * + * + * @generated + */ + EOperation DCAE_SERVICE___TEST__STRING = eINSTANCE.getDcaeService__Test__String(); + + /** + * The meta object literal for the 'Suspend' operation. + * + * + * @generated + */ + EOperation DCAE_SERVICE___SUSPEND__STRING = eINSTANCE.getDcaeService__Suspend__String(); + + /** + * The meta object literal for the 'Resume' operation. + * + * + * @generated + */ + EOperation DCAE_SERVICE___RESUME__STRING = eINSTANCE.getDcaeService__Resume__String(); + + /** + * The meta object literal for the 'Push Manager Configuration' operation. + * + * + * @generated + */ + EOperation DCAE_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING = eINSTANCE.getDcaeService__PushManagerConfiguration__String(); + + /** + * The meta object literal for the 'Poll Manager Configuration' operation. + * + * + * @generated + */ + EOperation DCAE_SERVICE___POLL_MANAGER_CONFIGURATION__STRING = eINSTANCE.getDcaeService__PollManagerConfiguration__String(); + + /** + * The meta object literal for the 'Manager Configuration' operation. + * + * + * @generated + */ + EOperation DCAE_SERVICE___MANAGER_CONFIGURATION__STRING = eINSTANCE.getDcaeService__ManagerConfiguration__String(); + + /** + * The meta object literal for the 'Manager Operation' operation. + * + * + * @generated + */ + EOperation DCAE_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT = eINSTANCE.getDcaeService__ManagerOperation__String_String_JSONObject(); + + /** + * The meta object literal for the 'Update Configuration From Policy' operation. + * + * + * @generated + */ + EOperation DCAE_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING = eINSTANCE.getDcaeService__UpdateConfigurationFromPolicy__String(); + + /** + * The meta object literal for the 'Run Health Tests' operation. + * + * + * @generated + */ + EOperation DCAE_SERVICE___RUN_HEALTH_TESTS = eINSTANCE.getDcaeService__RunHealthTests(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceContainerImpl Dcae Service Container}' class. + * + * + * @see org.openecomp.dcae.controller.core.service.impl.DcaeServiceContainerImpl + * @see org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl#getDcaeServiceContainer() + * @generated + */ + EClass DCAE_SERVICE_CONTAINER = eINSTANCE.getDcaeServiceContainer(); + + /** + * The meta object literal for the 'Instances' reference list feature. + * + * + * @generated + */ + EReference DCAE_SERVICE_CONTAINER__INSTANCES = eINSTANCE.getDcaeServiceContainer_Instances(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceInstanceImpl Dcae Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.core.service.impl.DcaeServiceInstanceImpl + * @see org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl#getDcaeServiceInstance() + * @generated + */ + EClass DCAE_SERVICE_INSTANCE = eINSTANCE.getDcaeServiceInstance(); + + /** + * The meta object literal for the 'Service Container' reference feature. + * + * + * @generated + */ + EReference DCAE_SERVICE_INSTANCE__SERVICE_CONTAINER = eINSTANCE.getDcaeServiceInstance_ServiceContainer(); + + /** + * The meta object literal for the 'Status' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_SERVICE_INSTANCE__STATUS = eINSTANCE.getDcaeServiceInstance_Status(); + + /** + * The meta object literal for the 'Input Streams' containment reference list feature. + * + * + * @generated + */ + EReference DCAE_SERVICE_INSTANCE__INPUT_STREAMS = eINSTANCE.getDcaeServiceInstance_InputStreams(); + + /** + * The meta object literal for the 'Output Streams' containment reference list feature. + * + * + * @generated + */ + EReference DCAE_SERVICE_INSTANCE__OUTPUT_STREAMS = eINSTANCE.getDcaeServiceInstance_OutputStreams(); + + /** + * The meta object literal for the 'Last Health Test' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_SERVICE_INSTANCE__LAST_HEALTH_TEST = eINSTANCE.getDcaeServiceInstance_LastHealthTest(); + + /** + * The meta object literal for the 'Health Test Status' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_SERVICE_INSTANCE__HEALTH_TEST_STATUS = eINSTANCE.getDcaeServiceInstance_HealthTestStatus(); + + /** + * The meta object literal for the 'Health Test Message Code' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE = eINSTANCE.getDcaeServiceInstance_HealthTestMessageCode(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.service.impl.DcaeLocationImpl Dcae Location}' class. + * + * + * @see org.openecomp.dcae.controller.core.service.impl.DcaeLocationImpl + * @see org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl#getDcaeLocation() + * @generated + */ + EClass DCAE_LOCATION = eINSTANCE.getDcaeLocation(); + + /** + * The meta object literal for the 'Location Type' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_LOCATION__LOCATION_TYPE = eINSTANCE.getDcaeLocation_LocationType(); + + /** + * The meta object literal for the 'Openstack Project' reference feature. + * + * + * @generated + */ + EReference DCAE_LOCATION__OPENSTACK_PROJECT = eINSTANCE.getDcaeLocation_OpenstackProject(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceDescriptorImpl Dcae Service Descriptor}' class. + * + * + * @see org.openecomp.dcae.controller.core.service.impl.DcaeServiceDescriptorImpl + * @see org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl#getDcaeServiceDescriptor() + * @generated + */ + EClass DCAE_SERVICE_DESCRIPTOR = eINSTANCE.getDcaeServiceDescriptor(); + + /** + * The meta object literal for the 'Group Id' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_SERVICE_DESCRIPTOR__GROUP_ID = eINSTANCE.getDcaeServiceDescriptor_GroupId(); + + /** + * The meta object literal for the 'Artifact' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_SERVICE_DESCRIPTOR__ARTIFACT = eINSTANCE.getDcaeServiceDescriptor_Artifact(); + + /** + * The meta object literal for the 'Version' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_SERVICE_DESCRIPTOR__VERSION = eINSTANCE.getDcaeServiceDescriptor_Version(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.service.impl.HealthTestResponseImpl Health Test Response}' class. + * + * + * @see org.openecomp.dcae.controller.core.service.impl.HealthTestResponseImpl + * @see org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl#getHealthTestResponse() + * @generated + */ + EClass HEALTH_TEST_RESPONSE = eINSTANCE.getHealthTestResponse(); + + /** + * The meta object literal for the 'Status' attribute feature. + * + * + * @generated + */ + EAttribute HEALTH_TEST_RESPONSE__STATUS = eINSTANCE.getHealthTestResponse_Status(); + + /** + * The meta object literal for the 'Message Code' attribute feature. + * + * + * @generated + */ + EAttribute HEALTH_TEST_RESPONSE__MESSAGE_CODE = eINSTANCE.getHealthTestResponse_MessageCode(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.service.impl.DcaePolicyEntityImpl Dcae Policy Entity}' class. + * + * + * @see org.openecomp.dcae.controller.core.service.impl.DcaePolicyEntityImpl + * @see org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl#getDcaePolicyEntity() + * @generated + */ + EClass DCAE_POLICY_ENTITY = eINSTANCE.getDcaePolicyEntity(); + + /** + * The meta object literal for the 'Policy Name' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_POLICY_ENTITY__POLICY_NAME = eINSTANCE.getDcaePolicyEntity_PolicyName(); + + /** + * The meta object literal for the 'Policy Description' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_POLICY_ENTITY__POLICY_DESCRIPTION = eINSTANCE.getDcaePolicyEntity_PolicyDescription(); + + /** + * The meta object literal for the 'Policy Config Name' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_POLICY_ENTITY__POLICY_CONFIG_NAME = eINSTANCE.getDcaePolicyEntity_PolicyConfigName(); + + /** + * The meta object literal for the 'Policy Template Version' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_POLICY_ENTITY__POLICY_TEMPLATE_VERSION = eINSTANCE.getDcaePolicyEntity_PolicyTemplateVersion(); + + /** + * The meta object literal for the 'Policy Version' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_POLICY_ENTITY__POLICY_VERSION = eINSTANCE.getDcaePolicyEntity_PolicyVersion(); + + /** + * The meta object literal for the 'Policy Priority' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_POLICY_ENTITY__POLICY_PRIORITY = eINSTANCE.getDcaePolicyEntity_PolicyPriority(); + + /** + * The meta object literal for the 'Policy Scope' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_POLICY_ENTITY__POLICY_SCOPE = eINSTANCE.getDcaePolicyEntity_PolicyScope(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.service.HealthTestStatus Health Test Status}' enum. + * + * + * @see org.openecomp.dcae.controller.core.service.HealthTestStatus + * @see org.openecomp.dcae.controller.core.service.impl.ServicePackageImpl#getHealthTestStatus() + * @generated + */ + EEnum HEALTH_TEST_STATUS = eINSTANCE.getHealthTestStatus(); + + } + +} //ServicePackage diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/User.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/User.java new file mode 100644 index 0000000..0e7db04 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/User.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'User'. + * + * + * + * @see org.openecomp.dcae.controller.core.service.ServicePackage#getUser() + * @model + * @generated + */ +public interface User extends NamedEntity { +} // User diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeLocationImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeLocationImpl.java new file mode 100644 index 0000000..553af71 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeLocationImpl.java @@ -0,0 +1,242 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service.impl; + +import org.openecomp.dcae.controller.core.service.DcaeLocation; +import org.openecomp.dcae.controller.core.service.ServicePackage; +import org.openecomp.ncomp.openstack.location.OpenStackProject; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Dcae Location'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaeLocationImpl#getLocationType Location Type}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaeLocationImpl#getOpenstackProject Openstack Project}
  • + *
+ *

+ * + * @generated + */ +public class DcaeLocationImpl extends DcaeServiceContainerImpl implements DcaeLocation { + /** + * The default value of the '{@link #getLocationType() Location Type}' attribute. + * + * + * @see #getLocationType() + * @generated + * @ordered + */ + protected static final String LOCATION_TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLocationType() Location Type}' attribute. + * + * + * @see #getLocationType() + * @generated + * @ordered + */ + protected String locationType = LOCATION_TYPE_EDEFAULT; + + /** + * The cached value of the '{@link #getOpenstackProject() Openstack Project}' reference. + * + * + * @see #getOpenstackProject() + * @generated + * @ordered + */ + protected OpenStackProject openstackProject; + + /** + * + * + * @generated + */ + protected DcaeLocationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.DCAE_LOCATION; + } + + /** + * + * + * @generated + */ + public String getLocationType() { + return locationType; + } + + /** + * + * + * @generated + */ + public void setLocationType(String newLocationType) { + String oldLocationType = locationType; + locationType = newLocationType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_LOCATION__LOCATION_TYPE, oldLocationType, locationType)); + } + + /** + * + * + * @generated + */ + public OpenStackProject getOpenstackProject() { + if (openstackProject != null && openstackProject.eIsProxy()) { + InternalEObject oldOpenstackProject = (InternalEObject)openstackProject; + openstackProject = (OpenStackProject)eResolveProxy(oldOpenstackProject); + if (openstackProject != oldOpenstackProject) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ServicePackage.DCAE_LOCATION__OPENSTACK_PROJECT, oldOpenstackProject, openstackProject)); + } + } + return openstackProject; + } + + /** + * + * + * @generated + */ + public OpenStackProject basicGetOpenstackProject() { + return openstackProject; + } + + /** + * + * + * @generated + */ + public void setOpenstackProject(OpenStackProject newOpenstackProject) { + OpenStackProject oldOpenstackProject = openstackProject; + openstackProject = newOpenstackProject; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_LOCATION__OPENSTACK_PROJECT, oldOpenstackProject, openstackProject)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.DCAE_LOCATION__LOCATION_TYPE: + return getLocationType(); + case ServicePackage.DCAE_LOCATION__OPENSTACK_PROJECT: + if (resolve) return getOpenstackProject(); + return basicGetOpenstackProject(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.DCAE_LOCATION__LOCATION_TYPE: + setLocationType((String)newValue); + return; + case ServicePackage.DCAE_LOCATION__OPENSTACK_PROJECT: + setOpenstackProject((OpenStackProject)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.DCAE_LOCATION__LOCATION_TYPE: + setLocationType(LOCATION_TYPE_EDEFAULT); + return; + case ServicePackage.DCAE_LOCATION__OPENSTACK_PROJECT: + setOpenstackProject((OpenStackProject)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.DCAE_LOCATION__LOCATION_TYPE: + return LOCATION_TYPE_EDEFAULT == null ? locationType != null : !LOCATION_TYPE_EDEFAULT.equals(locationType); + case ServicePackage.DCAE_LOCATION__OPENSTACK_PROJECT: + return openstackProject != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (locationType: "); + result.append(locationType); + result.append(')'); + return result.toString(); + } + +} //DcaeLocationImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaePolicyEntityImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaePolicyEntityImpl.java new file mode 100644 index 0000000..d053055 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaePolicyEntityImpl.java @@ -0,0 +1,508 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service.impl; + +import org.openecomp.dcae.controller.core.service.DcaePolicyEntity; +import org.openecomp.dcae.controller.core.service.ServicePackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Dcae Policy Entity'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaePolicyEntityImpl#getPolicyName Policy Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaePolicyEntityImpl#getPolicyDescription Policy Description}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaePolicyEntityImpl#getPolicyConfigName Policy Config Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaePolicyEntityImpl#getPolicyTemplateVersion Policy Template Version}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaePolicyEntityImpl#getPolicyVersion Policy Version}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaePolicyEntityImpl#getPolicyPriority Policy Priority}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaePolicyEntityImpl#getPolicyScope Policy Scope}
  • + *
+ *

+ * + * @generated + */ +public abstract class DcaePolicyEntityImpl extends MinimalEObjectImpl.Container implements DcaePolicyEntity { + /** + * The default value of the '{@link #getPolicyName() Policy Name}' attribute. + * + * + * @see #getPolicyName() + * @generated + * @ordered + */ + protected static final String POLICY_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPolicyName() Policy Name}' attribute. + * + * + * @see #getPolicyName() + * @generated + * @ordered + */ + protected String policyName = POLICY_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getPolicyDescription() Policy Description}' attribute. + * + * + * @see #getPolicyDescription() + * @generated + * @ordered + */ + protected static final String POLICY_DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPolicyDescription() Policy Description}' attribute. + * + * + * @see #getPolicyDescription() + * @generated + * @ordered + */ + protected String policyDescription = POLICY_DESCRIPTION_EDEFAULT; + + /** + * The default value of the '{@link #getPolicyConfigName() Policy Config Name}' attribute. + * + * + * @see #getPolicyConfigName() + * @generated + * @ordered + */ + protected static final String POLICY_CONFIG_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPolicyConfigName() Policy Config Name}' attribute. + * + * + * @see #getPolicyConfigName() + * @generated + * @ordered + */ + protected String policyConfigName = POLICY_CONFIG_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getPolicyTemplateVersion() Policy Template Version}' attribute. + * + * + * @see #getPolicyTemplateVersion() + * @generated + * @ordered + */ + protected static final String POLICY_TEMPLATE_VERSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPolicyTemplateVersion() Policy Template Version}' attribute. + * + * + * @see #getPolicyTemplateVersion() + * @generated + * @ordered + */ + protected String policyTemplateVersion = POLICY_TEMPLATE_VERSION_EDEFAULT; + + /** + * The default value of the '{@link #getPolicyVersion() Policy Version}' attribute. + * + * + * @see #getPolicyVersion() + * @generated + * @ordered + */ + protected static final String POLICY_VERSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPolicyVersion() Policy Version}' attribute. + * + * + * @see #getPolicyVersion() + * @generated + * @ordered + */ + protected String policyVersion = POLICY_VERSION_EDEFAULT; + + /** + * The default value of the '{@link #getPolicyPriority() Policy Priority}' attribute. + * + * + * @see #getPolicyPriority() + * @generated + * @ordered + */ + protected static final String POLICY_PRIORITY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPolicyPriority() Policy Priority}' attribute. + * + * + * @see #getPolicyPriority() + * @generated + * @ordered + */ + protected String policyPriority = POLICY_PRIORITY_EDEFAULT; + + /** + * The default value of the '{@link #getPolicyScope() Policy Scope}' attribute. + * + * + * @see #getPolicyScope() + * @generated + * @ordered + */ + protected static final String POLICY_SCOPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPolicyScope() Policy Scope}' attribute. + * + * + * @see #getPolicyScope() + * @generated + * @ordered + */ + protected String policyScope = POLICY_SCOPE_EDEFAULT; + + /** + * + * + * @generated + */ + protected DcaePolicyEntityImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.DCAE_POLICY_ENTITY; + } + + /** + * + * + * @generated + */ + public String getPolicyName() { + return policyName; + } + + /** + * + * + * @generated + */ + public void setPolicyName(String newPolicyName) { + String oldPolicyName = policyName; + policyName = newPolicyName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_POLICY_ENTITY__POLICY_NAME, oldPolicyName, policyName)); + } + + /** + * + * + * @generated + */ + public String getPolicyDescription() { + return policyDescription; + } + + /** + * + * + * @generated + */ + public void setPolicyDescription(String newPolicyDescription) { + String oldPolicyDescription = policyDescription; + policyDescription = newPolicyDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_POLICY_ENTITY__POLICY_DESCRIPTION, oldPolicyDescription, policyDescription)); + } + + /** + * + * + * @generated + */ + public String getPolicyConfigName() { + return policyConfigName; + } + + /** + * + * + * @generated + */ + public void setPolicyConfigName(String newPolicyConfigName) { + String oldPolicyConfigName = policyConfigName; + policyConfigName = newPolicyConfigName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_POLICY_ENTITY__POLICY_CONFIG_NAME, oldPolicyConfigName, policyConfigName)); + } + + /** + * + * + * @generated + */ + public String getPolicyTemplateVersion() { + return policyTemplateVersion; + } + + /** + * + * + * @generated + */ + public void setPolicyTemplateVersion(String newPolicyTemplateVersion) { + String oldPolicyTemplateVersion = policyTemplateVersion; + policyTemplateVersion = newPolicyTemplateVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_POLICY_ENTITY__POLICY_TEMPLATE_VERSION, oldPolicyTemplateVersion, policyTemplateVersion)); + } + + /** + * + * + * @generated + */ + public String getPolicyVersion() { + return policyVersion; + } + + /** + * + * + * @generated + */ + public void setPolicyVersion(String newPolicyVersion) { + String oldPolicyVersion = policyVersion; + policyVersion = newPolicyVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_POLICY_ENTITY__POLICY_VERSION, oldPolicyVersion, policyVersion)); + } + + /** + * + * + * @generated + */ + public String getPolicyPriority() { + return policyPriority; + } + + /** + * + * + * @generated + */ + public void setPolicyPriority(String newPolicyPriority) { + String oldPolicyPriority = policyPriority; + policyPriority = newPolicyPriority; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_POLICY_ENTITY__POLICY_PRIORITY, oldPolicyPriority, policyPriority)); + } + + /** + * + * + * @generated + */ + public String getPolicyScope() { + return policyScope; + } + + /** + * + * + * @generated + */ + public void setPolicyScope(String newPolicyScope) { + String oldPolicyScope = policyScope; + policyScope = newPolicyScope; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_POLICY_ENTITY__POLICY_SCOPE, oldPolicyScope, policyScope)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_NAME: + return getPolicyName(); + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_DESCRIPTION: + return getPolicyDescription(); + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_CONFIG_NAME: + return getPolicyConfigName(); + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_TEMPLATE_VERSION: + return getPolicyTemplateVersion(); + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_VERSION: + return getPolicyVersion(); + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_PRIORITY: + return getPolicyPriority(); + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_SCOPE: + return getPolicyScope(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_NAME: + setPolicyName((String)newValue); + return; + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_DESCRIPTION: + setPolicyDescription((String)newValue); + return; + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_CONFIG_NAME: + setPolicyConfigName((String)newValue); + return; + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_TEMPLATE_VERSION: + setPolicyTemplateVersion((String)newValue); + return; + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_VERSION: + setPolicyVersion((String)newValue); + return; + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_PRIORITY: + setPolicyPriority((String)newValue); + return; + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_SCOPE: + setPolicyScope((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_NAME: + setPolicyName(POLICY_NAME_EDEFAULT); + return; + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_DESCRIPTION: + setPolicyDescription(POLICY_DESCRIPTION_EDEFAULT); + return; + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_CONFIG_NAME: + setPolicyConfigName(POLICY_CONFIG_NAME_EDEFAULT); + return; + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_TEMPLATE_VERSION: + setPolicyTemplateVersion(POLICY_TEMPLATE_VERSION_EDEFAULT); + return; + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_VERSION: + setPolicyVersion(POLICY_VERSION_EDEFAULT); + return; + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_PRIORITY: + setPolicyPriority(POLICY_PRIORITY_EDEFAULT); + return; + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_SCOPE: + setPolicyScope(POLICY_SCOPE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_NAME: + return POLICY_NAME_EDEFAULT == null ? policyName != null : !POLICY_NAME_EDEFAULT.equals(policyName); + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_DESCRIPTION: + return POLICY_DESCRIPTION_EDEFAULT == null ? policyDescription != null : !POLICY_DESCRIPTION_EDEFAULT.equals(policyDescription); + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_CONFIG_NAME: + return POLICY_CONFIG_NAME_EDEFAULT == null ? policyConfigName != null : !POLICY_CONFIG_NAME_EDEFAULT.equals(policyConfigName); + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_TEMPLATE_VERSION: + return POLICY_TEMPLATE_VERSION_EDEFAULT == null ? policyTemplateVersion != null : !POLICY_TEMPLATE_VERSION_EDEFAULT.equals(policyTemplateVersion); + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_VERSION: + return POLICY_VERSION_EDEFAULT == null ? policyVersion != null : !POLICY_VERSION_EDEFAULT.equals(policyVersion); + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_PRIORITY: + return POLICY_PRIORITY_EDEFAULT == null ? policyPriority != null : !POLICY_PRIORITY_EDEFAULT.equals(policyPriority); + case ServicePackage.DCAE_POLICY_ENTITY__POLICY_SCOPE: + return POLICY_SCOPE_EDEFAULT == null ? policyScope != null : !POLICY_SCOPE_EDEFAULT.equals(policyScope); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (policyName: "); + result.append(policyName); + result.append(", policyDescription: "); + result.append(policyDescription); + result.append(", policyConfigName: "); + result.append(policyConfigName); + result.append(", policyTemplateVersion: "); + result.append(policyTemplateVersion); + result.append(", policyVersion: "); + result.append(policyVersion); + result.append(", policyPriority: "); + result.append(policyPriority); + result.append(", policyScope: "); + result.append(policyScope); + result.append(')'); + return result.toString(); + } + +} //DcaePolicyEntityImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeServiceContainerImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeServiceContainerImpl.java new file mode 100644 index 0000000..fea898d --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeServiceContainerImpl.java @@ -0,0 +1,181 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service.impl; + +import org.openecomp.dcae.controller.core.service.DcaeServiceContainer; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; +import org.openecomp.dcae.controller.core.service.ServicePackage; +import org.openecomp.ncomp.core.impl.NamedEntityImpl; +import java.util.Collection; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Dcae Service Container'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceContainerImpl#getInstances Instances}
  • + *
+ *

+ * + * @generated + */ +public abstract class DcaeServiceContainerImpl extends NamedEntityImpl implements DcaeServiceContainer { + /** + * The cached value of the '{@link #getInstances() Instances}' reference list. + * + * + * @see #getInstances() + * @generated + * @ordered + */ + protected EList instances; + /** + * + * + * @generated + */ + protected DcaeServiceContainerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.DCAE_SERVICE_CONTAINER; + } + + /** + * + * + * @generated + */ + public EList getInstances() { + if (instances == null) { + instances = new EObjectWithInverseResolvingEList(DcaeServiceInstance.class, this, ServicePackage.DCAE_SERVICE_CONTAINER__INSTANCES, ServicePackage.DCAE_SERVICE_INSTANCE__SERVICE_CONTAINER); + } + return instances; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.DCAE_SERVICE_CONTAINER__INSTANCES: + return ((InternalEList)(InternalEList)getInstances()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.DCAE_SERVICE_CONTAINER__INSTANCES: + return ((InternalEList)getInstances()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.DCAE_SERVICE_CONTAINER__INSTANCES: + return getInstances(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.DCAE_SERVICE_CONTAINER__INSTANCES: + getInstances().clear(); + getInstances().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.DCAE_SERVICE_CONTAINER__INSTANCES: + getInstances().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.DCAE_SERVICE_CONTAINER__INSTANCES: + return instances != null && !instances.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //DcaeServiceContainerImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeServiceDescriptorImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeServiceDescriptorImpl.java new file mode 100644 index 0000000..8ad411e --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeServiceDescriptorImpl.java @@ -0,0 +1,293 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service.impl; + +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; +import org.openecomp.dcae.controller.core.service.ServicePackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Dcae Service Descriptor'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceDescriptorImpl#getGroupId Group Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceDescriptorImpl#getArtifact Artifact}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceDescriptorImpl#getVersion Version}
  • + *
+ *

+ * + * @generated + */ +public class DcaeServiceDescriptorImpl extends NamedEntityImpl implements DcaeServiceDescriptor { + /** + * The default value of the '{@link #getGroupId() Group Id}' attribute. + * + * + * @see #getGroupId() + * @generated + * @ordered + */ + protected static final String GROUP_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getGroupId() Group Id}' attribute. + * + * + * @see #getGroupId() + * @generated + * @ordered + */ + protected String groupId = GROUP_ID_EDEFAULT; + + /** + * The default value of the '{@link #getArtifact() Artifact}' attribute. + * + * + * @see #getArtifact() + * @generated + * @ordered + */ + protected static final String ARTIFACT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getArtifact() Artifact}' attribute. + * + * + * @see #getArtifact() + * @generated + * @ordered + */ + protected String artifact = ARTIFACT_EDEFAULT; + + /** + * The default value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + + /** + * + * + * @generated + */ + protected DcaeServiceDescriptorImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.DCAE_SERVICE_DESCRIPTOR; + } + + /** + * + * + * @generated + */ + public String getGroupId() { + return groupId; + } + + /** + * + * + * @generated + */ + public void setGroupId(String newGroupId) { + String oldGroupId = groupId; + groupId = newGroupId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_SERVICE_DESCRIPTOR__GROUP_ID, oldGroupId, groupId)); + } + + /** + * + * + * @generated + */ + public String getArtifact() { + return artifact; + } + + /** + * + * + * @generated + */ + public void setArtifact(String newArtifact) { + String oldArtifact = artifact; + artifact = newArtifact; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_SERVICE_DESCRIPTOR__ARTIFACT, oldArtifact, artifact)); + } + + /** + * + * + * @generated + */ + public String getVersion() { + return version; + } + + /** + * + * + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_SERVICE_DESCRIPTOR__VERSION, oldVersion, version)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.DCAE_SERVICE_DESCRIPTOR__GROUP_ID: + return getGroupId(); + case ServicePackage.DCAE_SERVICE_DESCRIPTOR__ARTIFACT: + return getArtifact(); + case ServicePackage.DCAE_SERVICE_DESCRIPTOR__VERSION: + return getVersion(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.DCAE_SERVICE_DESCRIPTOR__GROUP_ID: + setGroupId((String)newValue); + return; + case ServicePackage.DCAE_SERVICE_DESCRIPTOR__ARTIFACT: + setArtifact((String)newValue); + return; + case ServicePackage.DCAE_SERVICE_DESCRIPTOR__VERSION: + setVersion((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.DCAE_SERVICE_DESCRIPTOR__GROUP_ID: + setGroupId(GROUP_ID_EDEFAULT); + return; + case ServicePackage.DCAE_SERVICE_DESCRIPTOR__ARTIFACT: + setArtifact(ARTIFACT_EDEFAULT); + return; + case ServicePackage.DCAE_SERVICE_DESCRIPTOR__VERSION: + setVersion(VERSION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.DCAE_SERVICE_DESCRIPTOR__GROUP_ID: + return GROUP_ID_EDEFAULT == null ? groupId != null : !GROUP_ID_EDEFAULT.equals(groupId); + case ServicePackage.DCAE_SERVICE_DESCRIPTOR__ARTIFACT: + return ARTIFACT_EDEFAULT == null ? artifact != null : !ARTIFACT_EDEFAULT.equals(artifact); + case ServicePackage.DCAE_SERVICE_DESCRIPTOR__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (groupId: "); + result.append(groupId); + result.append(", artifact: "); + result.append(artifact); + result.append(", version: "); + result.append(version); + result.append(')'); + return result.toString(); + } + +} //DcaeServiceDescriptorImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeServiceImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeServiceImpl.java new file mode 100644 index 0000000..2fc6b56 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeServiceImpl.java @@ -0,0 +1,228 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service.impl; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.service.ServicePackage; +import org.openecomp.ncomp.core.impl.NamedEntityImpl; +import java.lang.reflect.InvocationTargetException; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.json.JSONObject; + +/** + * + * An implementation of the model object 'Dcae Service'. + * + *

+ *

+ * + * @generated + */ +public abstract class DcaeServiceImpl extends NamedEntityImpl implements DcaeService { + /** + * + * + * @generated + */ + protected DcaeServiceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.DCAE_SERVICE; + } + + /** + * + * + * @generated + */ + public void deploy(String instanceName, String containerPath) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void undeploy(String instanceName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public HealthTestResponse test(String instanceName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void suspend(String instanceName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void resume(String instanceName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void pushManagerConfiguration(String instanceName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void pollManagerConfiguration(String instanceName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EObject managerConfiguration(String instanceName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public JSONObject managerOperation(String instanceName, String operation, JSONObject parameters) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void updateConfigurationFromPolicy(String instanceName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void runHealthTests() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ServicePackage.DCAE_SERVICE___DEPLOY__STRING_STRING: + deploy((String)arguments.get(0), (String)arguments.get(1)); + return null; + case ServicePackage.DCAE_SERVICE___UNDEPLOY__STRING: + undeploy((String)arguments.get(0)); + return null; + case ServicePackage.DCAE_SERVICE___TEST__STRING: + return test((String)arguments.get(0)); + case ServicePackage.DCAE_SERVICE___SUSPEND__STRING: + suspend((String)arguments.get(0)); + return null; + case ServicePackage.DCAE_SERVICE___RESUME__STRING: + resume((String)arguments.get(0)); + return null; + case ServicePackage.DCAE_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING: + pushManagerConfiguration((String)arguments.get(0)); + return null; + case ServicePackage.DCAE_SERVICE___POLL_MANAGER_CONFIGURATION__STRING: + pollManagerConfiguration((String)arguments.get(0)); + return null; + case ServicePackage.DCAE_SERVICE___MANAGER_CONFIGURATION__STRING: + return managerConfiguration((String)arguments.get(0)); + case ServicePackage.DCAE_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT: + return managerOperation((String)arguments.get(0), (String)arguments.get(1), (JSONObject)arguments.get(2)); + case ServicePackage.DCAE_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING: + updateConfigurationFromPolicy((String)arguments.get(0)); + return null; + case ServicePackage.DCAE_SERVICE___RUN_HEALTH_TESTS: + runHealthTests(); + return null; + } + return super.eInvoke(operationID, arguments); + } + +} //DcaeServiceImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeServiceInstanceImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeServiceInstanceImpl.java new file mode 100644 index 0000000..ce2d06b --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/DcaeServiceInstanceImpl.java @@ -0,0 +1,539 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service.impl; + +import org.openecomp.dcae.controller.core.service.DcaeServiceContainer; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; +import org.openecomp.dcae.controller.core.service.HealthTestStatus; +import org.openecomp.dcae.controller.core.service.ServicePackage; +import org.openecomp.dcae.controller.core.stream.DcaeStream; +import org.openecomp.ncomp.core.DeploymentStatus; +import org.openecomp.ncomp.core.impl.NamedEntityImpl; +import org.openecomp.ncomp.core.types.metrics.DateMetricAttribute; +import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Dcae Service Instance'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceInstanceImpl#getServiceContainer Service Container}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceInstanceImpl#getStatus Status}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceInstanceImpl#getInputStreams Input Streams}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceInstanceImpl#getOutputStreams Output Streams}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceInstanceImpl#getLastHealthTest Last Health Test}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceInstanceImpl#getHealthTestStatus Health Test Status}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.impl.DcaeServiceInstanceImpl#getHealthTestMessageCode Health Test Message Code}
  • + *
+ *

+ * + * @generated + */ +public abstract class DcaeServiceInstanceImpl extends NamedEntityImpl implements DcaeServiceInstance { + /** + * The cached value of the '{@link #getServiceContainer() Service Container}' reference. + * + * + * @see #getServiceContainer() + * @generated + * @ordered + */ + protected DcaeServiceContainer serviceContainer; + + /** + * The default value of the '{@link #getStatus() Status}' attribute. + * + * + * @see #getStatus() + * @generated + * @ordered + */ + protected static final DeploymentStatus STATUS_EDEFAULT = DeploymentStatus.UNDEPLOYED; + + /** + * The cached value of the '{@link #getStatus() Status}' attribute. + * + * + * @see #getStatus() + * @generated + * @ordered + */ + protected DeploymentStatus status = STATUS_EDEFAULT; + + /** + * The cached value of the '{@link #getInputStreams() Input Streams}' containment reference list. + * + * + * @see #getInputStreams() + * @generated + * @ordered + */ + protected EList inputStreams; + + /** + * The cached value of the '{@link #getOutputStreams() Output Streams}' containment reference list. + * + * + * @see #getOutputStreams() + * @generated + * @ordered + */ + protected EList outputStreams; + + /** + * The default value of the '{@link #getLastHealthTest() Last Health Test}' attribute. + * + * + * @see #getLastHealthTest() + * @generated + * @ordered + */ + protected static final DateMetricAttribute LAST_HEALTH_TEST_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLastHealthTest() Last Health Test}' attribute. + * + * + * @see #getLastHealthTest() + * @generated + * @ordered + */ + protected DateMetricAttribute lastHealthTest = LAST_HEALTH_TEST_EDEFAULT; + + /** + * The default value of the '{@link #getHealthTestStatus() Health Test Status}' attribute. + * + * + * @see #getHealthTestStatus() + * @generated + * @ordered + */ + protected static final HealthTestStatus HEALTH_TEST_STATUS_EDEFAULT = HealthTestStatus.GREEN; + + /** + * The cached value of the '{@link #getHealthTestStatus() Health Test Status}' attribute. + * + * + * @see #getHealthTestStatus() + * @generated + * @ordered + */ + protected HealthTestStatus healthTestStatus = HEALTH_TEST_STATUS_EDEFAULT; + + /** + * The default value of the '{@link #getHealthTestMessageCode() Health Test Message Code}' attribute. + * + * + * @see #getHealthTestMessageCode() + * @generated + * @ordered + */ + protected static final String HEALTH_TEST_MESSAGE_CODE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHealthTestMessageCode() Health Test Message Code}' attribute. + * + * + * @see #getHealthTestMessageCode() + * @generated + * @ordered + */ + protected String healthTestMessageCode = HEALTH_TEST_MESSAGE_CODE_EDEFAULT; + + /** + * + * + * @generated + */ + protected DcaeServiceInstanceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.DCAE_SERVICE_INSTANCE; + } + + /** + * + * + * @generated + */ + public DcaeServiceContainer getServiceContainer() { + if (serviceContainer != null && serviceContainer.eIsProxy()) { + InternalEObject oldServiceContainer = (InternalEObject)serviceContainer; + serviceContainer = (DcaeServiceContainer)eResolveProxy(oldServiceContainer); + if (serviceContainer != oldServiceContainer) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ServicePackage.DCAE_SERVICE_INSTANCE__SERVICE_CONTAINER, oldServiceContainer, serviceContainer)); + } + } + return serviceContainer; + } + + /** + * + * + * @generated + */ + public DcaeServiceContainer basicGetServiceContainer() { + return serviceContainer; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetServiceContainer(DcaeServiceContainer newServiceContainer, NotificationChain msgs) { + DcaeServiceContainer oldServiceContainer = serviceContainer; + serviceContainer = newServiceContainer; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_SERVICE_INSTANCE__SERVICE_CONTAINER, oldServiceContainer, newServiceContainer); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setServiceContainer(DcaeServiceContainer newServiceContainer) { + if (newServiceContainer != serviceContainer) { + NotificationChain msgs = null; + if (serviceContainer != null) + msgs = ((InternalEObject)serviceContainer).eInverseRemove(this, ServicePackage.DCAE_SERVICE_CONTAINER__INSTANCES, DcaeServiceContainer.class, msgs); + if (newServiceContainer != null) + msgs = ((InternalEObject)newServiceContainer).eInverseAdd(this, ServicePackage.DCAE_SERVICE_CONTAINER__INSTANCES, DcaeServiceContainer.class, msgs); + msgs = basicSetServiceContainer(newServiceContainer, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_SERVICE_INSTANCE__SERVICE_CONTAINER, newServiceContainer, newServiceContainer)); + } + + /** + * + * + * @generated + */ + public DeploymentStatus getStatus() { + return status; + } + + /** + * + * + * @generated + */ + public void setStatus(DeploymentStatus newStatus) { + DeploymentStatus oldStatus = status; + status = newStatus == null ? STATUS_EDEFAULT : newStatus; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_SERVICE_INSTANCE__STATUS, oldStatus, status)); + } + + /** + * + * + * @generated + */ + public EList getInputStreams() { + if (inputStreams == null) { + inputStreams = new EObjectContainmentEList(DcaeStream.class, this, ServicePackage.DCAE_SERVICE_INSTANCE__INPUT_STREAMS); + } + return inputStreams; + } + + /** + * + * + * @generated + */ + public EList getOutputStreams() { + if (outputStreams == null) { + outputStreams = new EObjectContainmentEList(DcaeStream.class, this, ServicePackage.DCAE_SERVICE_INSTANCE__OUTPUT_STREAMS); + } + return outputStreams; + } + + /** + * + * + * @generated + */ + public DateMetricAttribute getLastHealthTest() { + return lastHealthTest; + } + + /** + * + * + * @generated + */ + public void setLastHealthTest(DateMetricAttribute newLastHealthTest) { + DateMetricAttribute oldLastHealthTest = lastHealthTest; + lastHealthTest = newLastHealthTest; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_SERVICE_INSTANCE__LAST_HEALTH_TEST, oldLastHealthTest, lastHealthTest)); + } + + /** + * + * + * @generated + */ + public HealthTestStatus getHealthTestStatus() { + return healthTestStatus; + } + + /** + * + * + * @generated + */ + public void setHealthTestStatus(HealthTestStatus newHealthTestStatus) { + HealthTestStatus oldHealthTestStatus = healthTestStatus; + healthTestStatus = newHealthTestStatus == null ? HEALTH_TEST_STATUS_EDEFAULT : newHealthTestStatus; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_STATUS, oldHealthTestStatus, healthTestStatus)); + } + + /** + * + * + * @generated + */ + public String getHealthTestMessageCode() { + return healthTestMessageCode; + } + + /** + * + * + * @generated + */ + public void setHealthTestMessageCode(String newHealthTestMessageCode) { + String oldHealthTestMessageCode = healthTestMessageCode; + healthTestMessageCode = newHealthTestMessageCode; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE, oldHealthTestMessageCode, healthTestMessageCode)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.DCAE_SERVICE_INSTANCE__SERVICE_CONTAINER: + if (serviceContainer != null) + msgs = ((InternalEObject)serviceContainer).eInverseRemove(this, ServicePackage.DCAE_SERVICE_CONTAINER__INSTANCES, DcaeServiceContainer.class, msgs); + return basicSetServiceContainer((DcaeServiceContainer)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.DCAE_SERVICE_INSTANCE__SERVICE_CONTAINER: + return basicSetServiceContainer(null, msgs); + case ServicePackage.DCAE_SERVICE_INSTANCE__INPUT_STREAMS: + return ((InternalEList)getInputStreams()).basicRemove(otherEnd, msgs); + case ServicePackage.DCAE_SERVICE_INSTANCE__OUTPUT_STREAMS: + return ((InternalEList)getOutputStreams()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.DCAE_SERVICE_INSTANCE__SERVICE_CONTAINER: + if (resolve) return getServiceContainer(); + return basicGetServiceContainer(); + case ServicePackage.DCAE_SERVICE_INSTANCE__STATUS: + return getStatus(); + case ServicePackage.DCAE_SERVICE_INSTANCE__INPUT_STREAMS: + return getInputStreams(); + case ServicePackage.DCAE_SERVICE_INSTANCE__OUTPUT_STREAMS: + return getOutputStreams(); + case ServicePackage.DCAE_SERVICE_INSTANCE__LAST_HEALTH_TEST: + return getLastHealthTest(); + case ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_STATUS: + return getHealthTestStatus(); + case ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE: + return getHealthTestMessageCode(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.DCAE_SERVICE_INSTANCE__SERVICE_CONTAINER: + setServiceContainer((DcaeServiceContainer)newValue); + return; + case ServicePackage.DCAE_SERVICE_INSTANCE__STATUS: + setStatus((DeploymentStatus)newValue); + return; + case ServicePackage.DCAE_SERVICE_INSTANCE__INPUT_STREAMS: + getInputStreams().clear(); + getInputStreams().addAll((Collection)newValue); + return; + case ServicePackage.DCAE_SERVICE_INSTANCE__OUTPUT_STREAMS: + getOutputStreams().clear(); + getOutputStreams().addAll((Collection)newValue); + return; + case ServicePackage.DCAE_SERVICE_INSTANCE__LAST_HEALTH_TEST: + setLastHealthTest((DateMetricAttribute)newValue); + return; + case ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_STATUS: + setHealthTestStatus((HealthTestStatus)newValue); + return; + case ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE: + setHealthTestMessageCode((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.DCAE_SERVICE_INSTANCE__SERVICE_CONTAINER: + setServiceContainer((DcaeServiceContainer)null); + return; + case ServicePackage.DCAE_SERVICE_INSTANCE__STATUS: + setStatus(STATUS_EDEFAULT); + return; + case ServicePackage.DCAE_SERVICE_INSTANCE__INPUT_STREAMS: + getInputStreams().clear(); + return; + case ServicePackage.DCAE_SERVICE_INSTANCE__OUTPUT_STREAMS: + getOutputStreams().clear(); + return; + case ServicePackage.DCAE_SERVICE_INSTANCE__LAST_HEALTH_TEST: + setLastHealthTest(LAST_HEALTH_TEST_EDEFAULT); + return; + case ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_STATUS: + setHealthTestStatus(HEALTH_TEST_STATUS_EDEFAULT); + return; + case ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE: + setHealthTestMessageCode(HEALTH_TEST_MESSAGE_CODE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.DCAE_SERVICE_INSTANCE__SERVICE_CONTAINER: + return serviceContainer != null; + case ServicePackage.DCAE_SERVICE_INSTANCE__STATUS: + return status != STATUS_EDEFAULT; + case ServicePackage.DCAE_SERVICE_INSTANCE__INPUT_STREAMS: + return inputStreams != null && !inputStreams.isEmpty(); + case ServicePackage.DCAE_SERVICE_INSTANCE__OUTPUT_STREAMS: + return outputStreams != null && !outputStreams.isEmpty(); + case ServicePackage.DCAE_SERVICE_INSTANCE__LAST_HEALTH_TEST: + return LAST_HEALTH_TEST_EDEFAULT == null ? lastHealthTest != null : !LAST_HEALTH_TEST_EDEFAULT.equals(lastHealthTest); + case ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_STATUS: + return healthTestStatus != HEALTH_TEST_STATUS_EDEFAULT; + case ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE: + return HEALTH_TEST_MESSAGE_CODE_EDEFAULT == null ? healthTestMessageCode != null : !HEALTH_TEST_MESSAGE_CODE_EDEFAULT.equals(healthTestMessageCode); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (status: "); + result.append(status); + result.append(", lastHealthTest: "); + result.append(lastHealthTest); + result.append(", healthTestStatus: "); + result.append(healthTestStatus); + result.append(", healthTestMessageCode: "); + result.append(healthTestMessageCode); + result.append(')'); + return result.toString(); + } + +} //DcaeServiceInstanceImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/HealthTestResponseImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/HealthTestResponseImpl.java new file mode 100644 index 0000000..70b646c --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/HealthTestResponseImpl.java @@ -0,0 +1,239 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service.impl; + +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.service.HealthTestStatus; +import org.openecomp.dcae.controller.core.service.ServicePackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Healt Test Response'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.service.impl.HealthTestResponseImpl#getStatus Status}
  • + *
  • {@link org.openecomp.dcae.controller.core.service.impl.HealthTestResponseImpl#getMessageCode Message Code}
  • + *
+ *

+ * + * @generated + */ +public class HealthTestResponseImpl extends MinimalEObjectImpl.Container implements HealthTestResponse { + /** + * The default value of the '{@link #getStatus() Status}' attribute. + * + * + * @see #getStatus() + * @generated + * @ordered + */ + protected static final HealthTestStatus STATUS_EDEFAULT = HealthTestStatus.GREEN; + + /** + * The cached value of the '{@link #getStatus() Status}' attribute. + * + * + * @see #getStatus() + * @generated + * @ordered + */ + protected HealthTestStatus status = STATUS_EDEFAULT; + + /** + * The default value of the '{@link #getMessageCode() Message Code}' attribute. + * + * + * @see #getMessageCode() + * @generated + * @ordered + */ + protected static final String MESSAGE_CODE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMessageCode() Message Code}' attribute. + * + * + * @see #getMessageCode() + * @generated + * @ordered + */ + protected String messageCode = MESSAGE_CODE_EDEFAULT; + + /** + * + * + * @generated + */ + protected HealthTestResponseImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.HEALTH_TEST_RESPONSE; + } + + /** + * + * + * @generated + */ + public HealthTestStatus getStatus() { + return status; + } + + /** + * + * + * @generated + */ + public void setStatus(HealthTestStatus newStatus) { + HealthTestStatus oldStatus = status; + status = newStatus == null ? STATUS_EDEFAULT : newStatus; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.HEALTH_TEST_RESPONSE__STATUS, oldStatus, status)); + } + + /** + * + * + * @generated + */ + public String getMessageCode() { + return messageCode; + } + + /** + * + * + * @generated + */ + public void setMessageCode(String newMessageCode) { + String oldMessageCode = messageCode; + messageCode = newMessageCode; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.HEALTH_TEST_RESPONSE__MESSAGE_CODE, oldMessageCode, messageCode)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.HEALTH_TEST_RESPONSE__STATUS: + return getStatus(); + case ServicePackage.HEALTH_TEST_RESPONSE__MESSAGE_CODE: + return getMessageCode(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.HEALTH_TEST_RESPONSE__STATUS: + setStatus((HealthTestStatus)newValue); + return; + case ServicePackage.HEALTH_TEST_RESPONSE__MESSAGE_CODE: + setMessageCode((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.HEALTH_TEST_RESPONSE__STATUS: + setStatus(STATUS_EDEFAULT); + return; + case ServicePackage.HEALTH_TEST_RESPONSE__MESSAGE_CODE: + setMessageCode(MESSAGE_CODE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.HEALTH_TEST_RESPONSE__STATUS: + return status != STATUS_EDEFAULT; + case ServicePackage.HEALTH_TEST_RESPONSE__MESSAGE_CODE: + return MESSAGE_CODE_EDEFAULT == null ? messageCode != null : !MESSAGE_CODE_EDEFAULT.equals(messageCode); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (status: "); + result.append(status); + result.append(", messageCode: "); + result.append(messageCode); + result.append(')'); + return result.toString(); + } + +} //HealtTestResponseImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/ServiceFactoryImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/ServiceFactoryImpl.java new file mode 100644 index 0000000..0b0ce9e --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/ServiceFactoryImpl.java @@ -0,0 +1,189 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service.impl; + +import org.openecomp.dcae.controller.core.service.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ServiceFactoryImpl extends EFactoryImpl implements ServiceFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ServiceFactory init() { + try { + ServiceFactory theServiceFactory = (ServiceFactory)EPackage.Registry.INSTANCE.getEFactory(ServicePackage.eNS_URI); + if (theServiceFactory != null) { + return theServiceFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ServiceFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ServiceFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ServicePackage.DCAE_LOCATION: return createDcaeLocation(); + case ServicePackage.DCAE_SERVICE_DESCRIPTOR: return createDcaeServiceDescriptor(); + case ServicePackage.HEALTH_TEST_RESPONSE: return createHealthTestResponse(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case ServicePackage.HEALTH_TEST_STATUS: + return createHealthTestStatusFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case ServicePackage.HEALTH_TEST_STATUS: + return convertHealthTestStatusToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public DcaeLocation createDcaeLocation() { + DcaeLocationImpl dcaeLocation = new DcaeLocationImpl(); + return dcaeLocation; + } + + /** + * + * + * @generated + */ + public DcaeServiceDescriptor createDcaeServiceDescriptor() { + DcaeServiceDescriptorImpl dcaeServiceDescriptor = new DcaeServiceDescriptorImpl(); + return dcaeServiceDescriptor; + } + + /** + * + * + * @generated + */ + public HealthTestResponse createHealthTestResponse() { + HealthTestResponseImpl healthTestResponse = new HealthTestResponseImpl(); + return healthTestResponse; + } + + /** + * + * + * @generated + */ + public HealthTestStatus createHealthTestStatusFromString(EDataType eDataType, String initialValue) { + HealthTestStatus result = HealthTestStatus.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertHealthTestStatusToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public ServicePackage getServicePackage() { + return (ServicePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ServicePackage getPackage() { + return ServicePackage.eINSTANCE; + } + +} //ServiceFactoryImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/ServicePackageImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/ServicePackageImpl.java new file mode 100644 index 0000000..f3bc7f0 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/impl/ServicePackageImpl.java @@ -0,0 +1,857 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service.impl; + +import org.openecomp.dcae.controller.core.service.DcaeLocation; +import org.openecomp.dcae.controller.core.service.DcaePolicyEntity; +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceContainer; +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.service.HealthTestStatus; +import org.openecomp.dcae.controller.core.service.ServiceFactory; +import org.openecomp.dcae.controller.core.service.ServicePackage; +import org.openecomp.dcae.controller.core.stream.StreamPackage; +import org.openecomp.ncomp.core.CorePackage; +import org.openecomp.ncomp.openstack.location.LocationPackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ServicePackageImpl extends EPackageImpl implements ServicePackage { + /** + * + * + * @generated + */ + private EClass dcaeServiceEClass = null; + + /** + * + * + * @generated + */ + private EClass dcaeServiceContainerEClass = null; + + /** + * + * + * @generated + */ + private EClass dcaeServiceInstanceEClass = null; + + /** + * + * + * @generated + */ + private EClass dcaeLocationEClass = null; + + /** + * + * + * @generated + */ + private EClass dcaeServiceDescriptorEClass = null; + + /** + * + * + * @generated + */ + private EClass healthTestResponseEClass = null; + + /** + * + * + * @generated + */ + private EClass dcaePolicyEntityEClass = null; + + /** + * + * + * @generated + */ + private EEnum healthTestStatusEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.core.service.ServicePackage#eNS_URI + * @see #init() + * @generated + */ + private ServicePackageImpl() { + super(eNS_URI, ServiceFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ServicePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ServicePackage init() { + if (isInited) return (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + + // Obtain or create and register package + ServicePackageImpl theServicePackage = (ServicePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ServicePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ServicePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + LocationPackage.eINSTANCE.eClass(); + StreamPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theServicePackage.createPackageContents(); + + // Initialize created meta-data + theServicePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theServicePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ServicePackage.eNS_URI, theServicePackage); + return theServicePackage; + } + + /** + * + * + * @generated + */ + public EClass getDcaeService() { + return dcaeServiceEClass; + } + + /** + * + * + * @generated + */ + public EOperation getDcaeService__Deploy__String_String() { + return dcaeServiceEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EOperation getDcaeService__Undeploy__String() { + return dcaeServiceEClass.getEOperations().get(1); + } + + /** + * + * + * @generated + */ + public EOperation getDcaeService__Test__String() { + return dcaeServiceEClass.getEOperations().get(2); + } + + /** + * + * + * @generated + */ + public EOperation getDcaeService__Suspend__String() { + return dcaeServiceEClass.getEOperations().get(3); + } + + /** + * + * + * @generated + */ + public EOperation getDcaeService__Resume__String() { + return dcaeServiceEClass.getEOperations().get(4); + } + + /** + * + * + * @generated + */ + public EOperation getDcaeService__PushManagerConfiguration__String() { + return dcaeServiceEClass.getEOperations().get(5); + } + + /** + * + * + * @generated + */ + public EOperation getDcaeService__PollManagerConfiguration__String() { + return dcaeServiceEClass.getEOperations().get(6); + } + + /** + * + * + * @generated + */ + public EOperation getDcaeService__ManagerConfiguration__String() { + return dcaeServiceEClass.getEOperations().get(7); + } + + /** + * + * + * @generated + */ + public EOperation getDcaeService__ManagerOperation__String_String_JSONObject() { + return dcaeServiceEClass.getEOperations().get(8); + } + + /** + * + * + * @generated + */ + public EOperation getDcaeService__UpdateConfigurationFromPolicy__String() { + return dcaeServiceEClass.getEOperations().get(9); + } + + /** + * + * + * @generated + */ + public EOperation getDcaeService__RunHealthTests() { + return dcaeServiceEClass.getEOperations().get(10); + } + + /** + * + * + * @generated + */ + public EClass getDcaeServiceContainer() { + return dcaeServiceContainerEClass; + } + + /** + * + * + * @generated + */ + public EReference getDcaeServiceContainer_Instances() { + return (EReference)dcaeServiceContainerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getDcaeServiceInstance() { + return dcaeServiceInstanceEClass; + } + + /** + * + * + * @generated + */ + public EReference getDcaeServiceInstance_ServiceContainer() { + return (EReference)dcaeServiceInstanceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeServiceInstance_Status() { + return (EAttribute)dcaeServiceInstanceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getDcaeServiceInstance_InputStreams() { + return (EReference)dcaeServiceInstanceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getDcaeServiceInstance_OutputStreams() { + return (EReference)dcaeServiceInstanceEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeServiceInstance_LastHealthTest() { + return (EAttribute)dcaeServiceInstanceEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeServiceInstance_HealthTestStatus() { + return (EAttribute)dcaeServiceInstanceEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeServiceInstance_HealthTestMessageCode() { + return (EAttribute)dcaeServiceInstanceEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EClass getDcaeLocation() { + return dcaeLocationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeLocation_LocationType() { + return (EAttribute)dcaeLocationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getDcaeLocation_OpenstackProject() { + return (EReference)dcaeLocationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getDcaeServiceDescriptor() { + return dcaeServiceDescriptorEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeServiceDescriptor_GroupId() { + return (EAttribute)dcaeServiceDescriptorEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeServiceDescriptor_Artifact() { + return (EAttribute)dcaeServiceDescriptorEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeServiceDescriptor_Version() { + return (EAttribute)dcaeServiceDescriptorEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getHealthTestResponse() { + return healthTestResponseEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getHealthTestResponse_Status() { + return (EAttribute)healthTestResponseEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getHealthTestResponse_MessageCode() { + return (EAttribute)healthTestResponseEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getDcaePolicyEntity() { + return dcaePolicyEntityEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDcaePolicyEntity_PolicyName() { + return (EAttribute)dcaePolicyEntityEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaePolicyEntity_PolicyDescription() { + return (EAttribute)dcaePolicyEntityEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaePolicyEntity_PolicyConfigName() { + return (EAttribute)dcaePolicyEntityEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaePolicyEntity_PolicyTemplateVersion() { + return (EAttribute)dcaePolicyEntityEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaePolicyEntity_PolicyVersion() { + return (EAttribute)dcaePolicyEntityEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaePolicyEntity_PolicyPriority() { + return (EAttribute)dcaePolicyEntityEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaePolicyEntity_PolicyScope() { + return (EAttribute)dcaePolicyEntityEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EEnum getHealthTestStatus() { + return healthTestStatusEEnum; + } + + /** + * + * + * @generated + */ + public ServiceFactory getServiceFactory() { + return (ServiceFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + dcaeServiceContainerEClass = createEClass(DCAE_SERVICE_CONTAINER); + createEReference(dcaeServiceContainerEClass, DCAE_SERVICE_CONTAINER__INSTANCES); + + dcaeServiceEClass = createEClass(DCAE_SERVICE); + createEOperation(dcaeServiceEClass, DCAE_SERVICE___DEPLOY__STRING_STRING); + createEOperation(dcaeServiceEClass, DCAE_SERVICE___UNDEPLOY__STRING); + createEOperation(dcaeServiceEClass, DCAE_SERVICE___TEST__STRING); + createEOperation(dcaeServiceEClass, DCAE_SERVICE___SUSPEND__STRING); + createEOperation(dcaeServiceEClass, DCAE_SERVICE___RESUME__STRING); + createEOperation(dcaeServiceEClass, DCAE_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING); + createEOperation(dcaeServiceEClass, DCAE_SERVICE___POLL_MANAGER_CONFIGURATION__STRING); + createEOperation(dcaeServiceEClass, DCAE_SERVICE___MANAGER_CONFIGURATION__STRING); + createEOperation(dcaeServiceEClass, DCAE_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT); + createEOperation(dcaeServiceEClass, DCAE_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING); + createEOperation(dcaeServiceEClass, DCAE_SERVICE___RUN_HEALTH_TESTS); + + dcaeServiceInstanceEClass = createEClass(DCAE_SERVICE_INSTANCE); + createEReference(dcaeServiceInstanceEClass, DCAE_SERVICE_INSTANCE__SERVICE_CONTAINER); + createEAttribute(dcaeServiceInstanceEClass, DCAE_SERVICE_INSTANCE__STATUS); + createEReference(dcaeServiceInstanceEClass, DCAE_SERVICE_INSTANCE__INPUT_STREAMS); + createEReference(dcaeServiceInstanceEClass, DCAE_SERVICE_INSTANCE__OUTPUT_STREAMS); + createEAttribute(dcaeServiceInstanceEClass, DCAE_SERVICE_INSTANCE__LAST_HEALTH_TEST); + createEAttribute(dcaeServiceInstanceEClass, DCAE_SERVICE_INSTANCE__HEALTH_TEST_STATUS); + createEAttribute(dcaeServiceInstanceEClass, DCAE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE); + + dcaeLocationEClass = createEClass(DCAE_LOCATION); + createEAttribute(dcaeLocationEClass, DCAE_LOCATION__LOCATION_TYPE); + createEReference(dcaeLocationEClass, DCAE_LOCATION__OPENSTACK_PROJECT); + + dcaeServiceDescriptorEClass = createEClass(DCAE_SERVICE_DESCRIPTOR); + createEAttribute(dcaeServiceDescriptorEClass, DCAE_SERVICE_DESCRIPTOR__GROUP_ID); + createEAttribute(dcaeServiceDescriptorEClass, DCAE_SERVICE_DESCRIPTOR__ARTIFACT); + createEAttribute(dcaeServiceDescriptorEClass, DCAE_SERVICE_DESCRIPTOR__VERSION); + + healthTestResponseEClass = createEClass(HEALTH_TEST_RESPONSE); + createEAttribute(healthTestResponseEClass, HEALTH_TEST_RESPONSE__STATUS); + createEAttribute(healthTestResponseEClass, HEALTH_TEST_RESPONSE__MESSAGE_CODE); + + dcaePolicyEntityEClass = createEClass(DCAE_POLICY_ENTITY); + createEAttribute(dcaePolicyEntityEClass, DCAE_POLICY_ENTITY__POLICY_NAME); + createEAttribute(dcaePolicyEntityEClass, DCAE_POLICY_ENTITY__POLICY_DESCRIPTION); + createEAttribute(dcaePolicyEntityEClass, DCAE_POLICY_ENTITY__POLICY_CONFIG_NAME); + createEAttribute(dcaePolicyEntityEClass, DCAE_POLICY_ENTITY__POLICY_TEMPLATE_VERSION); + createEAttribute(dcaePolicyEntityEClass, DCAE_POLICY_ENTITY__POLICY_VERSION); + createEAttribute(dcaePolicyEntityEClass, DCAE_POLICY_ENTITY__POLICY_PRIORITY); + createEAttribute(dcaePolicyEntityEClass, DCAE_POLICY_ENTITY__POLICY_SCOPE); + + // Create enums + healthTestStatusEEnum = createEEnum(HEALTH_TEST_STATUS); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + StreamPackage theStreamPackage = (StreamPackage)EPackage.Registry.INSTANCE.getEPackage(StreamPackage.eNS_URI); + LocationPackage theLocationPackage = (LocationPackage)EPackage.Registry.INSTANCE.getEPackage(LocationPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + dcaeServiceContainerEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + dcaeServiceEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + dcaeServiceInstanceEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + dcaeLocationEClass.getESuperTypes().add(this.getDcaeServiceContainer()); + dcaeServiceDescriptorEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + + // Initialize classes, features, and operations; add parameters + initEClass(dcaeServiceContainerEClass, DcaeServiceContainer.class, "DcaeServiceContainer", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDcaeServiceContainer_Instances(), this.getDcaeServiceInstance(), this.getDcaeServiceInstance_ServiceContainer(), "instances", null, 0, -1, DcaeServiceContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(dcaeServiceEClass, DcaeService.class, "DcaeService", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + EOperation op = initEOperation(getDcaeService__Deploy__String_String(), null, "deploy", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "instanceName", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "containerPath", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getDcaeService__Undeploy__String(), null, "undeploy", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "instanceName", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getDcaeService__Test__String(), this.getHealthTestResponse(), "test", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "instanceName", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getDcaeService__Suspend__String(), null, "suspend", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "instanceName", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getDcaeService__Resume__String(), null, "resume", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "instanceName", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getDcaeService__PushManagerConfiguration__String(), null, "pushManagerConfiguration", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "instanceName", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getDcaeService__PollManagerConfiguration__String(), null, "pollManagerConfiguration", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "instanceName", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getDcaeService__ManagerConfiguration__String(), theEcorePackage.getEObject(), "managerConfiguration", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "instanceName", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getDcaeService__ManagerOperation__String_String_JSONObject(), theCorePackage.getJsonObject(), "managerOperation", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "instanceName", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "operation", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theCorePackage.getJsonObject(), "parameters", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getDcaeService__UpdateConfigurationFromPolicy__String(), null, "updateConfigurationFromPolicy", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "instanceName", 0, 1, !IS_UNIQUE, IS_ORDERED); + + initEOperation(getDcaeService__RunHealthTests(), null, "runHealthTests", 0, 1, !IS_UNIQUE, IS_ORDERED); + + initEClass(dcaeServiceInstanceEClass, DcaeServiceInstance.class, "DcaeServiceInstance", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDcaeServiceInstance_ServiceContainer(), this.getDcaeServiceContainer(), this.getDcaeServiceContainer_Instances(), "serviceContainer", null, 0, 1, DcaeServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaeServiceInstance_Status(), theCorePackage.getDeploymentStatus(), "status", null, 0, 1, DcaeServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDcaeServiceInstance_InputStreams(), theStreamPackage.getDcaeStream(), null, "inputStreams", null, 0, -1, DcaeServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDcaeServiceInstance_OutputStreams(), theStreamPackage.getDcaeStream(), null, "outputStreams", null, 0, -1, DcaeServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaeServiceInstance_LastHealthTest(), theCorePackage.getDateMetricAttribute(), "lastHealthTest", null, 0, 1, DcaeServiceInstance.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaeServiceInstance_HealthTestStatus(), this.getHealthTestStatus(), "healthTestStatus", null, 0, 1, DcaeServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaeServiceInstance_HealthTestMessageCode(), theEcorePackage.getEString(), "healthTestMessageCode", null, 0, 1, DcaeServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(dcaeLocationEClass, DcaeLocation.class, "DcaeLocation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDcaeLocation_LocationType(), theEcorePackage.getEString(), "locationType", null, 0, 1, DcaeLocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDcaeLocation_OpenstackProject(), theLocationPackage.getOpenStackProject(), null, "openstackProject", null, 0, 1, DcaeLocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(dcaeServiceDescriptorEClass, DcaeServiceDescriptor.class, "DcaeServiceDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDcaeServiceDescriptor_GroupId(), theEcorePackage.getEString(), "groupId", null, 0, 1, DcaeServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaeServiceDescriptor_Artifact(), theEcorePackage.getEString(), "artifact", null, 0, 1, DcaeServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaeServiceDescriptor_Version(), theEcorePackage.getEString(), "version", null, 0, 1, DcaeServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(healthTestResponseEClass, HealthTestResponse.class, "HealthTestResponse", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getHealthTestResponse_Status(), this.getHealthTestStatus(), "status", null, 0, 1, HealthTestResponse.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getHealthTestResponse_MessageCode(), theEcorePackage.getEString(), "messageCode", null, 0, 1, HealthTestResponse.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(dcaePolicyEntityEClass, DcaePolicyEntity.class, "DcaePolicyEntity", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDcaePolicyEntity_PolicyName(), theEcorePackage.getEString(), "policyName", null, 0, 1, DcaePolicyEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaePolicyEntity_PolicyDescription(), theEcorePackage.getEString(), "policyDescription", null, 0, 1, DcaePolicyEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaePolicyEntity_PolicyConfigName(), theEcorePackage.getEString(), "policyConfigName", null, 0, 1, DcaePolicyEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaePolicyEntity_PolicyTemplateVersion(), theEcorePackage.getEString(), "policyTemplateVersion", null, 0, 1, DcaePolicyEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaePolicyEntity_PolicyVersion(), theEcorePackage.getEString(), "policyVersion", null, 0, 1, DcaePolicyEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaePolicyEntity_PolicyPriority(), theEcorePackage.getEString(), "policyPriority", null, 0, 1, DcaePolicyEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaePolicyEntity_PolicyScope(), theEcorePackage.getEString(), "policyScope", null, 0, 1, DcaePolicyEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(healthTestStatusEEnum, HealthTestStatus.class, "HealthTestStatus"); + addEEnumLiteral(healthTestStatusEEnum, HealthTestStatus.GREEN); + addEEnumLiteral(healthTestStatusEEnum, HealthTestStatus.YELLOW); + addEEnumLiteral(healthTestStatusEEnum, HealthTestStatus.RED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + // http://openecomp.org + createEcompAnnotations(); + // http://openecomp.org/cdap + createCdapAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "ecomp", "http://openecomp.org", + "cdap", "http://openecomp.org/cdap" + }); + } + + /** + * Initializes the annotations for http://openecomp.org. + * + * + * @generated + */ + protected void createEcompAnnotations() { + String source = "http://openecomp.org"; + addAnnotation + (getDcaeServiceInstance_ServiceContainer(), + source, + new String[] { + "type", "operational" + }); + addAnnotation + (getDcaeServiceInstance_Status(), + source, + new String[] { + "type", "operational" + }); + addAnnotation + (getDcaeServiceInstance_InputStreams(), + source, + new String[] { + "type", "service" + }); + addAnnotation + (getDcaeServiceInstance_OutputStreams(), + source, + new String[] { + "type", "service" + }); + } + + /** + * Initializes the annotations for http://openecomp.org/cdap. + * + * + * @generated + */ + protected void createCdapAnnotations() { + String source = "http://openecomp.org/cdap"; + addAnnotation + (getDcaePolicyEntity_PolicyName(), + source, + new String[] { + "destination", "namespace-prefs::${path}.policyName" + }); + addAnnotation + (getDcaePolicyEntity_PolicyDescription(), + source, + new String[] { + "destination", "namespace-prefs::${path}.policyDescription" + }); + addAnnotation + (getDcaePolicyEntity_PolicyConfigName(), + source, + new String[] { + "destination", "namespace-prefs::${path}.policyConfigName" + }); + addAnnotation + (getDcaePolicyEntity_PolicyTemplateVersion(), + source, + new String[] { + "destination", "namespace-prefs::${path}.policyTemplateVersion" + }); + addAnnotation + (getDcaePolicyEntity_PolicyVersion(), + source, + new String[] { + "destination", "namespace-prefs::${path}.policyVersion" + }); + addAnnotation + (getDcaePolicyEntity_PolicyPriority(), + source, + new String[] { + "destination", "namespace-prefs::${path}.policyPriority" + }); + addAnnotation + (getDcaePolicyEntity_PolicyScope(), + source, + new String[] { + "destination", "namespace-prefs::${path}.policyScope" + }); + } + +} //ServicePackageImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/util/ServiceAdapterFactory.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/util/ServiceAdapterFactory.java new file mode 100644 index 0000000..be5e923 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/util/ServiceAdapterFactory.java @@ -0,0 +1,269 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service.util; + +import org.openecomp.dcae.controller.core.service.*; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.core.service.ServicePackage + * @generated + */ +public class ServiceAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ServiceAdapterFactory() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ServiceSwitch modelSwitch = + new ServiceSwitch() { + @Override + public Adapter caseDcaeServiceContainer(DcaeServiceContainer object) { + return createDcaeServiceContainerAdapter(); + } + @Override + public Adapter caseDcaeService(DcaeService object) { + return createDcaeServiceAdapter(); + } + @Override + public Adapter caseDcaeServiceInstance(DcaeServiceInstance object) { + return createDcaeServiceInstanceAdapter(); + } + @Override + public Adapter caseDcaeLocation(DcaeLocation object) { + return createDcaeLocationAdapter(); + } + @Override + public Adapter caseDcaeServiceDescriptor(DcaeServiceDescriptor object) { + return createDcaeServiceDescriptorAdapter(); + } + @Override + public Adapter caseHealthTestResponse(HealthTestResponse object) { + return createHealthTestResponseAdapter(); + } + @Override + public Adapter caseDcaePolicyEntity(DcaePolicyEntity object) { + return createDcaePolicyEntityAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeService Dcae Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeService + * @generated + */ + public Adapter createDcaeServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceContainer Dcae Service Container}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceContainer + * @generated + */ + public Adapter createDcaeServiceContainerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance Dcae Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance + * @generated + */ + public Adapter createDcaeServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeLocation Dcae Location}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeLocation + * @generated + */ + public Adapter createDcaeLocationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor Dcae Service Descriptor}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor + * @generated + */ + public Adapter createDcaeServiceDescriptorAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.HealthTestResponse Health Test Response}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.HealthTestResponse + * @generated + */ + public Adapter createHealthTestResponseAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaePolicyEntity Dcae Policy Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaePolicyEntity + * @generated + */ + public Adapter createDcaePolicyEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ServiceAdapterFactory diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/util/ServiceSwitch.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/util/ServiceSwitch.java new file mode 100644 index 0000000..3845664 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/service/util/ServiceSwitch.java @@ -0,0 +1,280 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.service.util; + +import org.openecomp.dcae.controller.core.service.*; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.core.service.ServicePackage + * @generated + */ +public class ServiceSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ServiceSwitch() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ServicePackage.DCAE_SERVICE_CONTAINER: { + DcaeServiceContainer dcaeServiceContainer = (DcaeServiceContainer)theEObject; + T result = caseDcaeServiceContainer(dcaeServiceContainer); + if (result == null) result = caseNamedEntity(dcaeServiceContainer); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.DCAE_SERVICE: { + DcaeService dcaeService = (DcaeService)theEObject; + T result = caseDcaeService(dcaeService); + if (result == null) result = caseNamedEntity(dcaeService); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.DCAE_SERVICE_INSTANCE: { + DcaeServiceInstance dcaeServiceInstance = (DcaeServiceInstance)theEObject; + T result = caseDcaeServiceInstance(dcaeServiceInstance); + if (result == null) result = caseNamedEntity(dcaeServiceInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.DCAE_LOCATION: { + DcaeLocation dcaeLocation = (DcaeLocation)theEObject; + T result = caseDcaeLocation(dcaeLocation); + if (result == null) result = caseDcaeServiceContainer(dcaeLocation); + if (result == null) result = caseNamedEntity(dcaeLocation); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.DCAE_SERVICE_DESCRIPTOR: { + DcaeServiceDescriptor dcaeServiceDescriptor = (DcaeServiceDescriptor)theEObject; + T result = caseDcaeServiceDescriptor(dcaeServiceDescriptor); + if (result == null) result = caseNamedEntity(dcaeServiceDescriptor); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.HEALTH_TEST_RESPONSE: { + HealthTestResponse healthTestResponse = (HealthTestResponse)theEObject; + T result = caseHealthTestResponse(healthTestResponse); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.DCAE_POLICY_ENTITY: { + DcaePolicyEntity dcaePolicyEntity = (DcaePolicyEntity)theEObject; + T result = caseDcaePolicyEntity(dcaePolicyEntity); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeService(DcaeService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service Container'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service Container'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceContainer(DcaeServiceContainer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceInstance(DcaeServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Location'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Location'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeLocation(DcaeLocation object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service Descriptor'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service Descriptor'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceDescriptor(DcaeServiceDescriptor object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Health Test Response'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Health Test Response'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseHealthTestResponse(HealthTestResponse object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Policy Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Policy Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaePolicyEntity(DcaePolicyEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ServiceSwitch diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusDataRouterNode.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusDataRouterNode.java new file mode 100644 index 0000000..eab989b --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusDataRouterNode.java @@ -0,0 +1,124 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + + +/** + * + * A representation of the model object 'Databus Data Router Node'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode#getDcaeLocationName Dcae Location Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode#getHostFqdn Host Fqdn}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode#getVersion Version}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusDataRouterNode() + * @model + * @generated + */ +public interface DatabusDataRouterNode extends DatabusEntity { + + /** + * Returns the value of the 'Dcae Location Name' attribute. + * + *

+ * If the meaning of the 'Dcae Location Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dcae Location Name' attribute. + * @see #setDcaeLocationName(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusDataRouterNode_DcaeLocationName() + * @model unique="false" + * @generated + */ + String getDcaeLocationName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode#getDcaeLocationName Dcae Location Name}' attribute. + * + * + * @param value the new value of the 'Dcae Location Name' attribute. + * @see #getDcaeLocationName() + * @generated + */ + void setDcaeLocationName(String value); + + /** + * Returns the value of the 'Host Fqdn' attribute. + * + *

+ * If the meaning of the 'Host Fqdn' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Host Fqdn' attribute. + * @see #setHostFqdn(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusDataRouterNode_HostFqdn() + * @model unique="false" + * @generated + */ + String getHostFqdn(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode#getHostFqdn Host Fqdn}' attribute. + * + * + * @param value the new value of the 'Host Fqdn' attribute. + * @see #getHostFqdn() + * @generated + */ + void setHostFqdn(String value); + + /** + * Returns the value of the 'Version' attribute. + * + *

+ * If the meaning of the 'Version' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Version' attribute. + * @see #setVersion(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusDataRouterNode_Version() + * @model unique="false" + * @generated + */ + String getVersion(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode#getVersion Version}' attribute. + * + * + * @param value the new value of the 'Version' attribute. + * @see #getVersion() + * @generated + */ + void setVersion(String value); +} // DatabusDataRouterNode diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusEntity.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusEntity.java new file mode 100644 index 0000000..0047458 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusEntity.java @@ -0,0 +1,126 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import org.openecomp.ncomp.core.NamedEntity; +import java.util.Date; + +/** + * + * A representation of the model object 'Databus Entity'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusEntity#getStatus Status}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusEntity#getLastModified Last Modified}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusEntity#getType Type}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusEntity() + * @model + * @generated + */ +public interface DatabusEntity extends NamedEntity { + /** + * Returns the value of the 'Status' attribute. + * + *

+ * If the meaning of the 'Status' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Status' attribute. + * @see #setStatus(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusEntity_Status() + * @model unique="false" + * @generated + */ + String getStatus(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusEntity#getStatus Status}' attribute. + * + * + * @param value the new value of the 'Status' attribute. + * @see #getStatus() + * @generated + */ + void setStatus(String value); + + /** + * Returns the value of the 'Last Modified' attribute. + * + *

+ * If the meaning of the 'Last Modified' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Last Modified' attribute. + * @see #setLastModified(Date) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusEntity_LastModified() + * @model unique="false" + * @generated + */ + Date getLastModified(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusEntity#getLastModified Last Modified}' attribute. + * + * + * @param value the new value of the 'Last Modified' attribute. + * @see #getLastModified() + * @generated + */ + void setLastModified(Date value); + + /** + * Returns the value of the 'Type' attribute. + * + *

+ * If the meaning of the 'Type' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Type' attribute. + * @see #setType(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusEntity_Type() + * @model unique="false" + * @generated + */ + String getType(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusEntity#getType Type}' attribute. + * + * + * @param value the new value of the 'Type' attribute. + * @see #getType() + * @generated + */ + void setType(String value); + +} // DatabusEntity diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusLocation.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusLocation.java new file mode 100644 index 0000000..a4aee6b --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusLocation.java @@ -0,0 +1,70 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + + +/** + * + * A representation of the model object 'Databus Location'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusLocation#getDcaeLayer Dcae Layer}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusLocation() + * @model + * @generated + */ +public interface DatabusLocation extends DatabusEntity { + + /** + * Returns the value of the 'Dcae Layer' attribute. + * + *

+ * If the meaning of the 'Dcae Layer' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dcae Layer' attribute. + * @see #setDcaeLayer(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusLocation_DcaeLayer() + * @model unique="false" + * @generated + */ + String getDcaeLayer(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusLocation#getDcaeLayer Dcae Layer}' attribute. + * + * + * @param value the new value of the 'Dcae Layer' attribute. + * @see #getDcaeLayer() + * @generated + */ + void setDcaeLayer(String value); +} // DatabusLocation diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusMessageRouterCluster.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusMessageRouterCluster.java new file mode 100644 index 0000000..d176b17 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusMessageRouterCluster.java @@ -0,0 +1,169 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Databus Message Router Cluster'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getDcaeLocationName Dcae Location Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getServiceFqdn Service Fqdn}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getHostFqdn Host Fqdn}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getTopicPort Topic Port}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getTopicProtocol Topic Protocol}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusMessageRouterCluster() + * @model + * @generated + */ +public interface DatabusMessageRouterCluster extends DatabusEntity { + + /** + * Returns the value of the 'Dcae Location Name' attribute. + * + *

+ * If the meaning of the 'Dcae Location Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dcae Location Name' attribute. + * @see #setDcaeLocationName(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusMessageRouterCluster_DcaeLocationName() + * @model unique="false" + * @generated + */ + String getDcaeLocationName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getDcaeLocationName Dcae Location Name}' attribute. + * + * + * @param value the new value of the 'Dcae Location Name' attribute. + * @see #getDcaeLocationName() + * @generated + */ + void setDcaeLocationName(String value); + + /** + * Returns the value of the 'Service Fqdn' attribute. + * + *

+ * If the meaning of the 'Service Fqdn' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Service Fqdn' attribute. + * @see #setServiceFqdn(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusMessageRouterCluster_ServiceFqdn() + * @model unique="false" + * @generated + */ + String getServiceFqdn(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getServiceFqdn Service Fqdn}' attribute. + * + * + * @param value the new value of the 'Service Fqdn' attribute. + * @see #getServiceFqdn() + * @generated + */ + void setServiceFqdn(String value); + + /** + * Returns the value of the 'Host Fqdn' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

+ * If the meaning of the 'Host Fqdn' attribute list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Host Fqdn' attribute list. + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusMessageRouterCluster_HostFqdn() + * @model unique="false" + * @generated + */ + EList getHostFqdn(); + + /** + * Returns the value of the 'Topic Port' attribute. + * + *

+ * If the meaning of the 'Topic Port' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Topic Port' attribute. + * @see #setTopicPort(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusMessageRouterCluster_TopicPort() + * @model unique="false" + * @generated + */ + String getTopicPort(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getTopicPort Topic Port}' attribute. + * + * + * @param value the new value of the 'Topic Port' attribute. + * @see #getTopicPort() + * @generated + */ + void setTopicPort(String value); + + /** + * Returns the value of the 'Topic Protocol' attribute. + * + *

+ * If the meaning of the 'Topic Protocol' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Topic Protocol' attribute. + * @see #setTopicProtocol(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusMessageRouterCluster_TopicProtocol() + * @model unique="false" + * @generated + */ + String getTopicProtocol(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getTopicProtocol Topic Protocol}' attribute. + * + * + * @param value the new value of the 'Topic Protocol' attribute. + * @see #getTopicProtocol() + * @generated + */ + void setTopicProtocol(String value); +} // DatabusMessageRouterCluster diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStream.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStream.java new file mode 100644 index 0000000..4252099 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStream.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Databus Stream'. + * + * + * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStream() + * @model abstract="true" + * @generated + */ +public interface DatabusStream extends NamedEntity { +} // DatabusStream diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamFeed.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamFeed.java new file mode 100644 index 0000000..910a0f8 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamFeed.java @@ -0,0 +1,376 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import org.eclipse.emf.common.util.EList; + + +/** + * + * A representation of the model object 'Databus Stream Feed'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getFeedName Feed Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getFeedVersion Feed Version}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getFeedDescription Feed Description}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getAsprClassification Aspr Classification}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getOwner Owner}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getFeedId Feed Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getLogURL Log URL}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getPublishURL Publish URL}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getSubscribeURL Subscribe URL}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getStatus Status}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getSuspended Suspended}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getPublishers Publishers}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getSubscribers Subscribers}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeed() + * @model + * @generated + */ +public interface DatabusStreamFeed extends DatabusStream { + + /** + * Returns the value of the 'Feed Name' attribute. + * + *

+ * If the meaning of the 'Feed Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Feed Name' attribute. + * @see #setFeedName(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeed_FeedName() + * @model unique="false" + * @generated + */ + String getFeedName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getFeedName Feed Name}' attribute. + * + * + * @param value the new value of the 'Feed Name' attribute. + * @see #getFeedName() + * @generated + */ + void setFeedName(String value); + + /** + * Returns the value of the 'Feed Version' attribute. + * + *

+ * If the meaning of the 'Feed Version' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Feed Version' attribute. + * @see #setFeedVersion(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeed_FeedVersion() + * @model unique="false" + * @generated + */ + String getFeedVersion(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getFeedVersion Feed Version}' attribute. + * + * + * @param value the new value of the 'Feed Version' attribute. + * @see #getFeedVersion() + * @generated + */ + void setFeedVersion(String value); + + /** + * Returns the value of the 'Feed Description' attribute. + * + *

+ * If the meaning of the 'Feed Description' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Feed Description' attribute. + * @see #setFeedDescription(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeed_FeedDescription() + * @model unique="false" + * @generated + */ + String getFeedDescription(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getFeedDescription Feed Description}' attribute. + * + * + * @param value the new value of the 'Feed Description' attribute. + * @see #getFeedDescription() + * @generated + */ + void setFeedDescription(String value); + + /** + * Returns the value of the 'Aspr Classification' attribute. + * + *

+ * If the meaning of the 'Aspr Classification' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Aspr Classification' attribute. + * @see #setAsprClassification(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeed_AsprClassification() + * @model unique="false" + * @generated + */ + String getAsprClassification(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getAsprClassification Aspr Classification}' attribute. + * + * + * @param value the new value of the 'Aspr Classification' attribute. + * @see #getAsprClassification() + * @generated + */ + void setAsprClassification(String value); + + /** + * Returns the value of the 'Owner' attribute. + * + *

+ * If the meaning of the 'Owner' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Owner' attribute. + * @see #setOwner(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeed_Owner() + * @model unique="false" + * @generated + */ + String getOwner(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getOwner Owner}' attribute. + * + * + * @param value the new value of the 'Owner' attribute. + * @see #getOwner() + * @generated + */ + void setOwner(String value); + + /** + * Returns the value of the 'Feed Id' attribute. + * + *

+ * If the meaning of the 'Feed Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Feed Id' attribute. + * @see #setFeedId(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeed_FeedId() + * @model unique="false" + * @generated + */ + String getFeedId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getFeedId Feed Id}' attribute. + * + * + * @param value the new value of the 'Feed Id' attribute. + * @see #getFeedId() + * @generated + */ + void setFeedId(String value); + + /** + * Returns the value of the 'Log URL' attribute. + * + *

+ * If the meaning of the 'Log URL' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Log URL' attribute. + * @see #setLogURL(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeed_LogURL() + * @model unique="false" + * @generated + */ + String getLogURL(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getLogURL Log URL}' attribute. + * + * + * @param value the new value of the 'Log URL' attribute. + * @see #getLogURL() + * @generated + */ + void setLogURL(String value); + + /** + * Returns the value of the 'Publish URL' attribute. + * + *

+ * If the meaning of the 'Publish URL' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Publish URL' attribute. + * @see #setPublishURL(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeed_PublishURL() + * @model unique="false" + * @generated + */ + String getPublishURL(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getPublishURL Publish URL}' attribute. + * + * + * @param value the new value of the 'Publish URL' attribute. + * @see #getPublishURL() + * @generated + */ + void setPublishURL(String value); + + /** + * Returns the value of the 'Subscribe URL' attribute. + * + *

+ * If the meaning of the 'Subscribe URL' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Subscribe URL' attribute. + * @see #setSubscribeURL(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeed_SubscribeURL() + * @model unique="false" + * @generated + */ + String getSubscribeURL(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getSubscribeURL Subscribe URL}' attribute. + * + * + * @param value the new value of the 'Subscribe URL' attribute. + * @see #getSubscribeURL() + * @generated + */ + void setSubscribeURL(String value); + + /** + * Returns the value of the 'Status' attribute. + * + *

+ * If the meaning of the 'Status' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Status' attribute. + * @see #setStatus(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeed_Status() + * @model unique="false" + * @generated + */ + String getStatus(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getStatus Status}' attribute. + * + * + * @param value the new value of the 'Status' attribute. + * @see #getStatus() + * @generated + */ + void setStatus(String value); + + /** + * Returns the value of the 'Suspended' attribute. + * + *

+ * If the meaning of the 'Suspended' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Suspended' attribute. + * @see #setSuspended(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeed_Suspended() + * @model unique="false" + * @generated + */ + String getSuspended(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getSuspended Suspended}' attribute. + * + * + * @param value the new value of the 'Suspended' attribute. + * @see #getSuspended() + * @generated + */ + void setSuspended(String value); + + /** + * Returns the value of the 'Publishers' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher}. + * + *

+ * If the meaning of the 'Publishers' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Publishers' containment reference list. + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeed_Publishers() + * @model containment="true" + * @generated + */ + EList getPublishers(); + + /** + * Returns the value of the 'Subscribers' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber}. + * + *

+ * If the meaning of the 'Subscribers' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Subscribers' containment reference list. + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeed_Subscribers() + * @model containment="true" + * @generated + */ + EList getSubscribers(); +} // DatabusStreamFeed diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamFeedPublisher.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamFeedPublisher.java new file mode 100644 index 0000000..9513cfc --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamFeedPublisher.java @@ -0,0 +1,233 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Databus Stream Feed Publisher'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getLocalStreamId Local Stream Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getDcaeLocationName Dcae Location Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getFeedId Feed Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getPubId Pub Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getStatus Status}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getUsername Username}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getUserpwd Userpwd}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedPublisher() + * @model + * @generated + */ +public interface DatabusStreamFeedPublisher extends NamedEntity { + /** + * Returns the value of the 'Local Stream Id' attribute. + * + *

+ * If the meaning of the 'Local Stream Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Local Stream Id' attribute. + * @see #setLocalStreamId(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedPublisher_LocalStreamId() + * @model unique="false" + * @generated + */ + String getLocalStreamId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getLocalStreamId Local Stream Id}' attribute. + * + * + * @param value the new value of the 'Local Stream Id' attribute. + * @see #getLocalStreamId() + * @generated + */ + void setLocalStreamId(String value); + + /** + * Returns the value of the 'Dcae Location Name' attribute. + * + *

+ * If the meaning of the 'Dcae Location Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dcae Location Name' attribute. + * @see #setDcaeLocationName(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedPublisher_DcaeLocationName() + * @model unique="false" + * @generated + */ + String getDcaeLocationName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getDcaeLocationName Dcae Location Name}' attribute. + * + * + * @param value the new value of the 'Dcae Location Name' attribute. + * @see #getDcaeLocationName() + * @generated + */ + void setDcaeLocationName(String value); + + /** + * Returns the value of the 'Feed Id' attribute. + * + *

+ * If the meaning of the 'Feed Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Feed Id' attribute. + * @see #setFeedId(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedPublisher_FeedId() + * @model unique="false" + * @generated + */ + String getFeedId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getFeedId Feed Id}' attribute. + * + * + * @param value the new value of the 'Feed Id' attribute. + * @see #getFeedId() + * @generated + */ + void setFeedId(String value); + + /** + * Returns the value of the 'Pub Id' attribute. + * + *

+ * If the meaning of the 'Pub Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Pub Id' attribute. + * @see #setPubId(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedPublisher_PubId() + * @model unique="false" + * @generated + */ + String getPubId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getPubId Pub Id}' attribute. + * + * + * @param value the new value of the 'Pub Id' attribute. + * @see #getPubId() + * @generated + */ + void setPubId(String value); + + /** + * Returns the value of the 'Status' attribute. + * + *

+ * If the meaning of the 'Status' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Status' attribute. + * @see #setStatus(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedPublisher_Status() + * @model unique="false" + * @generated + */ + String getStatus(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getStatus Status}' attribute. + * + * + * @param value the new value of the 'Status' attribute. + * @see #getStatus() + * @generated + */ + void setStatus(String value); + + /** + * Returns the value of the 'Username' attribute. + * + *

+ * If the meaning of the 'Username' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Username' attribute. + * @see #setUsername(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedPublisher_Username() + * @model unique="false" + * @generated + */ + String getUsername(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getUsername Username}' attribute. + * + * + * @param value the new value of the 'Username' attribute. + * @see #getUsername() + * @generated + */ + void setUsername(String value); + + /** + * Returns the value of the 'Userpwd' attribute. + * + *

+ * If the meaning of the 'Userpwd' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Userpwd' attribute. + * @see #setUserpwd(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedPublisher_Userpwd() + * @model unique="false" + * @generated + */ + String getUserpwd(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getUserpwd Userpwd}' attribute. + * + * + * @param value the new value of the 'Userpwd' attribute. + * @see #getUserpwd() + * @generated + */ + void setUserpwd(String value); + +} // DatabusStreamFeedPublisher diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamFeedSubscriber.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamFeedSubscriber.java new file mode 100644 index 0000000..b9b37d1 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamFeedSubscriber.java @@ -0,0 +1,368 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Databus Stream Feed Subscriber'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getLocalStreamId Local Stream Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getDcaeLocationName Dcae Location Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getOtherFeedName Other Feed Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getFeedId Feed Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getLogURL Log URL}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getOwner Owner}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getSubId Sub Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#isSuspended Suspended}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#isUse100 Use100}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getUsername Username}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getUserpwd Userpwd}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getDeliveryURL Delivery URL}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedSubscriber() + * @model + * @generated + */ +public interface DatabusStreamFeedSubscriber extends NamedEntity { + /** + * Returns the value of the 'Local Stream Id' attribute. + * + *

+ * If the meaning of the 'Local Stream Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Local Stream Id' attribute. + * @see #setLocalStreamId(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedSubscriber_LocalStreamId() + * @model unique="false" + * @generated + */ + String getLocalStreamId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getLocalStreamId Local Stream Id}' attribute. + * + * + * @param value the new value of the 'Local Stream Id' attribute. + * @see #getLocalStreamId() + * @generated + */ + void setLocalStreamId(String value); + + /** + * Returns the value of the 'Dcae Location Name' attribute. + * + *

+ * If the meaning of the 'Dcae Location Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dcae Location Name' attribute. + * @see #setDcaeLocationName(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedSubscriber_DcaeLocationName() + * @model unique="false" + * @generated + */ + String getDcaeLocationName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getDcaeLocationName Dcae Location Name}' attribute. + * + * + * @param value the new value of the 'Dcae Location Name' attribute. + * @see #getDcaeLocationName() + * @generated + */ + void setDcaeLocationName(String value); + + /** + * Returns the value of the 'Other Feed Name' attribute. + * + *

+ * If the meaning of the 'Other Feed Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Other Feed Name' attribute. + * @see #setOtherFeedName(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedSubscriber_OtherFeedName() + * @model unique="false" + * @generated + */ + String getOtherFeedName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getOtherFeedName Other Feed Name}' attribute. + * + * + * @param value the new value of the 'Other Feed Name' attribute. + * @see #getOtherFeedName() + * @generated + */ + void setOtherFeedName(String value); + + /** + * Returns the value of the 'Feed Id' attribute. + * + *

+ * If the meaning of the 'Feed Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Feed Id' attribute. + * @see #setFeedId(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedSubscriber_FeedId() + * @model unique="false" + * @generated + */ + String getFeedId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getFeedId Feed Id}' attribute. + * + * + * @param value the new value of the 'Feed Id' attribute. + * @see #getFeedId() + * @generated + */ + void setFeedId(String value); + + /** + * Returns the value of the 'Log URL' attribute. + * + *

+ * If the meaning of the 'Log URL' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Log URL' attribute. + * @see #setLogURL(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedSubscriber_LogURL() + * @model unique="false" + * @generated + */ + String getLogURL(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getLogURL Log URL}' attribute. + * + * + * @param value the new value of the 'Log URL' attribute. + * @see #getLogURL() + * @generated + */ + void setLogURL(String value); + + /** + * Returns the value of the 'Owner' attribute. + * + *

+ * If the meaning of the 'Owner' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Owner' attribute. + * @see #setOwner(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedSubscriber_Owner() + * @model unique="false" + * @generated + */ + String getOwner(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getOwner Owner}' attribute. + * + * + * @param value the new value of the 'Owner' attribute. + * @see #getOwner() + * @generated + */ + void setOwner(String value); + + /** + * Returns the value of the 'Sub Id' attribute. + * + *

+ * If the meaning of the 'Sub Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Sub Id' attribute. + * @see #setSubId(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedSubscriber_SubId() + * @model unique="false" + * @generated + */ + String getSubId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getSubId Sub Id}' attribute. + * + * + * @param value the new value of the 'Sub Id' attribute. + * @see #getSubId() + * @generated + */ + void setSubId(String value); + + /** + * Returns the value of the 'Suspended' attribute. + * + *

+ * If the meaning of the 'Suspended' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Suspended' attribute. + * @see #setSuspended(boolean) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedSubscriber_Suspended() + * @model unique="false" + * @generated + */ + boolean isSuspended(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#isSuspended Suspended}' attribute. + * + * + * @param value the new value of the 'Suspended' attribute. + * @see #isSuspended() + * @generated + */ + void setSuspended(boolean value); + + /** + * Returns the value of the 'Use100' attribute. + * + *

+ * If the meaning of the 'Use100' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Use100' attribute. + * @see #setUse100(boolean) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedSubscriber_Use100() + * @model unique="false" + * @generated + */ + boolean isUse100(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#isUse100 Use100}' attribute. + * + * + * @param value the new value of the 'Use100' attribute. + * @see #isUse100() + * @generated + */ + void setUse100(boolean value); + + /** + * Returns the value of the 'Username' attribute. + * + *

+ * If the meaning of the 'Username' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Username' attribute. + * @see #setUsername(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedSubscriber_Username() + * @model unique="false" + * @generated + */ + String getUsername(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getUsername Username}' attribute. + * + * + * @param value the new value of the 'Username' attribute. + * @see #getUsername() + * @generated + */ + void setUsername(String value); + + /** + * Returns the value of the 'Userpwd' attribute. + * + *

+ * If the meaning of the 'Userpwd' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Userpwd' attribute. + * @see #setUserpwd(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedSubscriber_Userpwd() + * @model unique="false" + * @generated + */ + String getUserpwd(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getUserpwd Userpwd}' attribute. + * + * + * @param value the new value of the 'Userpwd' attribute. + * @see #getUserpwd() + * @generated + */ + void setUserpwd(String value); + + /** + * Returns the value of the 'Delivery URL' attribute. + * + *

+ * If the meaning of the 'Delivery URL' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Delivery URL' attribute. + * @see #setDeliveryURL(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamFeedSubscriber_DeliveryURL() + * @model unique="false" + * @generated + */ + String getDeliveryURL(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getDeliveryURL Delivery URL}' attribute. + * + * + * @param value the new value of the 'Delivery URL' attribute. + * @see #getDeliveryURL() + * @generated + */ + void setDeliveryURL(String value); + +} // DatabusStreamFeedSubscriber diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamTopic.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamTopic.java new file mode 100644 index 0000000..7fab2f2 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamTopic.java @@ -0,0 +1,363 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import java.util.Date; +import org.eclipse.emf.common.util.EList; + + +/** + * + * A representation of the model object 'Databus Stream Topic'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getTopicName Topic Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getTopicDescription Topic Description}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getDcaeLocationName Dcae Location Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getOwner Owner}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#isTxenabled Txenabled}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getFqtn Fqtn}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getLastMod Last Mod}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getStatus Status}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getClients Clients}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getPublishURL Publish URL}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getSubscribeURL Subscribe URL}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getAuthenticationMethod Authentication Method}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopic() + * @model + * @generated + */ +public interface DatabusStreamTopic extends DatabusStream { + + /** + * Returns the value of the 'Topic Name' attribute. + * + *

+ * If the meaning of the 'Topic Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Topic Name' attribute. + * @see #setTopicName(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopic_TopicName() + * @model unique="false" + * @generated + */ + String getTopicName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getTopicName Topic Name}' attribute. + * + * + * @param value the new value of the 'Topic Name' attribute. + * @see #getTopicName() + * @generated + */ + void setTopicName(String value); + + /** + * Returns the value of the 'Topic Description' attribute. + * + *

+ * If the meaning of the 'Topic Description' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Topic Description' attribute. + * @see #setTopicDescription(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopic_TopicDescription() + * @model unique="false" + * @generated + */ + String getTopicDescription(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getTopicDescription Topic Description}' attribute. + * + * + * @param value the new value of the 'Topic Description' attribute. + * @see #getTopicDescription() + * @generated + */ + void setTopicDescription(String value); + + /** + * Returns the value of the 'Dcae Location Name' attribute. + * + *

+ * If the meaning of the 'Dcae Location Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dcae Location Name' attribute. + * @see #setDcaeLocationName(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopic_DcaeLocationName() + * @model unique="false" + * @generated + */ + String getDcaeLocationName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getDcaeLocationName Dcae Location Name}' attribute. + * + * + * @param value the new value of the 'Dcae Location Name' attribute. + * @see #getDcaeLocationName() + * @generated + */ + void setDcaeLocationName(String value); + + /** + * Returns the value of the 'Owner' attribute. + * + *

+ * If the meaning of the 'Owner' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Owner' attribute. + * @see #setOwner(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopic_Owner() + * @model unique="false" + * @generated + */ + String getOwner(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getOwner Owner}' attribute. + * + * + * @param value the new value of the 'Owner' attribute. + * @see #getOwner() + * @generated + */ + void setOwner(String value); + + /** + * Returns the value of the 'Txenabled' attribute. + * + *

+ * If the meaning of the 'Txenabled' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Txenabled' attribute. + * @see #setTxenabled(boolean) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopic_Txenabled() + * @model unique="false" + * @generated + */ + boolean isTxenabled(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#isTxenabled Txenabled}' attribute. + * + * + * @param value the new value of the 'Txenabled' attribute. + * @see #isTxenabled() + * @generated + */ + void setTxenabled(boolean value); + + /** + * Returns the value of the 'Fqtn' attribute. + * + *

+ * If the meaning of the 'Fqtn' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Fqtn' attribute. + * @see #setFqtn(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopic_Fqtn() + * @model unique="false" + * @generated + */ + String getFqtn(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getFqtn Fqtn}' attribute. + * + * + * @param value the new value of the 'Fqtn' attribute. + * @see #getFqtn() + * @generated + */ + void setFqtn(String value); + + /** + * Returns the value of the 'Last Mod' attribute. + * + *

+ * If the meaning of the 'Last Mod' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Last Mod' attribute. + * @see #setLastMod(Date) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopic_LastMod() + * @model unique="false" + * @generated + */ + Date getLastMod(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getLastMod Last Mod}' attribute. + * + * + * @param value the new value of the 'Last Mod' attribute. + * @see #getLastMod() + * @generated + */ + void setLastMod(Date value); + + /** + * Returns the value of the 'Status' attribute. + * + *

+ * If the meaning of the 'Status' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Status' attribute. + * @see #setStatus(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopic_Status() + * @model unique="false" + * @generated + */ + String getStatus(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getStatus Status}' attribute. + * + * + * @param value the new value of the 'Status' attribute. + * @see #getStatus() + * @generated + */ + void setStatus(String value); + + /** + * Returns the value of the 'Clients' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient}. + * + *

+ * If the meaning of the 'Clients' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Clients' containment reference list. + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopic_Clients() + * @model containment="true" + * @generated + */ + EList getClients(); + + /** + * Returns the value of the 'Publish URL' attribute. + * + *

+ * If the meaning of the 'Publish URL' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Publish URL' attribute. + * @see #setPublishURL(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopic_PublishURL() + * @model unique="false" + * @generated + */ + String getPublishURL(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getPublishURL Publish URL}' attribute. + * + * + * @param value the new value of the 'Publish URL' attribute. + * @see #getPublishURL() + * @generated + */ + void setPublishURL(String value); + + /** + * Returns the value of the 'Subscribe URL' attribute. + * + *

+ * If the meaning of the 'Subscribe URL' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Subscribe URL' attribute. + * @see #setSubscribeURL(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopic_SubscribeURL() + * @model unique="false" + * @generated + */ + String getSubscribeURL(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getSubscribeURL Subscribe URL}' attribute. + * + * + * @param value the new value of the 'Subscribe URL' attribute. + * @see #getSubscribeURL() + * @generated + */ + void setSubscribeURL(String value); + + /** + * Returns the value of the 'Authentication Method' attribute. + * The literals are from the enumeration {@link org.openecomp.dcae.controller.core.stream.StreamAuthentication}. + * + *

+ * If the meaning of the 'Authentication Method' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Authentication Method' attribute. + * @see org.openecomp.dcae.controller.core.stream.StreamAuthentication + * @see #setAuthenticationMethod(StreamAuthentication) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopic_AuthenticationMethod() + * @model unique="false" + * @generated + */ + StreamAuthentication getAuthenticationMethod(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getAuthenticationMethod Authentication Method}' attribute. + * + * + * @param value the new value of the 'Authentication Method' attribute. + * @see org.openecomp.dcae.controller.core.stream.StreamAuthentication + * @see #getAuthenticationMethod() + * @generated + */ + void setAuthenticationMethod(StreamAuthentication value); +} // DatabusStreamTopic diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamTopicAction.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamTopicAction.java new file mode 100644 index 0000000..313e19e --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamTopicAction.java @@ -0,0 +1,254 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Databus Stream Topic Action', + * and utility methods for working with them. + * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopicAction() + * @model + * @generated + */ +public enum DatabusStreamTopicAction implements Enumerator { + /** + * The 'PUB' literal object. + * + * + * @see #PUB_VALUE + * @generated + * @ordered + */ + PUB(0, "PUB", "pub"), + + /** + * The 'SUB' literal object. + * + * + * @see #SUB_VALUE + * @generated + * @ordered + */ + SUB(0, "SUB", "sub"), + + /** + * The 'VIEW' literal object. + * + * + * @see #VIEW_VALUE + * @generated + * @ordered + */ + VIEW(0, "VIEW", "view"); + + /** + * The 'PUB' literal value. + * + *

+ * If the meaning of 'PUB' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #PUB + * @model literal="pub" + * @generated + * @ordered + */ + public static final int PUB_VALUE = 0; + + /** + * The 'SUB' literal value. + * + *

+ * If the meaning of 'SUB' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #SUB + * @model literal="sub" + * @generated + * @ordered + */ + public static final int SUB_VALUE = 0; + + /** + * The 'VIEW' literal value. + * + *

+ * If the meaning of 'VIEW' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #VIEW + * @model literal="view" + * @generated + * @ordered + */ + public static final int VIEW_VALUE = 0; + + /** + * An array of all the 'Databus Stream Topic Action' enumerators. + * + * + * @generated + */ + private static final DatabusStreamTopicAction[] VALUES_ARRAY = + new DatabusStreamTopicAction[] { + PUB, + SUB, + VIEW, + }; + + /** + * A public read-only list of all the 'Databus Stream Topic Action' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Databus Stream Topic Action' literal with the specified literal value. + * + * + * @generated + */ + public static DatabusStreamTopicAction get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + DatabusStreamTopicAction result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Databus Stream Topic Action' literal with the specified name. + * + * + * @generated + */ + public static DatabusStreamTopicAction getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + DatabusStreamTopicAction result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Databus Stream Topic Action' literal with the specified integer value. + * + * + * @generated + */ + public static DatabusStreamTopicAction get(int value) { + switch (value) { + case PUB_VALUE: return PUB; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private DatabusStreamTopicAction(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //DatabusStreamTopicAction diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamTopicClient.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamTopicClient.java new file mode 100644 index 0000000..21b7e59 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DatabusStreamTopicClient.java @@ -0,0 +1,279 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Databus Stream Topic Client'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getLocalStreamId Local Stream Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getDcaeLocationName Dcae Location Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getClientRole Client Role}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getAction Action}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getUsername Username}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getUserpwd Userpwd}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getFqtn Fqtn}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getMrClientId Mr Client Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getTopicURL Topic URL}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopicClient() + * @model + * @generated + */ +public interface DatabusStreamTopicClient extends DatabusStream { + /** + * Returns the value of the 'Local Stream Id' attribute. + * + *

+ * If the meaning of the 'Local Stream Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Local Stream Id' attribute. + * @see #setLocalStreamId(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopicClient_LocalStreamId() + * @model unique="false" + * @generated + */ + String getLocalStreamId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getLocalStreamId Local Stream Id}' attribute. + * + * + * @param value the new value of the 'Local Stream Id' attribute. + * @see #getLocalStreamId() + * @generated + */ + void setLocalStreamId(String value); + + /** + * Returns the value of the 'Dcae Location Name' attribute. + * + *

+ * If the meaning of the 'Dcae Location Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dcae Location Name' attribute. + * @see #setDcaeLocationName(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopicClient_DcaeLocationName() + * @model unique="false" + * @generated + */ + String getDcaeLocationName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getDcaeLocationName Dcae Location Name}' attribute. + * + * + * @param value the new value of the 'Dcae Location Name' attribute. + * @see #getDcaeLocationName() + * @generated + */ + void setDcaeLocationName(String value); + + /** + * Returns the value of the 'Client Role' attribute. + * + *

+ * If the meaning of the 'Client Role' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Client Role' attribute. + * @see #setClientRole(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopicClient_ClientRole() + * @model unique="false" + * @generated + */ + String getClientRole(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getClientRole Client Role}' attribute. + * + * + * @param value the new value of the 'Client Role' attribute. + * @see #getClientRole() + * @generated + */ + void setClientRole(String value); + + /** + * Returns the value of the 'Action' attribute list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicAction}. + * The literals are from the enumeration {@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicAction}. + * + *

+ * If the meaning of the 'Action' attribute list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Action' attribute list. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopicAction + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopicClient_Action() + * @model unique="false" + * @generated + */ + EList getAction(); + + /** + * Returns the value of the 'Username' attribute. + * + *

+ * If the meaning of the 'Username' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Username' attribute. + * @see #setUsername(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopicClient_Username() + * @model unique="false" + * @generated + */ + String getUsername(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getUsername Username}' attribute. + * + * + * @param value the new value of the 'Username' attribute. + * @see #getUsername() + * @generated + */ + void setUsername(String value); + + /** + * Returns the value of the 'Userpwd' attribute. + * + *

+ * If the meaning of the 'Userpwd' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Userpwd' attribute. + * @see #setUserpwd(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopicClient_Userpwd() + * @model unique="false" + * @generated + */ + String getUserpwd(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getUserpwd Userpwd}' attribute. + * + * + * @param value the new value of the 'Userpwd' attribute. + * @see #getUserpwd() + * @generated + */ + void setUserpwd(String value); + + /** + * Returns the value of the 'Fqtn' attribute. + * + *

+ * If the meaning of the 'Fqtn' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Fqtn' attribute. + * @see #setFqtn(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopicClient_Fqtn() + * @model unique="false" + * @generated + */ + String getFqtn(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getFqtn Fqtn}' attribute. + * + * + * @param value the new value of the 'Fqtn' attribute. + * @see #getFqtn() + * @generated + */ + void setFqtn(String value); + + /** + * Returns the value of the 'Mr Client Id' attribute. + * + *

+ * If the meaning of the 'Mr Client Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Mr Client Id' attribute. + * @see #setMrClientId(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopicClient_MrClientId() + * @model unique="false" + * @generated + */ + String getMrClientId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getMrClientId Mr Client Id}' attribute. + * + * + * @param value the new value of the 'Mr Client Id' attribute. + * @see #getMrClientId() + * @generated + */ + void setMrClientId(String value); + + /** + * Returns the value of the 'Topic URL' attribute. + * + *

+ * If the meaning of the 'Topic URL' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Topic URL' attribute. + * @see #setTopicURL(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDatabusStreamTopicClient_TopicURL() + * @model unique="false" + * @generated + */ + String getTopicURL(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getTopicURL Topic URL}' attribute. + * + * + * @param value the new value of the 'Topic URL' attribute. + * @see #getTopicURL() + * @generated + */ + void setTopicURL(String value); + +} // DatabusStreamTopicClient diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStream.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStream.java new file mode 100644 index 0000000..dadb69b --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStream.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Dcae Stream'. + * + * + * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStream() + * @model + * @generated + */ +public interface DcaeStream extends NamedEntity { +} // DcaeStream diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamDefinition.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamDefinition.java new file mode 100644 index 0000000..24e4702 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamDefinition.java @@ -0,0 +1,133 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import org.openecomp.ncomp.core.NamedEntity; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Dcae Stream Definition'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition#getStreamType Stream Type}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition#getDatabusType Databus Type}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition#getPublishers Publishers}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition#getSubscribers Subscribers}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamDefinition() + * @model + * @generated + */ +public interface DcaeStreamDefinition extends NamedEntity { + /** + * Returns the value of the 'Stream Type' attribute. + * + *

+ * If the meaning of the 'Stream Type' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Stream Type' attribute. + * @see #setStreamType(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamDefinition_StreamType() + * @model unique="false" + * @generated + */ + String getStreamType(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition#getStreamType Stream Type}' attribute. + * + * + * @param value the new value of the 'Stream Type' attribute. + * @see #getStreamType() + * @generated + */ + void setStreamType(String value); + + /** + * Returns the value of the 'Databus Type' attribute. + * + *

+ * If the meaning of the 'Databus Type' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Databus Type' attribute. + * @see #setDatabusType(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamDefinition_DatabusType() + * @model unique="false" + * @generated + */ + String getDatabusType(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition#getDatabusType Databus Type}' attribute. + * + * + * @param value the new value of the 'Databus Type' attribute. + * @see #getDatabusType() + * @generated + */ + void setDatabusType(String value); + + /** + * Returns the value of the 'Publishers' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.stream.DcaeStreamPublisher}. + * + *

+ * If the meaning of the 'Publishers' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Publishers' containment reference list. + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamDefinition_Publishers() + * @model containment="true" + * @generated + */ + EList getPublishers(); + + /** + * Returns the value of the 'Subscribers' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriber}. + * + *

+ * If the meaning of the 'Subscribers' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Subscribers' containment reference list. + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamDefinition_Subscribers() + * @model containment="true" + * @generated + */ + EList getSubscribers(); + +} // DcaeStreamDefinition diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamExternalEndPoint.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamExternalEndPoint.java new file mode 100644 index 0000000..b8e9ab3 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamExternalEndPoint.java @@ -0,0 +1,125 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Dcae Stream External End Point'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint#getUser User}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint#getPassword Password}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint#getUrl Url}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamExternalEndPoint() + * @model + * @generated + */ +public interface DcaeStreamExternalEndPoint extends EObject { + /** + * Returns the value of the 'User' attribute. + * + *

+ * If the meaning of the 'User' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'User' attribute. + * @see #setUser(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamExternalEndPoint_User() + * @model unique="false" + * @generated + */ + String getUser(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint#getUser User}' attribute. + * + * + * @param value the new value of the 'User' attribute. + * @see #getUser() + * @generated + */ + void setUser(String value); + + /** + * Returns the value of the 'Password' attribute. + * + *

+ * If the meaning of the 'Password' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Password' attribute. + * @see #setPassword(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamExternalEndPoint_Password() + * @model unique="false" + * @generated + */ + String getPassword(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint#getPassword Password}' attribute. + * + * + * @param value the new value of the 'Password' attribute. + * @see #getPassword() + * @generated + */ + void setPassword(String value); + + /** + * Returns the value of the 'Url' attribute. + * + *

+ * If the meaning of the 'Url' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Url' attribute. + * @see #setUrl(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamExternalEndPoint_Url() + * @model unique="false" + * @generated + */ + String getUrl(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint#getUrl Url}' attribute. + * + * + * @param value the new value of the 'Url' attribute. + * @see #getUrl() + * @generated + */ + void setUrl(String value); + +} // DcaeStreamExternalEndPoint diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamInternalEndPoint.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamInternalEndPoint.java new file mode 100644 index 0000000..0fc65fe --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamInternalEndPoint.java @@ -0,0 +1,98 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Dcae Stream Internal End Point'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.DcaeStreamInternalEndPoint#getLocalName Local Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DcaeStreamInternalEndPoint#getServiceName Service Name}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamInternalEndPoint() + * @model + * @generated + */ +public interface DcaeStreamInternalEndPoint extends EObject { + /** + * Returns the value of the 'Local Name' attribute. + * + *

+ * If the meaning of the 'Local Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Local Name' attribute. + * @see #setLocalName(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamInternalEndPoint_LocalName() + * @model unique="false" + * @generated + */ + String getLocalName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamInternalEndPoint#getLocalName Local Name}' attribute. + * + * + * @param value the new value of the 'Local Name' attribute. + * @see #getLocalName() + * @generated + */ + void setLocalName(String value); + + /** + * Returns the value of the 'Service Name' attribute. + * + *

+ * If the meaning of the 'Service Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Service Name' attribute. + * @see #setServiceName(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamInternalEndPoint_ServiceName() + * @model unique="false" + * @generated + */ + String getServiceName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamInternalEndPoint#getServiceName Service Name}' attribute. + * + * + * @param value the new value of the 'Service Name' attribute. + * @see #getServiceName() + * @generated + */ + void setServiceName(String value); + +} // DcaeStreamInternalEndPoint diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamPublisher.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamPublisher.java new file mode 100644 index 0000000..10e70d7 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamPublisher.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Dcae Stream Publisher'. + * + * + * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamPublisher() + * @model abstract="true" + * @generated + */ +public interface DcaeStreamPublisher extends NamedEntity { +} // DcaeStreamPublisher diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamPublisherExternal.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamPublisherExternal.java new file mode 100644 index 0000000..b4a71a6 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamPublisherExternal.java @@ -0,0 +1,38 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + + +/** + * + * A representation of the model object 'Dcae Stream Publisher External'. + * + * + * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamPublisherExternal() + * @model + * @generated + */ +public interface DcaeStreamPublisherExternal extends DcaeStreamPublisher, DcaeStreamExternalEndPoint { +} // DcaeStreamPublisherExternal diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamPublisherInternal.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamPublisherInternal.java new file mode 100644 index 0000000..6821ded --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamPublisherInternal.java @@ -0,0 +1,38 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + + +/** + * + * A representation of the model object 'Dcae Stream Publisher Internal'. + * + * + * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamPublisherInternal() + * @model + * @generated + */ +public interface DcaeStreamPublisherInternal extends DcaeStreamPublisher, DcaeStreamInternalEndPoint { +} // DcaeStreamPublisherInternal diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamSubscriber.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamSubscriber.java new file mode 100644 index 0000000..2df16b0 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamSubscriber.java @@ -0,0 +1,40 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Dcae Stream Subscriber'. + * + * + * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamSubscriber() + * @model abstract="true" + * @generated + */ +public interface DcaeStreamSubscriber extends NamedEntity { + +} // DcaeStreamSubscriber diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamSubscriberExternal.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamSubscriberExternal.java new file mode 100644 index 0000000..1a2f6f4 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamSubscriberExternal.java @@ -0,0 +1,38 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + + +/** + * + * A representation of the model object 'Dcae Stream Subscriber External'. + * + * + * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamSubscriberExternal() + * @model + * @generated + */ +public interface DcaeStreamSubscriberExternal extends DcaeStreamSubscriber, DcaeStreamExternalEndPoint { +} // DcaeStreamSubscriberExternal diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamSubscriberInternal.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamSubscriberInternal.java new file mode 100644 index 0000000..16bc53f --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DcaeStreamSubscriberInternal.java @@ -0,0 +1,38 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + + +/** + * + * A representation of the model object 'Dcae Stream Subscriber Internal'. + * + * + * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDcaeStreamSubscriberInternal() + * @model + * @generated + */ +public interface DcaeStreamSubscriberInternal extends DcaeStreamSubscriber, DcaeStreamInternalEndPoint { +} // DcaeStreamSubscriberInternal diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DmaapStream.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DmaapStream.java new file mode 100644 index 0000000..b0e9b89 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/DmaapStream.java @@ -0,0 +1,205 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + + +/** + * + * A representation of the model object 'Dmaap Stream'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapDataType Dmaap Data Type}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapAction Dmaap Action}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapUrl Dmaap Url}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapUserName Dmaap User Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapPassword Dmaap Password}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapAuthMethod Dmaap Auth Method}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDmaapStream() + * @model + * @generated + */ +public interface DmaapStream extends DcaeStream { + /** + * Returns the value of the 'Dmaap Data Type' attribute. + * + *

+ * If the meaning of the 'Dmaap Data Type' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dmaap Data Type' attribute. + * @see #setDmaapDataType(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDmaapStream_DmaapDataType() + * @model unique="false" + * @generated + */ + String getDmaapDataType(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapDataType Dmaap Data Type}' attribute. + * + * + * @param value the new value of the 'Dmaap Data Type' attribute. + * @see #getDmaapDataType() + * @generated + */ + void setDmaapDataType(String value); + + /** + * Returns the value of the 'Dmaap Action' attribute. + * + *

+ * If the meaning of the 'Dmaap Action' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dmaap Action' attribute. + * @see #setDmaapAction(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDmaapStream_DmaapAction() + * @model unique="false" + * @generated + */ + String getDmaapAction(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapAction Dmaap Action}' attribute. + * + * + * @param value the new value of the 'Dmaap Action' attribute. + * @see #getDmaapAction() + * @generated + */ + void setDmaapAction(String value); + + /** + * Returns the value of the 'Dmaap Url' attribute. + * + *

+ * If the meaning of the 'Dmaap Url' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dmaap Url' attribute. + * @see #setDmaapUrl(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDmaapStream_DmaapUrl() + * @model unique="false" + * @generated + */ + String getDmaapUrl(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapUrl Dmaap Url}' attribute. + * + * + * @param value the new value of the 'Dmaap Url' attribute. + * @see #getDmaapUrl() + * @generated + */ + void setDmaapUrl(String value); + + /** + * Returns the value of the 'Dmaap User Name' attribute. + * + *

+ * If the meaning of the 'Dmaap User Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dmaap User Name' attribute. + * @see #setDmaapUserName(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDmaapStream_DmaapUserName() + * @model unique="false" + * @generated + */ + String getDmaapUserName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapUserName Dmaap User Name}' attribute. + * + * + * @param value the new value of the 'Dmaap User Name' attribute. + * @see #getDmaapUserName() + * @generated + */ + void setDmaapUserName(String value); + + /** + * Returns the value of the 'Dmaap Password' attribute. + * + *

+ * If the meaning of the 'Dmaap Password' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dmaap Password' attribute. + * @see #setDmaapPassword(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDmaapStream_DmaapPassword() + * @model unique="false" + * @generated + */ + String getDmaapPassword(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapPassword Dmaap Password}' attribute. + * + * + * @param value the new value of the 'Dmaap Password' attribute. + * @see #getDmaapPassword() + * @generated + */ + void setDmaapPassword(String value); + + /** + * Returns the value of the 'Dmaap Auth Method' attribute. + * + *

+ * If the meaning of the 'Dmaap Auth Method' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dmaap Auth Method' attribute. + * @see #setDmaapAuthMethod(String) + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getDmaapStream_DmaapAuthMethod() + * @model unique="false" + * @generated + */ + String getDmaapAuthMethod(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapAuthMethod Dmaap Auth Method}' attribute. + * + * + * @param value the new value of the 'Dmaap Auth Method' attribute. + * @see #getDmaapAuthMethod() + * @generated + */ + void setDmaapAuthMethod(String value); + +} // DmaapStream diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamAuthentication.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamAuthentication.java new file mode 100644 index 0000000..f798a33 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamAuthentication.java @@ -0,0 +1,250 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Topic Authentication', + * and utility methods for working with them. + * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#getStreamAuthentication() + * @model + * @generated + */ +public enum StreamAuthentication implements Enumerator { + /** + * The 'AAF' literal object. + * + * + * @see #AAF_VALUE + * @generated + * @ordered + */ + AAF(0, "AAF", "aaf"), /** + * The 'NONE' literal object. + * + * + * @see #NONE_VALUE + * @generated + * @ordered + */ + NONE(0, "NONE", "none"), /** + * The 'PASSWORD' literal object. + * + * + * @see #PASSWORD_VALUE + * @generated + * @ordered + */ + PASSWORD(0, "PASSWORD", "password"); + + /** + * The 'AAF' literal value. + * + *

+ * If the meaning of 'AAF' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #AAF + * @model literal="aaf" + * @generated + * @ordered + */ + public static final int AAF_VALUE = 0; + + /** + * The 'NONE' literal value. + * + *

+ * If the meaning of 'NONE' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #NONE + * @model literal="none" + * @generated + * @ordered + */ + public static final int NONE_VALUE = 0; + + /** + * The 'PASSWORD' literal value. + * + *

+ * If the meaning of 'PASSWORD' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #PASSWORD + * @model literal="password" + * @generated + * @ordered + */ + public static final int PASSWORD_VALUE = 0; + + /** + * An array of all the 'Authentication' enumerators. + * + * + * @generated + */ + private static final StreamAuthentication[] VALUES_ARRAY = + new StreamAuthentication[] { + AAF, + NONE, + PASSWORD, + }; + + /** + * A public read-only list of all the 'Authentication' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Authentication' literal with the specified literal value. + * + * + * @generated + */ + public static StreamAuthentication get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + StreamAuthentication result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Authentication' literal with the specified name. + * + * + * @generated + */ + public static StreamAuthentication getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + StreamAuthentication result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Authentication' literal with the specified integer value. + * + * + * @generated + */ + public static StreamAuthentication get(int value) { + switch (value) { + case AAF_VALUE: return AAF; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private StreamAuthentication(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //TopicAuthentication diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamFactory.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamFactory.java new file mode 100644 index 0000000..7c62a38 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamFactory.java @@ -0,0 +1,216 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage + * @generated + */ +public interface StreamFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + StreamFactory eINSTANCE = org.openecomp.dcae.controller.core.stream.impl.StreamFactoryImpl.init(); + + /** + * Returns a new object of class 'Dcae Stream'. + * + * + * @return a new object of class 'Dcae Stream'. + * @generated + */ + DcaeStream createDcaeStream(); + + /** + * Returns a new object of class 'Dmaap Stream'. + * + * + * @return a new object of class 'Dmaap Stream'. + * @generated + */ + DmaapStream createDmaapStream(); + + /** + * Returns a new object of class 'Dcae Stream Definition'. + * + * + * @return a new object of class 'Dcae Stream Definition'. + * @generated + */ + DcaeStreamDefinition createDcaeStreamDefinition(); + + /** + * Returns a new object of class 'Dcae Stream Publisher External'. + * + * + * @return a new object of class 'Dcae Stream Publisher External'. + * @generated + */ + DcaeStreamPublisherExternal createDcaeStreamPublisherExternal(); + + /** + * Returns a new object of class 'Dcae Stream Publisher Internal'. + * + * + * @return a new object of class 'Dcae Stream Publisher Internal'. + * @generated + */ + DcaeStreamPublisherInternal createDcaeStreamPublisherInternal(); + + /** + * Returns a new object of class 'Dcae Stream Subscriber External'. + * + * + * @return a new object of class 'Dcae Stream Subscriber External'. + * @generated + */ + DcaeStreamSubscriberExternal createDcaeStreamSubscriberExternal(); + + /** + * Returns a new object of class 'Dcae Stream Subscriber Internal'. + * + * + * @return a new object of class 'Dcae Stream Subscriber Internal'. + * @generated + */ + DcaeStreamSubscriberInternal createDcaeStreamSubscriberInternal(); + + /** + * Returns a new object of class 'Dcae Stream Internal End Point'. + * + * + * @return a new object of class 'Dcae Stream Internal End Point'. + * @generated + */ + DcaeStreamInternalEndPoint createDcaeStreamInternalEndPoint(); + + /** + * Returns a new object of class 'Dcae Stream External End Point'. + * + * + * @return a new object of class 'Dcae Stream External End Point'. + * @generated + */ + DcaeStreamExternalEndPoint createDcaeStreamExternalEndPoint(); + + /** + * Returns a new object of class 'Databus Stream Topic'. + * + * + * @return a new object of class 'Databus Stream Topic'. + * @generated + */ + DatabusStreamTopic createDatabusStreamTopic(); + + /** + * Returns a new object of class 'Databus Stream Topic Client'. + * + * + * @return a new object of class 'Databus Stream Topic Client'. + * @generated + */ + DatabusStreamTopicClient createDatabusStreamTopicClient(); + + /** + * Returns a new object of class 'Databus Stream Feed'. + * + * + * @return a new object of class 'Databus Stream Feed'. + * @generated + */ + DatabusStreamFeed createDatabusStreamFeed(); + + /** + * Returns a new object of class 'Databus Stream Feed Publisher'. + * + * + * @return a new object of class 'Databus Stream Feed Publisher'. + * @generated + */ + DatabusStreamFeedPublisher createDatabusStreamFeedPublisher(); + + /** + * Returns a new object of class 'Databus Stream Feed Subscriber'. + * + * + * @return a new object of class 'Databus Stream Feed Subscriber'. + * @generated + */ + DatabusStreamFeedSubscriber createDatabusStreamFeedSubscriber(); + + /** + * Returns a new object of class 'Databus Entity'. + * + * + * @return a new object of class 'Databus Entity'. + * @generated + */ + DatabusEntity createDatabusEntity(); + + /** + * Returns a new object of class 'Databus Location'. + * + * + * @return a new object of class 'Databus Location'. + * @generated + */ + DatabusLocation createDatabusLocation(); + + /** + * Returns a new object of class 'Databus Message Router Cluster'. + * + * + * @return a new object of class 'Databus Message Router Cluster'. + * @generated + */ + DatabusMessageRouterCluster createDatabusMessageRouterCluster(); + + /** + * Returns a new object of class 'Databus Data Router Node'. + * + * + * @return a new object of class 'Databus Data Router Node'. + * @generated + */ + DatabusDataRouterNode createDatabusDataRouterNode(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + StreamPackage getStreamPackage(); + +} //StreamFactory diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamPackage.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamPackage.java new file mode 100644 index 0000000..efeb246 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamPackage.java @@ -0,0 +1,4179 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream; + +import org.openecomp.ncomp.core.CorePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.core.stream.StreamFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-core-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.core'" + * @generated + */ +public interface StreamPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "stream"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.core.stream"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "stream"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + StreamPackage eINSTANCE = org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamImpl Dcae Stream}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStream() + * @generated + */ + int DCAE_STREAM = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The number of structural features of the 'Dcae Stream' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Dcae Stream' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DmaapStreamImpl Dmaap Stream}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DmaapStreamImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDmaapStream() + * @generated + */ + int DMAAP_STREAM = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DMAAP_STREAM__NAME = DCAE_STREAM__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DMAAP_STREAM__LAST_POLLED = DCAE_STREAM__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DMAAP_STREAM__LAST_CHANGED = DCAE_STREAM__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DMAAP_STREAM__CREATED = DCAE_STREAM__CREATED; + + /** + * The feature id for the 'Dmaap Data Type' attribute. + * + * + * @generated + * @ordered + */ + int DMAAP_STREAM__DMAAP_DATA_TYPE = DCAE_STREAM_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Dmaap Action' attribute. + * + * + * @generated + * @ordered + */ + int DMAAP_STREAM__DMAAP_ACTION = DCAE_STREAM_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Dmaap Url' attribute. + * + * + * @generated + * @ordered + */ + int DMAAP_STREAM__DMAAP_URL = DCAE_STREAM_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Dmaap User Name' attribute. + * + * + * @generated + * @ordered + */ + int DMAAP_STREAM__DMAAP_USER_NAME = DCAE_STREAM_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Dmaap Password' attribute. + * + * + * @generated + * @ordered + */ + int DMAAP_STREAM__DMAAP_PASSWORD = DCAE_STREAM_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Dmaap Auth Method' attribute. + * + * + * @generated + * @ordered + */ + int DMAAP_STREAM__DMAAP_AUTH_METHOD = DCAE_STREAM_FEATURE_COUNT + 5; + + /** + * The number of structural features of the 'Dmaap Stream' class. + * + * + * @generated + * @ordered + */ + int DMAAP_STREAM_FEATURE_COUNT = DCAE_STREAM_FEATURE_COUNT + 6; + + /** + * The number of operations of the 'Dmaap Stream' class. + * + * + * @generated + * @ordered + */ + int DMAAP_STREAM_OPERATION_COUNT = DCAE_STREAM_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamDefinitionImpl Dcae Stream Definition}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamDefinitionImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamDefinition() + * @generated + */ + int DCAE_STREAM_DEFINITION = 2; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_DEFINITION__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_DEFINITION__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_DEFINITION__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_DEFINITION__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Stream Type' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_DEFINITION__STREAM_TYPE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Databus Type' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_DEFINITION__DATABUS_TYPE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Publishers' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_DEFINITION__PUBLISHERS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Subscribers' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_DEFINITION__SUBSCRIBERS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The number of structural features of the 'Dcae Stream Definition' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_DEFINITION_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of operations of the 'Dcae Stream Definition' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_DEFINITION_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherImpl Dcae Stream Publisher}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamPublisher() + * @generated + */ + int DCAE_STREAM_PUBLISHER = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The number of structural features of the 'Dcae Stream Publisher' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Dcae Stream Publisher' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberImpl Dcae Stream Subscriber}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamSubscriber() + * @generated + */ + int DCAE_STREAM_SUBSCRIBER = 4; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The number of structural features of the 'Dcae Stream Subscriber' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Dcae Stream Subscriber' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherExternalImpl Dcae Stream Publisher External}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherExternalImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamPublisherExternal() + * @generated + */ + int DCAE_STREAM_PUBLISHER_EXTERNAL = 5; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_EXTERNAL__NAME = DCAE_STREAM_PUBLISHER__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_EXTERNAL__LAST_POLLED = DCAE_STREAM_PUBLISHER__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_EXTERNAL__LAST_CHANGED = DCAE_STREAM_PUBLISHER__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_EXTERNAL__CREATED = DCAE_STREAM_PUBLISHER__CREATED; + + /** + * The feature id for the 'User' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_EXTERNAL__USER = DCAE_STREAM_PUBLISHER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Password' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_EXTERNAL__PASSWORD = DCAE_STREAM_PUBLISHER_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Url' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_EXTERNAL__URL = DCAE_STREAM_PUBLISHER_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Dcae Stream Publisher External' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_EXTERNAL_FEATURE_COUNT = DCAE_STREAM_PUBLISHER_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Dcae Stream Publisher External' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_EXTERNAL_OPERATION_COUNT = DCAE_STREAM_PUBLISHER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherInternalImpl Dcae Stream Publisher Internal}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherInternalImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamPublisherInternal() + * @generated + */ + int DCAE_STREAM_PUBLISHER_INTERNAL = 6; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_INTERNAL__NAME = DCAE_STREAM_PUBLISHER__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_INTERNAL__LAST_POLLED = DCAE_STREAM_PUBLISHER__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_INTERNAL__LAST_CHANGED = DCAE_STREAM_PUBLISHER__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_INTERNAL__CREATED = DCAE_STREAM_PUBLISHER__CREATED; + + /** + * The feature id for the 'Local Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_INTERNAL__LOCAL_NAME = DCAE_STREAM_PUBLISHER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Service Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_INTERNAL__SERVICE_NAME = DCAE_STREAM_PUBLISHER_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Dcae Stream Publisher Internal' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_INTERNAL_FEATURE_COUNT = DCAE_STREAM_PUBLISHER_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Dcae Stream Publisher Internal' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_PUBLISHER_INTERNAL_OPERATION_COUNT = DCAE_STREAM_PUBLISHER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberExternalImpl Dcae Stream Subscriber External}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberExternalImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamSubscriberExternal() + * @generated + */ + int DCAE_STREAM_SUBSCRIBER_EXTERNAL = 7; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_EXTERNAL__NAME = DCAE_STREAM_SUBSCRIBER__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_EXTERNAL__LAST_POLLED = DCAE_STREAM_SUBSCRIBER__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_EXTERNAL__LAST_CHANGED = DCAE_STREAM_SUBSCRIBER__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_EXTERNAL__CREATED = DCAE_STREAM_SUBSCRIBER__CREATED; + + /** + * The feature id for the 'User' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_EXTERNAL__USER = DCAE_STREAM_SUBSCRIBER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Password' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_EXTERNAL__PASSWORD = DCAE_STREAM_SUBSCRIBER_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Url' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_EXTERNAL__URL = DCAE_STREAM_SUBSCRIBER_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Dcae Stream Subscriber External' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_EXTERNAL_FEATURE_COUNT = DCAE_STREAM_SUBSCRIBER_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Dcae Stream Subscriber External' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_EXTERNAL_OPERATION_COUNT = DCAE_STREAM_SUBSCRIBER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberInternalImpl Dcae Stream Subscriber Internal}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberInternalImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamSubscriberInternal() + * @generated + */ + int DCAE_STREAM_SUBSCRIBER_INTERNAL = 8; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_INTERNAL__NAME = DCAE_STREAM_SUBSCRIBER__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_INTERNAL__LAST_POLLED = DCAE_STREAM_SUBSCRIBER__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_INTERNAL__LAST_CHANGED = DCAE_STREAM_SUBSCRIBER__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_INTERNAL__CREATED = DCAE_STREAM_SUBSCRIBER__CREATED; + + /** + * The feature id for the 'Local Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_INTERNAL__LOCAL_NAME = DCAE_STREAM_SUBSCRIBER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Service Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_INTERNAL__SERVICE_NAME = DCAE_STREAM_SUBSCRIBER_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Dcae Stream Subscriber Internal' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_INTERNAL_FEATURE_COUNT = DCAE_STREAM_SUBSCRIBER_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Dcae Stream Subscriber Internal' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_SUBSCRIBER_INTERNAL_OPERATION_COUNT = DCAE_STREAM_SUBSCRIBER_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamInternalEndPointImpl Dcae Stream Internal End Point}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamInternalEndPointImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamInternalEndPoint() + * @generated + */ + int DCAE_STREAM_INTERNAL_END_POINT = 9; + + /** + * The feature id for the 'Local Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_INTERNAL_END_POINT__LOCAL_NAME = 0; + + /** + * The feature id for the 'Service Name' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_INTERNAL_END_POINT__SERVICE_NAME = 1; + + /** + * The number of structural features of the 'Dcae Stream Internal End Point' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_INTERNAL_END_POINT_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Dcae Stream Internal End Point' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_INTERNAL_END_POINT_OPERATION_COUNT = 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamExternalEndPointImpl Dcae Stream External End Point}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamExternalEndPointImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamExternalEndPoint() + * @generated + */ + int DCAE_STREAM_EXTERNAL_END_POINT = 10; + + /** + * The feature id for the 'User' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_EXTERNAL_END_POINT__USER = 0; + + /** + * The feature id for the 'Password' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_EXTERNAL_END_POINT__PASSWORD = 1; + + /** + * The feature id for the 'Url' attribute. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_EXTERNAL_END_POINT__URL = 2; + + /** + * The number of structural features of the 'Dcae Stream External End Point' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_EXTERNAL_END_POINT_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Dcae Stream External End Point' class. + * + * + * @generated + * @ordered + */ + int DCAE_STREAM_EXTERNAL_END_POINT_OPERATION_COUNT = 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamImpl Databus Stream}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusStreamImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusStream() + * @generated + */ + int DATABUS_STREAM = 11; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The number of structural features of the 'Databus Stream' class. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Databus Stream' class. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicImpl Databus Stream Topic}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusStreamTopic() + * @generated + */ + int DATABUS_STREAM_TOPIC = 12; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC__NAME = DATABUS_STREAM__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC__LAST_POLLED = DATABUS_STREAM__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC__LAST_CHANGED = DATABUS_STREAM__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC__CREATED = DATABUS_STREAM__CREATED; + + /** + * The feature id for the 'Topic Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC__TOPIC_NAME = DATABUS_STREAM_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Topic Description' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC__TOPIC_DESCRIPTION = DATABUS_STREAM_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Dcae Location Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC__DCAE_LOCATION_NAME = DATABUS_STREAM_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Owner' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC__OWNER = DATABUS_STREAM_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Txenabled' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC__TXENABLED = DATABUS_STREAM_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Fqtn' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC__FQTN = DATABUS_STREAM_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Last Mod' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC__LAST_MOD = DATABUS_STREAM_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC__STATUS = DATABUS_STREAM_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Clients' containment reference list. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC__CLIENTS = DATABUS_STREAM_FEATURE_COUNT + 8; + + /** + * The feature id for the 'Publish URL' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC__PUBLISH_URL = DATABUS_STREAM_FEATURE_COUNT + 9; + + /** + * The feature id for the 'Subscribe URL' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC__SUBSCRIBE_URL = DATABUS_STREAM_FEATURE_COUNT + 10; + + /** + * The feature id for the 'Authentication Method' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC__AUTHENTICATION_METHOD = DATABUS_STREAM_FEATURE_COUNT + 11; + + /** + * The number of structural features of the 'Databus Stream Topic' class. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_FEATURE_COUNT = DATABUS_STREAM_FEATURE_COUNT + 12; + + /** + * The number of operations of the 'Databus Stream Topic' class. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_OPERATION_COUNT = DATABUS_STREAM_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicClientImpl Databus Stream Topic Client}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicClientImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusStreamTopicClient() + * @generated + */ + int DATABUS_STREAM_TOPIC_CLIENT = 13; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_CLIENT__NAME = DATABUS_STREAM__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_CLIENT__LAST_POLLED = DATABUS_STREAM__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_CLIENT__LAST_CHANGED = DATABUS_STREAM__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_CLIENT__CREATED = DATABUS_STREAM__CREATED; + + /** + * The feature id for the 'Local Stream Id' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_CLIENT__LOCAL_STREAM_ID = DATABUS_STREAM_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Dcae Location Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_CLIENT__DCAE_LOCATION_NAME = DATABUS_STREAM_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Client Role' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_CLIENT__CLIENT_ROLE = DATABUS_STREAM_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Action' attribute list. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_CLIENT__ACTION = DATABUS_STREAM_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Username' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_CLIENT__USERNAME = DATABUS_STREAM_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Userpwd' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_CLIENT__USERPWD = DATABUS_STREAM_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Fqtn' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_CLIENT__FQTN = DATABUS_STREAM_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Mr Client Id' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_CLIENT__MR_CLIENT_ID = DATABUS_STREAM_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Topic URL' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_CLIENT__TOPIC_URL = DATABUS_STREAM_FEATURE_COUNT + 8; + + /** + * The number of structural features of the 'Databus Stream Topic Client' class. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_CLIENT_FEATURE_COUNT = DATABUS_STREAM_FEATURE_COUNT + 9; + + /** + * The number of operations of the 'Databus Stream Topic Client' class. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_TOPIC_CLIENT_OPERATION_COUNT = DATABUS_STREAM_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl Databus Stream Feed}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusStreamFeed() + * @generated + */ + int DATABUS_STREAM_FEED = 14; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__NAME = DATABUS_STREAM__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__LAST_POLLED = DATABUS_STREAM__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__LAST_CHANGED = DATABUS_STREAM__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__CREATED = DATABUS_STREAM__CREATED; + + /** + * The feature id for the 'Feed Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__FEED_NAME = DATABUS_STREAM_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Feed Version' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__FEED_VERSION = DATABUS_STREAM_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Feed Description' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__FEED_DESCRIPTION = DATABUS_STREAM_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Aspr Classification' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__ASPR_CLASSIFICATION = DATABUS_STREAM_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Owner' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__OWNER = DATABUS_STREAM_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Feed Id' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__FEED_ID = DATABUS_STREAM_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Log URL' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__LOG_URL = DATABUS_STREAM_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Publish URL' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__PUBLISH_URL = DATABUS_STREAM_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Subscribe URL' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__SUBSCRIBE_URL = DATABUS_STREAM_FEATURE_COUNT + 8; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__STATUS = DATABUS_STREAM_FEATURE_COUNT + 9; + + /** + * The feature id for the 'Suspended' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__SUSPENDED = DATABUS_STREAM_FEATURE_COUNT + 10; + + /** + * The feature id for the 'Publishers' containment reference list. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__PUBLISHERS = DATABUS_STREAM_FEATURE_COUNT + 11; + + /** + * The feature id for the 'Subscribers' containment reference list. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED__SUBSCRIBERS = DATABUS_STREAM_FEATURE_COUNT + 12; + + /** + * The number of structural features of the 'Databus Stream Feed' class. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_FEATURE_COUNT = DATABUS_STREAM_FEATURE_COUNT + 13; + + /** + * The number of operations of the 'Databus Stream Feed' class. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_OPERATION_COUNT = DATABUS_STREAM_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedPublisherImpl Databus Stream Feed Publisher}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedPublisherImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusStreamFeedPublisher() + * @generated + */ + int DATABUS_STREAM_FEED_PUBLISHER = 15; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_PUBLISHER__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_PUBLISHER__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_PUBLISHER__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_PUBLISHER__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Local Stream Id' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_PUBLISHER__LOCAL_STREAM_ID = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Dcae Location Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_PUBLISHER__DCAE_LOCATION_NAME = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Feed Id' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_PUBLISHER__FEED_ID = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Pub Id' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_PUBLISHER__PUB_ID = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_PUBLISHER__STATUS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Username' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_PUBLISHER__USERNAME = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Userpwd' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_PUBLISHER__USERPWD = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 6; + + /** + * The number of structural features of the 'Databus Stream Feed Publisher' class. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_PUBLISHER_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 7; + + /** + * The number of operations of the 'Databus Stream Feed Publisher' class. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_PUBLISHER_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedSubscriberImpl Databus Stream Feed Subscriber}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedSubscriberImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusStreamFeedSubscriber() + * @generated + */ + int DATABUS_STREAM_FEED_SUBSCRIBER = 16; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Local Stream Id' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER__LOCAL_STREAM_ID = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Dcae Location Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER__DCAE_LOCATION_NAME = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Other Feed Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER__OTHER_FEED_NAME = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Feed Id' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER__FEED_ID = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Log URL' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER__LOG_URL = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Owner' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER__OWNER = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Sub Id' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER__SUB_ID = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Suspended' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER__SUSPENDED = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Use100' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER__USE100 = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 8; + + /** + * The feature id for the 'Username' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER__USERNAME = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 9; + + /** + * The feature id for the 'Userpwd' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER__USERPWD = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 10; + + /** + * The feature id for the 'Delivery URL' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER__DELIVERY_URL = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 11; + + /** + * The number of structural features of the 'Databus Stream Feed Subscriber' class. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 12; + + /** + * The number of operations of the 'Databus Stream Feed Subscriber' class. + * + * + * @generated + * @ordered + */ + int DATABUS_STREAM_FEED_SUBSCRIBER_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusEntityImpl Databus Entity}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusEntityImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusEntity() + * @generated + */ + int DATABUS_ENTITY = 17; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_ENTITY__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_ENTITY__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_ENTITY__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_ENTITY__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_ENTITY__STATUS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Last Modified' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_ENTITY__LAST_MODIFIED = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_ENTITY__TYPE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Databus Entity' class. + * + * + * @generated + * @ordered + */ + int DATABUS_ENTITY_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Databus Entity' class. + * + * + * @generated + * @ordered + */ + int DATABUS_ENTITY_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusLocationImpl Databus Location}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusLocationImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusLocation() + * @generated + */ + int DATABUS_LOCATION = 18; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_LOCATION__NAME = DATABUS_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_LOCATION__LAST_POLLED = DATABUS_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_LOCATION__LAST_CHANGED = DATABUS_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_LOCATION__CREATED = DATABUS_ENTITY__CREATED; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_LOCATION__STATUS = DATABUS_ENTITY__STATUS; + + /** + * The feature id for the 'Last Modified' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_LOCATION__LAST_MODIFIED = DATABUS_ENTITY__LAST_MODIFIED; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_LOCATION__TYPE = DATABUS_ENTITY__TYPE; + + /** + * The feature id for the 'Dcae Layer' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_LOCATION__DCAE_LAYER = DATABUS_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Databus Location' class. + * + * + * @generated + * @ordered + */ + int DATABUS_LOCATION_FEATURE_COUNT = DATABUS_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Databus Location' class. + * + * + * @generated + * @ordered + */ + int DATABUS_LOCATION_OPERATION_COUNT = DATABUS_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusMessageRouterClusterImpl Databus Message Router Cluster}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusMessageRouterClusterImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusMessageRouterCluster() + * @generated + */ + int DATABUS_MESSAGE_ROUTER_CLUSTER = 19; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_MESSAGE_ROUTER_CLUSTER__NAME = DATABUS_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_MESSAGE_ROUTER_CLUSTER__LAST_POLLED = DATABUS_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_MESSAGE_ROUTER_CLUSTER__LAST_CHANGED = DATABUS_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_MESSAGE_ROUTER_CLUSTER__CREATED = DATABUS_ENTITY__CREATED; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_MESSAGE_ROUTER_CLUSTER__STATUS = DATABUS_ENTITY__STATUS; + + /** + * The feature id for the 'Last Modified' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_MESSAGE_ROUTER_CLUSTER__LAST_MODIFIED = DATABUS_ENTITY__LAST_MODIFIED; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_MESSAGE_ROUTER_CLUSTER__TYPE = DATABUS_ENTITY__TYPE; + + /** + * The feature id for the 'Dcae Location Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_MESSAGE_ROUTER_CLUSTER__DCAE_LOCATION_NAME = DATABUS_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Service Fqdn' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_MESSAGE_ROUTER_CLUSTER__SERVICE_FQDN = DATABUS_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Host Fqdn' attribute list. + * + * + * @generated + * @ordered + */ + int DATABUS_MESSAGE_ROUTER_CLUSTER__HOST_FQDN = DATABUS_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Topic Port' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_MESSAGE_ROUTER_CLUSTER__TOPIC_PORT = DATABUS_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Topic Protocol' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_MESSAGE_ROUTER_CLUSTER__TOPIC_PROTOCOL = DATABUS_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Databus Message Router Cluster' class. + * + * + * @generated + * @ordered + */ + int DATABUS_MESSAGE_ROUTER_CLUSTER_FEATURE_COUNT = DATABUS_ENTITY_FEATURE_COUNT + 5; + + /** + * The number of operations of the 'Databus Message Router Cluster' class. + * + * + * @generated + * @ordered + */ + int DATABUS_MESSAGE_ROUTER_CLUSTER_OPERATION_COUNT = DATABUS_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusDataRouterNodeImpl Databus Data Router Node}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusDataRouterNodeImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusDataRouterNode() + * @generated + */ + int DATABUS_DATA_ROUTER_NODE = 20; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_DATA_ROUTER_NODE__NAME = DATABUS_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_DATA_ROUTER_NODE__LAST_POLLED = DATABUS_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_DATA_ROUTER_NODE__LAST_CHANGED = DATABUS_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_DATA_ROUTER_NODE__CREATED = DATABUS_ENTITY__CREATED; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_DATA_ROUTER_NODE__STATUS = DATABUS_ENTITY__STATUS; + + /** + * The feature id for the 'Last Modified' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_DATA_ROUTER_NODE__LAST_MODIFIED = DATABUS_ENTITY__LAST_MODIFIED; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_DATA_ROUTER_NODE__TYPE = DATABUS_ENTITY__TYPE; + + /** + * The feature id for the 'Dcae Location Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_DATA_ROUTER_NODE__DCAE_LOCATION_NAME = DATABUS_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Host Fqdn' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_DATA_ROUTER_NODE__HOST_FQDN = DATABUS_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Version' attribute. + * + * + * @generated + * @ordered + */ + int DATABUS_DATA_ROUTER_NODE__VERSION = DATABUS_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Databus Data Router Node' class. + * + * + * @generated + * @ordered + */ + int DATABUS_DATA_ROUTER_NODE_FEATURE_COUNT = DATABUS_ENTITY_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Databus Data Router Node' class. + * + * + * @generated + * @ordered + */ + int DATABUS_DATA_ROUTER_NODE_OPERATION_COUNT = DATABUS_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicAction Databus Stream Topic Action}' enum. + * + * + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopicAction + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusStreamTopicAction() + * @generated + */ + int DATABUS_STREAM_TOPIC_ACTION = 21; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.core.stream.StreamAuthentication Authentication}' enum. + * + * + * @see org.openecomp.dcae.controller.core.stream.StreamAuthentication + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getStreamAuthentication() + * @generated + */ + int STREAM_AUTHENTICATION = 22; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DcaeStream Dcae Stream}'. + * + * + * @return the meta object for class 'Dcae Stream'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStream + * @generated + */ + EClass getDcaeStream(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DmaapStream Dmaap Stream}'. + * + * + * @return the meta object for class 'Dmaap Stream'. + * @see org.openecomp.dcae.controller.core.stream.DmaapStream + * @generated + */ + EClass getDmaapStream(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapDataType Dmaap Data Type}'. + * + * + * @return the meta object for the attribute 'Dmaap Data Type'. + * @see org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapDataType() + * @see #getDmaapStream() + * @generated + */ + EAttribute getDmaapStream_DmaapDataType(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapAction Dmaap Action}'. + * + * + * @return the meta object for the attribute 'Dmaap Action'. + * @see org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapAction() + * @see #getDmaapStream() + * @generated + */ + EAttribute getDmaapStream_DmaapAction(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapUrl Dmaap Url}'. + * + * + * @return the meta object for the attribute 'Dmaap Url'. + * @see org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapUrl() + * @see #getDmaapStream() + * @generated + */ + EAttribute getDmaapStream_DmaapUrl(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapUserName Dmaap User Name}'. + * + * + * @return the meta object for the attribute 'Dmaap User Name'. + * @see org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapUserName() + * @see #getDmaapStream() + * @generated + */ + EAttribute getDmaapStream_DmaapUserName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapPassword Dmaap Password}'. + * + * + * @return the meta object for the attribute 'Dmaap Password'. + * @see org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapPassword() + * @see #getDmaapStream() + * @generated + */ + EAttribute getDmaapStream_DmaapPassword(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapAuthMethod Dmaap Auth Method}'. + * + * + * @return the meta object for the attribute 'Dmaap Auth Method'. + * @see org.openecomp.dcae.controller.core.stream.DmaapStream#getDmaapAuthMethod() + * @see #getDmaapStream() + * @generated + */ + EAttribute getDmaapStream_DmaapAuthMethod(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition Dcae Stream Definition}'. + * + * + * @return the meta object for class 'Dcae Stream Definition'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition + * @generated + */ + EClass getDcaeStreamDefinition(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition#getStreamType Stream Type}'. + * + * + * @return the meta object for the attribute 'Stream Type'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition#getStreamType() + * @see #getDcaeStreamDefinition() + * @generated + */ + EAttribute getDcaeStreamDefinition_StreamType(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition#getDatabusType Databus Type}'. + * + * + * @return the meta object for the attribute 'Databus Type'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition#getDatabusType() + * @see #getDcaeStreamDefinition() + * @generated + */ + EAttribute getDcaeStreamDefinition_DatabusType(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition#getPublishers Publishers}'. + * + * + * @return the meta object for the containment reference list 'Publishers'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition#getPublishers() + * @see #getDcaeStreamDefinition() + * @generated + */ + EReference getDcaeStreamDefinition_Publishers(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition#getSubscribers Subscribers}'. + * + * + * @return the meta object for the containment reference list 'Subscribers'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition#getSubscribers() + * @see #getDcaeStreamDefinition() + * @generated + */ + EReference getDcaeStreamDefinition_Subscribers(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamPublisher Dcae Stream Publisher}'. + * + * + * @return the meta object for class 'Dcae Stream Publisher'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamPublisher + * @generated + */ + EClass getDcaeStreamPublisher(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriber Dcae Stream Subscriber}'. + * + * + * @return the meta object for class 'Dcae Stream Subscriber'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriber + * @generated + */ + EClass getDcaeStreamSubscriber(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamPublisherExternal Dcae Stream Publisher External}'. + * + * + * @return the meta object for class 'Dcae Stream Publisher External'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamPublisherExternal + * @generated + */ + EClass getDcaeStreamPublisherExternal(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamPublisherInternal Dcae Stream Publisher Internal}'. + * + * + * @return the meta object for class 'Dcae Stream Publisher Internal'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamPublisherInternal + * @generated + */ + EClass getDcaeStreamPublisherInternal(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriberExternal Dcae Stream Subscriber External}'. + * + * + * @return the meta object for class 'Dcae Stream Subscriber External'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriberExternal + * @generated + */ + EClass getDcaeStreamSubscriberExternal(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriberInternal Dcae Stream Subscriber Internal}'. + * + * + * @return the meta object for class 'Dcae Stream Subscriber Internal'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriberInternal + * @generated + */ + EClass getDcaeStreamSubscriberInternal(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamInternalEndPoint Dcae Stream Internal End Point}'. + * + * + * @return the meta object for class 'Dcae Stream Internal End Point'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamInternalEndPoint + * @generated + */ + EClass getDcaeStreamInternalEndPoint(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamInternalEndPoint#getLocalName Local Name}'. + * + * + * @return the meta object for the attribute 'Local Name'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamInternalEndPoint#getLocalName() + * @see #getDcaeStreamInternalEndPoint() + * @generated + */ + EAttribute getDcaeStreamInternalEndPoint_LocalName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamInternalEndPoint#getServiceName Service Name}'. + * + * + * @return the meta object for the attribute 'Service Name'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamInternalEndPoint#getServiceName() + * @see #getDcaeStreamInternalEndPoint() + * @generated + */ + EAttribute getDcaeStreamInternalEndPoint_ServiceName(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint Dcae Stream External End Point}'. + * + * + * @return the meta object for class 'Dcae Stream External End Point'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint + * @generated + */ + EClass getDcaeStreamExternalEndPoint(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint#getUser User}'. + * + * + * @return the meta object for the attribute 'User'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint#getUser() + * @see #getDcaeStreamExternalEndPoint() + * @generated + */ + EAttribute getDcaeStreamExternalEndPoint_User(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint#getPassword Password}'. + * + * + * @return the meta object for the attribute 'Password'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint#getPassword() + * @see #getDcaeStreamExternalEndPoint() + * @generated + */ + EAttribute getDcaeStreamExternalEndPoint_Password(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint#getUrl Url}'. + * + * + * @return the meta object for the attribute 'Url'. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint#getUrl() + * @see #getDcaeStreamExternalEndPoint() + * @generated + */ + EAttribute getDcaeStreamExternalEndPoint_Url(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DatabusStream Databus Stream}'. + * + * + * @return the meta object for class 'Databus Stream'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStream + * @generated + */ + EClass getDatabusStream(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic Databus Stream Topic}'. + * + * + * @return the meta object for class 'Databus Stream Topic'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopic + * @generated + */ + EClass getDatabusStreamTopic(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getTopicName Topic Name}'. + * + * + * @return the meta object for the attribute 'Topic Name'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getTopicName() + * @see #getDatabusStreamTopic() + * @generated + */ + EAttribute getDatabusStreamTopic_TopicName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getTopicDescription Topic Description}'. + * + * + * @return the meta object for the attribute 'Topic Description'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getTopicDescription() + * @see #getDatabusStreamTopic() + * @generated + */ + EAttribute getDatabusStreamTopic_TopicDescription(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getDcaeLocationName Dcae Location Name}'. + * + * + * @return the meta object for the attribute 'Dcae Location Name'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getDcaeLocationName() + * @see #getDatabusStreamTopic() + * @generated + */ + EAttribute getDatabusStreamTopic_DcaeLocationName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getOwner Owner}'. + * + * + * @return the meta object for the attribute 'Owner'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getOwner() + * @see #getDatabusStreamTopic() + * @generated + */ + EAttribute getDatabusStreamTopic_Owner(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#isTxenabled Txenabled}'. + * + * + * @return the meta object for the attribute 'Txenabled'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#isTxenabled() + * @see #getDatabusStreamTopic() + * @generated + */ + EAttribute getDatabusStreamTopic_Txenabled(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getFqtn Fqtn}'. + * + * + * @return the meta object for the attribute 'Fqtn'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getFqtn() + * @see #getDatabusStreamTopic() + * @generated + */ + EAttribute getDatabusStreamTopic_Fqtn(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getLastMod Last Mod}'. + * + * + * @return the meta object for the attribute 'Last Mod'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getLastMod() + * @see #getDatabusStreamTopic() + * @generated + */ + EAttribute getDatabusStreamTopic_LastMod(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getStatus Status}'. + * + * + * @return the meta object for the attribute 'Status'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getStatus() + * @see #getDatabusStreamTopic() + * @generated + */ + EAttribute getDatabusStreamTopic_Status(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getClients Clients}'. + * + * + * @return the meta object for the containment reference list 'Clients'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getClients() + * @see #getDatabusStreamTopic() + * @generated + */ + EReference getDatabusStreamTopic_Clients(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getPublishURL Publish URL}'. + * + * + * @return the meta object for the attribute 'Publish URL'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getPublishURL() + * @see #getDatabusStreamTopic() + * @generated + */ + EAttribute getDatabusStreamTopic_PublishURL(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getSubscribeURL Subscribe URL}'. + * + * + * @return the meta object for the attribute 'Subscribe URL'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getSubscribeURL() + * @see #getDatabusStreamTopic() + * @generated + */ + EAttribute getDatabusStreamTopic_SubscribeURL(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getAuthenticationMethod Authentication Method}'. + * + * + * @return the meta object for the attribute 'Authentication Method'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopic#getAuthenticationMethod() + * @see #getDatabusStreamTopic() + * @generated + */ + EAttribute getDatabusStreamTopic_AuthenticationMethod(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient Databus Stream Topic Client}'. + * + * + * @return the meta object for class 'Databus Stream Topic Client'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient + * @generated + */ + EClass getDatabusStreamTopicClient(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getLocalStreamId Local Stream Id}'. + * + * + * @return the meta object for the attribute 'Local Stream Id'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getLocalStreamId() + * @see #getDatabusStreamTopicClient() + * @generated + */ + EAttribute getDatabusStreamTopicClient_LocalStreamId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getDcaeLocationName Dcae Location Name}'. + * + * + * @return the meta object for the attribute 'Dcae Location Name'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getDcaeLocationName() + * @see #getDatabusStreamTopicClient() + * @generated + */ + EAttribute getDatabusStreamTopicClient_DcaeLocationName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getClientRole Client Role}'. + * + * + * @return the meta object for the attribute 'Client Role'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getClientRole() + * @see #getDatabusStreamTopicClient() + * @generated + */ + EAttribute getDatabusStreamTopicClient_ClientRole(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getAction Action}'. + * + * + * @return the meta object for the attribute list 'Action'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getAction() + * @see #getDatabusStreamTopicClient() + * @generated + */ + EAttribute getDatabusStreamTopicClient_Action(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getUsername Username}'. + * + * + * @return the meta object for the attribute 'Username'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getUsername() + * @see #getDatabusStreamTopicClient() + * @generated + */ + EAttribute getDatabusStreamTopicClient_Username(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getUserpwd Userpwd}'. + * + * + * @return the meta object for the attribute 'Userpwd'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getUserpwd() + * @see #getDatabusStreamTopicClient() + * @generated + */ + EAttribute getDatabusStreamTopicClient_Userpwd(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getFqtn Fqtn}'. + * + * + * @return the meta object for the attribute 'Fqtn'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getFqtn() + * @see #getDatabusStreamTopicClient() + * @generated + */ + EAttribute getDatabusStreamTopicClient_Fqtn(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getMrClientId Mr Client Id}'. + * + * + * @return the meta object for the attribute 'Mr Client Id'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getMrClientId() + * @see #getDatabusStreamTopicClient() + * @generated + */ + EAttribute getDatabusStreamTopicClient_MrClientId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getTopicURL Topic URL}'. + * + * + * @return the meta object for the attribute 'Topic URL'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient#getTopicURL() + * @see #getDatabusStreamTopicClient() + * @generated + */ + EAttribute getDatabusStreamTopicClient_TopicURL(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed Databus Stream Feed}'. + * + * + * @return the meta object for class 'Databus Stream Feed'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeed + * @generated + */ + EClass getDatabusStreamFeed(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getFeedName Feed Name}'. + * + * + * @return the meta object for the attribute 'Feed Name'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getFeedName() + * @see #getDatabusStreamFeed() + * @generated + */ + EAttribute getDatabusStreamFeed_FeedName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getFeedVersion Feed Version}'. + * + * + * @return the meta object for the attribute 'Feed Version'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getFeedVersion() + * @see #getDatabusStreamFeed() + * @generated + */ + EAttribute getDatabusStreamFeed_FeedVersion(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getFeedDescription Feed Description}'. + * + * + * @return the meta object for the attribute 'Feed Description'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getFeedDescription() + * @see #getDatabusStreamFeed() + * @generated + */ + EAttribute getDatabusStreamFeed_FeedDescription(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getAsprClassification Aspr Classification}'. + * + * + * @return the meta object for the attribute 'Aspr Classification'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getAsprClassification() + * @see #getDatabusStreamFeed() + * @generated + */ + EAttribute getDatabusStreamFeed_AsprClassification(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getOwner Owner}'. + * + * + * @return the meta object for the attribute 'Owner'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getOwner() + * @see #getDatabusStreamFeed() + * @generated + */ + EAttribute getDatabusStreamFeed_Owner(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getFeedId Feed Id}'. + * + * + * @return the meta object for the attribute 'Feed Id'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getFeedId() + * @see #getDatabusStreamFeed() + * @generated + */ + EAttribute getDatabusStreamFeed_FeedId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getLogURL Log URL}'. + * + * + * @return the meta object for the attribute 'Log URL'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getLogURL() + * @see #getDatabusStreamFeed() + * @generated + */ + EAttribute getDatabusStreamFeed_LogURL(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getPublishURL Publish URL}'. + * + * + * @return the meta object for the attribute 'Publish URL'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getPublishURL() + * @see #getDatabusStreamFeed() + * @generated + */ + EAttribute getDatabusStreamFeed_PublishURL(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getSubscribeURL Subscribe URL}'. + * + * + * @return the meta object for the attribute 'Subscribe URL'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getSubscribeURL() + * @see #getDatabusStreamFeed() + * @generated + */ + EAttribute getDatabusStreamFeed_SubscribeURL(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getStatus Status}'. + * + * + * @return the meta object for the attribute 'Status'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getStatus() + * @see #getDatabusStreamFeed() + * @generated + */ + EAttribute getDatabusStreamFeed_Status(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getSuspended Suspended}'. + * + * + * @return the meta object for the attribute 'Suspended'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getSuspended() + * @see #getDatabusStreamFeed() + * @generated + */ + EAttribute getDatabusStreamFeed_Suspended(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getPublishers Publishers}'. + * + * + * @return the meta object for the containment reference list 'Publishers'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getPublishers() + * @see #getDatabusStreamFeed() + * @generated + */ + EReference getDatabusStreamFeed_Publishers(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getSubscribers Subscribers}'. + * + * + * @return the meta object for the containment reference list 'Subscribers'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeed#getSubscribers() + * @see #getDatabusStreamFeed() + * @generated + */ + EReference getDatabusStreamFeed_Subscribers(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher Databus Stream Feed Publisher}'. + * + * + * @return the meta object for class 'Databus Stream Feed Publisher'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher + * @generated + */ + EClass getDatabusStreamFeedPublisher(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getLocalStreamId Local Stream Id}'. + * + * + * @return the meta object for the attribute 'Local Stream Id'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getLocalStreamId() + * @see #getDatabusStreamFeedPublisher() + * @generated + */ + EAttribute getDatabusStreamFeedPublisher_LocalStreamId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getDcaeLocationName Dcae Location Name}'. + * + * + * @return the meta object for the attribute 'Dcae Location Name'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getDcaeLocationName() + * @see #getDatabusStreamFeedPublisher() + * @generated + */ + EAttribute getDatabusStreamFeedPublisher_DcaeLocationName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getFeedId Feed Id}'. + * + * + * @return the meta object for the attribute 'Feed Id'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getFeedId() + * @see #getDatabusStreamFeedPublisher() + * @generated + */ + EAttribute getDatabusStreamFeedPublisher_FeedId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getPubId Pub Id}'. + * + * + * @return the meta object for the attribute 'Pub Id'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getPubId() + * @see #getDatabusStreamFeedPublisher() + * @generated + */ + EAttribute getDatabusStreamFeedPublisher_PubId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getStatus Status}'. + * + * + * @return the meta object for the attribute 'Status'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getStatus() + * @see #getDatabusStreamFeedPublisher() + * @generated + */ + EAttribute getDatabusStreamFeedPublisher_Status(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getUsername Username}'. + * + * + * @return the meta object for the attribute 'Username'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getUsername() + * @see #getDatabusStreamFeedPublisher() + * @generated + */ + EAttribute getDatabusStreamFeedPublisher_Username(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getUserpwd Userpwd}'. + * + * + * @return the meta object for the attribute 'Userpwd'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher#getUserpwd() + * @see #getDatabusStreamFeedPublisher() + * @generated + */ + EAttribute getDatabusStreamFeedPublisher_Userpwd(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber Databus Stream Feed Subscriber}'. + * + * + * @return the meta object for class 'Databus Stream Feed Subscriber'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber + * @generated + */ + EClass getDatabusStreamFeedSubscriber(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getLocalStreamId Local Stream Id}'. + * + * + * @return the meta object for the attribute 'Local Stream Id'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getLocalStreamId() + * @see #getDatabusStreamFeedSubscriber() + * @generated + */ + EAttribute getDatabusStreamFeedSubscriber_LocalStreamId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getDcaeLocationName Dcae Location Name}'. + * + * + * @return the meta object for the attribute 'Dcae Location Name'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getDcaeLocationName() + * @see #getDatabusStreamFeedSubscriber() + * @generated + */ + EAttribute getDatabusStreamFeedSubscriber_DcaeLocationName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getOtherFeedName Other Feed Name}'. + * + * + * @return the meta object for the attribute 'Other Feed Name'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getOtherFeedName() + * @see #getDatabusStreamFeedSubscriber() + * @generated + */ + EAttribute getDatabusStreamFeedSubscriber_OtherFeedName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getFeedId Feed Id}'. + * + * + * @return the meta object for the attribute 'Feed Id'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getFeedId() + * @see #getDatabusStreamFeedSubscriber() + * @generated + */ + EAttribute getDatabusStreamFeedSubscriber_FeedId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getLogURL Log URL}'. + * + * + * @return the meta object for the attribute 'Log URL'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getLogURL() + * @see #getDatabusStreamFeedSubscriber() + * @generated + */ + EAttribute getDatabusStreamFeedSubscriber_LogURL(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getOwner Owner}'. + * + * + * @return the meta object for the attribute 'Owner'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getOwner() + * @see #getDatabusStreamFeedSubscriber() + * @generated + */ + EAttribute getDatabusStreamFeedSubscriber_Owner(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getSubId Sub Id}'. + * + * + * @return the meta object for the attribute 'Sub Id'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getSubId() + * @see #getDatabusStreamFeedSubscriber() + * @generated + */ + EAttribute getDatabusStreamFeedSubscriber_SubId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#isSuspended Suspended}'. + * + * + * @return the meta object for the attribute 'Suspended'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#isSuspended() + * @see #getDatabusStreamFeedSubscriber() + * @generated + */ + EAttribute getDatabusStreamFeedSubscriber_Suspended(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#isUse100 Use100}'. + * + * + * @return the meta object for the attribute 'Use100'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#isUse100() + * @see #getDatabusStreamFeedSubscriber() + * @generated + */ + EAttribute getDatabusStreamFeedSubscriber_Use100(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getUsername Username}'. + * + * + * @return the meta object for the attribute 'Username'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getUsername() + * @see #getDatabusStreamFeedSubscriber() + * @generated + */ + EAttribute getDatabusStreamFeedSubscriber_Username(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getUserpwd Userpwd}'. + * + * + * @return the meta object for the attribute 'Userpwd'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getUserpwd() + * @see #getDatabusStreamFeedSubscriber() + * @generated + */ + EAttribute getDatabusStreamFeedSubscriber_Userpwd(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getDeliveryURL Delivery URL}'. + * + * + * @return the meta object for the attribute 'Delivery URL'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber#getDeliveryURL() + * @see #getDatabusStreamFeedSubscriber() + * @generated + */ + EAttribute getDatabusStreamFeedSubscriber_DeliveryURL(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DatabusEntity Databus Entity}'. + * + * + * @return the meta object for class 'Databus Entity'. + * @see org.openecomp.dcae.controller.core.stream.DatabusEntity + * @generated + */ + EClass getDatabusEntity(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusEntity#getStatus Status}'. + * + * + * @return the meta object for the attribute 'Status'. + * @see org.openecomp.dcae.controller.core.stream.DatabusEntity#getStatus() + * @see #getDatabusEntity() + * @generated + */ + EAttribute getDatabusEntity_Status(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusEntity#getLastModified Last Modified}'. + * + * + * @return the meta object for the attribute 'Last Modified'. + * @see org.openecomp.dcae.controller.core.stream.DatabusEntity#getLastModified() + * @see #getDatabusEntity() + * @generated + */ + EAttribute getDatabusEntity_LastModified(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusEntity#getType Type}'. + * + * + * @return the meta object for the attribute 'Type'. + * @see org.openecomp.dcae.controller.core.stream.DatabusEntity#getType() + * @see #getDatabusEntity() + * @generated + */ + EAttribute getDatabusEntity_Type(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DatabusLocation Databus Location}'. + * + * + * @return the meta object for class 'Databus Location'. + * @see org.openecomp.dcae.controller.core.stream.DatabusLocation + * @generated + */ + EClass getDatabusLocation(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusLocation#getDcaeLayer Dcae Layer}'. + * + * + * @return the meta object for the attribute 'Dcae Layer'. + * @see org.openecomp.dcae.controller.core.stream.DatabusLocation#getDcaeLayer() + * @see #getDatabusLocation() + * @generated + */ + EAttribute getDatabusLocation_DcaeLayer(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster Databus Message Router Cluster}'. + * + * + * @return the meta object for class 'Databus Message Router Cluster'. + * @see org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster + * @generated + */ + EClass getDatabusMessageRouterCluster(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getDcaeLocationName Dcae Location Name}'. + * + * + * @return the meta object for the attribute 'Dcae Location Name'. + * @see org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getDcaeLocationName() + * @see #getDatabusMessageRouterCluster() + * @generated + */ + EAttribute getDatabusMessageRouterCluster_DcaeLocationName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getServiceFqdn Service Fqdn}'. + * + * + * @return the meta object for the attribute 'Service Fqdn'. + * @see org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getServiceFqdn() + * @see #getDatabusMessageRouterCluster() + * @generated + */ + EAttribute getDatabusMessageRouterCluster_ServiceFqdn(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getHostFqdn Host Fqdn}'. + * + * + * @return the meta object for the attribute list 'Host Fqdn'. + * @see org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getHostFqdn() + * @see #getDatabusMessageRouterCluster() + * @generated + */ + EAttribute getDatabusMessageRouterCluster_HostFqdn(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getTopicPort Topic Port}'. + * + * + * @return the meta object for the attribute 'Topic Port'. + * @see org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getTopicPort() + * @see #getDatabusMessageRouterCluster() + * @generated + */ + EAttribute getDatabusMessageRouterCluster_TopicPort(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getTopicProtocol Topic Protocol}'. + * + * + * @return the meta object for the attribute 'Topic Protocol'. + * @see org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster#getTopicProtocol() + * @see #getDatabusMessageRouterCluster() + * @generated + */ + EAttribute getDatabusMessageRouterCluster_TopicProtocol(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode Databus Data Router Node}'. + * + * + * @return the meta object for class 'Databus Data Router Node'. + * @see org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode + * @generated + */ + EClass getDatabusDataRouterNode(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode#getDcaeLocationName Dcae Location Name}'. + * + * + * @return the meta object for the attribute 'Dcae Location Name'. + * @see org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode#getDcaeLocationName() + * @see #getDatabusDataRouterNode() + * @generated + */ + EAttribute getDatabusDataRouterNode_DcaeLocationName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode#getHostFqdn Host Fqdn}'. + * + * + * @return the meta object for the attribute 'Host Fqdn'. + * @see org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode#getHostFqdn() + * @see #getDatabusDataRouterNode() + * @generated + */ + EAttribute getDatabusDataRouterNode_HostFqdn(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode#getVersion Version}'. + * + * + * @return the meta object for the attribute 'Version'. + * @see org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode#getVersion() + * @see #getDatabusDataRouterNode() + * @generated + */ + EAttribute getDatabusDataRouterNode_Version(); + + /** + * Returns the meta object for enum '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicAction Databus Stream Topic Action}'. + * + * + * @return the meta object for enum 'Databus Stream Topic Action'. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopicAction + * @generated + */ + EEnum getDatabusStreamTopicAction(); + + /** + * Returns the meta object for enum '{@link org.openecomp.dcae.controller.core.stream.StreamAuthentication Authentication}'. + * + * + * @return the meta object for enum 'Authentication'. + * @see org.openecomp.dcae.controller.core.stream.StreamAuthentication + * @generated + */ + EEnum getStreamAuthentication(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + StreamFactory getStreamFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamImpl Dcae Stream}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStream() + * @generated + */ + EClass DCAE_STREAM = eINSTANCE.getDcaeStream(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DmaapStreamImpl Dmaap Stream}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DmaapStreamImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDmaapStream() + * @generated + */ + EClass DMAAP_STREAM = eINSTANCE.getDmaapStream(); + /** + * The meta object literal for the 'Dmaap Data Type' attribute feature. + * + * + * @generated + */ + EAttribute DMAAP_STREAM__DMAAP_DATA_TYPE = eINSTANCE.getDmaapStream_DmaapDataType(); + /** + * The meta object literal for the 'Dmaap Action' attribute feature. + * + * + * @generated + */ + EAttribute DMAAP_STREAM__DMAAP_ACTION = eINSTANCE.getDmaapStream_DmaapAction(); + /** + * The meta object literal for the 'Dmaap Url' attribute feature. + * + * + * @generated + */ + EAttribute DMAAP_STREAM__DMAAP_URL = eINSTANCE.getDmaapStream_DmaapUrl(); + /** + * The meta object literal for the 'Dmaap User Name' attribute feature. + * + * + * @generated + */ + EAttribute DMAAP_STREAM__DMAAP_USER_NAME = eINSTANCE.getDmaapStream_DmaapUserName(); + /** + * The meta object literal for the 'Dmaap Password' attribute feature. + * + * + * @generated + */ + EAttribute DMAAP_STREAM__DMAAP_PASSWORD = eINSTANCE.getDmaapStream_DmaapPassword(); + /** + * The meta object literal for the 'Dmaap Auth Method' attribute feature. + * + * + * @generated + */ + EAttribute DMAAP_STREAM__DMAAP_AUTH_METHOD = eINSTANCE.getDmaapStream_DmaapAuthMethod(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamDefinitionImpl Dcae Stream Definition}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamDefinitionImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamDefinition() + * @generated + */ + EClass DCAE_STREAM_DEFINITION = eINSTANCE.getDcaeStreamDefinition(); + /** + * The meta object literal for the 'Stream Type' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_STREAM_DEFINITION__STREAM_TYPE = eINSTANCE.getDcaeStreamDefinition_StreamType(); + /** + * The meta object literal for the 'Databus Type' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_STREAM_DEFINITION__DATABUS_TYPE = eINSTANCE.getDcaeStreamDefinition_DatabusType(); + /** + * The meta object literal for the 'Publishers' containment reference list feature. + * + * + * @generated + */ + EReference DCAE_STREAM_DEFINITION__PUBLISHERS = eINSTANCE.getDcaeStreamDefinition_Publishers(); + /** + * The meta object literal for the 'Subscribers' containment reference list feature. + * + * + * @generated + */ + EReference DCAE_STREAM_DEFINITION__SUBSCRIBERS = eINSTANCE.getDcaeStreamDefinition_Subscribers(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherImpl Dcae Stream Publisher}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamPublisher() + * @generated + */ + EClass DCAE_STREAM_PUBLISHER = eINSTANCE.getDcaeStreamPublisher(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberImpl Dcae Stream Subscriber}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamSubscriber() + * @generated + */ + EClass DCAE_STREAM_SUBSCRIBER = eINSTANCE.getDcaeStreamSubscriber(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherExternalImpl Dcae Stream Publisher External}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherExternalImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamPublisherExternal() + * @generated + */ + EClass DCAE_STREAM_PUBLISHER_EXTERNAL = eINSTANCE.getDcaeStreamPublisherExternal(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherInternalImpl Dcae Stream Publisher Internal}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherInternalImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamPublisherInternal() + * @generated + */ + EClass DCAE_STREAM_PUBLISHER_INTERNAL = eINSTANCE.getDcaeStreamPublisherInternal(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberExternalImpl Dcae Stream Subscriber External}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberExternalImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamSubscriberExternal() + * @generated + */ + EClass DCAE_STREAM_SUBSCRIBER_EXTERNAL = eINSTANCE.getDcaeStreamSubscriberExternal(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberInternalImpl Dcae Stream Subscriber Internal}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberInternalImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamSubscriberInternal() + * @generated + */ + EClass DCAE_STREAM_SUBSCRIBER_INTERNAL = eINSTANCE.getDcaeStreamSubscriberInternal(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamInternalEndPointImpl Dcae Stream Internal End Point}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamInternalEndPointImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamInternalEndPoint() + * @generated + */ + EClass DCAE_STREAM_INTERNAL_END_POINT = eINSTANCE.getDcaeStreamInternalEndPoint(); + /** + * The meta object literal for the 'Local Name' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_STREAM_INTERNAL_END_POINT__LOCAL_NAME = eINSTANCE.getDcaeStreamInternalEndPoint_LocalName(); + /** + * The meta object literal for the 'Service Name' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_STREAM_INTERNAL_END_POINT__SERVICE_NAME = eINSTANCE.getDcaeStreamInternalEndPoint_ServiceName(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamExternalEndPointImpl Dcae Stream External End Point}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DcaeStreamExternalEndPointImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDcaeStreamExternalEndPoint() + * @generated + */ + EClass DCAE_STREAM_EXTERNAL_END_POINT = eINSTANCE.getDcaeStreamExternalEndPoint(); + /** + * The meta object literal for the 'User' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_STREAM_EXTERNAL_END_POINT__USER = eINSTANCE.getDcaeStreamExternalEndPoint_User(); + /** + * The meta object literal for the 'Password' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_STREAM_EXTERNAL_END_POINT__PASSWORD = eINSTANCE.getDcaeStreamExternalEndPoint_Password(); + /** + * The meta object literal for the 'Url' attribute feature. + * + * + * @generated + */ + EAttribute DCAE_STREAM_EXTERNAL_END_POINT__URL = eINSTANCE.getDcaeStreamExternalEndPoint_Url(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamImpl Databus Stream}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusStreamImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusStream() + * @generated + */ + EClass DATABUS_STREAM = eINSTANCE.getDatabusStream(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicImpl Databus Stream Topic}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusStreamTopic() + * @generated + */ + EClass DATABUS_STREAM_TOPIC = eINSTANCE.getDatabusStreamTopic(); + /** + * The meta object literal for the 'Topic Name' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC__TOPIC_NAME = eINSTANCE.getDatabusStreamTopic_TopicName(); + /** + * The meta object literal for the 'Topic Description' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC__TOPIC_DESCRIPTION = eINSTANCE.getDatabusStreamTopic_TopicDescription(); + /** + * The meta object literal for the 'Dcae Location Name' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC__DCAE_LOCATION_NAME = eINSTANCE.getDatabusStreamTopic_DcaeLocationName(); + /** + * The meta object literal for the 'Owner' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC__OWNER = eINSTANCE.getDatabusStreamTopic_Owner(); + /** + * The meta object literal for the 'Txenabled' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC__TXENABLED = eINSTANCE.getDatabusStreamTopic_Txenabled(); + /** + * The meta object literal for the 'Fqtn' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC__FQTN = eINSTANCE.getDatabusStreamTopic_Fqtn(); + /** + * The meta object literal for the 'Last Mod' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC__LAST_MOD = eINSTANCE.getDatabusStreamTopic_LastMod(); + /** + * The meta object literal for the 'Status' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC__STATUS = eINSTANCE.getDatabusStreamTopic_Status(); + /** + * The meta object literal for the 'Clients' containment reference list feature. + * + * + * @generated + */ + EReference DATABUS_STREAM_TOPIC__CLIENTS = eINSTANCE.getDatabusStreamTopic_Clients(); + /** + * The meta object literal for the 'Publish URL' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC__PUBLISH_URL = eINSTANCE.getDatabusStreamTopic_PublishURL(); + /** + * The meta object literal for the 'Subscribe URL' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC__SUBSCRIBE_URL = eINSTANCE.getDatabusStreamTopic_SubscribeURL(); + /** + * The meta object literal for the 'Authentication Method' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC__AUTHENTICATION_METHOD = eINSTANCE.getDatabusStreamTopic_AuthenticationMethod(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicClientImpl Databus Stream Topic Client}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicClientImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusStreamTopicClient() + * @generated + */ + EClass DATABUS_STREAM_TOPIC_CLIENT = eINSTANCE.getDatabusStreamTopicClient(); + /** + * The meta object literal for the 'Local Stream Id' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC_CLIENT__LOCAL_STREAM_ID = eINSTANCE.getDatabusStreamTopicClient_LocalStreamId(); + /** + * The meta object literal for the 'Dcae Location Name' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC_CLIENT__DCAE_LOCATION_NAME = eINSTANCE.getDatabusStreamTopicClient_DcaeLocationName(); + /** + * The meta object literal for the 'Client Role' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC_CLIENT__CLIENT_ROLE = eINSTANCE.getDatabusStreamTopicClient_ClientRole(); + /** + * The meta object literal for the 'Action' attribute list feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC_CLIENT__ACTION = eINSTANCE.getDatabusStreamTopicClient_Action(); + /** + * The meta object literal for the 'Username' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC_CLIENT__USERNAME = eINSTANCE.getDatabusStreamTopicClient_Username(); + /** + * The meta object literal for the 'Userpwd' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC_CLIENT__USERPWD = eINSTANCE.getDatabusStreamTopicClient_Userpwd(); + /** + * The meta object literal for the 'Fqtn' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC_CLIENT__FQTN = eINSTANCE.getDatabusStreamTopicClient_Fqtn(); + /** + * The meta object literal for the 'Mr Client Id' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC_CLIENT__MR_CLIENT_ID = eINSTANCE.getDatabusStreamTopicClient_MrClientId(); + /** + * The meta object literal for the 'Topic URL' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_TOPIC_CLIENT__TOPIC_URL = eINSTANCE.getDatabusStreamTopicClient_TopicURL(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl Databus Stream Feed}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusStreamFeed() + * @generated + */ + EClass DATABUS_STREAM_FEED = eINSTANCE.getDatabusStreamFeed(); + /** + * The meta object literal for the 'Feed Name' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED__FEED_NAME = eINSTANCE.getDatabusStreamFeed_FeedName(); + /** + * The meta object literal for the 'Feed Version' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED__FEED_VERSION = eINSTANCE.getDatabusStreamFeed_FeedVersion(); + /** + * The meta object literal for the 'Feed Description' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED__FEED_DESCRIPTION = eINSTANCE.getDatabusStreamFeed_FeedDescription(); + /** + * The meta object literal for the 'Aspr Classification' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED__ASPR_CLASSIFICATION = eINSTANCE.getDatabusStreamFeed_AsprClassification(); + /** + * The meta object literal for the 'Owner' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED__OWNER = eINSTANCE.getDatabusStreamFeed_Owner(); + /** + * The meta object literal for the 'Feed Id' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED__FEED_ID = eINSTANCE.getDatabusStreamFeed_FeedId(); + /** + * The meta object literal for the 'Log URL' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED__LOG_URL = eINSTANCE.getDatabusStreamFeed_LogURL(); + /** + * The meta object literal for the 'Publish URL' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED__PUBLISH_URL = eINSTANCE.getDatabusStreamFeed_PublishURL(); + /** + * The meta object literal for the 'Subscribe URL' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED__SUBSCRIBE_URL = eINSTANCE.getDatabusStreamFeed_SubscribeURL(); + /** + * The meta object literal for the 'Status' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED__STATUS = eINSTANCE.getDatabusStreamFeed_Status(); + /** + * The meta object literal for the 'Suspended' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED__SUSPENDED = eINSTANCE.getDatabusStreamFeed_Suspended(); + /** + * The meta object literal for the 'Publishers' containment reference list feature. + * + * + * @generated + */ + EReference DATABUS_STREAM_FEED__PUBLISHERS = eINSTANCE.getDatabusStreamFeed_Publishers(); + /** + * The meta object literal for the 'Subscribers' containment reference list feature. + * + * + * @generated + */ + EReference DATABUS_STREAM_FEED__SUBSCRIBERS = eINSTANCE.getDatabusStreamFeed_Subscribers(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedPublisherImpl Databus Stream Feed Publisher}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedPublisherImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusStreamFeedPublisher() + * @generated + */ + EClass DATABUS_STREAM_FEED_PUBLISHER = eINSTANCE.getDatabusStreamFeedPublisher(); + /** + * The meta object literal for the 'Local Stream Id' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_PUBLISHER__LOCAL_STREAM_ID = eINSTANCE.getDatabusStreamFeedPublisher_LocalStreamId(); + /** + * The meta object literal for the 'Dcae Location Name' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_PUBLISHER__DCAE_LOCATION_NAME = eINSTANCE.getDatabusStreamFeedPublisher_DcaeLocationName(); + /** + * The meta object literal for the 'Feed Id' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_PUBLISHER__FEED_ID = eINSTANCE.getDatabusStreamFeedPublisher_FeedId(); + /** + * The meta object literal for the 'Pub Id' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_PUBLISHER__PUB_ID = eINSTANCE.getDatabusStreamFeedPublisher_PubId(); + /** + * The meta object literal for the 'Status' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_PUBLISHER__STATUS = eINSTANCE.getDatabusStreamFeedPublisher_Status(); + /** + * The meta object literal for the 'Username' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_PUBLISHER__USERNAME = eINSTANCE.getDatabusStreamFeedPublisher_Username(); + /** + * The meta object literal for the 'Userpwd' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_PUBLISHER__USERPWD = eINSTANCE.getDatabusStreamFeedPublisher_Userpwd(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedSubscriberImpl Databus Stream Feed Subscriber}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedSubscriberImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusStreamFeedSubscriber() + * @generated + */ + EClass DATABUS_STREAM_FEED_SUBSCRIBER = eINSTANCE.getDatabusStreamFeedSubscriber(); + /** + * The meta object literal for the 'Local Stream Id' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_SUBSCRIBER__LOCAL_STREAM_ID = eINSTANCE.getDatabusStreamFeedSubscriber_LocalStreamId(); + /** + * The meta object literal for the 'Dcae Location Name' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_SUBSCRIBER__DCAE_LOCATION_NAME = eINSTANCE.getDatabusStreamFeedSubscriber_DcaeLocationName(); + /** + * The meta object literal for the 'Other Feed Name' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_SUBSCRIBER__OTHER_FEED_NAME = eINSTANCE.getDatabusStreamFeedSubscriber_OtherFeedName(); + /** + * The meta object literal for the 'Feed Id' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_SUBSCRIBER__FEED_ID = eINSTANCE.getDatabusStreamFeedSubscriber_FeedId(); + /** + * The meta object literal for the 'Log URL' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_SUBSCRIBER__LOG_URL = eINSTANCE.getDatabusStreamFeedSubscriber_LogURL(); + /** + * The meta object literal for the 'Owner' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_SUBSCRIBER__OWNER = eINSTANCE.getDatabusStreamFeedSubscriber_Owner(); + /** + * The meta object literal for the 'Sub Id' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_SUBSCRIBER__SUB_ID = eINSTANCE.getDatabusStreamFeedSubscriber_SubId(); + /** + * The meta object literal for the 'Suspended' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_SUBSCRIBER__SUSPENDED = eINSTANCE.getDatabusStreamFeedSubscriber_Suspended(); + /** + * The meta object literal for the 'Use100' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_SUBSCRIBER__USE100 = eINSTANCE.getDatabusStreamFeedSubscriber_Use100(); + /** + * The meta object literal for the 'Username' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_SUBSCRIBER__USERNAME = eINSTANCE.getDatabusStreamFeedSubscriber_Username(); + /** + * The meta object literal for the 'Userpwd' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_SUBSCRIBER__USERPWD = eINSTANCE.getDatabusStreamFeedSubscriber_Userpwd(); + /** + * The meta object literal for the 'Delivery URL' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_STREAM_FEED_SUBSCRIBER__DELIVERY_URL = eINSTANCE.getDatabusStreamFeedSubscriber_DeliveryURL(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusEntityImpl Databus Entity}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusEntityImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusEntity() + * @generated + */ + EClass DATABUS_ENTITY = eINSTANCE.getDatabusEntity(); + /** + * The meta object literal for the 'Status' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_ENTITY__STATUS = eINSTANCE.getDatabusEntity_Status(); + /** + * The meta object literal for the 'Last Modified' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_ENTITY__LAST_MODIFIED = eINSTANCE.getDatabusEntity_LastModified(); + /** + * The meta object literal for the 'Type' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_ENTITY__TYPE = eINSTANCE.getDatabusEntity_Type(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusLocationImpl Databus Location}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusLocationImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusLocation() + * @generated + */ + EClass DATABUS_LOCATION = eINSTANCE.getDatabusLocation(); + /** + * The meta object literal for the 'Dcae Layer' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_LOCATION__DCAE_LAYER = eINSTANCE.getDatabusLocation_DcaeLayer(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusMessageRouterClusterImpl Databus Message Router Cluster}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusMessageRouterClusterImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusMessageRouterCluster() + * @generated + */ + EClass DATABUS_MESSAGE_ROUTER_CLUSTER = eINSTANCE.getDatabusMessageRouterCluster(); + /** + * The meta object literal for the 'Dcae Location Name' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_MESSAGE_ROUTER_CLUSTER__DCAE_LOCATION_NAME = eINSTANCE.getDatabusMessageRouterCluster_DcaeLocationName(); + /** + * The meta object literal for the 'Service Fqdn' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_MESSAGE_ROUTER_CLUSTER__SERVICE_FQDN = eINSTANCE.getDatabusMessageRouterCluster_ServiceFqdn(); + /** + * The meta object literal for the 'Host Fqdn' attribute list feature. + * + * + * @generated + */ + EAttribute DATABUS_MESSAGE_ROUTER_CLUSTER__HOST_FQDN = eINSTANCE.getDatabusMessageRouterCluster_HostFqdn(); + /** + * The meta object literal for the 'Topic Port' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_MESSAGE_ROUTER_CLUSTER__TOPIC_PORT = eINSTANCE.getDatabusMessageRouterCluster_TopicPort(); + /** + * The meta object literal for the 'Topic Protocol' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_MESSAGE_ROUTER_CLUSTER__TOPIC_PROTOCOL = eINSTANCE.getDatabusMessageRouterCluster_TopicProtocol(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.impl.DatabusDataRouterNodeImpl Databus Data Router Node}' class. + * + * + * @see org.openecomp.dcae.controller.core.stream.impl.DatabusDataRouterNodeImpl + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusDataRouterNode() + * @generated + */ + EClass DATABUS_DATA_ROUTER_NODE = eINSTANCE.getDatabusDataRouterNode(); + /** + * The meta object literal for the 'Dcae Location Name' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_DATA_ROUTER_NODE__DCAE_LOCATION_NAME = eINSTANCE.getDatabusDataRouterNode_DcaeLocationName(); + /** + * The meta object literal for the 'Host Fqdn' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_DATA_ROUTER_NODE__HOST_FQDN = eINSTANCE.getDatabusDataRouterNode_HostFqdn(); + /** + * The meta object literal for the 'Version' attribute feature. + * + * + * @generated + */ + EAttribute DATABUS_DATA_ROUTER_NODE__VERSION = eINSTANCE.getDatabusDataRouterNode_Version(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicAction Databus Stream Topic Action}' enum. + * + * + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopicAction + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getDatabusStreamTopicAction() + * @generated + */ + EEnum DATABUS_STREAM_TOPIC_ACTION = eINSTANCE.getDatabusStreamTopicAction(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.core.stream.StreamAuthentication Authentication}' enum. + * + * + * @see org.openecomp.dcae.controller.core.stream.StreamAuthentication + * @see org.openecomp.dcae.controller.core.stream.impl.StreamPackageImpl#getStreamAuthentication() + * @generated + */ + EEnum STREAM_AUTHENTICATION = eINSTANCE.getStreamAuthentication(); + + } + +} //StreamPackage diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusDataRouterNodeImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusDataRouterNodeImpl.java new file mode 100644 index 0000000..605ad95 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusDataRouterNodeImpl.java @@ -0,0 +1,283 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode; +import org.openecomp.dcae.controller.core.stream.StreamPackage; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Databus Data Router Node'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusDataRouterNodeImpl#getDcaeLocationName Dcae Location Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusDataRouterNodeImpl#getHostFqdn Host Fqdn}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusDataRouterNodeImpl#getVersion Version}
  • + *
+ *

+ * + * @generated + */ +public class DatabusDataRouterNodeImpl extends DatabusEntityImpl implements DatabusDataRouterNode { + /** + * The default value of the '{@link #getDcaeLocationName() Dcae Location Name}' attribute. + * + * + * @see #getDcaeLocationName() + * @generated + * @ordered + */ + protected static final String DCAE_LOCATION_NAME_EDEFAULT = null; + /** + * The cached value of the '{@link #getDcaeLocationName() Dcae Location Name}' attribute. + * + * + * @see #getDcaeLocationName() + * @generated + * @ordered + */ + protected String dcaeLocationName = DCAE_LOCATION_NAME_EDEFAULT; + /** + * The default value of the '{@link #getHostFqdn() Host Fqdn}' attribute. + * + * + * @see #getHostFqdn() + * @generated + * @ordered + */ + protected static final String HOST_FQDN_EDEFAULT = null; + /** + * The cached value of the '{@link #getHostFqdn() Host Fqdn}' attribute. + * + * + * @see #getHostFqdn() + * @generated + * @ordered + */ + protected String hostFqdn = HOST_FQDN_EDEFAULT; + /** + * The default value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + /** + * The cached value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + + /** + * + * + * @generated + */ + protected DatabusDataRouterNodeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DATABUS_DATA_ROUTER_NODE; + } + + /** + * + * + * @generated + */ + public String getDcaeLocationName() { + return dcaeLocationName; + } + + /** + * + * + * @generated + */ + public void setDcaeLocationName(String newDcaeLocationName) { + String oldDcaeLocationName = dcaeLocationName; + dcaeLocationName = newDcaeLocationName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_DATA_ROUTER_NODE__DCAE_LOCATION_NAME, oldDcaeLocationName, dcaeLocationName)); + } + + /** + * + * + * @generated + */ + public String getHostFqdn() { + return hostFqdn; + } + + /** + * + * + * @generated + */ + public void setHostFqdn(String newHostFqdn) { + String oldHostFqdn = hostFqdn; + hostFqdn = newHostFqdn; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_DATA_ROUTER_NODE__HOST_FQDN, oldHostFqdn, hostFqdn)); + } + + /** + * + * + * @generated + */ + public String getVersion() { + return version; + } + + /** + * + * + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_DATA_ROUTER_NODE__VERSION, oldVersion, version)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DATABUS_DATA_ROUTER_NODE__DCAE_LOCATION_NAME: + return getDcaeLocationName(); + case StreamPackage.DATABUS_DATA_ROUTER_NODE__HOST_FQDN: + return getHostFqdn(); + case StreamPackage.DATABUS_DATA_ROUTER_NODE__VERSION: + return getVersion(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DATABUS_DATA_ROUTER_NODE__DCAE_LOCATION_NAME: + setDcaeLocationName((String)newValue); + return; + case StreamPackage.DATABUS_DATA_ROUTER_NODE__HOST_FQDN: + setHostFqdn((String)newValue); + return; + case StreamPackage.DATABUS_DATA_ROUTER_NODE__VERSION: + setVersion((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_DATA_ROUTER_NODE__DCAE_LOCATION_NAME: + setDcaeLocationName(DCAE_LOCATION_NAME_EDEFAULT); + return; + case StreamPackage.DATABUS_DATA_ROUTER_NODE__HOST_FQDN: + setHostFqdn(HOST_FQDN_EDEFAULT); + return; + case StreamPackage.DATABUS_DATA_ROUTER_NODE__VERSION: + setVersion(VERSION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_DATA_ROUTER_NODE__DCAE_LOCATION_NAME: + return DCAE_LOCATION_NAME_EDEFAULT == null ? dcaeLocationName != null : !DCAE_LOCATION_NAME_EDEFAULT.equals(dcaeLocationName); + case StreamPackage.DATABUS_DATA_ROUTER_NODE__HOST_FQDN: + return HOST_FQDN_EDEFAULT == null ? hostFqdn != null : !HOST_FQDN_EDEFAULT.equals(hostFqdn); + case StreamPackage.DATABUS_DATA_ROUTER_NODE__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (dcaeLocationName: "); + result.append(dcaeLocationName); + result.append(", hostFqdn: "); + result.append(hostFqdn); + result.append(", version: "); + result.append(version); + result.append(')'); + return result.toString(); + } + +} //DatabusDataRouterNodeImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusEntityImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusEntityImpl.java new file mode 100644 index 0000000..e4b8a36 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusEntityImpl.java @@ -0,0 +1,294 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DatabusEntity; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import java.util.Date; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Databus Entity'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusEntityImpl#getStatus Status}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusEntityImpl#getLastModified Last Modified}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusEntityImpl#getType Type}
  • + *
+ *

+ * + * @generated + */ +public class DatabusEntityImpl extends NamedEntityImpl implements DatabusEntity { + /** + * The default value of the '{@link #getStatus() Status}' attribute. + * + * + * @see #getStatus() + * @generated + * @ordered + */ + protected static final String STATUS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getStatus() Status}' attribute. + * + * + * @see #getStatus() + * @generated + * @ordered + */ + protected String status = STATUS_EDEFAULT; + + /** + * The default value of the '{@link #getLastModified() Last Modified}' attribute. + * + * + * @see #getLastModified() + * @generated + * @ordered + */ + protected static final Date LAST_MODIFIED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLastModified() Last Modified}' attribute. + * + * + * @see #getLastModified() + * @generated + * @ordered + */ + protected Date lastModified = LAST_MODIFIED_EDEFAULT; + + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected String type = TYPE_EDEFAULT; + + /** + * + * + * @generated + */ + protected DatabusEntityImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DATABUS_ENTITY; + } + + /** + * + * + * @generated + */ + public String getStatus() { + return status; + } + + /** + * + * + * @generated + */ + public void setStatus(String newStatus) { + String oldStatus = status; + status = newStatus; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_ENTITY__STATUS, oldStatus, status)); + } + + /** + * + * + * @generated + */ + public Date getLastModified() { + return lastModified; + } + + /** + * + * + * @generated + */ + public void setLastModified(Date newLastModified) { + Date oldLastModified = lastModified; + lastModified = newLastModified; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_ENTITY__LAST_MODIFIED, oldLastModified, lastModified)); + } + + /** + * + * + * @generated + */ + public String getType() { + return type; + } + + /** + * + * + * @generated + */ + public void setType(String newType) { + String oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_ENTITY__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DATABUS_ENTITY__STATUS: + return getStatus(); + case StreamPackage.DATABUS_ENTITY__LAST_MODIFIED: + return getLastModified(); + case StreamPackage.DATABUS_ENTITY__TYPE: + return getType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DATABUS_ENTITY__STATUS: + setStatus((String)newValue); + return; + case StreamPackage.DATABUS_ENTITY__LAST_MODIFIED: + setLastModified((Date)newValue); + return; + case StreamPackage.DATABUS_ENTITY__TYPE: + setType((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_ENTITY__STATUS: + setStatus(STATUS_EDEFAULT); + return; + case StreamPackage.DATABUS_ENTITY__LAST_MODIFIED: + setLastModified(LAST_MODIFIED_EDEFAULT); + return; + case StreamPackage.DATABUS_ENTITY__TYPE: + setType(TYPE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_ENTITY__STATUS: + return STATUS_EDEFAULT == null ? status != null : !STATUS_EDEFAULT.equals(status); + case StreamPackage.DATABUS_ENTITY__LAST_MODIFIED: + return LAST_MODIFIED_EDEFAULT == null ? lastModified != null : !LAST_MODIFIED_EDEFAULT.equals(lastModified); + case StreamPackage.DATABUS_ENTITY__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (status: "); + result.append(status); + result.append(", lastModified: "); + result.append(lastModified); + result.append(", type: "); + result.append(type); + result.append(')'); + return result.toString(); + } + +} //DatabusEntityImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusLocationImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusLocationImpl.java new file mode 100644 index 0000000..7699732 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusLocationImpl.java @@ -0,0 +1,179 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DatabusLocation; +import org.openecomp.dcae.controller.core.stream.StreamPackage; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Databus Location'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusLocationImpl#getDcaeLayer Dcae Layer}
  • + *
+ *

+ * + * @generated + */ +public class DatabusLocationImpl extends DatabusEntityImpl implements DatabusLocation { + /** + * The default value of the '{@link #getDcaeLayer() Dcae Layer}' attribute. + * + * + * @see #getDcaeLayer() + * @generated + * @ordered + */ + protected static final String DCAE_LAYER_EDEFAULT = null; + /** + * The cached value of the '{@link #getDcaeLayer() Dcae Layer}' attribute. + * + * + * @see #getDcaeLayer() + * @generated + * @ordered + */ + protected String dcaeLayer = DCAE_LAYER_EDEFAULT; + + /** + * + * + * @generated + */ + protected DatabusLocationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DATABUS_LOCATION; + } + + /** + * + * + * @generated + */ + public String getDcaeLayer() { + return dcaeLayer; + } + + /** + * + * + * @generated + */ + public void setDcaeLayer(String newDcaeLayer) { + String oldDcaeLayer = dcaeLayer; + dcaeLayer = newDcaeLayer; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_LOCATION__DCAE_LAYER, oldDcaeLayer, dcaeLayer)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DATABUS_LOCATION__DCAE_LAYER: + return getDcaeLayer(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DATABUS_LOCATION__DCAE_LAYER: + setDcaeLayer((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_LOCATION__DCAE_LAYER: + setDcaeLayer(DCAE_LAYER_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_LOCATION__DCAE_LAYER: + return DCAE_LAYER_EDEFAULT == null ? dcaeLayer != null : !DCAE_LAYER_EDEFAULT.equals(dcaeLayer); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (dcaeLayer: "); + result.append(dcaeLayer); + result.append(')'); + return result.toString(); + } + +} //DatabusLocationImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusMessageRouterClusterImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusMessageRouterClusterImpl.java new file mode 100644 index 0000000..958e545 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusMessageRouterClusterImpl.java @@ -0,0 +1,375 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster; +import org.openecomp.dcae.controller.core.stream.StreamPackage; +import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EDataTypeEList; + +/** + * + * An implementation of the model object 'Databus Message Router Cluster'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusMessageRouterClusterImpl#getDcaeLocationName Dcae Location Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusMessageRouterClusterImpl#getServiceFqdn Service Fqdn}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusMessageRouterClusterImpl#getHostFqdn Host Fqdn}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusMessageRouterClusterImpl#getTopicPort Topic Port}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusMessageRouterClusterImpl#getTopicProtocol Topic Protocol}
  • + *
+ *

+ * + * @generated + */ +public class DatabusMessageRouterClusterImpl extends DatabusEntityImpl implements DatabusMessageRouterCluster { + /** + * The default value of the '{@link #getDcaeLocationName() Dcae Location Name}' attribute. + * + * + * @see #getDcaeLocationName() + * @generated + * @ordered + */ + protected static final String DCAE_LOCATION_NAME_EDEFAULT = null; + /** + * The cached value of the '{@link #getDcaeLocationName() Dcae Location Name}' attribute. + * + * + * @see #getDcaeLocationName() + * @generated + * @ordered + */ + protected String dcaeLocationName = DCAE_LOCATION_NAME_EDEFAULT; + /** + * The default value of the '{@link #getServiceFqdn() Service Fqdn}' attribute. + * + * + * @see #getServiceFqdn() + * @generated + * @ordered + */ + protected static final String SERVICE_FQDN_EDEFAULT = null; + /** + * The cached value of the '{@link #getServiceFqdn() Service Fqdn}' attribute. + * + * + * @see #getServiceFqdn() + * @generated + * @ordered + */ + protected String serviceFqdn = SERVICE_FQDN_EDEFAULT; + /** + * The cached value of the '{@link #getHostFqdn() Host Fqdn}' attribute list. + * + * + * @see #getHostFqdn() + * @generated + * @ordered + */ + protected EList hostFqdn; + + /** + * The default value of the '{@link #getTopicPort() Topic Port}' attribute. + * + * + * @see #getTopicPort() + * @generated + * @ordered + */ + protected static final String TOPIC_PORT_EDEFAULT = null; + /** + * The cached value of the '{@link #getTopicPort() Topic Port}' attribute. + * + * + * @see #getTopicPort() + * @generated + * @ordered + */ + protected String topicPort = TOPIC_PORT_EDEFAULT; + /** + * The default value of the '{@link #getTopicProtocol() Topic Protocol}' attribute. + * + * + * @see #getTopicProtocol() + * @generated + * @ordered + */ + protected static final String TOPIC_PROTOCOL_EDEFAULT = null; + /** + * The cached value of the '{@link #getTopicProtocol() Topic Protocol}' attribute. + * + * + * @see #getTopicProtocol() + * @generated + * @ordered + */ + protected String topicProtocol = TOPIC_PROTOCOL_EDEFAULT; + + /** + * + * + * @generated + */ + protected DatabusMessageRouterClusterImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DATABUS_MESSAGE_ROUTER_CLUSTER; + } + + /** + * + * + * @generated + */ + public String getDcaeLocationName() { + return dcaeLocationName; + } + + /** + * + * + * @generated + */ + public void setDcaeLocationName(String newDcaeLocationName) { + String oldDcaeLocationName = dcaeLocationName; + dcaeLocationName = newDcaeLocationName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__DCAE_LOCATION_NAME, oldDcaeLocationName, dcaeLocationName)); + } + + /** + * + * + * @generated + */ + public String getServiceFqdn() { + return serviceFqdn; + } + + /** + * + * + * @generated + */ + public void setServiceFqdn(String newServiceFqdn) { + String oldServiceFqdn = serviceFqdn; + serviceFqdn = newServiceFqdn; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__SERVICE_FQDN, oldServiceFqdn, serviceFqdn)); + } + + /** + * + * + * @generated + */ + public EList getHostFqdn() { + if (hostFqdn == null) { + hostFqdn = new EDataTypeEList(String.class, this, StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__HOST_FQDN); + } + return hostFqdn; + } + + /** + * + * + * @generated + */ + public String getTopicPort() { + return topicPort; + } + + /** + * + * + * @generated + */ + public void setTopicPort(String newTopicPort) { + String oldTopicPort = topicPort; + topicPort = newTopicPort; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__TOPIC_PORT, oldTopicPort, topicPort)); + } + + /** + * + * + * @generated + */ + public String getTopicProtocol() { + return topicProtocol; + } + + /** + * + * + * @generated + */ + public void setTopicProtocol(String newTopicProtocol) { + String oldTopicProtocol = topicProtocol; + topicProtocol = newTopicProtocol; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__TOPIC_PROTOCOL, oldTopicProtocol, topicProtocol)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__DCAE_LOCATION_NAME: + return getDcaeLocationName(); + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__SERVICE_FQDN: + return getServiceFqdn(); + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__HOST_FQDN: + return getHostFqdn(); + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__TOPIC_PORT: + return getTopicPort(); + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__TOPIC_PROTOCOL: + return getTopicProtocol(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__DCAE_LOCATION_NAME: + setDcaeLocationName((String)newValue); + return; + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__SERVICE_FQDN: + setServiceFqdn((String)newValue); + return; + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__HOST_FQDN: + getHostFqdn().clear(); + getHostFqdn().addAll((Collection)newValue); + return; + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__TOPIC_PORT: + setTopicPort((String)newValue); + return; + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__TOPIC_PROTOCOL: + setTopicProtocol((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__DCAE_LOCATION_NAME: + setDcaeLocationName(DCAE_LOCATION_NAME_EDEFAULT); + return; + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__SERVICE_FQDN: + setServiceFqdn(SERVICE_FQDN_EDEFAULT); + return; + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__HOST_FQDN: + getHostFqdn().clear(); + return; + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__TOPIC_PORT: + setTopicPort(TOPIC_PORT_EDEFAULT); + return; + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__TOPIC_PROTOCOL: + setTopicProtocol(TOPIC_PROTOCOL_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__DCAE_LOCATION_NAME: + return DCAE_LOCATION_NAME_EDEFAULT == null ? dcaeLocationName != null : !DCAE_LOCATION_NAME_EDEFAULT.equals(dcaeLocationName); + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__SERVICE_FQDN: + return SERVICE_FQDN_EDEFAULT == null ? serviceFqdn != null : !SERVICE_FQDN_EDEFAULT.equals(serviceFqdn); + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__HOST_FQDN: + return hostFqdn != null && !hostFqdn.isEmpty(); + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__TOPIC_PORT: + return TOPIC_PORT_EDEFAULT == null ? topicPort != null : !TOPIC_PORT_EDEFAULT.equals(topicPort); + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER__TOPIC_PROTOCOL: + return TOPIC_PROTOCOL_EDEFAULT == null ? topicProtocol != null : !TOPIC_PROTOCOL_EDEFAULT.equals(topicProtocol); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (dcaeLocationName: "); + result.append(dcaeLocationName); + result.append(", serviceFqdn: "); + result.append(serviceFqdn); + result.append(", hostFqdn: "); + result.append(hostFqdn); + result.append(", topicPort: "); + result.append(topicPort); + result.append(", topicProtocol: "); + result.append(topicProtocol); + result.append(')'); + return result.toString(); + } + +} //DatabusMessageRouterClusterImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamFeedImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamFeedImpl.java new file mode 100644 index 0000000..7bc9a2d --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamFeedImpl.java @@ -0,0 +1,791 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DatabusStreamFeed; +import org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher; +import org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Databus Stream Feed'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl#getFeedName Feed Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl#getFeedVersion Feed Version}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl#getFeedDescription Feed Description}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl#getAsprClassification Aspr Classification}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl#getOwner Owner}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl#getFeedId Feed Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl#getLogURL Log URL}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl#getPublishURL Publish URL}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl#getSubscribeURL Subscribe URL}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl#getStatus Status}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl#getSuspended Suspended}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl#getPublishers Publishers}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedImpl#getSubscribers Subscribers}
  • + *
+ *

+ * + * @generated + */ +public class DatabusStreamFeedImpl extends DatabusStreamImpl implements DatabusStreamFeed { + /** + * The default value of the '{@link #getFeedName() Feed Name}' attribute. + * + * + * @see #getFeedName() + * @generated + * @ordered + */ + protected static final String FEED_NAME_EDEFAULT = null; + /** + * The cached value of the '{@link #getFeedName() Feed Name}' attribute. + * + * + * @see #getFeedName() + * @generated + * @ordered + */ + protected String feedName = FEED_NAME_EDEFAULT; + /** + * The default value of the '{@link #getFeedVersion() Feed Version}' attribute. + * + * + * @see #getFeedVersion() + * @generated + * @ordered + */ + protected static final String FEED_VERSION_EDEFAULT = null; + /** + * The cached value of the '{@link #getFeedVersion() Feed Version}' attribute. + * + * + * @see #getFeedVersion() + * @generated + * @ordered + */ + protected String feedVersion = FEED_VERSION_EDEFAULT; + /** + * The default value of the '{@link #getFeedDescription() Feed Description}' attribute. + * + * + * @see #getFeedDescription() + * @generated + * @ordered + */ + protected static final String FEED_DESCRIPTION_EDEFAULT = null; + /** + * The cached value of the '{@link #getFeedDescription() Feed Description}' attribute. + * + * + * @see #getFeedDescription() + * @generated + * @ordered + */ + protected String feedDescription = FEED_DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #getAsprClassification() Aspr Classification}' attribute. + * + * + * @see #getAsprClassification() + * @generated + * @ordered + */ + protected static final String ASPR_CLASSIFICATION_EDEFAULT = null; + /** + * The cached value of the '{@link #getAsprClassification() Aspr Classification}' attribute. + * + * + * @see #getAsprClassification() + * @generated + * @ordered + */ + protected String asprClassification = ASPR_CLASSIFICATION_EDEFAULT; + /** + * The default value of the '{@link #getOwner() Owner}' attribute. + * + * + * @see #getOwner() + * @generated + * @ordered + */ + protected static final String OWNER_EDEFAULT = null; + /** + * The cached value of the '{@link #getOwner() Owner}' attribute. + * + * + * @see #getOwner() + * @generated + * @ordered + */ + protected String owner = OWNER_EDEFAULT; + /** + * The default value of the '{@link #getFeedId() Feed Id}' attribute. + * + * + * @see #getFeedId() + * @generated + * @ordered + */ + protected static final String FEED_ID_EDEFAULT = null; + /** + * The cached value of the '{@link #getFeedId() Feed Id}' attribute. + * + * + * @see #getFeedId() + * @generated + * @ordered + */ + protected String feedId = FEED_ID_EDEFAULT; + /** + * The default value of the '{@link #getLogURL() Log URL}' attribute. + * + * + * @see #getLogURL() + * @generated + * @ordered + */ + protected static final String LOG_URL_EDEFAULT = null; + /** + * The cached value of the '{@link #getLogURL() Log URL}' attribute. + * + * + * @see #getLogURL() + * @generated + * @ordered + */ + protected String logURL = LOG_URL_EDEFAULT; + /** + * The default value of the '{@link #getPublishURL() Publish URL}' attribute. + * + * + * @see #getPublishURL() + * @generated + * @ordered + */ + protected static final String PUBLISH_URL_EDEFAULT = null; + /** + * The cached value of the '{@link #getPublishURL() Publish URL}' attribute. + * + * + * @see #getPublishURL() + * @generated + * @ordered + */ + protected String publishURL = PUBLISH_URL_EDEFAULT; + /** + * The default value of the '{@link #getSubscribeURL() Subscribe URL}' attribute. + * + * + * @see #getSubscribeURL() + * @generated + * @ordered + */ + protected static final String SUBSCRIBE_URL_EDEFAULT = null; + /** + * The cached value of the '{@link #getSubscribeURL() Subscribe URL}' attribute. + * + * + * @see #getSubscribeURL() + * @generated + * @ordered + */ + protected String subscribeURL = SUBSCRIBE_URL_EDEFAULT; + /** + * The default value of the '{@link #getStatus() Status}' attribute. + * + * + * @see #getStatus() + * @generated + * @ordered + */ + protected static final String STATUS_EDEFAULT = null; + /** + * The cached value of the '{@link #getStatus() Status}' attribute. + * + * + * @see #getStatus() + * @generated + * @ordered + */ + protected String status = STATUS_EDEFAULT; + /** + * The default value of the '{@link #getSuspended() Suspended}' attribute. + * + * + * @see #getSuspended() + * @generated + * @ordered + */ + protected static final String SUSPENDED_EDEFAULT = null; + /** + * The cached value of the '{@link #getSuspended() Suspended}' attribute. + * + * + * @see #getSuspended() + * @generated + * @ordered + */ + protected String suspended = SUSPENDED_EDEFAULT; + /** + * The cached value of the '{@link #getPublishers() Publishers}' containment reference list. + * + * + * @see #getPublishers() + * @generated + * @ordered + */ + protected EList publishers; + /** + * The cached value of the '{@link #getSubscribers() Subscribers}' containment reference list. + * + * + * @see #getSubscribers() + * @generated + * @ordered + */ + protected EList subscribers; + + /** + * + * + * @generated + */ + protected DatabusStreamFeedImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DATABUS_STREAM_FEED; + } + + /** + * + * + * @generated + */ + public String getFeedName() { + return feedName; + } + + /** + * + * + * @generated + */ + public void setFeedName(String newFeedName) { + String oldFeedName = feedName; + feedName = newFeedName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED__FEED_NAME, oldFeedName, feedName)); + } + + /** + * + * + * @generated + */ + public String getFeedVersion() { + return feedVersion; + } + + /** + * + * + * @generated + */ + public void setFeedVersion(String newFeedVersion) { + String oldFeedVersion = feedVersion; + feedVersion = newFeedVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED__FEED_VERSION, oldFeedVersion, feedVersion)); + } + + /** + * + * + * @generated + */ + public String getFeedDescription() { + return feedDescription; + } + + /** + * + * + * @generated + */ + public void setFeedDescription(String newFeedDescription) { + String oldFeedDescription = feedDescription; + feedDescription = newFeedDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED__FEED_DESCRIPTION, oldFeedDescription, feedDescription)); + } + + /** + * + * + * @generated + */ + public String getAsprClassification() { + return asprClassification; + } + + /** + * + * + * @generated + */ + public void setAsprClassification(String newAsprClassification) { + String oldAsprClassification = asprClassification; + asprClassification = newAsprClassification; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED__ASPR_CLASSIFICATION, oldAsprClassification, asprClassification)); + } + + /** + * + * + * @generated + */ + public String getOwner() { + return owner; + } + + /** + * + * + * @generated + */ + public void setOwner(String newOwner) { + String oldOwner = owner; + owner = newOwner; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED__OWNER, oldOwner, owner)); + } + + /** + * + * + * @generated + */ + public String getFeedId() { + return feedId; + } + + /** + * + * + * @generated + */ + public void setFeedId(String newFeedId) { + String oldFeedId = feedId; + feedId = newFeedId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED__FEED_ID, oldFeedId, feedId)); + } + + /** + * + * + * @generated + */ + public String getLogURL() { + return logURL; + } + + /** + * + * + * @generated + */ + public void setLogURL(String newLogURL) { + String oldLogURL = logURL; + logURL = newLogURL; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED__LOG_URL, oldLogURL, logURL)); + } + + /** + * + * + * @generated + */ + public String getPublishURL() { + return publishURL; + } + + /** + * + * + * @generated + */ + public void setPublishURL(String newPublishURL) { + String oldPublishURL = publishURL; + publishURL = newPublishURL; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED__PUBLISH_URL, oldPublishURL, publishURL)); + } + + /** + * + * + * @generated + */ + public String getSubscribeURL() { + return subscribeURL; + } + + /** + * + * + * @generated + */ + public void setSubscribeURL(String newSubscribeURL) { + String oldSubscribeURL = subscribeURL; + subscribeURL = newSubscribeURL; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED__SUBSCRIBE_URL, oldSubscribeURL, subscribeURL)); + } + + /** + * + * + * @generated + */ + public String getStatus() { + return status; + } + + /** + * + * + * @generated + */ + public void setStatus(String newStatus) { + String oldStatus = status; + status = newStatus; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED__STATUS, oldStatus, status)); + } + + /** + * + * + * @generated + */ + public String getSuspended() { + return suspended; + } + + /** + * + * + * @generated + */ + public void setSuspended(String newSuspended) { + String oldSuspended = suspended; + suspended = newSuspended; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED__SUSPENDED, oldSuspended, suspended)); + } + + /** + * + * + * @generated + */ + public EList getPublishers() { + if (publishers == null) { + publishers = new EObjectContainmentEList(DatabusStreamFeedPublisher.class, this, StreamPackage.DATABUS_STREAM_FEED__PUBLISHERS); + } + return publishers; + } + + /** + * + * + * @generated + */ + public EList getSubscribers() { + if (subscribers == null) { + subscribers = new EObjectContainmentEList(DatabusStreamFeedSubscriber.class, this, StreamPackage.DATABUS_STREAM_FEED__SUBSCRIBERS); + } + return subscribers; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_FEED__PUBLISHERS: + return ((InternalEList)getPublishers()).basicRemove(otherEnd, msgs); + case StreamPackage.DATABUS_STREAM_FEED__SUBSCRIBERS: + return ((InternalEList)getSubscribers()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_FEED__FEED_NAME: + return getFeedName(); + case StreamPackage.DATABUS_STREAM_FEED__FEED_VERSION: + return getFeedVersion(); + case StreamPackage.DATABUS_STREAM_FEED__FEED_DESCRIPTION: + return getFeedDescription(); + case StreamPackage.DATABUS_STREAM_FEED__ASPR_CLASSIFICATION: + return getAsprClassification(); + case StreamPackage.DATABUS_STREAM_FEED__OWNER: + return getOwner(); + case StreamPackage.DATABUS_STREAM_FEED__FEED_ID: + return getFeedId(); + case StreamPackage.DATABUS_STREAM_FEED__LOG_URL: + return getLogURL(); + case StreamPackage.DATABUS_STREAM_FEED__PUBLISH_URL: + return getPublishURL(); + case StreamPackage.DATABUS_STREAM_FEED__SUBSCRIBE_URL: + return getSubscribeURL(); + case StreamPackage.DATABUS_STREAM_FEED__STATUS: + return getStatus(); + case StreamPackage.DATABUS_STREAM_FEED__SUSPENDED: + return getSuspended(); + case StreamPackage.DATABUS_STREAM_FEED__PUBLISHERS: + return getPublishers(); + case StreamPackage.DATABUS_STREAM_FEED__SUBSCRIBERS: + return getSubscribers(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_FEED__FEED_NAME: + setFeedName((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED__FEED_VERSION: + setFeedVersion((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED__FEED_DESCRIPTION: + setFeedDescription((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED__ASPR_CLASSIFICATION: + setAsprClassification((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED__OWNER: + setOwner((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED__FEED_ID: + setFeedId((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED__LOG_URL: + setLogURL((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED__PUBLISH_URL: + setPublishURL((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED__SUBSCRIBE_URL: + setSubscribeURL((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED__STATUS: + setStatus((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED__SUSPENDED: + setSuspended((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED__PUBLISHERS: + getPublishers().clear(); + getPublishers().addAll((Collection)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED__SUBSCRIBERS: + getSubscribers().clear(); + getSubscribers().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_FEED__FEED_NAME: + setFeedName(FEED_NAME_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED__FEED_VERSION: + setFeedVersion(FEED_VERSION_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED__FEED_DESCRIPTION: + setFeedDescription(FEED_DESCRIPTION_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED__ASPR_CLASSIFICATION: + setAsprClassification(ASPR_CLASSIFICATION_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED__OWNER: + setOwner(OWNER_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED__FEED_ID: + setFeedId(FEED_ID_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED__LOG_URL: + setLogURL(LOG_URL_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED__PUBLISH_URL: + setPublishURL(PUBLISH_URL_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED__SUBSCRIBE_URL: + setSubscribeURL(SUBSCRIBE_URL_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED__STATUS: + setStatus(STATUS_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED__SUSPENDED: + setSuspended(SUSPENDED_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED__PUBLISHERS: + getPublishers().clear(); + return; + case StreamPackage.DATABUS_STREAM_FEED__SUBSCRIBERS: + getSubscribers().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_FEED__FEED_NAME: + return FEED_NAME_EDEFAULT == null ? feedName != null : !FEED_NAME_EDEFAULT.equals(feedName); + case StreamPackage.DATABUS_STREAM_FEED__FEED_VERSION: + return FEED_VERSION_EDEFAULT == null ? feedVersion != null : !FEED_VERSION_EDEFAULT.equals(feedVersion); + case StreamPackage.DATABUS_STREAM_FEED__FEED_DESCRIPTION: + return FEED_DESCRIPTION_EDEFAULT == null ? feedDescription != null : !FEED_DESCRIPTION_EDEFAULT.equals(feedDescription); + case StreamPackage.DATABUS_STREAM_FEED__ASPR_CLASSIFICATION: + return ASPR_CLASSIFICATION_EDEFAULT == null ? asprClassification != null : !ASPR_CLASSIFICATION_EDEFAULT.equals(asprClassification); + case StreamPackage.DATABUS_STREAM_FEED__OWNER: + return OWNER_EDEFAULT == null ? owner != null : !OWNER_EDEFAULT.equals(owner); + case StreamPackage.DATABUS_STREAM_FEED__FEED_ID: + return FEED_ID_EDEFAULT == null ? feedId != null : !FEED_ID_EDEFAULT.equals(feedId); + case StreamPackage.DATABUS_STREAM_FEED__LOG_URL: + return LOG_URL_EDEFAULT == null ? logURL != null : !LOG_URL_EDEFAULT.equals(logURL); + case StreamPackage.DATABUS_STREAM_FEED__PUBLISH_URL: + return PUBLISH_URL_EDEFAULT == null ? publishURL != null : !PUBLISH_URL_EDEFAULT.equals(publishURL); + case StreamPackage.DATABUS_STREAM_FEED__SUBSCRIBE_URL: + return SUBSCRIBE_URL_EDEFAULT == null ? subscribeURL != null : !SUBSCRIBE_URL_EDEFAULT.equals(subscribeURL); + case StreamPackage.DATABUS_STREAM_FEED__STATUS: + return STATUS_EDEFAULT == null ? status != null : !STATUS_EDEFAULT.equals(status); + case StreamPackage.DATABUS_STREAM_FEED__SUSPENDED: + return SUSPENDED_EDEFAULT == null ? suspended != null : !SUSPENDED_EDEFAULT.equals(suspended); + case StreamPackage.DATABUS_STREAM_FEED__PUBLISHERS: + return publishers != null && !publishers.isEmpty(); + case StreamPackage.DATABUS_STREAM_FEED__SUBSCRIBERS: + return subscribers != null && !subscribers.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (feedName: "); + result.append(feedName); + result.append(", feedVersion: "); + result.append(feedVersion); + result.append(", feedDescription: "); + result.append(feedDescription); + result.append(", asprClassification: "); + result.append(asprClassification); + result.append(", owner: "); + result.append(owner); + result.append(", feedId: "); + result.append(feedId); + result.append(", logURL: "); + result.append(logURL); + result.append(", publishURL: "); + result.append(publishURL); + result.append(", subscribeURL: "); + result.append(subscribeURL); + result.append(", status: "); + result.append(status); + result.append(", suspended: "); + result.append(suspended); + result.append(')'); + return result.toString(); + } + +} //DatabusStreamFeedImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamFeedPublisherImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamFeedPublisherImpl.java new file mode 100644 index 0000000..bf33b26 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamFeedPublisherImpl.java @@ -0,0 +1,505 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher; +import org.openecomp.dcae.controller.core.stream.StreamPackage; +import org.openecomp.ncomp.core.impl.NamedEntityImpl; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Databus Stream Feed Publisher'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedPublisherImpl#getLocalStreamId Local Stream Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedPublisherImpl#getDcaeLocationName Dcae Location Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedPublisherImpl#getFeedId Feed Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedPublisherImpl#getPubId Pub Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedPublisherImpl#getStatus Status}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedPublisherImpl#getUsername Username}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedPublisherImpl#getUserpwd Userpwd}
  • + *
+ *

+ * + * @generated + */ +public class DatabusStreamFeedPublisherImpl extends NamedEntityImpl implements DatabusStreamFeedPublisher { + /** + * The default value of the '{@link #getLocalStreamId() Local Stream Id}' attribute. + * + * + * @see #getLocalStreamId() + * @generated + * @ordered + */ + protected static final String LOCAL_STREAM_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLocalStreamId() Local Stream Id}' attribute. + * + * + * @see #getLocalStreamId() + * @generated + * @ordered + */ + protected String localStreamId = LOCAL_STREAM_ID_EDEFAULT; + + /** + * The default value of the '{@link #getDcaeLocationName() Dcae Location Name}' attribute. + * + * + * @see #getDcaeLocationName() + * @generated + * @ordered + */ + protected static final String DCAE_LOCATION_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDcaeLocationName() Dcae Location Name}' attribute. + * + * + * @see #getDcaeLocationName() + * @generated + * @ordered + */ + protected String dcaeLocationName = DCAE_LOCATION_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getFeedId() Feed Id}' attribute. + * + * + * @see #getFeedId() + * @generated + * @ordered + */ + protected static final String FEED_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFeedId() Feed Id}' attribute. + * + * + * @see #getFeedId() + * @generated + * @ordered + */ + protected String feedId = FEED_ID_EDEFAULT; + + /** + * The default value of the '{@link #getPubId() Pub Id}' attribute. + * + * + * @see #getPubId() + * @generated + * @ordered + */ + protected static final String PUB_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPubId() Pub Id}' attribute. + * + * + * @see #getPubId() + * @generated + * @ordered + */ + protected String pubId = PUB_ID_EDEFAULT; + + /** + * The default value of the '{@link #getStatus() Status}' attribute. + * + * + * @see #getStatus() + * @generated + * @ordered + */ + protected static final String STATUS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getStatus() Status}' attribute. + * + * + * @see #getStatus() + * @generated + * @ordered + */ + protected String status = STATUS_EDEFAULT; + + /** + * The default value of the '{@link #getUsername() Username}' attribute. + * + * + * @see #getUsername() + * @generated + * @ordered + */ + protected static final String USERNAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUsername() Username}' attribute. + * + * + * @see #getUsername() + * @generated + * @ordered + */ + protected String username = USERNAME_EDEFAULT; + + /** + * The default value of the '{@link #getUserpwd() Userpwd}' attribute. + * + * + * @see #getUserpwd() + * @generated + * @ordered + */ + protected static final String USERPWD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUserpwd() Userpwd}' attribute. + * + * + * @see #getUserpwd() + * @generated + * @ordered + */ + protected String userpwd = USERPWD_EDEFAULT; + + /** + * + * + * @generated + */ + protected DatabusStreamFeedPublisherImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DATABUS_STREAM_FEED_PUBLISHER; + } + + /** + * + * + * @generated + */ + public String getLocalStreamId() { + return localStreamId; + } + + /** + * + * + * @generated + */ + public void setLocalStreamId(String newLocalStreamId) { + String oldLocalStreamId = localStreamId; + localStreamId = newLocalStreamId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__LOCAL_STREAM_ID, oldLocalStreamId, localStreamId)); + } + + /** + * + * + * @generated + */ + public String getDcaeLocationName() { + return dcaeLocationName; + } + + /** + * + * + * @generated + */ + public void setDcaeLocationName(String newDcaeLocationName) { + String oldDcaeLocationName = dcaeLocationName; + dcaeLocationName = newDcaeLocationName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__DCAE_LOCATION_NAME, oldDcaeLocationName, dcaeLocationName)); + } + + /** + * + * + * @generated + */ + public String getFeedId() { + return feedId; + } + + /** + * + * + * @generated + */ + public void setFeedId(String newFeedId) { + String oldFeedId = feedId; + feedId = newFeedId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__FEED_ID, oldFeedId, feedId)); + } + + /** + * + * + * @generated + */ + public String getPubId() { + return pubId; + } + + /** + * + * + * @generated + */ + public void setPubId(String newPubId) { + String oldPubId = pubId; + pubId = newPubId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__PUB_ID, oldPubId, pubId)); + } + + /** + * + * + * @generated + */ + public String getStatus() { + return status; + } + + /** + * + * + * @generated + */ + public void setStatus(String newStatus) { + String oldStatus = status; + status = newStatus; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__STATUS, oldStatus, status)); + } + + /** + * + * + * @generated + */ + public String getUsername() { + return username; + } + + /** + * + * + * @generated + */ + public void setUsername(String newUsername) { + String oldUsername = username; + username = newUsername; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__USERNAME, oldUsername, username)); + } + + /** + * + * + * @generated + */ + public String getUserpwd() { + return userpwd; + } + + /** + * + * + * @generated + */ + public void setUserpwd(String newUserpwd) { + String oldUserpwd = userpwd; + userpwd = newUserpwd; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__USERPWD, oldUserpwd, userpwd)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__LOCAL_STREAM_ID: + return getLocalStreamId(); + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__DCAE_LOCATION_NAME: + return getDcaeLocationName(); + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__FEED_ID: + return getFeedId(); + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__PUB_ID: + return getPubId(); + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__STATUS: + return getStatus(); + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__USERNAME: + return getUsername(); + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__USERPWD: + return getUserpwd(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__LOCAL_STREAM_ID: + setLocalStreamId((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__DCAE_LOCATION_NAME: + setDcaeLocationName((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__FEED_ID: + setFeedId((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__PUB_ID: + setPubId((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__STATUS: + setStatus((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__USERNAME: + setUsername((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__USERPWD: + setUserpwd((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__LOCAL_STREAM_ID: + setLocalStreamId(LOCAL_STREAM_ID_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__DCAE_LOCATION_NAME: + setDcaeLocationName(DCAE_LOCATION_NAME_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__FEED_ID: + setFeedId(FEED_ID_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__PUB_ID: + setPubId(PUB_ID_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__STATUS: + setStatus(STATUS_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__USERNAME: + setUsername(USERNAME_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__USERPWD: + setUserpwd(USERPWD_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__LOCAL_STREAM_ID: + return LOCAL_STREAM_ID_EDEFAULT == null ? localStreamId != null : !LOCAL_STREAM_ID_EDEFAULT.equals(localStreamId); + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__DCAE_LOCATION_NAME: + return DCAE_LOCATION_NAME_EDEFAULT == null ? dcaeLocationName != null : !DCAE_LOCATION_NAME_EDEFAULT.equals(dcaeLocationName); + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__FEED_ID: + return FEED_ID_EDEFAULT == null ? feedId != null : !FEED_ID_EDEFAULT.equals(feedId); + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__PUB_ID: + return PUB_ID_EDEFAULT == null ? pubId != null : !PUB_ID_EDEFAULT.equals(pubId); + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__STATUS: + return STATUS_EDEFAULT == null ? status != null : !STATUS_EDEFAULT.equals(status); + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__USERNAME: + return USERNAME_EDEFAULT == null ? username != null : !USERNAME_EDEFAULT.equals(username); + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER__USERPWD: + return USERPWD_EDEFAULT == null ? userpwd != null : !USERPWD_EDEFAULT.equals(userpwd); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (localStreamId: "); + result.append(localStreamId); + result.append(", dcaeLocationName: "); + result.append(dcaeLocationName); + result.append(", feedId: "); + result.append(feedId); + result.append(", pubId: "); + result.append(pubId); + result.append(", status: "); + result.append(status); + result.append(", username: "); + result.append(username); + result.append(", userpwd: "); + result.append(userpwd); + result.append(')'); + return result.toString(); + } + +} //DatabusStreamFeedPublisherImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamFeedSubscriberImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamFeedSubscriberImpl.java new file mode 100644 index 0000000..ea2427b --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamFeedSubscriberImpl.java @@ -0,0 +1,775 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber; +import org.openecomp.dcae.controller.core.stream.StreamPackage; +import org.openecomp.ncomp.core.impl.NamedEntityImpl; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Databus Stream Feed Subscriber'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedSubscriberImpl#getLocalStreamId Local Stream Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedSubscriberImpl#getDcaeLocationName Dcae Location Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedSubscriberImpl#getOtherFeedName Other Feed Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedSubscriberImpl#getFeedId Feed Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedSubscriberImpl#getLogURL Log URL}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedSubscriberImpl#getOwner Owner}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedSubscriberImpl#getSubId Sub Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedSubscriberImpl#isSuspended Suspended}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedSubscriberImpl#isUse100 Use100}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedSubscriberImpl#getUsername Username}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedSubscriberImpl#getUserpwd Userpwd}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamFeedSubscriberImpl#getDeliveryURL Delivery URL}
  • + *
+ *

+ * + * @generated + */ +public class DatabusStreamFeedSubscriberImpl extends NamedEntityImpl implements DatabusStreamFeedSubscriber { + /** + * The default value of the '{@link #getLocalStreamId() Local Stream Id}' attribute. + * + * + * @see #getLocalStreamId() + * @generated + * @ordered + */ + protected static final String LOCAL_STREAM_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLocalStreamId() Local Stream Id}' attribute. + * + * + * @see #getLocalStreamId() + * @generated + * @ordered + */ + protected String localStreamId = LOCAL_STREAM_ID_EDEFAULT; + + /** + * The default value of the '{@link #getDcaeLocationName() Dcae Location Name}' attribute. + * + * + * @see #getDcaeLocationName() + * @generated + * @ordered + */ + protected static final String DCAE_LOCATION_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDcaeLocationName() Dcae Location Name}' attribute. + * + * + * @see #getDcaeLocationName() + * @generated + * @ordered + */ + protected String dcaeLocationName = DCAE_LOCATION_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getOtherFeedName() Other Feed Name}' attribute. + * + * + * @see #getOtherFeedName() + * @generated + * @ordered + */ + protected static final String OTHER_FEED_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getOtherFeedName() Other Feed Name}' attribute. + * + * + * @see #getOtherFeedName() + * @generated + * @ordered + */ + protected String otherFeedName = OTHER_FEED_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getFeedId() Feed Id}' attribute. + * + * + * @see #getFeedId() + * @generated + * @ordered + */ + protected static final String FEED_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFeedId() Feed Id}' attribute. + * + * + * @see #getFeedId() + * @generated + * @ordered + */ + protected String feedId = FEED_ID_EDEFAULT; + + /** + * The default value of the '{@link #getLogURL() Log URL}' attribute. + * + * + * @see #getLogURL() + * @generated + * @ordered + */ + protected static final String LOG_URL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLogURL() Log URL}' attribute. + * + * + * @see #getLogURL() + * @generated + * @ordered + */ + protected String logURL = LOG_URL_EDEFAULT; + + /** + * The default value of the '{@link #getOwner() Owner}' attribute. + * + * + * @see #getOwner() + * @generated + * @ordered + */ + protected static final String OWNER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getOwner() Owner}' attribute. + * + * + * @see #getOwner() + * @generated + * @ordered + */ + protected String owner = OWNER_EDEFAULT; + + /** + * The default value of the '{@link #getSubId() Sub Id}' attribute. + * + * + * @see #getSubId() + * @generated + * @ordered + */ + protected static final String SUB_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSubId() Sub Id}' attribute. + * + * + * @see #getSubId() + * @generated + * @ordered + */ + protected String subId = SUB_ID_EDEFAULT; + + /** + * The default value of the '{@link #isSuspended() Suspended}' attribute. + * + * + * @see #isSuspended() + * @generated + * @ordered + */ + protected static final boolean SUSPENDED_EDEFAULT = false; + + /** + * The cached value of the '{@link #isSuspended() Suspended}' attribute. + * + * + * @see #isSuspended() + * @generated + * @ordered + */ + protected boolean suspended = SUSPENDED_EDEFAULT; + + /** + * The default value of the '{@link #isUse100() Use100}' attribute. + * + * + * @see #isUse100() + * @generated + * @ordered + */ + protected static final boolean USE100_EDEFAULT = false; + + /** + * The cached value of the '{@link #isUse100() Use100}' attribute. + * + * + * @see #isUse100() + * @generated + * @ordered + */ + protected boolean use100 = USE100_EDEFAULT; + + /** + * The default value of the '{@link #getUsername() Username}' attribute. + * + * + * @see #getUsername() + * @generated + * @ordered + */ + protected static final String USERNAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUsername() Username}' attribute. + * + * + * @see #getUsername() + * @generated + * @ordered + */ + protected String username = USERNAME_EDEFAULT; + + /** + * The default value of the '{@link #getUserpwd() Userpwd}' attribute. + * + * + * @see #getUserpwd() + * @generated + * @ordered + */ + protected static final String USERPWD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUserpwd() Userpwd}' attribute. + * + * + * @see #getUserpwd() + * @generated + * @ordered + */ + protected String userpwd = USERPWD_EDEFAULT; + + /** + * The default value of the '{@link #getDeliveryURL() Delivery URL}' attribute. + * + * + * @see #getDeliveryURL() + * @generated + * @ordered + */ + protected static final String DELIVERY_URL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDeliveryURL() Delivery URL}' attribute. + * + * + * @see #getDeliveryURL() + * @generated + * @ordered + */ + protected String deliveryURL = DELIVERY_URL_EDEFAULT; + + /** + * + * + * @generated + */ + protected DatabusStreamFeedSubscriberImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DATABUS_STREAM_FEED_SUBSCRIBER; + } + + /** + * + * + * @generated + */ + public String getLocalStreamId() { + return localStreamId; + } + + /** + * + * + * @generated + */ + public void setLocalStreamId(String newLocalStreamId) { + String oldLocalStreamId = localStreamId; + localStreamId = newLocalStreamId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__LOCAL_STREAM_ID, oldLocalStreamId, localStreamId)); + } + + /** + * + * + * @generated + */ + public String getDcaeLocationName() { + return dcaeLocationName; + } + + /** + * + * + * @generated + */ + public void setDcaeLocationName(String newDcaeLocationName) { + String oldDcaeLocationName = dcaeLocationName; + dcaeLocationName = newDcaeLocationName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__DCAE_LOCATION_NAME, oldDcaeLocationName, dcaeLocationName)); + } + + /** + * + * + * @generated + */ + public String getOtherFeedName() { + return otherFeedName; + } + + /** + * + * + * @generated + */ + public void setOtherFeedName(String newOtherFeedName) { + String oldOtherFeedName = otherFeedName; + otherFeedName = newOtherFeedName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__OTHER_FEED_NAME, oldOtherFeedName, otherFeedName)); + } + + /** + * + * + * @generated + */ + public String getFeedId() { + return feedId; + } + + /** + * + * + * @generated + */ + public void setFeedId(String newFeedId) { + String oldFeedId = feedId; + feedId = newFeedId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__FEED_ID, oldFeedId, feedId)); + } + + /** + * + * + * @generated + */ + public String getLogURL() { + return logURL; + } + + /** + * + * + * @generated + */ + public void setLogURL(String newLogURL) { + String oldLogURL = logURL; + logURL = newLogURL; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__LOG_URL, oldLogURL, logURL)); + } + + /** + * + * + * @generated + */ + public String getOwner() { + return owner; + } + + /** + * + * + * @generated + */ + public void setOwner(String newOwner) { + String oldOwner = owner; + owner = newOwner; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__OWNER, oldOwner, owner)); + } + + /** + * + * + * @generated + */ + public String getSubId() { + return subId; + } + + /** + * + * + * @generated + */ + public void setSubId(String newSubId) { + String oldSubId = subId; + subId = newSubId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__SUB_ID, oldSubId, subId)); + } + + /** + * + * + * @generated + */ + public boolean isSuspended() { + return suspended; + } + + /** + * + * + * @generated + */ + public void setSuspended(boolean newSuspended) { + boolean oldSuspended = suspended; + suspended = newSuspended; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__SUSPENDED, oldSuspended, suspended)); + } + + /** + * + * + * @generated + */ + public boolean isUse100() { + return use100; + } + + /** + * + * + * @generated + */ + public void setUse100(boolean newUse100) { + boolean oldUse100 = use100; + use100 = newUse100; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__USE100, oldUse100, use100)); + } + + /** + * + * + * @generated + */ + public String getUsername() { + return username; + } + + /** + * + * + * @generated + */ + public void setUsername(String newUsername) { + String oldUsername = username; + username = newUsername; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__USERNAME, oldUsername, username)); + } + + /** + * + * + * @generated + */ + public String getUserpwd() { + return userpwd; + } + + /** + * + * + * @generated + */ + public void setUserpwd(String newUserpwd) { + String oldUserpwd = userpwd; + userpwd = newUserpwd; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__USERPWD, oldUserpwd, userpwd)); + } + + /** + * + * + * @generated + */ + public String getDeliveryURL() { + return deliveryURL; + } + + /** + * + * + * @generated + */ + public void setDeliveryURL(String newDeliveryURL) { + String oldDeliveryURL = deliveryURL; + deliveryURL = newDeliveryURL; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__DELIVERY_URL, oldDeliveryURL, deliveryURL)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__LOCAL_STREAM_ID: + return getLocalStreamId(); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__DCAE_LOCATION_NAME: + return getDcaeLocationName(); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__OTHER_FEED_NAME: + return getOtherFeedName(); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__FEED_ID: + return getFeedId(); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__LOG_URL: + return getLogURL(); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__OWNER: + return getOwner(); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__SUB_ID: + return getSubId(); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__SUSPENDED: + return isSuspended(); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__USE100: + return isUse100(); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__USERNAME: + return getUsername(); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__USERPWD: + return getUserpwd(); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__DELIVERY_URL: + return getDeliveryURL(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__LOCAL_STREAM_ID: + setLocalStreamId((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__DCAE_LOCATION_NAME: + setDcaeLocationName((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__OTHER_FEED_NAME: + setOtherFeedName((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__FEED_ID: + setFeedId((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__LOG_URL: + setLogURL((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__OWNER: + setOwner((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__SUB_ID: + setSubId((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__SUSPENDED: + setSuspended((Boolean)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__USE100: + setUse100((Boolean)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__USERNAME: + setUsername((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__USERPWD: + setUserpwd((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__DELIVERY_URL: + setDeliveryURL((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__LOCAL_STREAM_ID: + setLocalStreamId(LOCAL_STREAM_ID_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__DCAE_LOCATION_NAME: + setDcaeLocationName(DCAE_LOCATION_NAME_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__OTHER_FEED_NAME: + setOtherFeedName(OTHER_FEED_NAME_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__FEED_ID: + setFeedId(FEED_ID_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__LOG_URL: + setLogURL(LOG_URL_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__OWNER: + setOwner(OWNER_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__SUB_ID: + setSubId(SUB_ID_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__SUSPENDED: + setSuspended(SUSPENDED_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__USE100: + setUse100(USE100_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__USERNAME: + setUsername(USERNAME_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__USERPWD: + setUserpwd(USERPWD_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__DELIVERY_URL: + setDeliveryURL(DELIVERY_URL_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__LOCAL_STREAM_ID: + return LOCAL_STREAM_ID_EDEFAULT == null ? localStreamId != null : !LOCAL_STREAM_ID_EDEFAULT.equals(localStreamId); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__DCAE_LOCATION_NAME: + return DCAE_LOCATION_NAME_EDEFAULT == null ? dcaeLocationName != null : !DCAE_LOCATION_NAME_EDEFAULT.equals(dcaeLocationName); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__OTHER_FEED_NAME: + return OTHER_FEED_NAME_EDEFAULT == null ? otherFeedName != null : !OTHER_FEED_NAME_EDEFAULT.equals(otherFeedName); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__FEED_ID: + return FEED_ID_EDEFAULT == null ? feedId != null : !FEED_ID_EDEFAULT.equals(feedId); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__LOG_URL: + return LOG_URL_EDEFAULT == null ? logURL != null : !LOG_URL_EDEFAULT.equals(logURL); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__OWNER: + return OWNER_EDEFAULT == null ? owner != null : !OWNER_EDEFAULT.equals(owner); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__SUB_ID: + return SUB_ID_EDEFAULT == null ? subId != null : !SUB_ID_EDEFAULT.equals(subId); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__SUSPENDED: + return suspended != SUSPENDED_EDEFAULT; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__USE100: + return use100 != USE100_EDEFAULT; + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__USERNAME: + return USERNAME_EDEFAULT == null ? username != null : !USERNAME_EDEFAULT.equals(username); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__USERPWD: + return USERPWD_EDEFAULT == null ? userpwd != null : !USERPWD_EDEFAULT.equals(userpwd); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER__DELIVERY_URL: + return DELIVERY_URL_EDEFAULT == null ? deliveryURL != null : !DELIVERY_URL_EDEFAULT.equals(deliveryURL); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (localStreamId: "); + result.append(localStreamId); + result.append(", dcaeLocationName: "); + result.append(dcaeLocationName); + result.append(", otherFeedName: "); + result.append(otherFeedName); + result.append(", feedId: "); + result.append(feedId); + result.append(", logURL: "); + result.append(logURL); + result.append(", owner: "); + result.append(owner); + result.append(", subId: "); + result.append(subId); + result.append(", suspended: "); + result.append(suspended); + result.append(", use100: "); + result.append(use100); + result.append(", username: "); + result.append(username); + result.append(", userpwd: "); + result.append(userpwd); + result.append(", deliveryURL: "); + result.append(deliveryURL); + result.append(')'); + return result.toString(); + } + +} //DatabusStreamFeedSubscriberImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamImpl.java new file mode 100644 index 0000000..40a142a --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DatabusStream; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Databus Stream'. + * + *

+ *

+ * + * @generated + */ +public abstract class DatabusStreamImpl extends NamedEntityImpl implements DatabusStream { + /** + * + * + * @generated + */ + protected DatabusStreamImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DATABUS_STREAM; + } + +} //DatabusStreamImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamTopicClientImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamTopicClientImpl.java new file mode 100644 index 0000000..b412b3e --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamTopicClientImpl.java @@ -0,0 +1,605 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DatabusStreamTopicAction; +import org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EDataTypeEList; + +/** + * + * An implementation of the model object 'Databus Stream Topic Client'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicClientImpl#getLocalStreamId Local Stream Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicClientImpl#getDcaeLocationName Dcae Location Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicClientImpl#getClientRole Client Role}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicClientImpl#getAction Action}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicClientImpl#getUsername Username}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicClientImpl#getUserpwd Userpwd}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicClientImpl#getFqtn Fqtn}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicClientImpl#getMrClientId Mr Client Id}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicClientImpl#getTopicURL Topic URL}
  • + *
+ *

+ * + * @generated + */ +public class DatabusStreamTopicClientImpl extends DatabusStreamImpl implements DatabusStreamTopicClient { + /** + * The default value of the '{@link #getLocalStreamId() Local Stream Id}' attribute. + * + * + * @see #getLocalStreamId() + * @generated + * @ordered + */ + protected static final String LOCAL_STREAM_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLocalStreamId() Local Stream Id}' attribute. + * + * + * @see #getLocalStreamId() + * @generated + * @ordered + */ + protected String localStreamId = LOCAL_STREAM_ID_EDEFAULT; + + /** + * The default value of the '{@link #getDcaeLocationName() Dcae Location Name}' attribute. + * + * + * @see #getDcaeLocationName() + * @generated + * @ordered + */ + protected static final String DCAE_LOCATION_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDcaeLocationName() Dcae Location Name}' attribute. + * + * + * @see #getDcaeLocationName() + * @generated + * @ordered + */ + protected String dcaeLocationName = DCAE_LOCATION_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getClientRole() Client Role}' attribute. + * + * + * @see #getClientRole() + * @generated + * @ordered + */ + protected static final String CLIENT_ROLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getClientRole() Client Role}' attribute. + * + * + * @see #getClientRole() + * @generated + * @ordered + */ + protected String clientRole = CLIENT_ROLE_EDEFAULT; + + /** + * The cached value of the '{@link #getAction() Action}' attribute list. + * + * + * @see #getAction() + * @generated + * @ordered + */ + protected EList action; + + /** + * The default value of the '{@link #getUsername() Username}' attribute. + * + * + * @see #getUsername() + * @generated + * @ordered + */ + protected static final String USERNAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUsername() Username}' attribute. + * + * + * @see #getUsername() + * @generated + * @ordered + */ + protected String username = USERNAME_EDEFAULT; + + /** + * The default value of the '{@link #getUserpwd() Userpwd}' attribute. + * + * + * @see #getUserpwd() + * @generated + * @ordered + */ + protected static final String USERPWD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUserpwd() Userpwd}' attribute. + * + * + * @see #getUserpwd() + * @generated + * @ordered + */ + protected String userpwd = USERPWD_EDEFAULT; + + /** + * The default value of the '{@link #getFqtn() Fqtn}' attribute. + * + * + * @see #getFqtn() + * @generated + * @ordered + */ + protected static final String FQTN_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFqtn() Fqtn}' attribute. + * + * + * @see #getFqtn() + * @generated + * @ordered + */ + protected String fqtn = FQTN_EDEFAULT; + + /** + * The default value of the '{@link #getMrClientId() Mr Client Id}' attribute. + * + * + * @see #getMrClientId() + * @generated + * @ordered + */ + protected static final String MR_CLIENT_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMrClientId() Mr Client Id}' attribute. + * + * + * @see #getMrClientId() + * @generated + * @ordered + */ + protected String mrClientId = MR_CLIENT_ID_EDEFAULT; + + /** + * The default value of the '{@link #getTopicURL() Topic URL}' attribute. + * + * + * @see #getTopicURL() + * @generated + * @ordered + */ + protected static final String TOPIC_URL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTopicURL() Topic URL}' attribute. + * + * + * @see #getTopicURL() + * @generated + * @ordered + */ + protected String topicURL = TOPIC_URL_EDEFAULT; + + /** + * + * + * @generated + */ + protected DatabusStreamTopicClientImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DATABUS_STREAM_TOPIC_CLIENT; + } + + /** + * + * + * @generated + */ + public String getLocalStreamId() { + return localStreamId; + } + + /** + * + * + * @generated + */ + public void setLocalStreamId(String newLocalStreamId) { + String oldLocalStreamId = localStreamId; + localStreamId = newLocalStreamId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__LOCAL_STREAM_ID, oldLocalStreamId, localStreamId)); + } + + /** + * + * + * @generated + */ + public String getDcaeLocationName() { + return dcaeLocationName; + } + + /** + * + * + * @generated + */ + public void setDcaeLocationName(String newDcaeLocationName) { + String oldDcaeLocationName = dcaeLocationName; + dcaeLocationName = newDcaeLocationName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__DCAE_LOCATION_NAME, oldDcaeLocationName, dcaeLocationName)); + } + + /** + * + * + * @generated + */ + public String getClientRole() { + return clientRole; + } + + /** + * + * + * @generated + */ + public void setClientRole(String newClientRole) { + String oldClientRole = clientRole; + clientRole = newClientRole; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__CLIENT_ROLE, oldClientRole, clientRole)); + } + + /** + * + * + * @generated + */ + public EList getAction() { + if (action == null) { + action = new EDataTypeEList(DatabusStreamTopicAction.class, this, StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__ACTION); + } + return action; + } + + /** + * + * + * @generated + */ + public String getUsername() { + return username; + } + + /** + * + * + * @generated + */ + public void setUsername(String newUsername) { + String oldUsername = username; + username = newUsername; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__USERNAME, oldUsername, username)); + } + + /** + * + * + * @generated + */ + public String getUserpwd() { + return userpwd; + } + + /** + * + * + * @generated + */ + public void setUserpwd(String newUserpwd) { + String oldUserpwd = userpwd; + userpwd = newUserpwd; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__USERPWD, oldUserpwd, userpwd)); + } + + /** + * + * + * @generated + */ + public String getFqtn() { + return fqtn; + } + + /** + * + * + * @generated + */ + public void setFqtn(String newFqtn) { + String oldFqtn = fqtn; + fqtn = newFqtn; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__FQTN, oldFqtn, fqtn)); + } + + /** + * + * + * @generated + */ + public String getMrClientId() { + return mrClientId; + } + + /** + * + * + * @generated + */ + public void setMrClientId(String newMrClientId) { + String oldMrClientId = mrClientId; + mrClientId = newMrClientId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__MR_CLIENT_ID, oldMrClientId, mrClientId)); + } + + /** + * + * + * @generated + */ + public String getTopicURL() { + return topicURL; + } + + /** + * + * + * @generated + */ + public void setTopicURL(String newTopicURL) { + String oldTopicURL = topicURL; + topicURL = newTopicURL; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__TOPIC_URL, oldTopicURL, topicURL)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__LOCAL_STREAM_ID: + return getLocalStreamId(); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__DCAE_LOCATION_NAME: + return getDcaeLocationName(); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__CLIENT_ROLE: + return getClientRole(); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__ACTION: + return getAction(); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__USERNAME: + return getUsername(); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__USERPWD: + return getUserpwd(); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__FQTN: + return getFqtn(); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__MR_CLIENT_ID: + return getMrClientId(); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__TOPIC_URL: + return getTopicURL(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__LOCAL_STREAM_ID: + setLocalStreamId((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__DCAE_LOCATION_NAME: + setDcaeLocationName((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__CLIENT_ROLE: + setClientRole((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__ACTION: + getAction().clear(); + getAction().addAll((Collection)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__USERNAME: + setUsername((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__USERPWD: + setUserpwd((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__FQTN: + setFqtn((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__MR_CLIENT_ID: + setMrClientId((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__TOPIC_URL: + setTopicURL((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__LOCAL_STREAM_ID: + setLocalStreamId(LOCAL_STREAM_ID_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__DCAE_LOCATION_NAME: + setDcaeLocationName(DCAE_LOCATION_NAME_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__CLIENT_ROLE: + setClientRole(CLIENT_ROLE_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__ACTION: + getAction().clear(); + return; + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__USERNAME: + setUsername(USERNAME_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__USERPWD: + setUserpwd(USERPWD_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__FQTN: + setFqtn(FQTN_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__MR_CLIENT_ID: + setMrClientId(MR_CLIENT_ID_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__TOPIC_URL: + setTopicURL(TOPIC_URL_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__LOCAL_STREAM_ID: + return LOCAL_STREAM_ID_EDEFAULT == null ? localStreamId != null : !LOCAL_STREAM_ID_EDEFAULT.equals(localStreamId); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__DCAE_LOCATION_NAME: + return DCAE_LOCATION_NAME_EDEFAULT == null ? dcaeLocationName != null : !DCAE_LOCATION_NAME_EDEFAULT.equals(dcaeLocationName); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__CLIENT_ROLE: + return CLIENT_ROLE_EDEFAULT == null ? clientRole != null : !CLIENT_ROLE_EDEFAULT.equals(clientRole); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__ACTION: + return action != null && !action.isEmpty(); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__USERNAME: + return USERNAME_EDEFAULT == null ? username != null : !USERNAME_EDEFAULT.equals(username); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__USERPWD: + return USERPWD_EDEFAULT == null ? userpwd != null : !USERPWD_EDEFAULT.equals(userpwd); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__FQTN: + return FQTN_EDEFAULT == null ? fqtn != null : !FQTN_EDEFAULT.equals(fqtn); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__MR_CLIENT_ID: + return MR_CLIENT_ID_EDEFAULT == null ? mrClientId != null : !MR_CLIENT_ID_EDEFAULT.equals(mrClientId); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT__TOPIC_URL: + return TOPIC_URL_EDEFAULT == null ? topicURL != null : !TOPIC_URL_EDEFAULT.equals(topicURL); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (localStreamId: "); + result.append(localStreamId); + result.append(", dcaeLocationName: "); + result.append(dcaeLocationName); + result.append(", clientRole: "); + result.append(clientRole); + result.append(", action: "); + result.append(action); + result.append(", username: "); + result.append(username); + result.append(", userpwd: "); + result.append(userpwd); + result.append(", fqtn: "); + result.append(fqtn); + result.append(", mrClientId: "); + result.append(mrClientId); + result.append(", topicURL: "); + result.append(topicURL); + result.append(')'); + return result.toString(); + } + +} //DatabusStreamTopicClientImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamTopicImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamTopicImpl.java new file mode 100644 index 0000000..38eaff3 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamTopicImpl.java @@ -0,0 +1,760 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DatabusStreamTopic; +import org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import org.openecomp.dcae.controller.core.stream.StreamAuthentication; +import java.util.Collection; +import java.util.Date; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Databus Stream Topic'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicImpl#getTopicName Topic Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicImpl#getTopicDescription Topic Description}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicImpl#getDcaeLocationName Dcae Location Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicImpl#getOwner Owner}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicImpl#isTxenabled Txenabled}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicImpl#getFqtn Fqtn}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicImpl#getLastMod Last Mod}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicImpl#getStatus Status}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicImpl#getClients Clients}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicImpl#getPublishURL Publish URL}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicImpl#getSubscribeURL Subscribe URL}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DatabusStreamTopicImpl#getAuthenticationMethod Authentication Method}
  • + *
+ *

+ * + * @generated + */ +public class DatabusStreamTopicImpl extends DatabusStreamImpl implements DatabusStreamTopic { + /** + * The default value of the '{@link #getTopicName() Topic Name}' attribute. + * + * + * @see #getTopicName() + * @generated + * @ordered + */ + protected static final String TOPIC_NAME_EDEFAULT = null; + /** + * The cached value of the '{@link #getTopicName() Topic Name}' attribute. + * + * + * @see #getTopicName() + * @generated + * @ordered + */ + protected String topicName = TOPIC_NAME_EDEFAULT; + /** + * The default value of the '{@link #getTopicDescription() Topic Description}' attribute. + * + * + * @see #getTopicDescription() + * @generated + * @ordered + */ + protected static final String TOPIC_DESCRIPTION_EDEFAULT = null; + /** + * The cached value of the '{@link #getTopicDescription() Topic Description}' attribute. + * + * + * @see #getTopicDescription() + * @generated + * @ordered + */ + protected String topicDescription = TOPIC_DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #getDcaeLocationName() Dcae Location Name}' attribute. + * + * + * @see #getDcaeLocationName() + * @generated + * @ordered + */ + protected static final String DCAE_LOCATION_NAME_EDEFAULT = null; + /** + * The cached value of the '{@link #getDcaeLocationName() Dcae Location Name}' attribute. + * + * + * @see #getDcaeLocationName() + * @generated + * @ordered + */ + protected String dcaeLocationName = DCAE_LOCATION_NAME_EDEFAULT; + /** + * The default value of the '{@link #getOwner() Owner}' attribute. + * + * + * @see #getOwner() + * @generated + * @ordered + */ + protected static final String OWNER_EDEFAULT = null; + /** + * The cached value of the '{@link #getOwner() Owner}' attribute. + * + * + * @see #getOwner() + * @generated + * @ordered + */ + protected String owner = OWNER_EDEFAULT; + /** + * The default value of the '{@link #isTxenabled() Txenabled}' attribute. + * + * + * @see #isTxenabled() + * @generated + * @ordered + */ + protected static final boolean TXENABLED_EDEFAULT = false; + /** + * The cached value of the '{@link #isTxenabled() Txenabled}' attribute. + * + * + * @see #isTxenabled() + * @generated + * @ordered + */ + protected boolean txenabled = TXENABLED_EDEFAULT; + + /** + * The default value of the '{@link #getFqtn() Fqtn}' attribute. + * + * + * @see #getFqtn() + * @generated + * @ordered + */ + protected static final String FQTN_EDEFAULT = null; + /** + * The cached value of the '{@link #getFqtn() Fqtn}' attribute. + * + * + * @see #getFqtn() + * @generated + * @ordered + */ + protected String fqtn = FQTN_EDEFAULT; + /** + * The default value of the '{@link #getLastMod() Last Mod}' attribute. + * + * + * @see #getLastMod() + * @generated + * @ordered + */ + protected static final Date LAST_MOD_EDEFAULT = null; + /** + * The cached value of the '{@link #getLastMod() Last Mod}' attribute. + * + * + * @see #getLastMod() + * @generated + * @ordered + */ + protected Date lastMod = LAST_MOD_EDEFAULT; + /** + * The default value of the '{@link #getStatus() Status}' attribute. + * + * + * @see #getStatus() + * @generated + * @ordered + */ + protected static final String STATUS_EDEFAULT = null; + /** + * The cached value of the '{@link #getStatus() Status}' attribute. + * + * + * @see #getStatus() + * @generated + * @ordered + */ + protected String status = STATUS_EDEFAULT; + /** + * The cached value of the '{@link #getClients() Clients}' containment reference list. + * + * + * @see #getClients() + * @generated + * @ordered + */ + protected EList clients; + + /** + * The default value of the '{@link #getPublishURL() Publish URL}' attribute. + * + * + * @see #getPublishURL() + * @generated + * @ordered + */ + protected static final String PUBLISH_URL_EDEFAULT = null; + /** + * The cached value of the '{@link #getPublishURL() Publish URL}' attribute. + * + * + * @see #getPublishURL() + * @generated + * @ordered + */ + protected String publishURL = PUBLISH_URL_EDEFAULT; + /** + * The default value of the '{@link #getSubscribeURL() Subscribe URL}' attribute. + * + * + * @see #getSubscribeURL() + * @generated + * @ordered + */ + protected static final String SUBSCRIBE_URL_EDEFAULT = null; + /** + * The cached value of the '{@link #getSubscribeURL() Subscribe URL}' attribute. + * + * + * @see #getSubscribeURL() + * @generated + * @ordered + */ + protected String subscribeURL = SUBSCRIBE_URL_EDEFAULT; + + /** + * The default value of the '{@link #getAuthenticationMethod() Authentication Method}' attribute. + * + * + * @see #getAuthenticationMethod() + * @generated + * @ordered + */ + protected static final StreamAuthentication AUTHENTICATION_METHOD_EDEFAULT = StreamAuthentication.AAF; + /** + * The cached value of the '{@link #getAuthenticationMethod() Authentication Method}' attribute. + * + * + * @see #getAuthenticationMethod() + * @generated + * @ordered + */ + protected StreamAuthentication authenticationMethod = AUTHENTICATION_METHOD_EDEFAULT; + + /** + * + * + * @generated + */ + protected DatabusStreamTopicImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DATABUS_STREAM_TOPIC; + } + + /** + * + * + * @generated + */ + public String getTopicName() { + return topicName; + } + + /** + * + * + * @generated + */ + public void setTopicName(String newTopicName) { + String oldTopicName = topicName; + topicName = newTopicName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC__TOPIC_NAME, oldTopicName, topicName)); + } + + /** + * + * + * @generated + */ + public String getTopicDescription() { + return topicDescription; + } + + /** + * + * + * @generated + */ + public void setTopicDescription(String newTopicDescription) { + String oldTopicDescription = topicDescription; + topicDescription = newTopicDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC__TOPIC_DESCRIPTION, oldTopicDescription, topicDescription)); + } + + /** + * + * + * @generated + */ + public String getDcaeLocationName() { + return dcaeLocationName; + } + + /** + * + * + * @generated + */ + public void setDcaeLocationName(String newDcaeLocationName) { + String oldDcaeLocationName = dcaeLocationName; + dcaeLocationName = newDcaeLocationName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC__DCAE_LOCATION_NAME, oldDcaeLocationName, dcaeLocationName)); + } + + /** + * + * + * @generated + */ + public String getOwner() { + return owner; + } + + /** + * + * + * @generated + */ + public void setOwner(String newOwner) { + String oldOwner = owner; + owner = newOwner; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC__OWNER, oldOwner, owner)); + } + + /** + * + * + * @generated + */ + public boolean isTxenabled() { + return txenabled; + } + + /** + * + * + * @generated + */ + public void setTxenabled(boolean newTxenabled) { + boolean oldTxenabled = txenabled; + txenabled = newTxenabled; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC__TXENABLED, oldTxenabled, txenabled)); + } + + /** + * + * + * @generated + */ + public String getFqtn() { + return fqtn; + } + + /** + * + * + * @generated + */ + public void setFqtn(String newFqtn) { + String oldFqtn = fqtn; + fqtn = newFqtn; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC__FQTN, oldFqtn, fqtn)); + } + + /** + * + * + * @generated + */ + public Date getLastMod() { + return lastMod; + } + + /** + * + * + * @generated + */ + public void setLastMod(Date newLastMod) { + Date oldLastMod = lastMod; + lastMod = newLastMod; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC__LAST_MOD, oldLastMod, lastMod)); + } + + /** + * + * + * @generated + */ + public String getStatus() { + return status; + } + + /** + * + * + * @generated + */ + public void setStatus(String newStatus) { + String oldStatus = status; + status = newStatus; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC__STATUS, oldStatus, status)); + } + + /** + * + * + * @generated + */ + public EList getClients() { + if (clients == null) { + clients = new EObjectContainmentEList(DatabusStreamTopicClient.class, this, StreamPackage.DATABUS_STREAM_TOPIC__CLIENTS); + } + return clients; + } + + /** + * + * + * @generated + */ + public String getPublishURL() { + return publishURL; + } + + /** + * + * + * @generated + */ + public void setPublishURL(String newPublishURL) { + String oldPublishURL = publishURL; + publishURL = newPublishURL; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC__PUBLISH_URL, oldPublishURL, publishURL)); + } + + /** + * + * + * @generated + */ + public String getSubscribeURL() { + return subscribeURL; + } + + /** + * + * + * @generated + */ + public void setSubscribeURL(String newSubscribeURL) { + String oldSubscribeURL = subscribeURL; + subscribeURL = newSubscribeURL; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC__SUBSCRIBE_URL, oldSubscribeURL, subscribeURL)); + } + + /** + * + * + * @generated + */ + public StreamAuthentication getAuthenticationMethod() { + return authenticationMethod; + } + + /** + * + * + * @generated + */ + public void setAuthenticationMethod(StreamAuthentication newAuthenticationMethod) { + StreamAuthentication oldAuthenticationMethod = authenticationMethod; + authenticationMethod = newAuthenticationMethod == null ? AUTHENTICATION_METHOD_EDEFAULT : newAuthenticationMethod; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DATABUS_STREAM_TOPIC__AUTHENTICATION_METHOD, oldAuthenticationMethod, authenticationMethod)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_TOPIC__CLIENTS: + return ((InternalEList)getClients()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_TOPIC__TOPIC_NAME: + return getTopicName(); + case StreamPackage.DATABUS_STREAM_TOPIC__TOPIC_DESCRIPTION: + return getTopicDescription(); + case StreamPackage.DATABUS_STREAM_TOPIC__DCAE_LOCATION_NAME: + return getDcaeLocationName(); + case StreamPackage.DATABUS_STREAM_TOPIC__OWNER: + return getOwner(); + case StreamPackage.DATABUS_STREAM_TOPIC__TXENABLED: + return isTxenabled(); + case StreamPackage.DATABUS_STREAM_TOPIC__FQTN: + return getFqtn(); + case StreamPackage.DATABUS_STREAM_TOPIC__LAST_MOD: + return getLastMod(); + case StreamPackage.DATABUS_STREAM_TOPIC__STATUS: + return getStatus(); + case StreamPackage.DATABUS_STREAM_TOPIC__CLIENTS: + return getClients(); + case StreamPackage.DATABUS_STREAM_TOPIC__PUBLISH_URL: + return getPublishURL(); + case StreamPackage.DATABUS_STREAM_TOPIC__SUBSCRIBE_URL: + return getSubscribeURL(); + case StreamPackage.DATABUS_STREAM_TOPIC__AUTHENTICATION_METHOD: + return getAuthenticationMethod(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_TOPIC__TOPIC_NAME: + setTopicName((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__TOPIC_DESCRIPTION: + setTopicDescription((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__DCAE_LOCATION_NAME: + setDcaeLocationName((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__OWNER: + setOwner((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__TXENABLED: + setTxenabled((Boolean)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__FQTN: + setFqtn((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__LAST_MOD: + setLastMod((Date)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__STATUS: + setStatus((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__CLIENTS: + getClients().clear(); + getClients().addAll((Collection)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__PUBLISH_URL: + setPublishURL((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__SUBSCRIBE_URL: + setSubscribeURL((String)newValue); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__AUTHENTICATION_METHOD: + setAuthenticationMethod((StreamAuthentication)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_TOPIC__TOPIC_NAME: + setTopicName(TOPIC_NAME_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__TOPIC_DESCRIPTION: + setTopicDescription(TOPIC_DESCRIPTION_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__DCAE_LOCATION_NAME: + setDcaeLocationName(DCAE_LOCATION_NAME_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__OWNER: + setOwner(OWNER_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__TXENABLED: + setTxenabled(TXENABLED_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__FQTN: + setFqtn(FQTN_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__LAST_MOD: + setLastMod(LAST_MOD_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__STATUS: + setStatus(STATUS_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__CLIENTS: + getClients().clear(); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__PUBLISH_URL: + setPublishURL(PUBLISH_URL_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__SUBSCRIBE_URL: + setSubscribeURL(SUBSCRIBE_URL_EDEFAULT); + return; + case StreamPackage.DATABUS_STREAM_TOPIC__AUTHENTICATION_METHOD: + setAuthenticationMethod(AUTHENTICATION_METHOD_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DATABUS_STREAM_TOPIC__TOPIC_NAME: + return TOPIC_NAME_EDEFAULT == null ? topicName != null : !TOPIC_NAME_EDEFAULT.equals(topicName); + case StreamPackage.DATABUS_STREAM_TOPIC__TOPIC_DESCRIPTION: + return TOPIC_DESCRIPTION_EDEFAULT == null ? topicDescription != null : !TOPIC_DESCRIPTION_EDEFAULT.equals(topicDescription); + case StreamPackage.DATABUS_STREAM_TOPIC__DCAE_LOCATION_NAME: + return DCAE_LOCATION_NAME_EDEFAULT == null ? dcaeLocationName != null : !DCAE_LOCATION_NAME_EDEFAULT.equals(dcaeLocationName); + case StreamPackage.DATABUS_STREAM_TOPIC__OWNER: + return OWNER_EDEFAULT == null ? owner != null : !OWNER_EDEFAULT.equals(owner); + case StreamPackage.DATABUS_STREAM_TOPIC__TXENABLED: + return txenabled != TXENABLED_EDEFAULT; + case StreamPackage.DATABUS_STREAM_TOPIC__FQTN: + return FQTN_EDEFAULT == null ? fqtn != null : !FQTN_EDEFAULT.equals(fqtn); + case StreamPackage.DATABUS_STREAM_TOPIC__LAST_MOD: + return LAST_MOD_EDEFAULT == null ? lastMod != null : !LAST_MOD_EDEFAULT.equals(lastMod); + case StreamPackage.DATABUS_STREAM_TOPIC__STATUS: + return STATUS_EDEFAULT == null ? status != null : !STATUS_EDEFAULT.equals(status); + case StreamPackage.DATABUS_STREAM_TOPIC__CLIENTS: + return clients != null && !clients.isEmpty(); + case StreamPackage.DATABUS_STREAM_TOPIC__PUBLISH_URL: + return PUBLISH_URL_EDEFAULT == null ? publishURL != null : !PUBLISH_URL_EDEFAULT.equals(publishURL); + case StreamPackage.DATABUS_STREAM_TOPIC__SUBSCRIBE_URL: + return SUBSCRIBE_URL_EDEFAULT == null ? subscribeURL != null : !SUBSCRIBE_URL_EDEFAULT.equals(subscribeURL); + case StreamPackage.DATABUS_STREAM_TOPIC__AUTHENTICATION_METHOD: + return authenticationMethod != AUTHENTICATION_METHOD_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (topicName: "); + result.append(topicName); + result.append(", topicDescription: "); + result.append(topicDescription); + result.append(", dcaeLocationName: "); + result.append(dcaeLocationName); + result.append(", owner: "); + result.append(owner); + result.append(", txenabled: "); + result.append(txenabled); + result.append(", fqtn: "); + result.append(fqtn); + result.append(", lastMod: "); + result.append(lastMod); + result.append(", status: "); + result.append(status); + result.append(", publishURL: "); + result.append(publishURL); + result.append(", subscribeURL: "); + result.append(subscribeURL); + result.append(", authenticationMethod: "); + result.append(authenticationMethod); + result.append(')'); + return result.toString(); + } + +} //DatabusStreamTopicImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamDefinitionImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamDefinitionImpl.java new file mode 100644 index 0000000..39e69f2 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamDefinitionImpl.java @@ -0,0 +1,334 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition; +import org.openecomp.dcae.controller.core.stream.DcaeStreamPublisher; +import org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriber; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Dcae Stream Definition'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamDefinitionImpl#getStreamType Stream Type}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamDefinitionImpl#getDatabusType Databus Type}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamDefinitionImpl#getPublishers Publishers}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamDefinitionImpl#getSubscribers Subscribers}
  • + *
+ *

+ * + * @generated + */ +public class DcaeStreamDefinitionImpl extends NamedEntityImpl implements DcaeStreamDefinition { + /** + * The default value of the '{@link #getStreamType() Stream Type}' attribute. + * + * + * @see #getStreamType() + * @generated + * @ordered + */ + protected static final String STREAM_TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getStreamType() Stream Type}' attribute. + * + * + * @see #getStreamType() + * @generated + * @ordered + */ + protected String streamType = STREAM_TYPE_EDEFAULT; + + /** + * The default value of the '{@link #getDatabusType() Databus Type}' attribute. + * + * + * @see #getDatabusType() + * @generated + * @ordered + */ + protected static final String DATABUS_TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDatabusType() Databus Type}' attribute. + * + * + * @see #getDatabusType() + * @generated + * @ordered + */ + protected String databusType = DATABUS_TYPE_EDEFAULT; + + /** + * The cached value of the '{@link #getPublishers() Publishers}' containment reference list. + * + * + * @see #getPublishers() + * @generated + * @ordered + */ + protected EList publishers; + + /** + * The cached value of the '{@link #getSubscribers() Subscribers}' containment reference list. + * + * + * @see #getSubscribers() + * @generated + * @ordered + */ + protected EList subscribers; + + /** + * + * + * @generated + */ + protected DcaeStreamDefinitionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DCAE_STREAM_DEFINITION; + } + + /** + * + * + * @generated + */ + public String getStreamType() { + return streamType; + } + + /** + * + * + * @generated + */ + public void setStreamType(String newStreamType) { + String oldStreamType = streamType; + streamType = newStreamType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_DEFINITION__STREAM_TYPE, oldStreamType, streamType)); + } + + /** + * + * + * @generated + */ + public String getDatabusType() { + return databusType; + } + + /** + * + * + * @generated + */ + public void setDatabusType(String newDatabusType) { + String oldDatabusType = databusType; + databusType = newDatabusType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_DEFINITION__DATABUS_TYPE, oldDatabusType, databusType)); + } + + /** + * + * + * @generated + */ + public EList getPublishers() { + if (publishers == null) { + publishers = new EObjectContainmentEList(DcaeStreamPublisher.class, this, StreamPackage.DCAE_STREAM_DEFINITION__PUBLISHERS); + } + return publishers; + } + + /** + * + * + * @generated + */ + public EList getSubscribers() { + if (subscribers == null) { + subscribers = new EObjectContainmentEList(DcaeStreamSubscriber.class, this, StreamPackage.DCAE_STREAM_DEFINITION__SUBSCRIBERS); + } + return subscribers; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_DEFINITION__PUBLISHERS: + return ((InternalEList)getPublishers()).basicRemove(otherEnd, msgs); + case StreamPackage.DCAE_STREAM_DEFINITION__SUBSCRIBERS: + return ((InternalEList)getSubscribers()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_DEFINITION__STREAM_TYPE: + return getStreamType(); + case StreamPackage.DCAE_STREAM_DEFINITION__DATABUS_TYPE: + return getDatabusType(); + case StreamPackage.DCAE_STREAM_DEFINITION__PUBLISHERS: + return getPublishers(); + case StreamPackage.DCAE_STREAM_DEFINITION__SUBSCRIBERS: + return getSubscribers(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_DEFINITION__STREAM_TYPE: + setStreamType((String)newValue); + return; + case StreamPackage.DCAE_STREAM_DEFINITION__DATABUS_TYPE: + setDatabusType((String)newValue); + return; + case StreamPackage.DCAE_STREAM_DEFINITION__PUBLISHERS: + getPublishers().clear(); + getPublishers().addAll((Collection)newValue); + return; + case StreamPackage.DCAE_STREAM_DEFINITION__SUBSCRIBERS: + getSubscribers().clear(); + getSubscribers().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_DEFINITION__STREAM_TYPE: + setStreamType(STREAM_TYPE_EDEFAULT); + return; + case StreamPackage.DCAE_STREAM_DEFINITION__DATABUS_TYPE: + setDatabusType(DATABUS_TYPE_EDEFAULT); + return; + case StreamPackage.DCAE_STREAM_DEFINITION__PUBLISHERS: + getPublishers().clear(); + return; + case StreamPackage.DCAE_STREAM_DEFINITION__SUBSCRIBERS: + getSubscribers().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_DEFINITION__STREAM_TYPE: + return STREAM_TYPE_EDEFAULT == null ? streamType != null : !STREAM_TYPE_EDEFAULT.equals(streamType); + case StreamPackage.DCAE_STREAM_DEFINITION__DATABUS_TYPE: + return DATABUS_TYPE_EDEFAULT == null ? databusType != null : !DATABUS_TYPE_EDEFAULT.equals(databusType); + case StreamPackage.DCAE_STREAM_DEFINITION__PUBLISHERS: + return publishers != null && !publishers.isEmpty(); + case StreamPackage.DCAE_STREAM_DEFINITION__SUBSCRIBERS: + return subscribers != null && !subscribers.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (streamType: "); + result.append(streamType); + result.append(", databusType: "); + result.append(databusType); + result.append(')'); + return result.toString(); + } + +} //DcaeStreamDefinitionImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamExternalEndPointImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamExternalEndPointImpl.java new file mode 100644 index 0000000..41eb02d --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamExternalEndPointImpl.java @@ -0,0 +1,292 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Dcae Stream External End Point'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamExternalEndPointImpl#getUser User}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamExternalEndPointImpl#getPassword Password}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamExternalEndPointImpl#getUrl Url}
  • + *
+ *

+ * + * @generated + */ +public class DcaeStreamExternalEndPointImpl extends MinimalEObjectImpl.Container implements DcaeStreamExternalEndPoint { + /** + * The default value of the '{@link #getUser() User}' attribute. + * + * + * @see #getUser() + * @generated + * @ordered + */ + protected static final String USER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUser() User}' attribute. + * + * + * @see #getUser() + * @generated + * @ordered + */ + protected String user = USER_EDEFAULT; + + /** + * The default value of the '{@link #getPassword() Password}' attribute. + * + * + * @see #getPassword() + * @generated + * @ordered + */ + protected static final String PASSWORD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPassword() Password}' attribute. + * + * + * @see #getPassword() + * @generated + * @ordered + */ + protected String password = PASSWORD_EDEFAULT; + + /** + * The default value of the '{@link #getUrl() Url}' attribute. + * + * + * @see #getUrl() + * @generated + * @ordered + */ + protected static final String URL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUrl() Url}' attribute. + * + * + * @see #getUrl() + * @generated + * @ordered + */ + protected String url = URL_EDEFAULT; + + /** + * + * + * @generated + */ + protected DcaeStreamExternalEndPointImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DCAE_STREAM_EXTERNAL_END_POINT; + } + + /** + * + * + * @generated + */ + public String getUser() { + return user; + } + + /** + * + * + * @generated + */ + public void setUser(String newUser) { + String oldUser = user; + user = newUser; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__USER, oldUser, user)); + } + + /** + * + * + * @generated + */ + public String getPassword() { + return password; + } + + /** + * + * + * @generated + */ + public void setPassword(String newPassword) { + String oldPassword = password; + password = newPassword; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__PASSWORD, oldPassword, password)); + } + + /** + * + * + * @generated + */ + public String getUrl() { + return url; + } + + /** + * + * + * @generated + */ + public void setUrl(String newUrl) { + String oldUrl = url; + url = newUrl; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__URL, oldUrl, url)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__USER: + return getUser(); + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__PASSWORD: + return getPassword(); + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__URL: + return getUrl(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__USER: + setUser((String)newValue); + return; + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__PASSWORD: + setPassword((String)newValue); + return; + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__URL: + setUrl((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__USER: + setUser(USER_EDEFAULT); + return; + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__PASSWORD: + setPassword(PASSWORD_EDEFAULT); + return; + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__URL: + setUrl(URL_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__USER: + return USER_EDEFAULT == null ? user != null : !USER_EDEFAULT.equals(user); + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__PASSWORD: + return PASSWORD_EDEFAULT == null ? password != null : !PASSWORD_EDEFAULT.equals(password); + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__URL: + return URL_EDEFAULT == null ? url != null : !URL_EDEFAULT.equals(url); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (user: "); + result.append(user); + result.append(", password: "); + result.append(password); + result.append(", url: "); + result.append(url); + result.append(')'); + return result.toString(); + } + +} //DcaeStreamExternalEndPointImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamImpl.java new file mode 100644 index 0000000..69a342d --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DcaeStream; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Dcae Stream'. + * + *

+ *

+ * + * @generated + */ +public class DcaeStreamImpl extends NamedEntityImpl implements DcaeStream { + /** + * + * + * @generated + */ + protected DcaeStreamImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DCAE_STREAM; + } + +} //DcaeStreamImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamInternalEndPointImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamInternalEndPointImpl.java new file mode 100644 index 0000000..4286bab --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamInternalEndPointImpl.java @@ -0,0 +1,238 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DcaeStreamInternalEndPoint; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Dcae Stream Internal End Point'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamInternalEndPointImpl#getLocalName Local Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamInternalEndPointImpl#getServiceName Service Name}
  • + *
+ *

+ * + * @generated + */ +public class DcaeStreamInternalEndPointImpl extends MinimalEObjectImpl.Container implements DcaeStreamInternalEndPoint { + /** + * The default value of the '{@link #getLocalName() Local Name}' attribute. + * + * + * @see #getLocalName() + * @generated + * @ordered + */ + protected static final String LOCAL_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLocalName() Local Name}' attribute. + * + * + * @see #getLocalName() + * @generated + * @ordered + */ + protected String localName = LOCAL_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getServiceName() Service Name}' attribute. + * + * + * @see #getServiceName() + * @generated + * @ordered + */ + protected static final String SERVICE_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServiceName() Service Name}' attribute. + * + * + * @see #getServiceName() + * @generated + * @ordered + */ + protected String serviceName = SERVICE_NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected DcaeStreamInternalEndPointImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DCAE_STREAM_INTERNAL_END_POINT; + } + + /** + * + * + * @generated + */ + public String getLocalName() { + return localName; + } + + /** + * + * + * @generated + */ + public void setLocalName(String newLocalName) { + String oldLocalName = localName; + localName = newLocalName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__LOCAL_NAME, oldLocalName, localName)); + } + + /** + * + * + * @generated + */ + public String getServiceName() { + return serviceName; + } + + /** + * + * + * @generated + */ + public void setServiceName(String newServiceName) { + String oldServiceName = serviceName; + serviceName = newServiceName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__SERVICE_NAME, oldServiceName, serviceName)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__LOCAL_NAME: + return getLocalName(); + case StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__SERVICE_NAME: + return getServiceName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__LOCAL_NAME: + setLocalName((String)newValue); + return; + case StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__SERVICE_NAME: + setServiceName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__LOCAL_NAME: + setLocalName(LOCAL_NAME_EDEFAULT); + return; + case StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__SERVICE_NAME: + setServiceName(SERVICE_NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__LOCAL_NAME: + return LOCAL_NAME_EDEFAULT == null ? localName != null : !LOCAL_NAME_EDEFAULT.equals(localName); + case StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__SERVICE_NAME: + return SERVICE_NAME_EDEFAULT == null ? serviceName != null : !SERVICE_NAME_EDEFAULT.equals(serviceName); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (localName: "); + result.append(localName); + result.append(", serviceName: "); + result.append(serviceName); + result.append(')'); + return result.toString(); + } + +} //DcaeStreamInternalEndPointImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamPublisherExternalImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamPublisherExternalImpl.java new file mode 100644 index 0000000..eccb2f7 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamPublisherExternalImpl.java @@ -0,0 +1,328 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint; +import org.openecomp.dcae.controller.core.stream.DcaeStreamPublisherExternal; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Dcae Stream Publisher External'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherExternalImpl#getUser User}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherExternalImpl#getPassword Password}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherExternalImpl#getUrl Url}
  • + *
+ *

+ * + * @generated + */ +public class DcaeStreamPublisherExternalImpl extends DcaeStreamPublisherImpl implements DcaeStreamPublisherExternal { + /** + * The default value of the '{@link #getUser() User}' attribute. + * + * + * @see #getUser() + * @generated + * @ordered + */ + protected static final String USER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUser() User}' attribute. + * + * + * @see #getUser() + * @generated + * @ordered + */ + protected String user = USER_EDEFAULT; + + /** + * The default value of the '{@link #getPassword() Password}' attribute. + * + * + * @see #getPassword() + * @generated + * @ordered + */ + protected static final String PASSWORD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPassword() Password}' attribute. + * + * + * @see #getPassword() + * @generated + * @ordered + */ + protected String password = PASSWORD_EDEFAULT; + + /** + * The default value of the '{@link #getUrl() Url}' attribute. + * + * + * @see #getUrl() + * @generated + * @ordered + */ + protected static final String URL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUrl() Url}' attribute. + * + * + * @see #getUrl() + * @generated + * @ordered + */ + protected String url = URL_EDEFAULT; + + /** + * + * + * @generated + */ + protected DcaeStreamPublisherExternalImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DCAE_STREAM_PUBLISHER_EXTERNAL; + } + + /** + * + * + * @generated + */ + public String getUser() { + return user; + } + + /** + * + * + * @generated + */ + public void setUser(String newUser) { + String oldUser = user; + user = newUser; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__USER, oldUser, user)); + } + + /** + * + * + * @generated + */ + public String getPassword() { + return password; + } + + /** + * + * + * @generated + */ + public void setPassword(String newPassword) { + String oldPassword = password; + password = newPassword; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__PASSWORD, oldPassword, password)); + } + + /** + * + * + * @generated + */ + public String getUrl() { + return url; + } + + /** + * + * + * @generated + */ + public void setUrl(String newUrl) { + String oldUrl = url; + url = newUrl; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__URL, oldUrl, url)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__USER: + return getUser(); + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__PASSWORD: + return getPassword(); + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__URL: + return getUrl(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__USER: + setUser((String)newValue); + return; + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__PASSWORD: + setPassword((String)newValue); + return; + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__URL: + setUrl((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__USER: + setUser(USER_EDEFAULT); + return; + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__PASSWORD: + setPassword(PASSWORD_EDEFAULT); + return; + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__URL: + setUrl(URL_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__USER: + return USER_EDEFAULT == null ? user != null : !USER_EDEFAULT.equals(user); + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__PASSWORD: + return PASSWORD_EDEFAULT == null ? password != null : !PASSWORD_EDEFAULT.equals(password); + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__URL: + return URL_EDEFAULT == null ? url != null : !URL_EDEFAULT.equals(url); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == DcaeStreamExternalEndPoint.class) { + switch (derivedFeatureID) { + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__USER: return StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__USER; + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__PASSWORD: return StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__PASSWORD; + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__URL: return StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__URL; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == DcaeStreamExternalEndPoint.class) { + switch (baseFeatureID) { + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__USER: return StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__USER; + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__PASSWORD: return StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__PASSWORD; + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__URL: return StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL__URL; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (user: "); + result.append(user); + result.append(", password: "); + result.append(password); + result.append(", url: "); + result.append(url); + result.append(')'); + return result.toString(); + } + +} //DcaeStreamPublisherExternalImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamPublisherImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamPublisherImpl.java new file mode 100644 index 0000000..bbcaf85 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamPublisherImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DcaeStreamPublisher; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Dcae Stream Publisher'. + * + *

+ *

+ * + * @generated + */ +public abstract class DcaeStreamPublisherImpl extends NamedEntityImpl implements DcaeStreamPublisher { + /** + * + * + * @generated + */ + protected DcaeStreamPublisherImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DCAE_STREAM_PUBLISHER; + } + +} //DcaeStreamPublisherImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamPublisherInternalImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamPublisherInternalImpl.java new file mode 100644 index 0000000..480d1d3 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamPublisherInternalImpl.java @@ -0,0 +1,272 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DcaeStreamInternalEndPoint; +import org.openecomp.dcae.controller.core.stream.DcaeStreamPublisherInternal; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Dcae Stream Publisher Internal'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherInternalImpl#getLocalName Local Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamPublisherInternalImpl#getServiceName Service Name}
  • + *
+ *

+ * + * @generated + */ +public class DcaeStreamPublisherInternalImpl extends DcaeStreamPublisherImpl implements DcaeStreamPublisherInternal { + /** + * The default value of the '{@link #getLocalName() Local Name}' attribute. + * + * + * @see #getLocalName() + * @generated + * @ordered + */ + protected static final String LOCAL_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLocalName() Local Name}' attribute. + * + * + * @see #getLocalName() + * @generated + * @ordered + */ + protected String localName = LOCAL_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getServiceName() Service Name}' attribute. + * + * + * @see #getServiceName() + * @generated + * @ordered + */ + protected static final String SERVICE_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServiceName() Service Name}' attribute. + * + * + * @see #getServiceName() + * @generated + * @ordered + */ + protected String serviceName = SERVICE_NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected DcaeStreamPublisherInternalImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DCAE_STREAM_PUBLISHER_INTERNAL; + } + + /** + * + * + * @generated + */ + public String getLocalName() { + return localName; + } + + /** + * + * + * @generated + */ + public void setLocalName(String newLocalName) { + String oldLocalName = localName; + localName = newLocalName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_PUBLISHER_INTERNAL__LOCAL_NAME, oldLocalName, localName)); + } + + /** + * + * + * @generated + */ + public String getServiceName() { + return serviceName; + } + + /** + * + * + * @generated + */ + public void setServiceName(String newServiceName) { + String oldServiceName = serviceName; + serviceName = newServiceName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_PUBLISHER_INTERNAL__SERVICE_NAME, oldServiceName, serviceName)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_PUBLISHER_INTERNAL__LOCAL_NAME: + return getLocalName(); + case StreamPackage.DCAE_STREAM_PUBLISHER_INTERNAL__SERVICE_NAME: + return getServiceName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_PUBLISHER_INTERNAL__LOCAL_NAME: + setLocalName((String)newValue); + return; + case StreamPackage.DCAE_STREAM_PUBLISHER_INTERNAL__SERVICE_NAME: + setServiceName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_PUBLISHER_INTERNAL__LOCAL_NAME: + setLocalName(LOCAL_NAME_EDEFAULT); + return; + case StreamPackage.DCAE_STREAM_PUBLISHER_INTERNAL__SERVICE_NAME: + setServiceName(SERVICE_NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_PUBLISHER_INTERNAL__LOCAL_NAME: + return LOCAL_NAME_EDEFAULT == null ? localName != null : !LOCAL_NAME_EDEFAULT.equals(localName); + case StreamPackage.DCAE_STREAM_PUBLISHER_INTERNAL__SERVICE_NAME: + return SERVICE_NAME_EDEFAULT == null ? serviceName != null : !SERVICE_NAME_EDEFAULT.equals(serviceName); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == DcaeStreamInternalEndPoint.class) { + switch (derivedFeatureID) { + case StreamPackage.DCAE_STREAM_PUBLISHER_INTERNAL__LOCAL_NAME: return StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__LOCAL_NAME; + case StreamPackage.DCAE_STREAM_PUBLISHER_INTERNAL__SERVICE_NAME: return StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__SERVICE_NAME; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == DcaeStreamInternalEndPoint.class) { + switch (baseFeatureID) { + case StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__LOCAL_NAME: return StreamPackage.DCAE_STREAM_PUBLISHER_INTERNAL__LOCAL_NAME; + case StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__SERVICE_NAME: return StreamPackage.DCAE_STREAM_PUBLISHER_INTERNAL__SERVICE_NAME; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (localName: "); + result.append(localName); + result.append(", serviceName: "); + result.append(serviceName); + result.append(')'); + return result.toString(); + } + +} //DcaeStreamPublisherInternalImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamSubscriberExternalImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamSubscriberExternalImpl.java new file mode 100644 index 0000000..130a016 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamSubscriberExternalImpl.java @@ -0,0 +1,321 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint; +import org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriberExternal; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Dcae Stream Subscriber External'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberExternalImpl#getUser User}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberExternalImpl#getPassword Password}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberExternalImpl#getUrl Url}
  • + *
+ *

+ * + * @generated + */ +public class DcaeStreamSubscriberExternalImpl extends DcaeStreamSubscriberImpl implements DcaeStreamSubscriberExternal { + /** + * The default value of the '{@link #getUser() User}' attribute. + * + * + * @see #getUser() + * @generated + * @ordered + */ + protected static final String USER_EDEFAULT = null; + /** + * The cached value of the '{@link #getUser() User}' attribute. + * + * + * @see #getUser() + * @generated + * @ordered + */ + protected String user = USER_EDEFAULT; + /** + * The default value of the '{@link #getPassword() Password}' attribute. + * + * + * @see #getPassword() + * @generated + * @ordered + */ + protected static final String PASSWORD_EDEFAULT = null; + /** + * The cached value of the '{@link #getPassword() Password}' attribute. + * + * + * @see #getPassword() + * @generated + * @ordered + */ + protected String password = PASSWORD_EDEFAULT; + /** + * The default value of the '{@link #getUrl() Url}' attribute. + * + * + * @see #getUrl() + * @generated + * @ordered + */ + protected static final String URL_EDEFAULT = null; + /** + * The cached value of the '{@link #getUrl() Url}' attribute. + * + * + * @see #getUrl() + * @generated + * @ordered + */ + protected String url = URL_EDEFAULT; + + /** + * + * + * @generated + */ + protected DcaeStreamSubscriberExternalImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DCAE_STREAM_SUBSCRIBER_EXTERNAL; + } + + /** + * + * + * @generated + */ + public String getUser() { + return user; + } + + /** + * + * + * @generated + */ + public void setUser(String newUser) { + String oldUser = user; + user = newUser; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__USER, oldUser, user)); + } + + /** + * + * + * @generated + */ + public String getPassword() { + return password; + } + + /** + * + * + * @generated + */ + public void setPassword(String newPassword) { + String oldPassword = password; + password = newPassword; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__PASSWORD, oldPassword, password)); + } + + /** + * + * + * @generated + */ + public String getUrl() { + return url; + } + + /** + * + * + * @generated + */ + public void setUrl(String newUrl) { + String oldUrl = url; + url = newUrl; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__URL, oldUrl, url)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__USER: + return getUser(); + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__PASSWORD: + return getPassword(); + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__URL: + return getUrl(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__USER: + setUser((String)newValue); + return; + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__PASSWORD: + setPassword((String)newValue); + return; + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__URL: + setUrl((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__USER: + setUser(USER_EDEFAULT); + return; + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__PASSWORD: + setPassword(PASSWORD_EDEFAULT); + return; + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__URL: + setUrl(URL_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__USER: + return USER_EDEFAULT == null ? user != null : !USER_EDEFAULT.equals(user); + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__PASSWORD: + return PASSWORD_EDEFAULT == null ? password != null : !PASSWORD_EDEFAULT.equals(password); + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__URL: + return URL_EDEFAULT == null ? url != null : !URL_EDEFAULT.equals(url); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == DcaeStreamExternalEndPoint.class) { + switch (derivedFeatureID) { + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__USER: return StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__USER; + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__PASSWORD: return StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__PASSWORD; + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__URL: return StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__URL; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == DcaeStreamExternalEndPoint.class) { + switch (baseFeatureID) { + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__USER: return StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__USER; + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__PASSWORD: return StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__PASSWORD; + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT__URL: return StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL__URL; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (user: "); + result.append(user); + result.append(", password: "); + result.append(password); + result.append(", url: "); + result.append(url); + result.append(')'); + return result.toString(); + } + +} //DcaeStreamSubscriberExternalImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamSubscriberImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamSubscriberImpl.java new file mode 100644 index 0000000..b136cfd --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamSubscriberImpl.java @@ -0,0 +1,60 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriber; +import org.openecomp.dcae.controller.core.stream.StreamPackage; +import org.openecomp.ncomp.core.impl.NamedEntityImpl; +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Dcae Stream Subscriber'. + * + *

+ *

+ * + * @generated + */ +public abstract class DcaeStreamSubscriberImpl extends NamedEntityImpl implements DcaeStreamSubscriber { + /** + * + * + * @generated + */ + protected DcaeStreamSubscriberImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DCAE_STREAM_SUBSCRIBER; + } + +} //DcaeStreamSubscriberImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamSubscriberInternalImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamSubscriberInternalImpl.java new file mode 100644 index 0000000..075fa66 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DcaeStreamSubscriberInternalImpl.java @@ -0,0 +1,267 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DcaeStreamInternalEndPoint; +import org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriberInternal; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Dcae Stream Subscriber Internal'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberInternalImpl#getLocalName Local Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DcaeStreamSubscriberInternalImpl#getServiceName Service Name}
  • + *
+ *

+ * + * @generated + */ +public class DcaeStreamSubscriberInternalImpl extends DcaeStreamSubscriberImpl implements DcaeStreamSubscriberInternal { + /** + * The default value of the '{@link #getLocalName() Local Name}' attribute. + * + * + * @see #getLocalName() + * @generated + * @ordered + */ + protected static final String LOCAL_NAME_EDEFAULT = null; + /** + * The cached value of the '{@link #getLocalName() Local Name}' attribute. + * + * + * @see #getLocalName() + * @generated + * @ordered + */ + protected String localName = LOCAL_NAME_EDEFAULT; + /** + * The default value of the '{@link #getServiceName() Service Name}' attribute. + * + * + * @see #getServiceName() + * @generated + * @ordered + */ + protected static final String SERVICE_NAME_EDEFAULT = null; + /** + * The cached value of the '{@link #getServiceName() Service Name}' attribute. + * + * + * @see #getServiceName() + * @generated + * @ordered + */ + protected String serviceName = SERVICE_NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected DcaeStreamSubscriberInternalImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DCAE_STREAM_SUBSCRIBER_INTERNAL; + } + + /** + * + * + * @generated + */ + public String getLocalName() { + return localName; + } + + /** + * + * + * @generated + */ + public void setLocalName(String newLocalName) { + String oldLocalName = localName; + localName = newLocalName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_SUBSCRIBER_INTERNAL__LOCAL_NAME, oldLocalName, localName)); + } + + /** + * + * + * @generated + */ + public String getServiceName() { + return serviceName; + } + + /** + * + * + * @generated + */ + public void setServiceName(String newServiceName) { + String oldServiceName = serviceName; + serviceName = newServiceName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DCAE_STREAM_SUBSCRIBER_INTERNAL__SERVICE_NAME, oldServiceName, serviceName)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_SUBSCRIBER_INTERNAL__LOCAL_NAME: + return getLocalName(); + case StreamPackage.DCAE_STREAM_SUBSCRIBER_INTERNAL__SERVICE_NAME: + return getServiceName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_SUBSCRIBER_INTERNAL__LOCAL_NAME: + setLocalName((String)newValue); + return; + case StreamPackage.DCAE_STREAM_SUBSCRIBER_INTERNAL__SERVICE_NAME: + setServiceName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_SUBSCRIBER_INTERNAL__LOCAL_NAME: + setLocalName(LOCAL_NAME_EDEFAULT); + return; + case StreamPackage.DCAE_STREAM_SUBSCRIBER_INTERNAL__SERVICE_NAME: + setServiceName(SERVICE_NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DCAE_STREAM_SUBSCRIBER_INTERNAL__LOCAL_NAME: + return LOCAL_NAME_EDEFAULT == null ? localName != null : !LOCAL_NAME_EDEFAULT.equals(localName); + case StreamPackage.DCAE_STREAM_SUBSCRIBER_INTERNAL__SERVICE_NAME: + return SERVICE_NAME_EDEFAULT == null ? serviceName != null : !SERVICE_NAME_EDEFAULT.equals(serviceName); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == DcaeStreamInternalEndPoint.class) { + switch (derivedFeatureID) { + case StreamPackage.DCAE_STREAM_SUBSCRIBER_INTERNAL__LOCAL_NAME: return StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__LOCAL_NAME; + case StreamPackage.DCAE_STREAM_SUBSCRIBER_INTERNAL__SERVICE_NAME: return StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__SERVICE_NAME; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == DcaeStreamInternalEndPoint.class) { + switch (baseFeatureID) { + case StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__LOCAL_NAME: return StreamPackage.DCAE_STREAM_SUBSCRIBER_INTERNAL__LOCAL_NAME; + case StreamPackage.DCAE_STREAM_INTERNAL_END_POINT__SERVICE_NAME: return StreamPackage.DCAE_STREAM_SUBSCRIBER_INTERNAL__SERVICE_NAME; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (localName: "); + result.append(localName); + result.append(", serviceName: "); + result.append(serviceName); + result.append(')'); + return result.toString(); + } + +} //DcaeStreamSubscriberInternalImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DmaapStreamImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DmaapStreamImpl.java new file mode 100644 index 0000000..a365d18 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DmaapStreamImpl.java @@ -0,0 +1,453 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DmaapStream; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Dmaap Stream'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DmaapStreamImpl#getDmaapDataType Dmaap Data Type}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DmaapStreamImpl#getDmaapAction Dmaap Action}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DmaapStreamImpl#getDmaapUrl Dmaap Url}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DmaapStreamImpl#getDmaapUserName Dmaap User Name}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DmaapStreamImpl#getDmaapPassword Dmaap Password}
  • + *
  • {@link org.openecomp.dcae.controller.core.stream.impl.DmaapStreamImpl#getDmaapAuthMethod Dmaap Auth Method}
  • + *
+ *

+ * + * @generated + */ +public class DmaapStreamImpl extends DcaeStreamImpl implements DmaapStream { + /** + * The default value of the '{@link #getDmaapDataType() Dmaap Data Type}' attribute. + * + * + * @see #getDmaapDataType() + * @generated + * @ordered + */ + protected static final String DMAAP_DATA_TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapDataType() Dmaap Data Type}' attribute. + * + * + * @see #getDmaapDataType() + * @generated + * @ordered + */ + protected String dmaapDataType = DMAAP_DATA_TYPE_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapAction() Dmaap Action}' attribute. + * + * + * @see #getDmaapAction() + * @generated + * @ordered + */ + protected static final String DMAAP_ACTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapAction() Dmaap Action}' attribute. + * + * + * @see #getDmaapAction() + * @generated + * @ordered + */ + protected String dmaapAction = DMAAP_ACTION_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapUrl() Dmaap Url}' attribute. + * + * + * @see #getDmaapUrl() + * @generated + * @ordered + */ + protected static final String DMAAP_URL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapUrl() Dmaap Url}' attribute. + * + * + * @see #getDmaapUrl() + * @generated + * @ordered + */ + protected String dmaapUrl = DMAAP_URL_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapUserName() Dmaap User Name}' attribute. + * + * + * @see #getDmaapUserName() + * @generated + * @ordered + */ + protected static final String DMAAP_USER_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapUserName() Dmaap User Name}' attribute. + * + * + * @see #getDmaapUserName() + * @generated + * @ordered + */ + protected String dmaapUserName = DMAAP_USER_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapPassword() Dmaap Password}' attribute. + * + * + * @see #getDmaapPassword() + * @generated + * @ordered + */ + protected static final String DMAAP_PASSWORD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapPassword() Dmaap Password}' attribute. + * + * + * @see #getDmaapPassword() + * @generated + * @ordered + */ + protected String dmaapPassword = DMAAP_PASSWORD_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapAuthMethod() Dmaap Auth Method}' attribute. + * + * + * @see #getDmaapAuthMethod() + * @generated + * @ordered + */ + protected static final String DMAAP_AUTH_METHOD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapAuthMethod() Dmaap Auth Method}' attribute. + * + * + * @see #getDmaapAuthMethod() + * @generated + * @ordered + */ + protected String dmaapAuthMethod = DMAAP_AUTH_METHOD_EDEFAULT; + + /** + * + * + * @generated + */ + protected DmaapStreamImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StreamPackage.Literals.DMAAP_STREAM; + } + + /** + * + * + * @generated + */ + public String getDmaapDataType() { + return dmaapDataType; + } + + /** + * + * + * @generated + */ + public void setDmaapDataType(String newDmaapDataType) { + String oldDmaapDataType = dmaapDataType; + dmaapDataType = newDmaapDataType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DMAAP_STREAM__DMAAP_DATA_TYPE, oldDmaapDataType, dmaapDataType)); + } + + /** + * + * + * @generated + */ + public String getDmaapAction() { + return dmaapAction; + } + + /** + * + * + * @generated + */ + public void setDmaapAction(String newDmaapAction) { + String oldDmaapAction = dmaapAction; + dmaapAction = newDmaapAction; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DMAAP_STREAM__DMAAP_ACTION, oldDmaapAction, dmaapAction)); + } + + /** + * + * + * @generated + */ + public String getDmaapUrl() { + return dmaapUrl; + } + + /** + * + * + * @generated + */ + public void setDmaapUrl(String newDmaapUrl) { + String oldDmaapUrl = dmaapUrl; + dmaapUrl = newDmaapUrl; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DMAAP_STREAM__DMAAP_URL, oldDmaapUrl, dmaapUrl)); + } + + /** + * + * + * @generated + */ + public String getDmaapUserName() { + return dmaapUserName; + } + + /** + * + * + * @generated + */ + public void setDmaapUserName(String newDmaapUserName) { + String oldDmaapUserName = dmaapUserName; + dmaapUserName = newDmaapUserName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DMAAP_STREAM__DMAAP_USER_NAME, oldDmaapUserName, dmaapUserName)); + } + + /** + * + * + * @generated + */ + public String getDmaapPassword() { + return dmaapPassword; + } + + /** + * + * + * @generated + */ + public void setDmaapPassword(String newDmaapPassword) { + String oldDmaapPassword = dmaapPassword; + dmaapPassword = newDmaapPassword; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DMAAP_STREAM__DMAAP_PASSWORD, oldDmaapPassword, dmaapPassword)); + } + + /** + * + * + * @generated + */ + public String getDmaapAuthMethod() { + return dmaapAuthMethod; + } + + /** + * + * + * @generated + */ + public void setDmaapAuthMethod(String newDmaapAuthMethod) { + String oldDmaapAuthMethod = dmaapAuthMethod; + dmaapAuthMethod = newDmaapAuthMethod; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StreamPackage.DMAAP_STREAM__DMAAP_AUTH_METHOD, oldDmaapAuthMethod, dmaapAuthMethod)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StreamPackage.DMAAP_STREAM__DMAAP_DATA_TYPE: + return getDmaapDataType(); + case StreamPackage.DMAAP_STREAM__DMAAP_ACTION: + return getDmaapAction(); + case StreamPackage.DMAAP_STREAM__DMAAP_URL: + return getDmaapUrl(); + case StreamPackage.DMAAP_STREAM__DMAAP_USER_NAME: + return getDmaapUserName(); + case StreamPackage.DMAAP_STREAM__DMAAP_PASSWORD: + return getDmaapPassword(); + case StreamPackage.DMAAP_STREAM__DMAAP_AUTH_METHOD: + return getDmaapAuthMethod(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StreamPackage.DMAAP_STREAM__DMAAP_DATA_TYPE: + setDmaapDataType((String)newValue); + return; + case StreamPackage.DMAAP_STREAM__DMAAP_ACTION: + setDmaapAction((String)newValue); + return; + case StreamPackage.DMAAP_STREAM__DMAAP_URL: + setDmaapUrl((String)newValue); + return; + case StreamPackage.DMAAP_STREAM__DMAAP_USER_NAME: + setDmaapUserName((String)newValue); + return; + case StreamPackage.DMAAP_STREAM__DMAAP_PASSWORD: + setDmaapPassword((String)newValue); + return; + case StreamPackage.DMAAP_STREAM__DMAAP_AUTH_METHOD: + setDmaapAuthMethod((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StreamPackage.DMAAP_STREAM__DMAAP_DATA_TYPE: + setDmaapDataType(DMAAP_DATA_TYPE_EDEFAULT); + return; + case StreamPackage.DMAAP_STREAM__DMAAP_ACTION: + setDmaapAction(DMAAP_ACTION_EDEFAULT); + return; + case StreamPackage.DMAAP_STREAM__DMAAP_URL: + setDmaapUrl(DMAAP_URL_EDEFAULT); + return; + case StreamPackage.DMAAP_STREAM__DMAAP_USER_NAME: + setDmaapUserName(DMAAP_USER_NAME_EDEFAULT); + return; + case StreamPackage.DMAAP_STREAM__DMAAP_PASSWORD: + setDmaapPassword(DMAAP_PASSWORD_EDEFAULT); + return; + case StreamPackage.DMAAP_STREAM__DMAAP_AUTH_METHOD: + setDmaapAuthMethod(DMAAP_AUTH_METHOD_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StreamPackage.DMAAP_STREAM__DMAAP_DATA_TYPE: + return DMAAP_DATA_TYPE_EDEFAULT == null ? dmaapDataType != null : !DMAAP_DATA_TYPE_EDEFAULT.equals(dmaapDataType); + case StreamPackage.DMAAP_STREAM__DMAAP_ACTION: + return DMAAP_ACTION_EDEFAULT == null ? dmaapAction != null : !DMAAP_ACTION_EDEFAULT.equals(dmaapAction); + case StreamPackage.DMAAP_STREAM__DMAAP_URL: + return DMAAP_URL_EDEFAULT == null ? dmaapUrl != null : !DMAAP_URL_EDEFAULT.equals(dmaapUrl); + case StreamPackage.DMAAP_STREAM__DMAAP_USER_NAME: + return DMAAP_USER_NAME_EDEFAULT == null ? dmaapUserName != null : !DMAAP_USER_NAME_EDEFAULT.equals(dmaapUserName); + case StreamPackage.DMAAP_STREAM__DMAAP_PASSWORD: + return DMAAP_PASSWORD_EDEFAULT == null ? dmaapPassword != null : !DMAAP_PASSWORD_EDEFAULT.equals(dmaapPassword); + case StreamPackage.DMAAP_STREAM__DMAAP_AUTH_METHOD: + return DMAAP_AUTH_METHOD_EDEFAULT == null ? dmaapAuthMethod != null : !DMAAP_AUTH_METHOD_EDEFAULT.equals(dmaapAuthMethod); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (dmaapDataType: "); + result.append(dmaapDataType); + result.append(", dmaapAction: "); + result.append(dmaapAction); + result.append(", dmaapUrl: "); + result.append(dmaapUrl); + result.append(", dmaapUserName: "); + result.append(dmaapUserName); + result.append(", dmaapPassword: "); + result.append(dmaapPassword); + result.append(", dmaapAuthMethod: "); + result.append(dmaapAuthMethod); + result.append(')'); + return result.toString(); + } + +} //DmaapStreamImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/StreamFactoryImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/StreamFactoryImpl.java new file mode 100644 index 0000000..a0f0649 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/StreamFactoryImpl.java @@ -0,0 +1,378 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class StreamFactoryImpl extends EFactoryImpl implements StreamFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static StreamFactory init() { + try { + StreamFactory theStreamFactory = (StreamFactory)EPackage.Registry.INSTANCE.getEFactory(StreamPackage.eNS_URI); + if (theStreamFactory != null) { + return theStreamFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new StreamFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public StreamFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case StreamPackage.DCAE_STREAM: return createDcaeStream(); + case StreamPackage.DMAAP_STREAM: return createDmaapStream(); + case StreamPackage.DCAE_STREAM_DEFINITION: return createDcaeStreamDefinition(); + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL: return createDcaeStreamPublisherExternal(); + case StreamPackage.DCAE_STREAM_PUBLISHER_INTERNAL: return createDcaeStreamPublisherInternal(); + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL: return createDcaeStreamSubscriberExternal(); + case StreamPackage.DCAE_STREAM_SUBSCRIBER_INTERNAL: return createDcaeStreamSubscriberInternal(); + case StreamPackage.DCAE_STREAM_INTERNAL_END_POINT: return createDcaeStreamInternalEndPoint(); + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT: return createDcaeStreamExternalEndPoint(); + case StreamPackage.DATABUS_STREAM_TOPIC: return createDatabusStreamTopic(); + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT: return createDatabusStreamTopicClient(); + case StreamPackage.DATABUS_STREAM_FEED: return createDatabusStreamFeed(); + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER: return createDatabusStreamFeedPublisher(); + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER: return createDatabusStreamFeedSubscriber(); + case StreamPackage.DATABUS_ENTITY: return createDatabusEntity(); + case StreamPackage.DATABUS_LOCATION: return createDatabusLocation(); + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER: return createDatabusMessageRouterCluster(); + case StreamPackage.DATABUS_DATA_ROUTER_NODE: return createDatabusDataRouterNode(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case StreamPackage.DATABUS_STREAM_TOPIC_ACTION: + return createDatabusStreamTopicActionFromString(eDataType, initialValue); + case StreamPackage.STREAM_AUTHENTICATION: + return createStreamAuthenticationFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case StreamPackage.DATABUS_STREAM_TOPIC_ACTION: + return convertDatabusStreamTopicActionToString(eDataType, instanceValue); + case StreamPackage.STREAM_AUTHENTICATION: + return convertStreamAuthenticationToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public DcaeStream createDcaeStream() { + DcaeStreamImpl dcaeStream = new DcaeStreamImpl(); + return dcaeStream; + } + + /** + * + * + * @generated + */ + public DmaapStream createDmaapStream() { + DmaapStreamImpl dmaapStream = new DmaapStreamImpl(); + return dmaapStream; + } + + /** + * + * + * @generated + */ + public DcaeStreamDefinition createDcaeStreamDefinition() { + DcaeStreamDefinitionImpl dcaeStreamDefinition = new DcaeStreamDefinitionImpl(); + return dcaeStreamDefinition; + } + + /** + * + * + * @generated + */ + public DcaeStreamPublisherExternal createDcaeStreamPublisherExternal() { + DcaeStreamPublisherExternalImpl dcaeStreamPublisherExternal = new DcaeStreamPublisherExternalImpl(); + return dcaeStreamPublisherExternal; + } + + /** + * + * + * @generated + */ + public DcaeStreamPublisherInternal createDcaeStreamPublisherInternal() { + DcaeStreamPublisherInternalImpl dcaeStreamPublisherInternal = new DcaeStreamPublisherInternalImpl(); + return dcaeStreamPublisherInternal; + } + + /** + * + * + * @generated + */ + public DcaeStreamSubscriberExternal createDcaeStreamSubscriberExternal() { + DcaeStreamSubscriberExternalImpl dcaeStreamSubscriberExternal = new DcaeStreamSubscriberExternalImpl(); + return dcaeStreamSubscriberExternal; + } + + /** + * + * + * @generated + */ + public DcaeStreamSubscriberInternal createDcaeStreamSubscriberInternal() { + DcaeStreamSubscriberInternalImpl dcaeStreamSubscriberInternal = new DcaeStreamSubscriberInternalImpl(); + return dcaeStreamSubscriberInternal; + } + + /** + * + * + * @generated + */ + public DcaeStreamInternalEndPoint createDcaeStreamInternalEndPoint() { + DcaeStreamInternalEndPointImpl dcaeStreamInternalEndPoint = new DcaeStreamInternalEndPointImpl(); + return dcaeStreamInternalEndPoint; + } + + /** + * + * + * @generated + */ + public DcaeStreamExternalEndPoint createDcaeStreamExternalEndPoint() { + DcaeStreamExternalEndPointImpl dcaeStreamExternalEndPoint = new DcaeStreamExternalEndPointImpl(); + return dcaeStreamExternalEndPoint; + } + + /** + * + * + * @generated + */ + public DatabusStreamTopic createDatabusStreamTopic() { + DatabusStreamTopicImpl databusStreamTopic = new DatabusStreamTopicImpl(); + return databusStreamTopic; + } + + /** + * + * + * @generated + */ + public DatabusStreamTopicClient createDatabusStreamTopicClient() { + DatabusStreamTopicClientImpl databusStreamTopicClient = new DatabusStreamTopicClientImpl(); + return databusStreamTopicClient; + } + + /** + * + * + * @generated + */ + public DatabusStreamFeed createDatabusStreamFeed() { + DatabusStreamFeedImpl databusStreamFeed = new DatabusStreamFeedImpl(); + return databusStreamFeed; + } + + /** + * + * + * @generated + */ + public DatabusStreamFeedPublisher createDatabusStreamFeedPublisher() { + DatabusStreamFeedPublisherImpl databusStreamFeedPublisher = new DatabusStreamFeedPublisherImpl(); + return databusStreamFeedPublisher; + } + + /** + * + * + * @generated + */ + public DatabusStreamFeedSubscriber createDatabusStreamFeedSubscriber() { + DatabusStreamFeedSubscriberImpl databusStreamFeedSubscriber = new DatabusStreamFeedSubscriberImpl(); + return databusStreamFeedSubscriber; + } + + /** + * + * + * @generated + */ + public DatabusEntity createDatabusEntity() { + DatabusEntityImpl databusEntity = new DatabusEntityImpl(); + return databusEntity; + } + + /** + * + * + * @generated + */ + public DatabusLocation createDatabusLocation() { + DatabusLocationImpl databusLocation = new DatabusLocationImpl(); + return databusLocation; + } + + /** + * + * + * @generated + */ + public DatabusMessageRouterCluster createDatabusMessageRouterCluster() { + DatabusMessageRouterClusterImpl databusMessageRouterCluster = new DatabusMessageRouterClusterImpl(); + return databusMessageRouterCluster; + } + + /** + * + * + * @generated + */ + public DatabusDataRouterNode createDatabusDataRouterNode() { + DatabusDataRouterNodeImpl databusDataRouterNode = new DatabusDataRouterNodeImpl(); + return databusDataRouterNode; + } + + /** + * + * + * @generated + */ + public DatabusStreamTopicAction createDatabusStreamTopicActionFromString(EDataType eDataType, String initialValue) { + DatabusStreamTopicAction result = DatabusStreamTopicAction.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertDatabusStreamTopicActionToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public StreamAuthentication createStreamAuthenticationFromString(EDataType eDataType, String initialValue) { + StreamAuthentication result = StreamAuthentication.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertStreamAuthenticationToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public StreamPackage getStreamPackage() { + return (StreamPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static StreamPackage getPackage() { + return StreamPackage.eINSTANCE; + } + +} //StreamFactoryImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/StreamPackageImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/StreamPackageImpl.java new file mode 100644 index 0000000..9523175 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/StreamPackageImpl.java @@ -0,0 +1,1571 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.impl; + +import org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode; +import org.openecomp.dcae.controller.core.stream.DatabusEntity; +import org.openecomp.dcae.controller.core.stream.DatabusLocation; +import org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster; +import org.openecomp.dcae.controller.core.stream.DatabusStream; +import org.openecomp.dcae.controller.core.stream.DatabusStreamFeed; +import org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher; +import org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber; +import org.openecomp.dcae.controller.core.stream.DatabusStreamTopic; +import org.openecomp.dcae.controller.core.stream.DatabusStreamTopicAction; +import org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient; +import org.openecomp.dcae.controller.core.stream.DcaeStream; +import org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition; +import org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint; +import org.openecomp.dcae.controller.core.stream.DcaeStreamInternalEndPoint; +import org.openecomp.dcae.controller.core.stream.DcaeStreamPublisher; +import org.openecomp.dcae.controller.core.stream.DcaeStreamPublisherExternal; +import org.openecomp.dcae.controller.core.stream.DcaeStreamPublisherInternal; +import org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriber; +import org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriberExternal; +import org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriberInternal; +import org.openecomp.dcae.controller.core.stream.DmaapStream; +import org.openecomp.dcae.controller.core.stream.StreamFactory; +import org.openecomp.dcae.controller.core.stream.StreamPackage; + +import org.openecomp.dcae.controller.core.stream.StreamAuthentication; +import org.openecomp.ncomp.core.CorePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class StreamPackageImpl extends EPackageImpl implements StreamPackage { + /** + * + * + * @generated + */ + private EClass dcaeStreamEClass = null; + + /** + * + * + * @generated + */ + private EClass dmaapStreamEClass = null; + + /** + * + * + * @generated + */ + private EClass dcaeStreamDefinitionEClass = null; + + /** + * + * + * @generated + */ + private EClass dcaeStreamPublisherEClass = null; + + /** + * + * + * @generated + */ + private EClass dcaeStreamSubscriberEClass = null; + + /** + * + * + * @generated + */ + private EClass dcaeStreamPublisherExternalEClass = null; + + /** + * + * + * @generated + */ + private EClass dcaeStreamPublisherInternalEClass = null; + + /** + * + * + * @generated + */ + private EClass dcaeStreamSubscriberExternalEClass = null; + + /** + * + * + * @generated + */ + private EClass dcaeStreamSubscriberInternalEClass = null; + + /** + * + * + * @generated + */ + private EClass dcaeStreamInternalEndPointEClass = null; + + /** + * + * + * @generated + */ + private EClass dcaeStreamExternalEndPointEClass = null; + + /** + * + * + * @generated + */ + private EClass databusStreamEClass = null; + + /** + * + * + * @generated + */ + private EClass databusStreamTopicEClass = null; + + /** + * + * + * @generated + */ + private EClass databusStreamTopicClientEClass = null; + + /** + * + * + * @generated + */ + private EClass databusStreamFeedEClass = null; + + /** + * + * + * @generated + */ + private EClass databusStreamFeedPublisherEClass = null; + + /** + * + * + * @generated + */ + private EClass databusStreamFeedSubscriberEClass = null; + + /** + * + * + * @generated + */ + private EClass databusEntityEClass = null; + + /** + * + * + * @generated + */ + private EClass databusLocationEClass = null; + + /** + * + * + * @generated + */ + private EClass databusMessageRouterClusterEClass = null; + + /** + * + * + * @generated + */ + private EClass databusDataRouterNodeEClass = null; + + /** + * + * + * @generated + */ + private EEnum databusStreamTopicActionEEnum = null; + + /** + * + * + * @generated + */ + private EEnum streamAuthenticationEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.core.stream.StreamPackage#eNS_URI + * @see #init() + * @generated + */ + private StreamPackageImpl() { + super(eNS_URI, StreamFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link StreamPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static StreamPackage init() { + if (isInited) return (StreamPackage)EPackage.Registry.INSTANCE.getEPackage(StreamPackage.eNS_URI); + + // Obtain or create and register package + StreamPackageImpl theStreamPackage = (StreamPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof StreamPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new StreamPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + CorePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theStreamPackage.createPackageContents(); + + // Initialize created meta-data + theStreamPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theStreamPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(StreamPackage.eNS_URI, theStreamPackage); + return theStreamPackage; + } + + /** + * + * + * @generated + */ + public EClass getDcaeStream() { + return dcaeStreamEClass; + } + + /** + * + * + * @generated + */ + public EClass getDmaapStream() { + return dmaapStreamEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDmaapStream_DmaapDataType() { + return (EAttribute)dmaapStreamEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDmaapStream_DmaapAction() { + return (EAttribute)dmaapStreamEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDmaapStream_DmaapUrl() { + return (EAttribute)dmaapStreamEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getDmaapStream_DmaapUserName() { + return (EAttribute)dmaapStreamEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getDmaapStream_DmaapPassword() { + return (EAttribute)dmaapStreamEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getDmaapStream_DmaapAuthMethod() { + return (EAttribute)dmaapStreamEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EClass getDcaeStreamDefinition() { + return dcaeStreamDefinitionEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeStreamDefinition_StreamType() { + return (EAttribute)dcaeStreamDefinitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeStreamDefinition_DatabusType() { + return (EAttribute)dcaeStreamDefinitionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getDcaeStreamDefinition_Publishers() { + return (EReference)dcaeStreamDefinitionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getDcaeStreamDefinition_Subscribers() { + return (EReference)dcaeStreamDefinitionEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getDcaeStreamPublisher() { + return dcaeStreamPublisherEClass; + } + + /** + * + * + * @generated + */ + public EClass getDcaeStreamSubscriber() { + return dcaeStreamSubscriberEClass; + } + + /** + * + * + * @generated + */ + public EClass getDcaeStreamPublisherExternal() { + return dcaeStreamPublisherExternalEClass; + } + + /** + * + * + * @generated + */ + public EClass getDcaeStreamPublisherInternal() { + return dcaeStreamPublisherInternalEClass; + } + + /** + * + * + * @generated + */ + public EClass getDcaeStreamSubscriberExternal() { + return dcaeStreamSubscriberExternalEClass; + } + + /** + * + * + * @generated + */ + public EClass getDcaeStreamSubscriberInternal() { + return dcaeStreamSubscriberInternalEClass; + } + + /** + * + * + * @generated + */ + public EClass getDcaeStreamInternalEndPoint() { + return dcaeStreamInternalEndPointEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeStreamInternalEndPoint_LocalName() { + return (EAttribute)dcaeStreamInternalEndPointEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeStreamInternalEndPoint_ServiceName() { + return (EAttribute)dcaeStreamInternalEndPointEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getDcaeStreamExternalEndPoint() { + return dcaeStreamExternalEndPointEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeStreamExternalEndPoint_User() { + return (EAttribute)dcaeStreamExternalEndPointEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeStreamExternalEndPoint_Password() { + return (EAttribute)dcaeStreamExternalEndPointEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDcaeStreamExternalEndPoint_Url() { + return (EAttribute)dcaeStreamExternalEndPointEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getDatabusStream() { + return databusStreamEClass; + } + + /** + * + * + * @generated + */ + public EClass getDatabusStreamTopic() { + return databusStreamTopicEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopic_TopicName() { + return (EAttribute)databusStreamTopicEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopic_TopicDescription() { + return (EAttribute)databusStreamTopicEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopic_DcaeLocationName() { + return (EAttribute)databusStreamTopicEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopic_Owner() { + return (EAttribute)databusStreamTopicEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopic_Txenabled() { + return (EAttribute)databusStreamTopicEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopic_Fqtn() { + return (EAttribute)databusStreamTopicEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopic_LastMod() { + return (EAttribute)databusStreamTopicEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopic_Status() { + return (EAttribute)databusStreamTopicEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EReference getDatabusStreamTopic_Clients() { + return (EReference)databusStreamTopicEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopic_PublishURL() { + return (EAttribute)databusStreamTopicEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopic_SubscribeURL() { + return (EAttribute)databusStreamTopicEClass.getEStructuralFeatures().get(10); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopic_AuthenticationMethod() { + return (EAttribute)databusStreamTopicEClass.getEStructuralFeatures().get(11); + } + + /** + * + * + * @generated + */ + public EClass getDatabusStreamTopicClient() { + return databusStreamTopicClientEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopicClient_LocalStreamId() { + return (EAttribute)databusStreamTopicClientEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopicClient_DcaeLocationName() { + return (EAttribute)databusStreamTopicClientEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopicClient_ClientRole() { + return (EAttribute)databusStreamTopicClientEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopicClient_Action() { + return (EAttribute)databusStreamTopicClientEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopicClient_Username() { + return (EAttribute)databusStreamTopicClientEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopicClient_Userpwd() { + return (EAttribute)databusStreamTopicClientEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopicClient_Fqtn() { + return (EAttribute)databusStreamTopicClientEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopicClient_MrClientId() { + return (EAttribute)databusStreamTopicClientEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamTopicClient_TopicURL() { + return (EAttribute)databusStreamTopicClientEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EClass getDatabusStreamFeed() { + return databusStreamFeedEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeed_FeedName() { + return (EAttribute)databusStreamFeedEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeed_FeedVersion() { + return (EAttribute)databusStreamFeedEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeed_FeedDescription() { + return (EAttribute)databusStreamFeedEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeed_AsprClassification() { + return (EAttribute)databusStreamFeedEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeed_Owner() { + return (EAttribute)databusStreamFeedEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeed_FeedId() { + return (EAttribute)databusStreamFeedEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeed_LogURL() { + return (EAttribute)databusStreamFeedEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeed_PublishURL() { + return (EAttribute)databusStreamFeedEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeed_SubscribeURL() { + return (EAttribute)databusStreamFeedEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeed_Status() { + return (EAttribute)databusStreamFeedEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeed_Suspended() { + return (EAttribute)databusStreamFeedEClass.getEStructuralFeatures().get(10); + } + + /** + * + * + * @generated + */ + public EReference getDatabusStreamFeed_Publishers() { + return (EReference)databusStreamFeedEClass.getEStructuralFeatures().get(11); + } + + /** + * + * + * @generated + */ + public EReference getDatabusStreamFeed_Subscribers() { + return (EReference)databusStreamFeedEClass.getEStructuralFeatures().get(12); + } + + /** + * + * + * @generated + */ + public EClass getDatabusStreamFeedPublisher() { + return databusStreamFeedPublisherEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedPublisher_LocalStreamId() { + return (EAttribute)databusStreamFeedPublisherEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedPublisher_DcaeLocationName() { + return (EAttribute)databusStreamFeedPublisherEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedPublisher_FeedId() { + return (EAttribute)databusStreamFeedPublisherEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedPublisher_PubId() { + return (EAttribute)databusStreamFeedPublisherEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedPublisher_Status() { + return (EAttribute)databusStreamFeedPublisherEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedPublisher_Username() { + return (EAttribute)databusStreamFeedPublisherEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedPublisher_Userpwd() { + return (EAttribute)databusStreamFeedPublisherEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EClass getDatabusStreamFeedSubscriber() { + return databusStreamFeedSubscriberEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedSubscriber_LocalStreamId() { + return (EAttribute)databusStreamFeedSubscriberEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedSubscriber_DcaeLocationName() { + return (EAttribute)databusStreamFeedSubscriberEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedSubscriber_OtherFeedName() { + return (EAttribute)databusStreamFeedSubscriberEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedSubscriber_FeedId() { + return (EAttribute)databusStreamFeedSubscriberEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedSubscriber_LogURL() { + return (EAttribute)databusStreamFeedSubscriberEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedSubscriber_Owner() { + return (EAttribute)databusStreamFeedSubscriberEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedSubscriber_SubId() { + return (EAttribute)databusStreamFeedSubscriberEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedSubscriber_Suspended() { + return (EAttribute)databusStreamFeedSubscriberEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedSubscriber_Use100() { + return (EAttribute)databusStreamFeedSubscriberEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedSubscriber_Username() { + return (EAttribute)databusStreamFeedSubscriberEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedSubscriber_Userpwd() { + return (EAttribute)databusStreamFeedSubscriberEClass.getEStructuralFeatures().get(10); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusStreamFeedSubscriber_DeliveryURL() { + return (EAttribute)databusStreamFeedSubscriberEClass.getEStructuralFeatures().get(11); + } + + /** + * + * + * @generated + */ + public EClass getDatabusEntity() { + return databusEntityEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusEntity_Status() { + return (EAttribute)databusEntityEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusEntity_LastModified() { + return (EAttribute)databusEntityEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusEntity_Type() { + return (EAttribute)databusEntityEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getDatabusLocation() { + return databusLocationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusLocation_DcaeLayer() { + return (EAttribute)databusLocationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getDatabusMessageRouterCluster() { + return databusMessageRouterClusterEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusMessageRouterCluster_DcaeLocationName() { + return (EAttribute)databusMessageRouterClusterEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusMessageRouterCluster_ServiceFqdn() { + return (EAttribute)databusMessageRouterClusterEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusMessageRouterCluster_HostFqdn() { + return (EAttribute)databusMessageRouterClusterEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusMessageRouterCluster_TopicPort() { + return (EAttribute)databusMessageRouterClusterEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusMessageRouterCluster_TopicProtocol() { + return (EAttribute)databusMessageRouterClusterEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getDatabusDataRouterNode() { + return databusDataRouterNodeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusDataRouterNode_DcaeLocationName() { + return (EAttribute)databusDataRouterNodeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusDataRouterNode_HostFqdn() { + return (EAttribute)databusDataRouterNodeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabusDataRouterNode_Version() { + return (EAttribute)databusDataRouterNodeEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EEnum getDatabusStreamTopicAction() { + return databusStreamTopicActionEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getStreamAuthentication() { + return streamAuthenticationEEnum; + } + + /** + * + * + * @generated + */ + public StreamFactory getStreamFactory() { + return (StreamFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + dcaeStreamEClass = createEClass(DCAE_STREAM); + + dmaapStreamEClass = createEClass(DMAAP_STREAM); + createEAttribute(dmaapStreamEClass, DMAAP_STREAM__DMAAP_DATA_TYPE); + createEAttribute(dmaapStreamEClass, DMAAP_STREAM__DMAAP_ACTION); + createEAttribute(dmaapStreamEClass, DMAAP_STREAM__DMAAP_URL); + createEAttribute(dmaapStreamEClass, DMAAP_STREAM__DMAAP_USER_NAME); + createEAttribute(dmaapStreamEClass, DMAAP_STREAM__DMAAP_PASSWORD); + createEAttribute(dmaapStreamEClass, DMAAP_STREAM__DMAAP_AUTH_METHOD); + + dcaeStreamDefinitionEClass = createEClass(DCAE_STREAM_DEFINITION); + createEAttribute(dcaeStreamDefinitionEClass, DCAE_STREAM_DEFINITION__STREAM_TYPE); + createEAttribute(dcaeStreamDefinitionEClass, DCAE_STREAM_DEFINITION__DATABUS_TYPE); + createEReference(dcaeStreamDefinitionEClass, DCAE_STREAM_DEFINITION__PUBLISHERS); + createEReference(dcaeStreamDefinitionEClass, DCAE_STREAM_DEFINITION__SUBSCRIBERS); + + dcaeStreamPublisherEClass = createEClass(DCAE_STREAM_PUBLISHER); + + dcaeStreamSubscriberEClass = createEClass(DCAE_STREAM_SUBSCRIBER); + + dcaeStreamPublisherExternalEClass = createEClass(DCAE_STREAM_PUBLISHER_EXTERNAL); + + dcaeStreamPublisherInternalEClass = createEClass(DCAE_STREAM_PUBLISHER_INTERNAL); + + dcaeStreamSubscriberExternalEClass = createEClass(DCAE_STREAM_SUBSCRIBER_EXTERNAL); + + dcaeStreamSubscriberInternalEClass = createEClass(DCAE_STREAM_SUBSCRIBER_INTERNAL); + + dcaeStreamInternalEndPointEClass = createEClass(DCAE_STREAM_INTERNAL_END_POINT); + createEAttribute(dcaeStreamInternalEndPointEClass, DCAE_STREAM_INTERNAL_END_POINT__LOCAL_NAME); + createEAttribute(dcaeStreamInternalEndPointEClass, DCAE_STREAM_INTERNAL_END_POINT__SERVICE_NAME); + + dcaeStreamExternalEndPointEClass = createEClass(DCAE_STREAM_EXTERNAL_END_POINT); + createEAttribute(dcaeStreamExternalEndPointEClass, DCAE_STREAM_EXTERNAL_END_POINT__USER); + createEAttribute(dcaeStreamExternalEndPointEClass, DCAE_STREAM_EXTERNAL_END_POINT__PASSWORD); + createEAttribute(dcaeStreamExternalEndPointEClass, DCAE_STREAM_EXTERNAL_END_POINT__URL); + + databusStreamEClass = createEClass(DATABUS_STREAM); + + databusStreamTopicEClass = createEClass(DATABUS_STREAM_TOPIC); + createEAttribute(databusStreamTopicEClass, DATABUS_STREAM_TOPIC__TOPIC_NAME); + createEAttribute(databusStreamTopicEClass, DATABUS_STREAM_TOPIC__TOPIC_DESCRIPTION); + createEAttribute(databusStreamTopicEClass, DATABUS_STREAM_TOPIC__DCAE_LOCATION_NAME); + createEAttribute(databusStreamTopicEClass, DATABUS_STREAM_TOPIC__OWNER); + createEAttribute(databusStreamTopicEClass, DATABUS_STREAM_TOPIC__TXENABLED); + createEAttribute(databusStreamTopicEClass, DATABUS_STREAM_TOPIC__FQTN); + createEAttribute(databusStreamTopicEClass, DATABUS_STREAM_TOPIC__LAST_MOD); + createEAttribute(databusStreamTopicEClass, DATABUS_STREAM_TOPIC__STATUS); + createEReference(databusStreamTopicEClass, DATABUS_STREAM_TOPIC__CLIENTS); + createEAttribute(databusStreamTopicEClass, DATABUS_STREAM_TOPIC__PUBLISH_URL); + createEAttribute(databusStreamTopicEClass, DATABUS_STREAM_TOPIC__SUBSCRIBE_URL); + createEAttribute(databusStreamTopicEClass, DATABUS_STREAM_TOPIC__AUTHENTICATION_METHOD); + + databusStreamTopicClientEClass = createEClass(DATABUS_STREAM_TOPIC_CLIENT); + createEAttribute(databusStreamTopicClientEClass, DATABUS_STREAM_TOPIC_CLIENT__LOCAL_STREAM_ID); + createEAttribute(databusStreamTopicClientEClass, DATABUS_STREAM_TOPIC_CLIENT__DCAE_LOCATION_NAME); + createEAttribute(databusStreamTopicClientEClass, DATABUS_STREAM_TOPIC_CLIENT__CLIENT_ROLE); + createEAttribute(databusStreamTopicClientEClass, DATABUS_STREAM_TOPIC_CLIENT__ACTION); + createEAttribute(databusStreamTopicClientEClass, DATABUS_STREAM_TOPIC_CLIENT__USERNAME); + createEAttribute(databusStreamTopicClientEClass, DATABUS_STREAM_TOPIC_CLIENT__USERPWD); + createEAttribute(databusStreamTopicClientEClass, DATABUS_STREAM_TOPIC_CLIENT__FQTN); + createEAttribute(databusStreamTopicClientEClass, DATABUS_STREAM_TOPIC_CLIENT__MR_CLIENT_ID); + createEAttribute(databusStreamTopicClientEClass, DATABUS_STREAM_TOPIC_CLIENT__TOPIC_URL); + + databusStreamFeedEClass = createEClass(DATABUS_STREAM_FEED); + createEAttribute(databusStreamFeedEClass, DATABUS_STREAM_FEED__FEED_NAME); + createEAttribute(databusStreamFeedEClass, DATABUS_STREAM_FEED__FEED_VERSION); + createEAttribute(databusStreamFeedEClass, DATABUS_STREAM_FEED__FEED_DESCRIPTION); + createEAttribute(databusStreamFeedEClass, DATABUS_STREAM_FEED__ASPR_CLASSIFICATION); + createEAttribute(databusStreamFeedEClass, DATABUS_STREAM_FEED__OWNER); + createEAttribute(databusStreamFeedEClass, DATABUS_STREAM_FEED__FEED_ID); + createEAttribute(databusStreamFeedEClass, DATABUS_STREAM_FEED__LOG_URL); + createEAttribute(databusStreamFeedEClass, DATABUS_STREAM_FEED__PUBLISH_URL); + createEAttribute(databusStreamFeedEClass, DATABUS_STREAM_FEED__SUBSCRIBE_URL); + createEAttribute(databusStreamFeedEClass, DATABUS_STREAM_FEED__STATUS); + createEAttribute(databusStreamFeedEClass, DATABUS_STREAM_FEED__SUSPENDED); + createEReference(databusStreamFeedEClass, DATABUS_STREAM_FEED__PUBLISHERS); + createEReference(databusStreamFeedEClass, DATABUS_STREAM_FEED__SUBSCRIBERS); + + databusStreamFeedPublisherEClass = createEClass(DATABUS_STREAM_FEED_PUBLISHER); + createEAttribute(databusStreamFeedPublisherEClass, DATABUS_STREAM_FEED_PUBLISHER__LOCAL_STREAM_ID); + createEAttribute(databusStreamFeedPublisherEClass, DATABUS_STREAM_FEED_PUBLISHER__DCAE_LOCATION_NAME); + createEAttribute(databusStreamFeedPublisherEClass, DATABUS_STREAM_FEED_PUBLISHER__FEED_ID); + createEAttribute(databusStreamFeedPublisherEClass, DATABUS_STREAM_FEED_PUBLISHER__PUB_ID); + createEAttribute(databusStreamFeedPublisherEClass, DATABUS_STREAM_FEED_PUBLISHER__STATUS); + createEAttribute(databusStreamFeedPublisherEClass, DATABUS_STREAM_FEED_PUBLISHER__USERNAME); + createEAttribute(databusStreamFeedPublisherEClass, DATABUS_STREAM_FEED_PUBLISHER__USERPWD); + + databusStreamFeedSubscriberEClass = createEClass(DATABUS_STREAM_FEED_SUBSCRIBER); + createEAttribute(databusStreamFeedSubscriberEClass, DATABUS_STREAM_FEED_SUBSCRIBER__LOCAL_STREAM_ID); + createEAttribute(databusStreamFeedSubscriberEClass, DATABUS_STREAM_FEED_SUBSCRIBER__DCAE_LOCATION_NAME); + createEAttribute(databusStreamFeedSubscriberEClass, DATABUS_STREAM_FEED_SUBSCRIBER__OTHER_FEED_NAME); + createEAttribute(databusStreamFeedSubscriberEClass, DATABUS_STREAM_FEED_SUBSCRIBER__FEED_ID); + createEAttribute(databusStreamFeedSubscriberEClass, DATABUS_STREAM_FEED_SUBSCRIBER__LOG_URL); + createEAttribute(databusStreamFeedSubscriberEClass, DATABUS_STREAM_FEED_SUBSCRIBER__OWNER); + createEAttribute(databusStreamFeedSubscriberEClass, DATABUS_STREAM_FEED_SUBSCRIBER__SUB_ID); + createEAttribute(databusStreamFeedSubscriberEClass, DATABUS_STREAM_FEED_SUBSCRIBER__SUSPENDED); + createEAttribute(databusStreamFeedSubscriberEClass, DATABUS_STREAM_FEED_SUBSCRIBER__USE100); + createEAttribute(databusStreamFeedSubscriberEClass, DATABUS_STREAM_FEED_SUBSCRIBER__USERNAME); + createEAttribute(databusStreamFeedSubscriberEClass, DATABUS_STREAM_FEED_SUBSCRIBER__USERPWD); + createEAttribute(databusStreamFeedSubscriberEClass, DATABUS_STREAM_FEED_SUBSCRIBER__DELIVERY_URL); + + databusEntityEClass = createEClass(DATABUS_ENTITY); + createEAttribute(databusEntityEClass, DATABUS_ENTITY__STATUS); + createEAttribute(databusEntityEClass, DATABUS_ENTITY__LAST_MODIFIED); + createEAttribute(databusEntityEClass, DATABUS_ENTITY__TYPE); + + databusLocationEClass = createEClass(DATABUS_LOCATION); + createEAttribute(databusLocationEClass, DATABUS_LOCATION__DCAE_LAYER); + + databusMessageRouterClusterEClass = createEClass(DATABUS_MESSAGE_ROUTER_CLUSTER); + createEAttribute(databusMessageRouterClusterEClass, DATABUS_MESSAGE_ROUTER_CLUSTER__DCAE_LOCATION_NAME); + createEAttribute(databusMessageRouterClusterEClass, DATABUS_MESSAGE_ROUTER_CLUSTER__SERVICE_FQDN); + createEAttribute(databusMessageRouterClusterEClass, DATABUS_MESSAGE_ROUTER_CLUSTER__HOST_FQDN); + createEAttribute(databusMessageRouterClusterEClass, DATABUS_MESSAGE_ROUTER_CLUSTER__TOPIC_PORT); + createEAttribute(databusMessageRouterClusterEClass, DATABUS_MESSAGE_ROUTER_CLUSTER__TOPIC_PROTOCOL); + + databusDataRouterNodeEClass = createEClass(DATABUS_DATA_ROUTER_NODE); + createEAttribute(databusDataRouterNodeEClass, DATABUS_DATA_ROUTER_NODE__DCAE_LOCATION_NAME); + createEAttribute(databusDataRouterNodeEClass, DATABUS_DATA_ROUTER_NODE__HOST_FQDN); + createEAttribute(databusDataRouterNodeEClass, DATABUS_DATA_ROUTER_NODE__VERSION); + + // Create enums + databusStreamTopicActionEEnum = createEEnum(DATABUS_STREAM_TOPIC_ACTION); + streamAuthenticationEEnum = createEEnum(STREAM_AUTHENTICATION); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + dcaeStreamEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + dmaapStreamEClass.getESuperTypes().add(this.getDcaeStream()); + dcaeStreamDefinitionEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + dcaeStreamPublisherEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + dcaeStreamSubscriberEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + dcaeStreamPublisherExternalEClass.getESuperTypes().add(this.getDcaeStreamPublisher()); + dcaeStreamPublisherExternalEClass.getESuperTypes().add(this.getDcaeStreamExternalEndPoint()); + dcaeStreamPublisherInternalEClass.getESuperTypes().add(this.getDcaeStreamPublisher()); + dcaeStreamPublisherInternalEClass.getESuperTypes().add(this.getDcaeStreamInternalEndPoint()); + dcaeStreamSubscriberExternalEClass.getESuperTypes().add(this.getDcaeStreamSubscriber()); + dcaeStreamSubscriberExternalEClass.getESuperTypes().add(this.getDcaeStreamExternalEndPoint()); + dcaeStreamSubscriberInternalEClass.getESuperTypes().add(this.getDcaeStreamSubscriber()); + dcaeStreamSubscriberInternalEClass.getESuperTypes().add(this.getDcaeStreamInternalEndPoint()); + databusStreamEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + databusStreamTopicEClass.getESuperTypes().add(this.getDatabusStream()); + databusStreamTopicClientEClass.getESuperTypes().add(this.getDatabusStream()); + databusStreamFeedEClass.getESuperTypes().add(this.getDatabusStream()); + databusStreamFeedPublisherEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + databusStreamFeedSubscriberEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + databusEntityEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + databusLocationEClass.getESuperTypes().add(this.getDatabusEntity()); + databusMessageRouterClusterEClass.getESuperTypes().add(this.getDatabusEntity()); + databusDataRouterNodeEClass.getESuperTypes().add(this.getDatabusEntity()); + + // Initialize classes, features, and operations; add parameters + initEClass(dcaeStreamEClass, DcaeStream.class, "DcaeStream", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(dmaapStreamEClass, DmaapStream.class, "DmaapStream", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDmaapStream_DmaapDataType(), theEcorePackage.getEString(), "dmaapDataType", null, 0, 1, DmaapStream.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDmaapStream_DmaapAction(), theEcorePackage.getEString(), "dmaapAction", null, 0, 1, DmaapStream.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDmaapStream_DmaapUrl(), theEcorePackage.getEString(), "dmaapUrl", null, 0, 1, DmaapStream.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDmaapStream_DmaapUserName(), theEcorePackage.getEString(), "dmaapUserName", null, 0, 1, DmaapStream.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDmaapStream_DmaapPassword(), theEcorePackage.getEString(), "dmaapPassword", null, 0, 1, DmaapStream.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDmaapStream_DmaapAuthMethod(), theEcorePackage.getEString(), "dmaapAuthMethod", null, 0, 1, DmaapStream.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(dcaeStreamDefinitionEClass, DcaeStreamDefinition.class, "DcaeStreamDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDcaeStreamDefinition_StreamType(), theEcorePackage.getEString(), "streamType", null, 0, 1, DcaeStreamDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaeStreamDefinition_DatabusType(), theEcorePackage.getEString(), "databusType", null, 0, 1, DcaeStreamDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDcaeStreamDefinition_Publishers(), this.getDcaeStreamPublisher(), null, "publishers", null, 0, -1, DcaeStreamDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDcaeStreamDefinition_Subscribers(), this.getDcaeStreamSubscriber(), null, "subscribers", null, 0, -1, DcaeStreamDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(dcaeStreamPublisherEClass, DcaeStreamPublisher.class, "DcaeStreamPublisher", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(dcaeStreamSubscriberEClass, DcaeStreamSubscriber.class, "DcaeStreamSubscriber", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(dcaeStreamPublisherExternalEClass, DcaeStreamPublisherExternal.class, "DcaeStreamPublisherExternal", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(dcaeStreamPublisherInternalEClass, DcaeStreamPublisherInternal.class, "DcaeStreamPublisherInternal", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(dcaeStreamSubscriberExternalEClass, DcaeStreamSubscriberExternal.class, "DcaeStreamSubscriberExternal", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(dcaeStreamSubscriberInternalEClass, DcaeStreamSubscriberInternal.class, "DcaeStreamSubscriberInternal", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(dcaeStreamInternalEndPointEClass, DcaeStreamInternalEndPoint.class, "DcaeStreamInternalEndPoint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDcaeStreamInternalEndPoint_LocalName(), theEcorePackage.getEString(), "localName", null, 0, 1, DcaeStreamInternalEndPoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaeStreamInternalEndPoint_ServiceName(), theEcorePackage.getEString(), "serviceName", null, 0, 1, DcaeStreamInternalEndPoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(dcaeStreamExternalEndPointEClass, DcaeStreamExternalEndPoint.class, "DcaeStreamExternalEndPoint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDcaeStreamExternalEndPoint_User(), theEcorePackage.getEString(), "user", null, 0, 1, DcaeStreamExternalEndPoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaeStreamExternalEndPoint_Password(), theEcorePackage.getEString(), "password", null, 0, 1, DcaeStreamExternalEndPoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDcaeStreamExternalEndPoint_Url(), theEcorePackage.getEString(), "url", null, 0, 1, DcaeStreamExternalEndPoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(databusStreamEClass, DatabusStream.class, "DatabusStream", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(databusStreamTopicEClass, DatabusStreamTopic.class, "DatabusStreamTopic", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDatabusStreamTopic_TopicName(), theEcorePackage.getEString(), "topicName", null, 0, 1, DatabusStreamTopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopic_TopicDescription(), theEcorePackage.getEString(), "topicDescription", null, 0, 1, DatabusStreamTopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopic_DcaeLocationName(), theEcorePackage.getEString(), "dcaeLocationName", null, 0, 1, DatabusStreamTopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopic_Owner(), theEcorePackage.getEString(), "owner", null, 0, 1, DatabusStreamTopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopic_Txenabled(), theEcorePackage.getEBoolean(), "txenabled", null, 0, 1, DatabusStreamTopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopic_Fqtn(), theEcorePackage.getEString(), "fqtn", null, 0, 1, DatabusStreamTopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopic_LastMod(), theEcorePackage.getEDate(), "lastMod", null, 0, 1, DatabusStreamTopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopic_Status(), theEcorePackage.getEString(), "status", null, 0, 1, DatabusStreamTopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDatabusStreamTopic_Clients(), this.getDatabusStreamTopicClient(), null, "clients", null, 0, -1, DatabusStreamTopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopic_PublishURL(), theEcorePackage.getEString(), "publishURL", null, 0, 1, DatabusStreamTopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopic_SubscribeURL(), theEcorePackage.getEString(), "subscribeURL", null, 0, 1, DatabusStreamTopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopic_AuthenticationMethod(), this.getStreamAuthentication(), "authenticationMethod", null, 0, 1, DatabusStreamTopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(databusStreamTopicClientEClass, DatabusStreamTopicClient.class, "DatabusStreamTopicClient", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDatabusStreamTopicClient_LocalStreamId(), theEcorePackage.getEString(), "localStreamId", null, 0, 1, DatabusStreamTopicClient.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopicClient_DcaeLocationName(), theEcorePackage.getEString(), "dcaeLocationName", null, 0, 1, DatabusStreamTopicClient.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopicClient_ClientRole(), theEcorePackage.getEString(), "clientRole", null, 0, 1, DatabusStreamTopicClient.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopicClient_Action(), this.getDatabusStreamTopicAction(), "action", null, 0, -1, DatabusStreamTopicClient.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopicClient_Username(), theEcorePackage.getEString(), "username", null, 0, 1, DatabusStreamTopicClient.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopicClient_Userpwd(), theEcorePackage.getEString(), "userpwd", null, 0, 1, DatabusStreamTopicClient.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopicClient_Fqtn(), theEcorePackage.getEString(), "fqtn", null, 0, 1, DatabusStreamTopicClient.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopicClient_MrClientId(), theEcorePackage.getEString(), "mrClientId", null, 0, 1, DatabusStreamTopicClient.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamTopicClient_TopicURL(), theEcorePackage.getEString(), "topicURL", null, 0, 1, DatabusStreamTopicClient.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(databusStreamFeedEClass, DatabusStreamFeed.class, "DatabusStreamFeed", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDatabusStreamFeed_FeedName(), theEcorePackage.getEString(), "feedName", null, 0, 1, DatabusStreamFeed.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeed_FeedVersion(), theEcorePackage.getEString(), "feedVersion", null, 0, 1, DatabusStreamFeed.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeed_FeedDescription(), theEcorePackage.getEString(), "feedDescription", null, 0, 1, DatabusStreamFeed.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeed_AsprClassification(), theEcorePackage.getEString(), "asprClassification", null, 0, 1, DatabusStreamFeed.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeed_Owner(), theEcorePackage.getEString(), "owner", null, 0, 1, DatabusStreamFeed.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeed_FeedId(), theEcorePackage.getEString(), "feedId", null, 0, 1, DatabusStreamFeed.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeed_LogURL(), theEcorePackage.getEString(), "logURL", null, 0, 1, DatabusStreamFeed.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeed_PublishURL(), theEcorePackage.getEString(), "publishURL", null, 0, 1, DatabusStreamFeed.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeed_SubscribeURL(), theEcorePackage.getEString(), "subscribeURL", null, 0, 1, DatabusStreamFeed.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeed_Status(), theEcorePackage.getEString(), "status", null, 0, 1, DatabusStreamFeed.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeed_Suspended(), theEcorePackage.getEString(), "suspended", null, 0, 1, DatabusStreamFeed.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDatabusStreamFeed_Publishers(), this.getDatabusStreamFeedPublisher(), null, "publishers", null, 0, -1, DatabusStreamFeed.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDatabusStreamFeed_Subscribers(), this.getDatabusStreamFeedSubscriber(), null, "subscribers", null, 0, -1, DatabusStreamFeed.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(databusStreamFeedPublisherEClass, DatabusStreamFeedPublisher.class, "DatabusStreamFeedPublisher", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDatabusStreamFeedPublisher_LocalStreamId(), theEcorePackage.getEString(), "localStreamId", null, 0, 1, DatabusStreamFeedPublisher.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedPublisher_DcaeLocationName(), theEcorePackage.getEString(), "dcaeLocationName", null, 0, 1, DatabusStreamFeedPublisher.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedPublisher_FeedId(), theEcorePackage.getEString(), "feedId", null, 0, 1, DatabusStreamFeedPublisher.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedPublisher_PubId(), theEcorePackage.getEString(), "pubId", null, 0, 1, DatabusStreamFeedPublisher.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedPublisher_Status(), theEcorePackage.getEString(), "status", null, 0, 1, DatabusStreamFeedPublisher.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedPublisher_Username(), theEcorePackage.getEString(), "username", null, 0, 1, DatabusStreamFeedPublisher.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedPublisher_Userpwd(), theEcorePackage.getEString(), "userpwd", null, 0, 1, DatabusStreamFeedPublisher.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(databusStreamFeedSubscriberEClass, DatabusStreamFeedSubscriber.class, "DatabusStreamFeedSubscriber", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDatabusStreamFeedSubscriber_LocalStreamId(), theEcorePackage.getEString(), "localStreamId", null, 0, 1, DatabusStreamFeedSubscriber.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedSubscriber_DcaeLocationName(), theEcorePackage.getEString(), "dcaeLocationName", null, 0, 1, DatabusStreamFeedSubscriber.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedSubscriber_OtherFeedName(), theEcorePackage.getEString(), "otherFeedName", null, 0, 1, DatabusStreamFeedSubscriber.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedSubscriber_FeedId(), theEcorePackage.getEString(), "feedId", null, 0, 1, DatabusStreamFeedSubscriber.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedSubscriber_LogURL(), theEcorePackage.getEString(), "logURL", null, 0, 1, DatabusStreamFeedSubscriber.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedSubscriber_Owner(), theEcorePackage.getEString(), "owner", null, 0, 1, DatabusStreamFeedSubscriber.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedSubscriber_SubId(), theEcorePackage.getEString(), "subId", null, 0, 1, DatabusStreamFeedSubscriber.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedSubscriber_Suspended(), theEcorePackage.getEBoolean(), "suspended", null, 0, 1, DatabusStreamFeedSubscriber.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedSubscriber_Use100(), theEcorePackage.getEBoolean(), "use100", null, 0, 1, DatabusStreamFeedSubscriber.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedSubscriber_Username(), theEcorePackage.getEString(), "username", null, 0, 1, DatabusStreamFeedSubscriber.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedSubscriber_Userpwd(), theEcorePackage.getEString(), "userpwd", null, 0, 1, DatabusStreamFeedSubscriber.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusStreamFeedSubscriber_DeliveryURL(), theEcorePackage.getEString(), "deliveryURL", null, 0, 1, DatabusStreamFeedSubscriber.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(databusEntityEClass, DatabusEntity.class, "DatabusEntity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDatabusEntity_Status(), theEcorePackage.getEString(), "status", null, 0, 1, DatabusEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusEntity_LastModified(), theEcorePackage.getEDate(), "lastModified", null, 0, 1, DatabusEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusEntity_Type(), theEcorePackage.getEString(), "type", null, 0, 1, DatabusEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(databusLocationEClass, DatabusLocation.class, "DatabusLocation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDatabusLocation_DcaeLayer(), theEcorePackage.getEString(), "dcaeLayer", null, 0, 1, DatabusLocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(databusMessageRouterClusterEClass, DatabusMessageRouterCluster.class, "DatabusMessageRouterCluster", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDatabusMessageRouterCluster_DcaeLocationName(), theEcorePackage.getEString(), "dcaeLocationName", null, 0, 1, DatabusMessageRouterCluster.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusMessageRouterCluster_ServiceFqdn(), theEcorePackage.getEString(), "serviceFqdn", null, 0, 1, DatabusMessageRouterCluster.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusMessageRouterCluster_HostFqdn(), theEcorePackage.getEString(), "hostFqdn", null, 0, -1, DatabusMessageRouterCluster.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusMessageRouterCluster_TopicPort(), theEcorePackage.getEString(), "topicPort", null, 0, 1, DatabusMessageRouterCluster.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusMessageRouterCluster_TopicProtocol(), theEcorePackage.getEString(), "topicProtocol", null, 0, 1, DatabusMessageRouterCluster.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(databusDataRouterNodeEClass, DatabusDataRouterNode.class, "DatabusDataRouterNode", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDatabusDataRouterNode_DcaeLocationName(), theEcorePackage.getEString(), "dcaeLocationName", null, 0, 1, DatabusDataRouterNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusDataRouterNode_HostFqdn(), theEcorePackage.getEString(), "hostFqdn", null, 0, 1, DatabusDataRouterNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabusDataRouterNode_Version(), theEcorePackage.getEString(), "version", null, 0, 1, DatabusDataRouterNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(databusStreamTopicActionEEnum, DatabusStreamTopicAction.class, "DatabusStreamTopicAction"); + addEEnumLiteral(databusStreamTopicActionEEnum, DatabusStreamTopicAction.PUB); + addEEnumLiteral(databusStreamTopicActionEEnum, DatabusStreamTopicAction.SUB); + addEEnumLiteral(databusStreamTopicActionEEnum, DatabusStreamTopicAction.VIEW); + + initEEnum(streamAuthenticationEEnum, StreamAuthentication.class, "StreamAuthentication"); + addEEnumLiteral(streamAuthenticationEEnum, StreamAuthentication.AAF); + addEEnumLiteral(streamAuthenticationEEnum, StreamAuthentication.NONE); + addEEnumLiteral(streamAuthenticationEEnum, StreamAuthentication.PASSWORD); + + // Create resource + createResource(eNS_URI); + } + +} //StreamPackageImpl diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/util/StreamAdapterFactory.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/util/StreamAdapterFactory.java new file mode 100644 index 0000000..118e807 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/util/StreamAdapterFactory.java @@ -0,0 +1,521 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.util; + +import org.openecomp.dcae.controller.core.stream.*; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage + * @generated + */ +public class StreamAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static StreamPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public StreamAdapterFactory() { + if (modelPackage == null) { + modelPackage = StreamPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected StreamSwitch modelSwitch = + new StreamSwitch() { + @Override + public Adapter caseDcaeStream(DcaeStream object) { + return createDcaeStreamAdapter(); + } + @Override + public Adapter caseDmaapStream(DmaapStream object) { + return createDmaapStreamAdapter(); + } + @Override + public Adapter caseDcaeStreamDefinition(DcaeStreamDefinition object) { + return createDcaeStreamDefinitionAdapter(); + } + @Override + public Adapter caseDcaeStreamPublisher(DcaeStreamPublisher object) { + return createDcaeStreamPublisherAdapter(); + } + @Override + public Adapter caseDcaeStreamSubscriber(DcaeStreamSubscriber object) { + return createDcaeStreamSubscriberAdapter(); + } + @Override + public Adapter caseDcaeStreamPublisherExternal(DcaeStreamPublisherExternal object) { + return createDcaeStreamPublisherExternalAdapter(); + } + @Override + public Adapter caseDcaeStreamPublisherInternal(DcaeStreamPublisherInternal object) { + return createDcaeStreamPublisherInternalAdapter(); + } + @Override + public Adapter caseDcaeStreamSubscriberExternal(DcaeStreamSubscriberExternal object) { + return createDcaeStreamSubscriberExternalAdapter(); + } + @Override + public Adapter caseDcaeStreamSubscriberInternal(DcaeStreamSubscriberInternal object) { + return createDcaeStreamSubscriberInternalAdapter(); + } + @Override + public Adapter caseDcaeStreamInternalEndPoint(DcaeStreamInternalEndPoint object) { + return createDcaeStreamInternalEndPointAdapter(); + } + @Override + public Adapter caseDcaeStreamExternalEndPoint(DcaeStreamExternalEndPoint object) { + return createDcaeStreamExternalEndPointAdapter(); + } + @Override + public Adapter caseDatabusStream(DatabusStream object) { + return createDatabusStreamAdapter(); + } + @Override + public Adapter caseDatabusStreamTopic(DatabusStreamTopic object) { + return createDatabusStreamTopicAdapter(); + } + @Override + public Adapter caseDatabusStreamTopicClient(DatabusStreamTopicClient object) { + return createDatabusStreamTopicClientAdapter(); + } + @Override + public Adapter caseDatabusStreamFeed(DatabusStreamFeed object) { + return createDatabusStreamFeedAdapter(); + } + @Override + public Adapter caseDatabusStreamFeedPublisher(DatabusStreamFeedPublisher object) { + return createDatabusStreamFeedPublisherAdapter(); + } + @Override + public Adapter caseDatabusStreamFeedSubscriber(DatabusStreamFeedSubscriber object) { + return createDatabusStreamFeedSubscriberAdapter(); + } + @Override + public Adapter caseDatabusEntity(DatabusEntity object) { + return createDatabusEntityAdapter(); + } + @Override + public Adapter caseDatabusLocation(DatabusLocation object) { + return createDatabusLocationAdapter(); + } + @Override + public Adapter caseDatabusMessageRouterCluster(DatabusMessageRouterCluster object) { + return createDatabusMessageRouterClusterAdapter(); + } + @Override + public Adapter caseDatabusDataRouterNode(DatabusDataRouterNode object) { + return createDatabusDataRouterNodeAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DcaeStream Dcae Stream}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DcaeStream + * @generated + */ + public Adapter createDcaeStreamAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DmaapStream Dmaap Stream}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DmaapStream + * @generated + */ + public Adapter createDmaapStreamAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition Dcae Stream Definition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamDefinition + * @generated + */ + public Adapter createDcaeStreamDefinitionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamPublisher Dcae Stream Publisher}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamPublisher + * @generated + */ + public Adapter createDcaeStreamPublisherAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriber Dcae Stream Subscriber}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriber + * @generated + */ + public Adapter createDcaeStreamSubscriberAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamPublisherExternal Dcae Stream Publisher External}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamPublisherExternal + * @generated + */ + public Adapter createDcaeStreamPublisherExternalAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamPublisherInternal Dcae Stream Publisher Internal}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamPublisherInternal + * @generated + */ + public Adapter createDcaeStreamPublisherInternalAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriberExternal Dcae Stream Subscriber External}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriberExternal + * @generated + */ + public Adapter createDcaeStreamSubscriberExternalAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriberInternal Dcae Stream Subscriber Internal}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriberInternal + * @generated + */ + public Adapter createDcaeStreamSubscriberInternalAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamInternalEndPoint Dcae Stream Internal End Point}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamInternalEndPoint + * @generated + */ + public Adapter createDcaeStreamInternalEndPointAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint Dcae Stream External End Point}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DcaeStreamExternalEndPoint + * @generated + */ + public Adapter createDcaeStreamExternalEndPointAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DatabusStream Databus Stream}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DatabusStream + * @generated + */ + public Adapter createDatabusStreamAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopic Databus Stream Topic}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopic + * @generated + */ + public Adapter createDatabusStreamTopicAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient Databus Stream Topic Client}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient + * @generated + */ + public Adapter createDatabusStreamTopicClientAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeed Databus Stream Feed}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeed + * @generated + */ + public Adapter createDatabusStreamFeedAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher Databus Stream Feed Publisher}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher + * @generated + */ + public Adapter createDatabusStreamFeedPublisherAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber Databus Stream Feed Subscriber}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber + * @generated + */ + public Adapter createDatabusStreamFeedSubscriberAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DatabusEntity Databus Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DatabusEntity + * @generated + */ + public Adapter createDatabusEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DatabusLocation Databus Location}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DatabusLocation + * @generated + */ + public Adapter createDatabusLocationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster Databus Message Router Cluster}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster + * @generated + */ + public Adapter createDatabusMessageRouterClusterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode Databus Data Router Node}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode + * @generated + */ + public Adapter createDatabusDataRouterNodeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //StreamAdapterFactory diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/util/StreamSwitch.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/util/StreamSwitch.java new file mode 100644 index 0000000..4305d88 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/util/StreamSwitch.java @@ -0,0 +1,602 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.core.stream.util; + +import org.openecomp.dcae.controller.core.stream.*; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.core.stream.StreamPackage + * @generated + */ +public class StreamSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static StreamPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public StreamSwitch() { + if (modelPackage == null) { + modelPackage = StreamPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case StreamPackage.DCAE_STREAM: { + DcaeStream dcaeStream = (DcaeStream)theEObject; + T result = caseDcaeStream(dcaeStream); + if (result == null) result = caseNamedEntity(dcaeStream); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DMAAP_STREAM: { + DmaapStream dmaapStream = (DmaapStream)theEObject; + T result = caseDmaapStream(dmaapStream); + if (result == null) result = caseDcaeStream(dmaapStream); + if (result == null) result = caseNamedEntity(dmaapStream); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DCAE_STREAM_DEFINITION: { + DcaeStreamDefinition dcaeStreamDefinition = (DcaeStreamDefinition)theEObject; + T result = caseDcaeStreamDefinition(dcaeStreamDefinition); + if (result == null) result = caseNamedEntity(dcaeStreamDefinition); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DCAE_STREAM_PUBLISHER: { + DcaeStreamPublisher dcaeStreamPublisher = (DcaeStreamPublisher)theEObject; + T result = caseDcaeStreamPublisher(dcaeStreamPublisher); + if (result == null) result = caseNamedEntity(dcaeStreamPublisher); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DCAE_STREAM_SUBSCRIBER: { + DcaeStreamSubscriber dcaeStreamSubscriber = (DcaeStreamSubscriber)theEObject; + T result = caseDcaeStreamSubscriber(dcaeStreamSubscriber); + if (result == null) result = caseNamedEntity(dcaeStreamSubscriber); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DCAE_STREAM_PUBLISHER_EXTERNAL: { + DcaeStreamPublisherExternal dcaeStreamPublisherExternal = (DcaeStreamPublisherExternal)theEObject; + T result = caseDcaeStreamPublisherExternal(dcaeStreamPublisherExternal); + if (result == null) result = caseDcaeStreamPublisher(dcaeStreamPublisherExternal); + if (result == null) result = caseDcaeStreamExternalEndPoint(dcaeStreamPublisherExternal); + if (result == null) result = caseNamedEntity(dcaeStreamPublisherExternal); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DCAE_STREAM_PUBLISHER_INTERNAL: { + DcaeStreamPublisherInternal dcaeStreamPublisherInternal = (DcaeStreamPublisherInternal)theEObject; + T result = caseDcaeStreamPublisherInternal(dcaeStreamPublisherInternal); + if (result == null) result = caseDcaeStreamPublisher(dcaeStreamPublisherInternal); + if (result == null) result = caseDcaeStreamInternalEndPoint(dcaeStreamPublisherInternal); + if (result == null) result = caseNamedEntity(dcaeStreamPublisherInternal); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DCAE_STREAM_SUBSCRIBER_EXTERNAL: { + DcaeStreamSubscriberExternal dcaeStreamSubscriberExternal = (DcaeStreamSubscriberExternal)theEObject; + T result = caseDcaeStreamSubscriberExternal(dcaeStreamSubscriberExternal); + if (result == null) result = caseDcaeStreamSubscriber(dcaeStreamSubscriberExternal); + if (result == null) result = caseDcaeStreamExternalEndPoint(dcaeStreamSubscriberExternal); + if (result == null) result = caseNamedEntity(dcaeStreamSubscriberExternal); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DCAE_STREAM_SUBSCRIBER_INTERNAL: { + DcaeStreamSubscriberInternal dcaeStreamSubscriberInternal = (DcaeStreamSubscriberInternal)theEObject; + T result = caseDcaeStreamSubscriberInternal(dcaeStreamSubscriberInternal); + if (result == null) result = caseDcaeStreamSubscriber(dcaeStreamSubscriberInternal); + if (result == null) result = caseDcaeStreamInternalEndPoint(dcaeStreamSubscriberInternal); + if (result == null) result = caseNamedEntity(dcaeStreamSubscriberInternal); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DCAE_STREAM_INTERNAL_END_POINT: { + DcaeStreamInternalEndPoint dcaeStreamInternalEndPoint = (DcaeStreamInternalEndPoint)theEObject; + T result = caseDcaeStreamInternalEndPoint(dcaeStreamInternalEndPoint); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DCAE_STREAM_EXTERNAL_END_POINT: { + DcaeStreamExternalEndPoint dcaeStreamExternalEndPoint = (DcaeStreamExternalEndPoint)theEObject; + T result = caseDcaeStreamExternalEndPoint(dcaeStreamExternalEndPoint); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DATABUS_STREAM: { + DatabusStream databusStream = (DatabusStream)theEObject; + T result = caseDatabusStream(databusStream); + if (result == null) result = caseNamedEntity(databusStream); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DATABUS_STREAM_TOPIC: { + DatabusStreamTopic databusStreamTopic = (DatabusStreamTopic)theEObject; + T result = caseDatabusStreamTopic(databusStreamTopic); + if (result == null) result = caseDatabusStream(databusStreamTopic); + if (result == null) result = caseNamedEntity(databusStreamTopic); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DATABUS_STREAM_TOPIC_CLIENT: { + DatabusStreamTopicClient databusStreamTopicClient = (DatabusStreamTopicClient)theEObject; + T result = caseDatabusStreamTopicClient(databusStreamTopicClient); + if (result == null) result = caseDatabusStream(databusStreamTopicClient); + if (result == null) result = caseNamedEntity(databusStreamTopicClient); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DATABUS_STREAM_FEED: { + DatabusStreamFeed databusStreamFeed = (DatabusStreamFeed)theEObject; + T result = caseDatabusStreamFeed(databusStreamFeed); + if (result == null) result = caseDatabusStream(databusStreamFeed); + if (result == null) result = caseNamedEntity(databusStreamFeed); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DATABUS_STREAM_FEED_PUBLISHER: { + DatabusStreamFeedPublisher databusStreamFeedPublisher = (DatabusStreamFeedPublisher)theEObject; + T result = caseDatabusStreamFeedPublisher(databusStreamFeedPublisher); + if (result == null) result = caseNamedEntity(databusStreamFeedPublisher); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DATABUS_STREAM_FEED_SUBSCRIBER: { + DatabusStreamFeedSubscriber databusStreamFeedSubscriber = (DatabusStreamFeedSubscriber)theEObject; + T result = caseDatabusStreamFeedSubscriber(databusStreamFeedSubscriber); + if (result == null) result = caseNamedEntity(databusStreamFeedSubscriber); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DATABUS_ENTITY: { + DatabusEntity databusEntity = (DatabusEntity)theEObject; + T result = caseDatabusEntity(databusEntity); + if (result == null) result = caseNamedEntity(databusEntity); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DATABUS_LOCATION: { + DatabusLocation databusLocation = (DatabusLocation)theEObject; + T result = caseDatabusLocation(databusLocation); + if (result == null) result = caseDatabusEntity(databusLocation); + if (result == null) result = caseNamedEntity(databusLocation); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DATABUS_MESSAGE_ROUTER_CLUSTER: { + DatabusMessageRouterCluster databusMessageRouterCluster = (DatabusMessageRouterCluster)theEObject; + T result = caseDatabusMessageRouterCluster(databusMessageRouterCluster); + if (result == null) result = caseDatabusEntity(databusMessageRouterCluster); + if (result == null) result = caseNamedEntity(databusMessageRouterCluster); + if (result == null) result = defaultCase(theEObject); + return result; + } + case StreamPackage.DATABUS_DATA_ROUTER_NODE: { + DatabusDataRouterNode databusDataRouterNode = (DatabusDataRouterNode)theEObject; + T result = caseDatabusDataRouterNode(databusDataRouterNode); + if (result == null) result = caseDatabusEntity(databusDataRouterNode); + if (result == null) result = caseNamedEntity(databusDataRouterNode); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Stream'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Stream'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeStream(DcaeStream object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dmaap Stream'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dmaap Stream'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDmaapStream(DmaapStream object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Stream Definition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Stream Definition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeStreamDefinition(DcaeStreamDefinition object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Stream Publisher'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Stream Publisher'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeStreamPublisher(DcaeStreamPublisher object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Stream Subscriber'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Stream Subscriber'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeStreamSubscriber(DcaeStreamSubscriber object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Stream Publisher External'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Stream Publisher External'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeStreamPublisherExternal(DcaeStreamPublisherExternal object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Stream Publisher Internal'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Stream Publisher Internal'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeStreamPublisherInternal(DcaeStreamPublisherInternal object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Stream Subscriber External'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Stream Subscriber External'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeStreamSubscriberExternal(DcaeStreamSubscriberExternal object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Stream Subscriber Internal'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Stream Subscriber Internal'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeStreamSubscriberInternal(DcaeStreamSubscriberInternal object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Stream Internal End Point'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Stream Internal End Point'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeStreamInternalEndPoint(DcaeStreamInternalEndPoint object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Stream External End Point'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Stream External End Point'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeStreamExternalEndPoint(DcaeStreamExternalEndPoint object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Databus Stream'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Databus Stream'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDatabusStream(DatabusStream object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Databus Stream Topic'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Databus Stream Topic'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDatabusStreamTopic(DatabusStreamTopic object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Databus Stream Topic Client'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Databus Stream Topic Client'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDatabusStreamTopicClient(DatabusStreamTopicClient object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Databus Stream Feed'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Databus Stream Feed'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDatabusStreamFeed(DatabusStreamFeed object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Databus Stream Feed Publisher'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Databus Stream Feed Publisher'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDatabusStreamFeedPublisher(DatabusStreamFeedPublisher object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Databus Stream Feed Subscriber'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Databus Stream Feed Subscriber'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDatabusStreamFeedSubscriber(DatabusStreamFeedSubscriber object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Databus Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Databus Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDatabusEntity(DatabusEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Databus Location'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Databus Location'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDatabusLocation(DatabusLocation object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Databus Message Router Cluster'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Databus Message Router Cluster'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDatabusMessageRouterCluster(DatabusMessageRouterCluster object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Databus Data Router Node'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Databus Data Router Node'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDatabusDataRouterNode(DatabusDataRouterNode object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //StreamSwitch diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore/hypervisor.xcore b/dcae-controller-core/dcae-controller-core-model/src/main/xcore/hypervisor.xcore new file mode 100644 index 0000000..5d4ad9c --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore/hypervisor.xcore @@ -0,0 +1,30 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-core-model/src/main/xcore-gen") + +package org.openecomp.dcae.controller.core.hypervisor + +import org.openecomp.ncomp.core.NamedEntity + +class Hypervisor extends NamedEntity { + +} \ No newline at end of file diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore/manager.xcore b/dcae-controller-core/dcae-controller-core-model/src/main/xcore/manager.xcore new file mode 100644 index 0000000..e6a3246 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore/manager.xcore @@ -0,0 +1,45 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-core-model/src/main/xcore-gen") + + +package org.openecomp.dcae.controller.core.manager + +import org.openecomp.dcae.controller.core.stream.DcaeStream +import org.openecomp.dcae.controller.core.service.HealthTestResponse + +annotation "http://openecomp.org" as ecomp + +abstract class DcaeManager { + // operational requirements + op HealthTestResponse test() + op void suspend() + op void resume() + // internal + op String publicKey() + // trigger for any configuration push form controller + op void configurationChanged() + // stream information + contains DcaeStream[] inputStreams + contains DcaeStream[] outputStreams + op void updateStreams(DcaeStream[] inputStreams, DcaeStream[] outputStreams) +} diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore/server.xcore b/dcae-controller-core/dcae-controller-core-model/src/main/xcore/server.xcore new file mode 100644 index 0000000..0cfddf5 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore/server.xcore @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-core-model/src/main/xcore-gen") + +package org.openecomp.dcae.controller.core.server + +import org.openecomp.ncomp.core.HasOperationalState +import org.openecomp.ncomp.core.logs.LogMessageContainer +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer +import org.openecomp.ncomp.sirius.manager.properties.Module +import org.openecomp.ncomp.core.DateMetricAttribute +import org.openecomp.ncomp.core.NamedEntity +import org.openecomp.ncomp.openstack.core.VirtualMachineType +import org.openecomp.ncomp.openstack.compute.Server +import org.openecomp.ncomp.openstack.location.Hypervisor + +class DcaeBasicServer extends NamedEntity, HasOperationalState, LogMessageContainer { + String privateIp + String publicIp + contains CollectdServer collectd + contains unordered Module[] modules + contains unordered DcaeBasicServerNetwork[] networks + transient DateMetricAttribute lastUpdate + boolean usingMonitoringAgent = "true" + refers Server server + refers Hypervisor hypervisor + refers VirtualMachineType vmType + String certificatePassword +} + +class DcaeBasicServerNetwork extends NamedEntity { + String ip + String dnsName +} + diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore/service.xcore b/dcae-controller-core/dcae-controller-core-model/src/main/xcore/service.xcore new file mode 100644 index 0000000..a837430 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore/service.xcore @@ -0,0 +1,108 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-core-model/src/main/xcore-gen") + +package org.openecomp.dcae.controller.core.service + +import org.openecomp.ncomp.core.NamedEntity +import org.openecomp.ncomp.core.DeploymentStatus +import org.openecomp.dcae.controller.core.stream.DcaeStream +import org.openecomp.ncomp.openstack.location.OpenStackProject +import org.eclipse.emf.ecore.EObject +import org.openecomp.ncomp.core.JsonObject +import org.openecomp.ncomp.core.DateMetricAttribute + + +annotation "http://openecomp.org" as ecomp +annotation "http://openecomp.org/cdap" as cdap + + +abstract class DcaeServiceContainer extends NamedEntity { + refers DcaeServiceInstance[] instances opposite serviceContainer +} + +abstract class DcaeService extends NamedEntity { + // will contain a list of instances. + op void deploy(String instanceName, String containerPath) + op void undeploy(String instanceName) + op HealthTestResponse test(String instanceName) + op void suspend(String instanceName) + op void resume(String instanceName) + op void pushManagerConfiguration(String instanceName) + op void pollManagerConfiguration(String instanceName) + op EObject managerConfiguration(String instanceName) + op JsonObject managerOperation(String instanceName, String operation, JsonObject parameters) + op void updateConfigurationFromPolicy(String instanceName) + op void runHealthTests() +} + +abstract class DcaeServiceInstance extends NamedEntity { + @ecomp(^type = "operational") + refers DcaeServiceContainer serviceContainer opposite instances + @ecomp(^type = "operational") + DeploymentStatus status + @ecomp(^type = "service") + contains DcaeStream[] inputStreams + @ecomp(^type = "service") + contains DcaeStream[] outputStreams + transient DateMetricAttribute lastHealthTest + HealthTestStatus healthTestStatus + String healthTestMessageCode +} + +class DcaeLocation extends DcaeServiceContainer { + String locationType + refers OpenStackProject openstackProject +} + +class DcaeServiceDescriptor extends NamedEntity { + String groupId + String artifact + String version +} + +enum HealthTestStatus { + GREEN, YELLOW, RED +} + +class HealthTestResponse { + HealthTestStatus status + String messageCode +} + +abstract class DcaePolicyEntity { + @cdap( destination = "namespace-prefs::${path}.policyName") + String policyName + @cdap( destination = "namespace-prefs::${path}.policyDescription") + String policyDescription + @cdap( destination = "namespace-prefs::${path}.policyConfigName") + String policyConfigName + @cdap( destination = "namespace-prefs::${path}.policyTemplateVersion") + String policyTemplateVersion + @cdap( destination = "namespace-prefs::${path}.policyVersion") + String policyVersion + @cdap( destination = "namespace-prefs::${path}.policyPriority") + String policyPriority + @cdap( destination = "namespace-prefs::${path}.policyScope") + String policyScope +} + diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore/stream.xcore b/dcae-controller-core/dcae-controller-core-model/src/main/xcore/stream.xcore new file mode 100644 index 0000000..d6b0fcc --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore/stream.xcore @@ -0,0 +1,177 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-core-model/src/main/xcore-gen") +package org.openecomp.dcae.controller.core.stream + +import org.openecomp.ncomp.core.NamedEntity + +class DcaeStream extends NamedEntity { +} + +class DmaapStream extends DcaeStream { + String dmaapDataType + String dmaapAction + String dmaapUrl + String dmaapUserName + String dmaapPassword + String dmaapAuthMethod +} + +class DcaeStreamDefinition extends NamedEntity { + String streamType + String databusType + contains DcaeStreamPublisher[] publishers + contains DcaeStreamSubscriber[] subscribers +} + +abstract class DcaeStreamPublisher extends NamedEntity { +} + +abstract class DcaeStreamSubscriber extends NamedEntity { +} + +class DcaeStreamPublisherExternal extends DcaeStreamPublisher, DcaeStreamExternalEndPoint { +} + +class DcaeStreamPublisherInternal extends DcaeStreamPublisher, DcaeStreamInternalEndPoint { +} + +class DcaeStreamSubscriberExternal extends DcaeStreamSubscriber, DcaeStreamExternalEndPoint { +} + +class DcaeStreamSubscriberInternal extends DcaeStreamSubscriber, DcaeStreamInternalEndPoint { +} + +class DcaeStreamInternalEndPoint { + String localName + String serviceName +} + +class DcaeStreamExternalEndPoint { + String user + String password + String url +} + +abstract class DatabusStream extends NamedEntity { +} + +class DatabusStreamTopic extends DatabusStream { + String topicName + String topicDescription + String dcaeLocationName + String owner + boolean txenabled + String fqtn + Date lastMod + String status + contains DatabusStreamTopicClient[] clients + String publishURL + String subscribeURL + StreamAuthentication authenticationMethod +} + +class DatabusStreamTopicClient extends DatabusStream { + String localStreamId + String dcaeLocationName + String clientRole + DatabusStreamTopicAction[] action + String username + String userpwd + String fqtn + String mrClientId + String topicURL +} + +enum DatabusStreamTopicAction { + PUB as "pub", SUB as "sub", VIEW as "view" +} + +enum StreamAuthentication { + AAF as "aaf", NONE as "none", PASSWORD as "password" +} + + +class DatabusStreamFeed extends DatabusStream { + String feedName + String feedVersion + String feedDescription + String asprClassification + String owner + String feedId + String logURL + String publishURL + String subscribeURL + String status + String suspended + contains DatabusStreamFeedPublisher[] publishers + contains DatabusStreamFeedSubscriber[] subscribers +} + +class DatabusStreamFeedPublisher extends NamedEntity { + String localStreamId + String dcaeLocationName + String feedId + String pubId + String status + String username + String userpwd +} + +class DatabusStreamFeedSubscriber extends NamedEntity { + String localStreamId + String dcaeLocationName + String otherFeedName + String feedId + String logURL + String owner + String subId + boolean suspended + boolean use100 + String username + String userpwd + String deliveryURL +} + +class DatabusEntity extends NamedEntity { + String status + Date lastModified + String ^type +} + +class DatabusLocation extends DatabusEntity { + String dcaeLayer +} + +class DatabusMessageRouterCluster extends DatabusEntity { + String dcaeLocationName + String serviceFqdn + String[] hostFqdn + String topicPort + String topicProtocol +} + +class DatabusDataRouterNode extends DatabusEntity { + String dcaeLocationName + String hostFqdn + String version +} \ No newline at end of file diff --git a/dcae-controller-core/dcae-controller-core-utils/.classpath b/dcae-controller-core/dcae-controller-core-utils/.classpath new file mode 100644 index 0000000..6d9bfdd --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/.classpath @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-core/dcae-controller-core-utils/.gitignore b/dcae-controller-core/dcae-controller-core-utils/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-core/dcae-controller-core-utils/.project b/dcae-controller-core/dcae-controller-core-utils/.project new file mode 100644 index 0000000..62a6ca1 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/.project @@ -0,0 +1,35 @@ + + + dcae-controller-core-utils + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/dcae-controller-core/dcae-controller-core-utils/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-core/dcae-controller-core-utils/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..abec6ca --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/dcae-controller-core/dcae-controller-core-utils/.settings/org.eclipse.jdt.groovy.core.prefs b/dcae-controller-core/dcae-controller-core-utils/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/dcae-controller-core/dcae-controller-core-utils/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-core/dcae-controller-core-utils/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-core/dcae-controller-core-utils/LICENSE.txt b/dcae-controller-core/dcae-controller-core-utils/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-core/dcae-controller-core-utils/META-INF/MANIFEST.MF b/dcae-controller-core/dcae-controller-core-utils/META-INF/MANIFEST.MF new file mode 100644 index 0000000..409cac8 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/META-INF/MANIFEST.MF @@ -0,0 +1,7 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: dcae-controller-core-utils +Bundle-SymbolicName: dcae-controller-core-utils +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.dcae.controller.core.utils +Require-Bundle: ncomp-utils-java diff --git a/dcae-controller-core/dcae-controller-core-utils/build.properties b/dcae-controller-core/dcae-controller-core-utils/build.properties new file mode 100644 index 0000000..a1ec8c4 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/build.properties @@ -0,0 +1,3 @@ +source.. = src/main/java/ +bin.includes = META-INF/,\ + . diff --git a/dcae-controller-core/dcae-controller-core-utils/pom.xml b/dcae-controller-core/dcae-controller-core-utils/pom.xml new file mode 100644 index 0000000..24ddeb9 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/pom.xml @@ -0,0 +1,126 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-core-utils + 0.1.0-SNAPSHOT + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-assembly-plugin + 2.6 + + + zipfile + + single + + package + + false + ${project.artifactId}-${project.version} + + src/assembly/assemble_zip.xml + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/lib + false + true + true + false + false + false + org.opendaylight,com.brocade.odl,ch.qos.logback,org.bouncycastle + runtime + + + + + + + + + + org.yaml + snakeyaml + 1.15 + + + org.openecomp.ncomp.utils + ncomp-utils-java + ${project.version} + + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + \ No newline at end of file diff --git a/dcae-controller-core/dcae-controller-core-utils/src/assembly/assemble_zip.xml b/dcae-controller-core/dcae-controller-core-utils/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..09531dc --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/assembly/assemble_zip.xml @@ -0,0 +1,61 @@ + + + + runtime + + zip + + + + false + + + + target + lib + + dcae-controller-core-utils-${project.version}.jar + + + + target/assembly/ + . + + + + + . + lib + + *.jar + + + + src/main/server-gen/bin + bin + 0744 + + + + + src/main/server/bin + bin + 0744 + + + + + src/main/server-gen/scripts + scripts + + + src/main/server/scripts + scripts + + + + diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/java/org/openecomp/dcae/controller/core/utils/DcaeServiceProvider.java b/dcae-controller-core/dcae-controller-core-utils/src/main/java/org/openecomp/dcae/controller/core/utils/DcaeServiceProvider.java new file mode 100644 index 0000000..dea0892 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/main/java/org/openecomp/dcae/controller/core/utils/DcaeServiceProvider.java @@ -0,0 +1,27 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.core.utils; + + +public class DcaeServiceProvider { + +} diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/.gitignore b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/.gitignore new file mode 100644 index 0000000..db7715e --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/.gitignore @@ -0,0 +1 @@ +/.*.swp diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/certificate.sh b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/certificate.sh new file mode 100644 index 0000000..61138af --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/certificate.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +set -x +set -e + +### HACK +case $(hostname) in + *drps??) + FILE=/etc/my.cnf + if [ -e $FILE ]; then rm $FILE; fi + ;; +esac + +mkdir -p /etc/dcae +sudo chown dcae:dcae /etc/dcae + + + +export JAVA_HOME=/opt/app/java/jdk/jdk170 +export PATH=$JAVA_HOME/bin:$PATH + +DIR=/opt/app/dcae-certificate +sudo mkdir -p $DIR +sudo chown attcloud:attcloud $DIR +cd $DIR + +cat /tmp/certificate.pkcs12.b64code | base64 --decode > certificate.pkcs12 + +cp /tmp/.password .password +chmod go-rwx /tmp/.password +chmod go+r /tmp/.password +chmod o-rwx .password + +PW=$(cat .password) + +ALIAS=$(hostname) + + +rm -f keystore.jks + +keytool -genkey -alias $ALIAS -keystore keystore.jks << EOF > /dev/null +$PW +$PW + + + + + + +yes + +EOF + +echo $PW | keytool -delete -keystore keystore.jks -alias $ALIAS + +( echo $PW ; echo $PW ) | keytool -v -importkeystore -srckeystore certificate.pkcs12 -srcstoretype PKCS12 -destkeystore keystore.jks -deststoretype JKS + +echo $PW | keytool -v -list -keystore keystore.jks | tee keystore.list + +sudo chown -R dcae:dcae $DIR + +##for u in $*; do + ##setfacl -m u:$u:rx /opt/app/dcae-certificate + ##setfacl -m u:$u:r /opt/app/dcae-certificate/* + ##setfacl -m u:$u:r /opt/app/dcae-certificate/.password +##done + + + diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/common.funcs b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/common.funcs new file mode 100644 index 0000000..dc7f280 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/common.funcs @@ -0,0 +1,35 @@ +# +# common shell functions +# + +_die() { + printf "$(date):FATAL:$1\n" + exit 2; +} + +_fail() { + _die "$1"; +} + +_warn() { + printf "$(date):WARN:$1\n"; +} + +_print() { + printf "$(date):INFO:$1\n"; +} + +_info() { + _print "$1"; +} + +_isRoot() { + [ $(whoami) != "root" ] && _fail "This script needs to be run by root"; +} + +fail() { + rc=$1 + shift; + echo "ERROR: $@" + exit $rc +} diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/convert-to-open-ecomp-all.sh b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/convert-to-open-ecomp-all.sh new file mode 100644 index 0000000..a0d1443 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/convert-to-open-ecomp-all.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +ROOT=$(dirname $0) + +for a in \ + OPENECOMP-DEMO \ + OPENECOMP-DEMO-RACKSPACE \ + dcae-controller-opensource \ + dcae-controller-platform-* \ + dcae-controller-service \ + dcae-controller-service-common-* \ + dcae-controller-service-cdap* \ + dcae-controller-service-docker* \ + dcae-controller-service-standardeventcollector* \ + dcae-controller-service-vm* \ + dcae-controller-service-dmaap-drsub* \ + dcae-controller-service-storage-postgres-model \ + dcae-controller-core-model \ + dcae-controller \ + dcae-controller-feature \ + dcae-controller-core \ + dcae-controller-core-utils \ + dcae-controller-operation-utils \ + dcae-analytics-cdap-common-model \ + ncomp-openstack* \ + ncomp-docker* \ + ncomp-cdap* \ + ncomp-maven* \ + ncomp-core \ + ncomp-core-model \ + ncomp-core-types \ + ncomp-core-tools \ + ncomp-sirius-manager \ + ncomp-sirius-manager-agent* \ + ncomp-sirius-manager-base \ + ncomp-sirius-manager-console \ + ncomp-sirius-manager-generator \ + ncomp-sirius-manager-model \ + ncomp-sirius-manager-drools \ + ncomp-sirius-manager-server \ + ncomp-utils-java \ + ncomp-utils-java-extra \ + ncomp-utils-journaling \ + ncomp-utils \ + operation-utils +do + for A in $(ls -d1 /home/ncomp/git/*/$a| grep -v git/dcae-); do + echo +++++++++ $A +++++++++ + bash $ROOT/convert-to-open-ecomp.sh $A + done +done diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/dmaap_mr_prep.sh b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/dmaap_mr_prep.sh new file mode 100644 index 0000000..6bcb1c0 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/dmaap_mr_prep.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +GITREPO=$1 + +cd /opt/app + +git -c http.sslVerify=false clone $GITREPO +cd dcae-startup-vm-message-router/ +./deploy.sh + + diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/docker_ca_cert.pem b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/docker_ca_cert.pem new file mode 100644 index 0000000..4a7bd61 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/docker_ca_cert.pem @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDTzCCAjegAwIBAgIJAJa7ZtoAXUZyMA0GCSqGSIb3DQEBCwUAMD4xCzAJBgNV +BAYTAlVTMRwwGgYDVQQKDBNBVCZUIFNlcnZpY2VzLCBJbmMuMREwDwYDVQQDDAhE +b2NrZXJDQTAeFw0xNjAzMDEyMTUyNDhaFw0yNjAyMjcyMTUyNDhaMD4xCzAJBgNV +BAYTAlVTMRwwGgYDVQQKDBNBVCZUIFNlcnZpY2VzLCBJbmMuMREwDwYDVQQDDAhE +b2NrZXJDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN1SWFC79DZS +raSs/lbsVFp43ScCUjVmcOgIW+LM6pcEkZhHArN0ocOdLtTEL37Zpti52+iPFqC5 +bwHZASQxLvd0znBSjfIp0tyZfsb+OWQKkLgEnA65V/F9WsD4kkHOCFJ/8NNXB1aY +6BoNJd7CnQ/4dGymGF63cidcqmvwZRfVovOTMG2Musuij/BfGBUzIvReIDmD3mfn +mVF8BclwOkcqo3MxbwmpkHMUStD+pCC/4BBVnjk6IGmheQdCcZC/ywrjmUso5wlq +ioSIdDEBLmC15Ngr4u03Z/zqEELW3fKNajXDAIqBjTlU1plhJ5U58QlcxbxtiiB0 +lFSHqr233isCAwEAAaNQME4wHQYDVR0OBBYEFMrZlCn2Z8nBjCFJAJJi+7fvC+Vj +MB8GA1UdIwQYMBaAFMrZlCn2Z8nBjCFJAJJi+7fvC+VjMAwGA1UdEwQFMAMBAf8w +DQYJKoZIhvcNAQELBQADggEBAIEEdH5YdWjaavFsF2akNoLpWm+BRkY4C6NajlqI +Be+mRMDFMi2SM+wfgUgNGC5GpdKHlXdbbNZF0eJJUe2vvSuifRbfMsivmi2mhrNS +H3d8X/5qtc6insKQlQqxC0YA9TDK1fMWFTudV7iT4BgjsJLOVI2EVMP2iGS6gBkF +07WgNUyki/LxFTHuPdpNN9ys5l7Kxxi2U/yyP2zWQ81HKbrTKnPRnWmN/RHFXVza +lnPf35BRcaYwikPgCvE13ewRDy0n1p8DwB4yQNtMqrg8u29pYUd5+HW6OD9+TVOx +ss6TFcJnDubtLZqCvk0+fWvOad7wW1s0UHpaH7HyVZel2Iw= +-----END CERTIFICATE----- diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/docker_ca_key.pem b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/docker_ca_key.pem new file mode 100644 index 0000000..1399338 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/docker_ca_key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEA3VJYULv0NlKtpKz+VuxUWnjdJwJSNWZw6Ahb4szqlwSRmEcC +s3Shw50u1MQvftmm2Lnb6I8WoLlvAdkBJDEu93TOcFKN8inS3Jl+xv45ZAqQuASc +DrlX8X1awPiSQc4IUn/w01cHVpjoGg0l3sKdD/h0bKYYXrdyJ1yqa/BlF9Wi85Mw +bYy6y6KP8F8YFTMi9F4gOYPeZ+eZUXwFyXA6RyqjczFvCamQcxRK0P6kIL/gEFWe +OTogaaF5B0JxkL/LCuOZSyjnCWqKhIh0MQEuYLXk2Cvi7Tdn/OoQQtbd8o1qNcMA +ioGNOVTWmWEnlTnxCVzFvG2KIHSUVIeqvbfeKwIDAQABAoIBAAu4w8Kq4blK0bWK +EAJsi98qzZO2VMJNRaeUYcF2VuperJNjF2qHv9WLaqKMLXPLdUG/Pj1n7qvehlmT +s7LGBBXJEvHx/WCZBHj4jDVf24xH3vhQDi/dcyHwILFduOlRTzGHYyreTh4xBQH0 +NlBBAG6LGydx+JJzptEc4E3NMp17cueOXVSf3VHbGzqAFgR99OHD8t8pZK0Ci2T/ +zUY2WUEpVquiMIIFDu5MMmPJHXdYJwsi7/oZwOaJV/8qFS5Rat2WIGGRrubt5No0 +sJHjbCMiEZdtVgFirezrOpQNCZf1j2a62BtlV/JsggJzluxwa6bvStfjsDQoN+2E +ICnBtnkCgYEA9P0mc4g+Xyju1ky4HhsuooL5wqeBK722nD4jojZEy+H/o44H7JUU +6/zzBdzJgu8yOPMXyl+I7zOu7cXDFO6bl/npfSEsl09mbbKBX0raWW/PEzWA8UGQ +9RRSfEQFiDWwbfAmEMe2RbN5cbyl+DAC/2eFl0aCrbzxsqSmeICHGI0CgYEA50Th +DmUIlz/XHu616QtaB1wEEdEf17u6goe2698EO8MpGCmK2rk0LQcMDR+cg58IRurx +VhjYbeOL1tDxbwrT8Q5lbKbriNc82HFxmVGJu+W/5ajxMxxelu4cvbgwk9a9UYKW +5pkEHk/DBfGiFMSgeqQOqSx+NuVvQbv4rHVAr5cCgYAYMny+woEukvNsFS3GQ3cK +tBcJI9Q9RsKnkfehCO0omgzO0bN0qZDkchpqxNDebtOuDkyWP3Nd9OPdNkA7bAnQ +K+3k3wbxdvUt9oiSqekBFmsEga9XpNs1aalv/qPxPSRM54BK/f7ByaVAF5ro9Y0G +PupR87PqhxP0ShDrK/6r7QKBgFtIqLyRzI5GuJaRCmRuAp8dBs4xiSwSAVA8WUtI +v9cG9VWAMDqdF6cePPeBHrolL5MucQvWyra1NiEYX/PAhl+Dmy0DxbxBmNamEHy/ +3mm4CcKQqIPQEtXoLpgD98ii3h8qOH3Ur/d27DeQZLVl1yIRV2gXE8p/TSbZFxKb +RWkJAoGBAJv2yw2NLlibSPefgegoj6WSJg3l/t0wEoLmuS9Ubz87htgztJNV7P+i +dCY6Ew/POz0CoDJlojkPHLA5s1LYS0LppJeszp2oq85JCTQFSXT7wvumGEVEygw6 +W5t202N+s59oRjgvutsAFdYRZRYB5Uhh1yI3sfm8OIctgZovyi3K +-----END RSA PRIVATE KEY----- diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/fs-init.py b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/fs-init.py new file mode 100644 index 0000000..271f7c9 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/fs-init.py @@ -0,0 +1,300 @@ +#!/usr/bin/env python + +# fs-init.py - initialize ephemeral/cinder volumes and filesystems in new VM + +import datetime +import yaml +import subprocess +import os +import sys +import math +import re +import time +from stat import * + +Debug = True +DryRun = False +MatchCinderUuid = False +YamlFile = "dcae-mount.conf" +CloudInitLog = "/var/log/cloud-init.log" + +def update_fstab(bdev, mount, opts="defaults", fstype="auto"): + ff = open("/etc/fstab", 'r') + off = open("/tmp/fstab.tmp", 'w+') + + for line in ff: + if(len(line)<=1): + off.write(line) + continue + F = line.split(); + if( F[0] != bdev ): + off.write(line) + entry="\t" + off.write(entry.join([bdev,mount,fstype,opts,"0","2"])+"\n") + ff.close() + off.close() + subprocess.call(["cp","/tmp/fstab.tmp","/etc/fstab"]); + +print "Start at:", datetime.datetime.now() + +if( os.geteuid() != 0 ): + sys.exit("Error: Must run as root."); + +if( not os.path.isfile( YamlFile ) ): + sys.exit("Error: config not found: %s" % YamlFile) + +with open(YamlFile, 'r') as stream: + try: + pinfo = yaml.load(stream) + except yaml.YAMLError as exc: + print(exc) + + # This was for parsing from the VM YAML file + #print "Parsing volume info for %s (%s)" % (doc["short-name"], doc["description"]) + + # Prune to only partition info fragment + #pinfo = doc["openstack-vm-type"]["disk-partitions"] + + # Check OS + oss = pinfo["osType"].lower() + if( os.path.isfile('/etc/lsb-release') ): + osrel = subprocess.check_output(['grep', 'DISTRIB_ID', '/etc/lsb-release']).lower().rstrip() + if( os.path.isfile('/etc/redhat-release') ): + osrel = subprocess.check_output(['grep', 'release', '/etc/redhat-release']).lower().rstrip() + v = osrel.find(oss) + if( v >= 0 ): + print "osType is ok (%s)" % (oss) + else: + print "osType unmatched or unrecognized: %s != %s" % (oss, osrel) + sys.exit("Error: OS not supported") + + # Enumerate work + vol = pinfo["volumes"] + for name in vol.keys(): + eph = 'ephemeral' if vol[name]["uuid"] == "ephemeral" else 'cinder' + print "\tVolume %s size %s type %s" % (name, vol[name]["size"], eph) + if( eph == "ephemeral" ): + ephvol = name + + # Parse ephemeral from cloud-init log + if( not os.access(CloudInitLog, os.R_OK) ): + sys.exit("Error: Cannot open cloud-init.log") + + ephem_found = False + with open(CloudInitLog, 'r') as fh: + for line in iter(fh): + if( re.search('apped ephemeral.*device',line) != None ): + dev_ephem=line.split(' ')[-1].strip('\n') + ephem_found = True + fh.close() + + if( not ephem_found ): + sys.exit("Error: ephemeral device not found in cloud-init.log"); + + # Read block device info + dev_config=dev_root=cinder_dev="" + out, err = subprocess.Popen(["lsblk","--pairs","--bytes","--output","name,type,size,label,uuid"], stdout=subprocess.PIPE).communicate() + for line in out.splitlines(): + dev_name=dev_size=dev_lab=dev_uuid="" + for pair in line.split(' '): + if( pair.split('=')[0].startswith('NAME') ): + dev_name="/dev/"+pair.split('=')[1].translate(None, '"') + elif( pair.split('=')[0].startswith('TYPE') ): + dev_type=pair.split('=')[1].translate(None, '"') + elif( pair.split('=')[0].startswith('SIZE') ): + dev_size=pair.split('=')[1].translate(None, '"') + elif( pair.split('=')[0].startswith('LABEL') ): + dev_lab=pair.split('=')[1].translate(None, '"') + elif( pair.split('=')[0].startswith('UUID') ): + dev_uuid=pair.split('=')[1].translate(None, '"') + if( Debug ): + print "%s: name %s size %s label %s uuid %s" % (dev_type,dev_name,dev_size,dev_lab,dev_uuid) + if( dev_lab.startswith('config') ): + dev_config = dev_name + elif( dev_lab.find('root') >= 0 ): + dev_root = dev_name.translate(None, '0123456789') + else: + if( not dev_name.startswith(dev_ephem) ): + if( dev_type == "disk" ): + cinder_dev=dev_name + cinder_size=dev_size + + print "\tRoot: %s" % ( dev_root ) + print "\tConfig: %s" % ( dev_config ) + print "\tEphemeral: %s" % ( dev_ephem ) + print "\tCinder: %s" % ( cinder_dev ) + + # Handle ephemeral already mounted + if( not os.access("/etc/fstab", os.R_OK) ): + sys.exit("Error: Cannot open fstab") + + with open("/etc/fstab", 'r') as fh: + for line in iter(fh): + if( line.startswith(dev_ephem) ): + print "Mount point for ephem found:" + print line + # Use specific partition created, which may differ from base device + dev_ephem=line.split()[0] + ephem_mounted = True + mp_ephem=line.split()[1] + print "Using ephem mount: \"%s\"" % ( dev_ephem ) + fh.close() + + # Handle ephemeral + if 'ephvol' in locals() and not DryRun: + print "Processing ephemeral volume \"%s\"" % ephvol + if( ephem_mounted == True ): + if( os.path.ismount(mp_ephem) ): + print "\tAlready mounted, recreating..." + if( subprocess.call(["umount",dev_ephem]) != 0 ): + sys.exit("Error unmounting ephemeral on "+dev_ephem) + # Create and mount fs + mode = os.stat(dev_ephem).st_mode + if( not S_ISBLK(mode) ): + sys.exit("Error: not a block device: %s" % ephem_device) + for k in vol[ephvol]['filesystems'].keys(): + # Wipe existing partition + if( oss == "ubuntu" ): + rv = subprocess.call(["sgdisk","--zap-all",dev_ephem]) + if( rv != 0 ): + print "Error: sgdisk for %s returned %d" % (dev_ephem,rv) + # Recreate fs + ftype=vol[ephvol]['filesystems'][k]['type'] + print "mkfs -t "+ftype+" "+dev_ephem + rv = subprocess.call(["mkfs","-t",ftype,dev_ephem]) + if( rv != 0 ): + print "Error: mkfs for %s returned %d" % (dev_ephem,rv) + print "Mount %s on %s" % (k, dev_ephem) + if( not os.path.isdir(k) ): + os.makedirs(k,0755) + if( subprocess.call(["mount",dev_ephem,k]) != 0 ): + sys.exit("Error mounting ephemeral on "+k) + update_fstab(dev_ephem,k) + else: + if( not DryRun ): + print "No ephemeral disk defined." + + # Handle cinder volume(s) + if( not 'cinder_dev' in locals() ): + sys.exit("Error: cinder volume not found") + + for name in vol.keys(): + uuid=vol[name]["uuid"] + if( uuid != "ephemeral" ): + uuid=uuid[:20] # virtio_blk only passes 20 bytes of uuid + sz=vol[name]["size"] + print "Volume %s specified size %s device %s" % (name,sz,cinder_dev) + fs=vol[name]['filesystems'] + if( Debug ): print fs + fssize=0 + for f in fs.keys(): + fssize+=int(fs[f]["size"]) + + # Check volume label + sp = subprocess.Popen(["parted","--machine",cinder_dev,"unit","s","p"], stderr=subprocess.PIPE, stdout=subprocess.PIPE) + out, err = sp.communicate() + if( sp.returncode >= 0 ): + # No disk label, must label first + if not DryRun: + rv=subprocess.call(["parted","--script",cinder_dev,"mklabel","gpt"]); + if( rv != 0 ): + print "Warning: attempt to GPT label %s failed." % (cinder_dev) + else: + print "Added GPT label on %s." % (cinder_dev) + else: + print "Would add GPT label on %s" % (cinder_dev) + sys.exit("Dryrun complete.") + + # Get device info + cinder_sectorsize=cinder_startsector=cinder_endsector=cinder_totalsector=-1 + out, err = subprocess.Popen(["parted","--machine",cinder_dev,"unit","s","p","free"], stdout=subprocess.PIPE).communicate() + for line in out.splitlines(): + if( line.find(cinder_dev) >= 0 ): + cinder_sectorsize=int(line.split(':')[3]) + elif( line.find('free;') >= 0 ): + cinder_startsector=int(line.split(':')[1].strip('s')) + cinder_endsector=int(line.split(':')[2].strip('s')) + cinder_totalsector=int(line.split(':')[3].strip('s')) + if( Debug ): + print "Sector size: %d, start: %d, end: %d" % (cinder_sectorsize,cinder_startsector,cinder_endsector) + + # Size checks + asz=int(cinder_size)/1024**3 + if( asz != sz ): + print "Warning: actual size of volume (%d) does not match requested volume size (%s)" % (asz,sz) + if( fssize > asz ): + print "Warning: total filesystem size (%d) exceeds actual total size (%d)" % (fssize,asz) + print "Using proportional allocation:" + for f in fs.keys(): + fs[f]["size"] = str( int(math.floor(float(asz)*(float(fs[f]["size"])/float(fssize))))) + # fs[f]["size"] = max (fs[f]["size"],1) + fs[f]["size"] = str(max(int(fs[f]["size"]), 1)) + + print "\t%s gets %sGB of %sGB" % (f,fs[f]["size"],asz) + + # Ensure not partitioned already + redeploy=False + cinder_partitioned = False + with open("/proc/partitions", 'r') as pf: + for line in pf: + if( len(line) > 1 ): + rpg=re.compile(cinder_dev.lstrip("/dev/")+'[0-9]') + if( rpg.search(line) != None ): + #if( "/dev/"+line.split()[-1] == cinder_dev+"1" ): + print "Warning: cinder dev %s already partitioned" % (cinder_dev) + cinder_partitioned = True + else: + print "String \"%s\" not found in \"%s\"" % (rpg.pattern, line) + + if( not cinder_partitioned ): + + # Generate partition info for parted (using sectors) + pfile = open("parted.cmd", "w+") + pfile.write("parted --script "+cinder_dev+" \\\n") + pfile.write("\tunit s \\\n"); + start=int(cinder_startsector) + for f in fs.keys(): + end=start+(int(fs[f]["size"])*(1024**3/cinder_sectorsize)) + if( end > cinder_endsector ): + end=cinder_endsector + pfile.write("\tmkpart primary "+fs[f]["type"]+" "+str(start)+"s "+str(end)+"s \\\n") + start=end+1 + pfile.write("\talign-check min 1 \\\n") + pfile.write("\tprint\n") + pfile.close() + os.chmod("parted.cmd", 0755) + + # Run partition + print "Running partitioning script..." + rv = subprocess.call(["./parted.cmd"],shell=True) + if( rv != 0 ): + print "Error: parted for %s failed" % cinder_dev + + else: + redeploy=True + print "Warning: cinder device %s already partitioned, skipping partitioning." % cinder_dev + + # Force kernel to re-read partition info on older Ubuntu + rv = subprocess.call(["parted","--machine",cinder_dev,"unit","s","p"]) + time.sleep(1) + + # Create/Mount filesystems + offset=1 + for f in fs.keys(): + if( not redeploy ): # preserve fs if a redeploy + print "mkfs -t "+fs[f]["type"]+" "+cinder_dev+str(offset) + rv = subprocess.call(["mkfs","-F","-t",fs[f]["type"],cinder_dev+str(offset)]) + if( rv != 0 ): + print "Error: mkfs for %s returned %d" % (cinder_dev+str(offset),rv) + if( not os.path.isdir(f) ): + os.makedirs(f,0755) + print "mount -t "+fs[f]["type"]+" "+cinder_dev+str(offset)+" "+f + rvm = subprocess.call(["mount","-t",fs[f]["type"],cinder_dev+str(offset),f]) + if( rvm != 0): + print "Error: mount for %s on %s failed" % (f,cinder_dev+str(offset)) + update_fstab(cinder_dev+str(offset),f) + print "Added mount \"%s\" to fstab." % f + offset=offset+1 + + + if( Debug): print "\nWhole subtree is:\n%s" % pinfo diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/generate-certs.sh b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/generate-certs.sh new file mode 100644 index 0000000..61338d6 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/generate-certs.sh @@ -0,0 +1,95 @@ +#!/bin/bash + +. common.funcs + +# +# this was cribbed from the io.docker:docker install_postproc script +# +DOCKER_DIR=/opt/app/docker +DOCKER_ETC_DIR=${DOCKER_DIR}/etc +DOCKER_BIN_DIR=${DOCKER_DIR}/bin +DOCKER_DATA_DIR=${DOCKER_DIR}/data +DOCKER_LOG_DIR=${DOCKER_DIR}/logs + +DOCKER_SSL="/etc/ssl/certs" + +DOCKER_CA_CERT=${DOCKER_ETC_DIR}/docker_ca_cert.pem +DOCKER_CA_KEY=${DOCKER_ETC_DIR}/docker_ca_key.pem + +CLIENT_P12_PWD=f22723cffdbd2fff1cb3c558677a7684 + +HOSTNAME=$(hostname -f) + +_isRoot + +mkdir -p ${DOCKER_DIR} +mkdir -p ${DOCKER_ETC_DIR} +mkdir -p ${DOCKER_BIN_DIR} +mkdir -p ${DOCKER_DATA_DIR} +mkdir -p ${DOCKER_LOG_DIR} + +cp -p docker_ca_cert.pem ${DOCKER_ETC_DIR} +cp -p docker_ca_key.pem ${DOCKER_ETC_DIR} + +# Generate certificates for SSL encryption +# Generate a private key for the docker engine + +openssl genrsa -out ${DOCKER_ETC_DIR}/server_key.pem 2048 || + fail 1 "Server private key generation failed" +_print "Generated the server's private key ..." + +# Generate a certificate signing request for the server using the private key. +openssl req -new -key ${DOCKER_ETC_DIR}/server_key.pem -out ${DOCKER_ETC_DIR}/server.csr -batch -subj "/countryName=US/stateOrProvinceName=Michigan/localityName=Southfield/organizationName=AT&T Services, Inc./commonName=${HOSTNAME}" || + fail 2 "Server certificate signing request generation failed." +_print "Generated a certificate signing request using the private key ..." + +# Generate a certificate for the server and sign it with the CA certificate. +openssl x509 -req -days 3650 -in ${DOCKER_ETC_DIR}/server.csr -CA ${DOCKER_CA_CERT} -CAkey ${DOCKER_CA_KEY} -CAcreateserial -out ${DOCKER_ETC_DIR}/server_cert.pem || + fail 3 "Server certificate signing failed." +_print "Generated a certificate for the server and sign it with the CA certificate ..." + +# Generate a private key for client authentication +openssl genrsa -out ${DOCKER_ETC_DIR}/client_key.pem 2048 || + fail 4 "Client private key generation failed." +_print "Generated a private key for client authentication ..." + +# Generate a certificate signing request for the client using the private key. +openssl req -new -key ${DOCKER_ETC_DIR}/client_key.pem -out ${DOCKER_ETC_DIR}/client.csr -batch -subj "/countryName=US/stateOrProvinceName=Michigan/localityName=Southfield/organizationName=AT&T Services, Inc./commonName=Client" || + fail 5 "Clienterver certificate signing request generation failed." +_print "Generated a certificate signing request for the client using the private key ..." + +# To make the key suitable for client authentication, +# create an extensions config file +echo extendedKeyUsage = clientAuth > ${DOCKER_ETC_DIR}/client_cert_extfile.cnf +_print "Generated client certificate extensions config ..." + +# Generate a certificate for the client and sign it with the CA certificate +openssl x509 -req -days 3650 -in ${DOCKER_ETC_DIR}/client.csr -CA ${DOCKER_CA_CERT} -CAkey ${DOCKER_CA_KEY} -CAcreateserial -out ${DOCKER_ETC_DIR}/client_cert.pem -extfile ${DOCKER_ETC_DIR}/client_cert_extfile.cnf || + fail 6 "Client certificate signing failed." +_print "Client certificate signing successfully ..." + +# Protect the keys +chmod 0600 ${DOCKER_ETC_DIR}/server_key.pem ${DOCKER_ETC_DIR}/client_key.pem ${DOCKER_CA_KEY} + +# Make the client key readable by the docker group so people who can access the docker cli can also +# access docker engine via the rest api +chgrp docker ${DOCKER_ETC_DIR}/client_key.pem +# But make the public keys readable +chmod 0644 ${DOCKER_ETC_DIR}/server_cert.pem ${DOCKER_ETC_DIR}/client_cert.pem ${DOCKER_CA_CERT} + +# Remove the password from the client key +openssl rsa -in ${DOCKER_ETC_DIR}/client_key.pem -out ${DOCKER_ETC_DIR}/client_key.pem +_print "Removed password from client key ..." + + +# Convert the client key from pem to pksc12 format so we can add it to the keystore +openssl pkcs12 -export -inkey ${DOCKER_ETC_DIR}/client_key.pem -in ${DOCKER_ETC_DIR}/client_cert.pem -out ${DOCKER_ETC_DIR}/client_cert.p12 -name client_p12 -CAfile ${DOCKER_CA_CERT} -caname root -chain -passout pass:${CLIENT_P12_PWD} || + fail 7 "CA key not converted to pksc12 format" +_print "Converted CA key to pksc12 format ..." + +# update the docker opts in /etc/default/docker +DOCKER_OPTS="--debug --graph /opt/app/docker/data --host tcp://0.0.0.0:4243 --host unix:///var/run/docker.sock --tls=true --tlscert=/opt/app/docker/etc/server_cert.pem --tlskey=/opt/app/docker/etc/server_key.pem --tlscacert=/opt/app/docker/etc/docker_ca_cert.pem" + +echo "DOCKER_OPTS=\"${DOCKER_OPTS}\"" >> /etc/default/docker +_print "Updated Docker DOCKER_OPTS ..." + diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/install-docker.sh b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/install-docker.sh new file mode 100644 index 0000000..cc73a1e --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/install-docker.sh @@ -0,0 +1,93 @@ +#!/bin/bash -x + +cd $(dirname $(readlink -e $0)) +export PATH=$PATH:$(pwd) + +PATH=$PATH:. +TRUSTY_REPO="deb https://apt.dockerproject.org/repo ubuntu-trusty main" + +. common.funcs + +# +# install docker-engine on ubuntu 14.04 +# + +_isRoot + +REL=$(uname -r) + +apt-get update + +# +# get certificates +# +apt-get install -q -y apt-transport-https ca-certificates || + _fail "apt-transport-http ca-certificates installation failed" +_print "apt-transport-htps ca-certificates installed ..." + + +# makes the aufs storage driver available +# +apt-get install -q -y linux-image-extra-${REL} linux-image-extra-virtual || + _fail "linux-image-extra-${REL} or linux-image-extra-virtual installation failed" +_print "linux-image-extra-virtual aufs storage driver installed ..." + +# +# Add GPG key +# +curl -fsSL https://yum.dockerproject.org/gpg | sudo apt-key add - + +apt-key fingerprint 58118E89F3A912897C070ADBF76221572C52609D + +echo "${TRUSTY_REPO}" | sudo tee /etc/apt/sources.list.d/docker.list + +# update apt package index +apt-get update + +# +# set up the repository +# +apt-get install software-properties-common +add-apt-repository \ + "deb https://apt.dockerproject.org/repo/ \ + ubuntu-$(lsb_release -cs) \ + main" || _fail "setup of repositry failed" +_print "repository set up" + +# +# install apparmor +# +apt-get install -q -y apparmor || + _fail "apparmor installation failed" +_print "apparmor installed ..." + +apt-get install -q -y docker-engine || + _fail "docker-engine installation failed" +_print "docker-engine installed ..." + +# +# Generate certifcates for TLS +# +_print "Generating certificates ..." +generate-certs.sh + +usermod -aG docker ubuntu +usermod -aG docker dcae + +# +# mv ecomp-nexus docker auth +# +if [ ! -d /home/ubuntu/.docker ]; then + mkdir -p /home/ubuntu/.docker || _fatal "Could not create /home/ubuntu/.docker dir" +fi + +# +# Start Docker +# +_print "Starting docker ..." +service docker restart + + +# +# END +# diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/process-yaml.sh b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/process-yaml.sh new file mode 100644 index 0000000..c0cff3f --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/process-yaml.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +export JAVA_HOME=/opt/app/java/jdk/jdk170 +export GROOVY_HOME=/opt/app/groovy/246 + +PATH=$JAVA_HOME/bin:$GROOVY_HOME/bin:$PATH + +cd $(dirname $(dirname $(readlink -e $0))) + +groovy -cp 'lib/*' scripts/process-yaml.groovy "$@" + +chgrp dcae /var/config/DCAE/chef/* diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/setup-logrotation.sh b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/setup-logrotation.sh new file mode 100644 index 0000000..aff11b1 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/setup-logrotation.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +APP=$1 + +LOG1=$(echo $APP | sed s/dcae-//).err +LOG2=$(echo $APP | sed s/dcae-//).out + +cat > | /etc/logrotate.d/$APP << EOF + +/opt/app/$APP/logs/$LOG1 { + missingok + compress + daily + rotate 14 + dateext + copytruncate +} + +/opt/app/$APP/logs/$LOG2 { + missingok + compress + daily + rotate 14 + dateext + copytruncate +} + +EOF \ No newline at end of file diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/setup_https.sh b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/setup_https.sh new file mode 100644 index 0000000..6559251 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/setup_https.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +FILE=$1 + +JKS=/opt/app/dcae-certificate/keystore.jks +PW=/opt/app/dcae-certificate/.password + +sed -i /server.keyStore/d $FILE +sed -i /server.keyManagerPassword/d $FILE + +if [ ! -e $JKS ]; then exit; fi +if [ ! -e $PW ]; then exit; fi + +echo server.keyStore=$JKS >> $FILE +echo server.keyStorePassword=$(cat $PW) >> $FILE +echo server.keyManagerPassword=$(cat $PW) >> $FILE + diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/update-docker-opts.sh b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/update-docker-opts.sh new file mode 100644 index 0000000..363c28f --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/update-docker-opts.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +_die() { + echo "$1" + exit 2; +} + +_exit() { + echo "$1" + exit 0; +} + +SFILE=/etc/default/docker +DFILE=/tmp/docker + +grep 'mtu=1400' $SFILE 1>/dev/null || _die "Could not open $SFILE" + +[ $? -eq 0 ] && _exit "DOCKER_OPTS already updated" + +[ ! -f ${SFILE}.ori ] && sudo -uroot cp -p ${SFILE} ${SFILE}.ori + +cp -p $SFILE $DFILE + +sed --in-place -e 's/DOCKER_OPTS="--debug/DOCKER_OPTS="--mtu=1400 --debug/' ${DFILE} + +grep 'mtu=1400' $DFILE 1>/dev/null || _die "Could not adjust DOCKER_OPTS" + +[ -s $DFILE ] && sudo -uroot cp -p $DFILE $SFILE diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/scripts/process-yaml.groovy b/dcae-controller-core/dcae-controller-core-utils/src/main/server/scripts/process-yaml.groovy new file mode 100644 index 0000000..4c740b9 --- /dev/null +++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/scripts/process-yaml.groovy @@ -0,0 +1,75 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +import org.yaml.snakeyaml.Yaml; +import org.openecomp.ncomp.utils.CryptoUtils; +import groovy.text.SimpleTemplateEngine + +def cli = new CliBuilder(usage:'process-yaml.sh reports OPTIONS') +cli.f(longOpt:'file', args:1, 'Yaml File') +cli.d(longOpt:'dir', args:1, 'Destination Directory') + +def options = cli.parse(args) + +def f = new File(options.file) +def dir = options.dir + +Yaml yaml = new Yaml(); + +def c = yaml.load(f.text) +println "Reading $f" + +def files = c['configuration-files'] ?: [:] + +class VmSubstitute { + def pw = new File("/opt/app/dcae-certificate/.password").text.trim() + def decrypt(String s) { +// println "pw='$pw' s='$s'" + return CryptoUtils.decrypt(pw,s) + } +} + + +SimpleTemplateEngine engine = new SimpleTemplateEngine() +def vm = new VmSubstitute() +def env = [ vm : vm, certPassword : vm.pw ] + +files.each { k, m-> + if (m['encrypted-password']) return + def content = m.content + File f1 = new File(m.destination) + File f2 = new File("$dir/$f1.name") + if (f2.exists()) f2.delete() + f2.parentFile.mkdirs() + println "Updating $f2" + switch (m['encoding']) { + case "base64": + f2 << content.decodeBase64(); + return + } + content = content.toString().replaceAll('\\$','DOLLAR_XXbXaX').replaceAll('%\\{','\\${') + f2 << "${engine.createTemplate(content).make(env)}".replaceAll('DOLLAR_XXbXaX','\\$') +} + + + + diff --git a/dcae-controller-core/dcae-controller-operation-utils/.classpath b/dcae-controller-core/dcae-controller-operation-utils/.classpath new file mode 100644 index 0000000..b14f8a5 --- /dev/null +++ b/dcae-controller-core/dcae-controller-operation-utils/.classpath @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-core/dcae-controller-operation-utils/.gitignore b/dcae-controller-core/dcae-controller-operation-utils/.gitignore new file mode 100644 index 0000000..ec2d648 --- /dev/null +++ b/dcae-controller-core/dcae-controller-operation-utils/.gitignore @@ -0,0 +1,2 @@ +/target/ +/config/ diff --git a/dcae-controller-core/dcae-controller-operation-utils/.project b/dcae-controller-core/dcae-controller-operation-utils/.project new file mode 100644 index 0000000..13e93f2 --- /dev/null +++ b/dcae-controller-core/dcae-controller-operation-utils/.project @@ -0,0 +1,35 @@ + + + dcae-controller-operation-utils + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/dcae-controller-core/dcae-controller-operation-utils/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-core/dcae-controller-operation-utils/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..abec6ca --- /dev/null +++ b/dcae-controller-core/dcae-controller-operation-utils/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/dcae-controller-core/dcae-controller-operation-utils/.settings/org.eclipse.jdt.groovy.core.prefs b/dcae-controller-core/dcae-controller-operation-utils/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/dcae-controller-core/dcae-controller-operation-utils/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/dcae-controller-core/dcae-controller-operation-utils/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-core/dcae-controller-operation-utils/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-core/dcae-controller-operation-utils/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-core/dcae-controller-operation-utils/LICENSE.txt b/dcae-controller-core/dcae-controller-operation-utils/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-core/dcae-controller-operation-utils/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-core/dcae-controller-operation-utils/META-INF/MANIFEST.MF b/dcae-controller-core/dcae-controller-operation-utils/META-INF/MANIFEST.MF new file mode 100644 index 0000000..a0c1ab8 --- /dev/null +++ b/dcae-controller-core/dcae-controller-operation-utils/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: dcae-controller-operation-utils +Bundle-SymbolicName: dcae-controller-operation-utils +Bundle-Version: 1.0.0.qualifier +Export-Package: org.openecomp.dcae.controller.operation.utils +Require-Bundle: dcae-controller-service-vm-model;bundle-version="0.1.0", + dcae-controller-service-vm-adaptor;bundle-version="0.1.0", + dcae-controller-platform-model;bundle-version="0.1.0", + ncomp-sirius-manager-console;bundle-version="0.1.0", + ncomp-sirius-manager-server;bundle-version="0.1.0", + dcae-controller-core-model;bundle-version="0.1.0" diff --git a/dcae-controller-core/dcae-controller-operation-utils/build.properties b/dcae-controller-core/dcae-controller-operation-utils/build.properties new file mode 100644 index 0000000..80bc250 --- /dev/null +++ b/dcae-controller-core/dcae-controller-operation-utils/build.properties @@ -0,0 +1,6 @@ +source.. = src/main/java/,\ + src/main/resources/,\ + src/test/java/,\ + src/test/resources/ +bin.includes = META-INF/,\ + . diff --git a/dcae-controller-core/dcae-controller-operation-utils/pom.xml b/dcae-controller-core/dcae-controller-operation-utils/pom.xml new file mode 100644 index 0000000..fbddc5b --- /dev/null +++ b/dcae-controller-core/dcae-controller-operation-utils/pom.xml @@ -0,0 +1,156 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-operation-utils + 0.1.0-SNAPSHOT + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-compiler-plugin + + 3.1 + + groovy-eclipse-compiler + + + + org.codehaus.groovy + groovy-eclipse-compiler + 2.9.1-01 + + + + org.codehaus.groovy + groovy-eclipse-batch + 2.3.7-01 + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.apache.maven.plugins + + + maven-compiler-plugin + + + [3.1,) + + + compile + testCompile + + + + + + + + + + + + + + + + + org.codehaus.groovy + groovy-all + 2.4.3 + + + + org.yaml + snakeyaml + 1.15 + + + org.openecomp.ncomp.utils + ncomp-utils-java + ${project.version} + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-console + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-platform-model + ${project.version} + + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + diff --git a/dcae-controller-core/dcae-controller-operation-utils/src/main/java/org/openecomp/dcae/controller/operation/utils/DcaePlatformConfiguration.groovy b/dcae-controller-core/dcae-controller-operation-utils/src/main/java/org/openecomp/dcae/controller/operation/utils/DcaePlatformConfiguration.groovy new file mode 100644 index 0000000..234e98a --- /dev/null +++ b/dcae-controller-core/dcae-controller-operation-utils/src/main/java/org/openecomp/dcae/controller/operation/utils/DcaePlatformConfiguration.groovy @@ -0,0 +1,1115 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.operation.utils + +import static org.openecomp.ncomp.sirius.manager.console.Utils.* +import static org.openecomp.ncomp.utils.Base64.decode64; +import static org.openecomp.dcae.controller.operation.utils.DocUtils.* + +import java.security.KeyFactory; +import java.security.PrivateKey; +import java.security.spec.KeySpec; +import java.security.spec.PKCS8EncodedKeySpec; + +import javax.crypto.Cipher; + +import org.json.JSONArray +import org.junit.After; + +import groovy.text.SimpleTemplateEngine + +import org.openecomp.ncomp.utils.CryptoUtils; +import org.openecomp.ncomp.webservice.utils.IpUtils + +class DcaePlatformConfiguration { + def env + def release + String envName + def tenants + def locationTypes + def serviceName + def instanceName + def tenant + def locationName + def streams + def networking + def ipAssignments + def passwords + Map deploymentType = [:] + Map types = [:] + def vms // for now use old setup. + def dockers // for now use old setup. + + public DcaePlatformConfiguration(String release, String envName, String root, String destRoot) { + DocUtils docUtils = new DocUtils(release,envName,root,destRoot) + this.envName = envName + this.release = release + vms = docUtils.vms() + dockers = docUtils.dockers() + env = file2object("$release-$envName/env.yaml", false) ?: [:] + tenants = file2object("$release-$envName/tenants.yaml", false) + ipAssignments = file2object("$release-$envName/ip-assignment.yaml", false) ?: [:] + locationTypes = file2object("$release/location-types.yaml", false) + streams = file2object("$release/streams.yaml", false) + networking = file2object("$release/networking.yaml") + passwords = file2object("$release-$envName/certificates/passwords.yaml", false) ?: [:] + tenants.each { n, v -> + v.tenantName = n + if (locationTypes[v.type].tenantNames == null) + locationTypes[v.type].tenantNames = [] + locationTypes[v.type].tenantNames += n + } + locationTypes.each { n, v -> + def deployments = [] + [ + 'vm-deployments', + 'docker-deployments', + 'cdap-deployments', + 'other-deployments' + ].each { t -> + def typeDir = t.replace("deployments","templates") + def typeName = t.replace("deployments","type") +// println "n=$n v=$v t=$t" + v[t].each { n1, v1 -> + deployments += n1 + // println "n1=$n1 v1=$v1 $release/$typeDir/${v1[typeName]}.yaml" + deploymentType[n1] = v1 + v1.type = file2object("$release/$typeDir/${v1[typeName]}.yaml", false) + if (v1.type == null) { + println "n1=$n1 v1=$v1" + System.err.println "Unknown type: $release/$typeDir/${v1[typeName]}.yaml" + System.exit(3) + } + types[v1[typeName]] = v1.type + } + } + locationTypes[n].deployments = deployments +// System.err.println "n=$n v=${locationTypes[n].deployments} $deployments" + } + deploymentType.each { n,v -> + addInstances(n) + } + } + + def init(s,i) { + serviceName = s + instanceName = i + tenant = tenants[i] + locationName = i + } + + def p(o) { + object2json(o).toString(2) + } + + def addInstances(String n) { + def instances = [:] + deploymentType[n].instances = instances + deploymentType[n].tenantNames = [] + tenants.each { tenantName, tenant -> + // System.err.println "tenantName $tenantName $tenant.type ${locationTypes[tenant.type].deployments}" + locationTypes[tenant.type].deployments.each { n1 -> + // println "$n $tenantName $n1" + if (n != n1) return + deploymentType[n].tenantNames += tenantName + def instance = [:] + instances[tenantName] = instance + if (n.startsWith("vm-")) { + // println "$n $tenantName $n1 ${p(vms[n])}" + instance.servers = vms[n].locations["$n1-$tenantName"].vms + if (instance.servers == null) { + println "No servers for: $n $tenantName $n1 ${p(vms[n])}" + System.exit(3) + } + instance.servers.each { n2, v2 -> + v2.ip = ipAssignments[n2] ?: "TBD - ip-assignment.yaml@$n2" + v2['dns-cnames'] = [] + v2['dns-gss'] = [] + v2['dns-arecords'] = [ "${n2}.${tenant['dns-surfix']}"] + def envDns = env.get("dns") ?: [:] + def shortName = deploymentType[n].type['short-name'] + def shortNameGlobal = "$shortName${envDns['global-fix'] ?: ''}" + def globalDns = envDns.get("service-suffix") ?: "TBD - env.yaml@dns.service-suffix" + def tenantDns = tenant.get("dns-surfix") ?: "TBD - tenants.yaml@${tenantName}.dns-surfix" + (deploymentType[n].type['dns-cnames'] ?: []).each { dns1 -> + if (dns1=="central" && tenant.type != "opendcae-central") return + if (dns1=="central-site" && tenant.type != "opendcae-central") return + v2['dns-cnames'] += dnsName(n,tenant,dns1) + } + (deploymentType[n].type['dns-gss'] ?: []).each { dns1 -> + if (dns1=="central" && tenant.type != "opendcae-central") return + v2['dns-gss'] += dnsName(n,tenant,dns1) + } + (deploymentType[n].type['dns-arecords'] ?: []).each { dns1 -> + if (dns1=="central" && tenant.type != "opendcae-central") return + v2['dns-arecords'] += dnsName(n,tenant,dns1) + } + // dns-service: [ drsub: [ 'dns-type' : 'arecords': 'cluster-type' : 'site' ] ] + (deploymentType[n].type['dns-service'] ?: [:]).each { n3, v3 -> + v2["dns-${v3['dns-type']}"] += dnsName(n,tenant,v3['cluster-type'],n3) + switch (v3['cluster-type']) { + case "gss" : + v2["dns-cnames"] += dnsName(n,tenant,"global",n3) + break + case "gss-edge" : + v2["dns-cnames"] += dnsName(n,tenant,"site",n3) +// println "$n ${p(v2)}" +// System.exit(3) + break + } + } +// println "$n ${p(v2)}" +// System.exit(3) + } + return + } +// println "$n $tenantName $n1 ${p(deploymentType[n])}" + def path = substitute(deploymentType[n].container,[:],n,tenantName) + def a = path.split("/") + instance.hostService = a[2] + instance.hostServiceInstance = a[4] + } + } +// println "$n ${p(instances)}" +// println "$n ${p(deploymentType[n])}" +// System.exit(0) + } + def dnsName(n,tenant,dnsType, extra = null) { + def tenant1 = tenant ?: [tenantName:"NA"] + def ee = envName.toLowerCase() + def envDns = env.get("dns") ?: [:] + if (deploymentType[n] == null) { + throw new RuntimeException("Unknown deploymentType: $n") + } + def shortName = deploymentType[n].type['short-name'] + def shortNameGlobal = "$shortName${envDns['global-fix'] ?: ''}" + def globalDns = envDns.get("service-suffix") ?: "TBD - env.yaml@dns.service-suffix" + def gssDns = env("dns.gss-idns-suffix") + def tenantDns = tenant1.get("dns-surfix") ?: "TBD - tenants.yaml@${tenant1.tenantName}.dns-surfix" + extra = (extra != null) ? "-$extra" : "" + switch (dnsType) { + case "gss": return "dcae-${shortNameGlobal}$extra-${ee}.${gssDns}" + case "gss-edge": return "dcae-${shortName}$extra-$tenant.tenantName-${ee}.${gssDns}" + case "global": + case "central": + case "central-site": + case "global-site": return "dcae-${shortNameGlobal}$extra-${ee}.${globalDns}" + case "site": return "dcae-${shortName}$extra-$tenant.tenantName-${ee}.${tenantDns}" + } + } + + def aEnv() { + switch (release) { + case "1607": return ! envName.contains("FTL"); break; + case "1610": return ! envName.equals("FTL2"); break; + default: return true; + } + } + + def genVmType(n) { + def o = types[n]['openstack-vm-type'] + def m = [:] + m.diskSizeGB = o.diskSizeGB ?: 0 + m.volumeSizeGB = o.volumeSizeGB ?: 0 + m.memorySizeMB = o.memorySizeGB ?: 4 + m.memorySizeMB *= 1024 + m.needPublicIp = "${o.needPublicIp ?: true}" + m.numberOfCores = o.numberOfCores ?: 2 + m.rootDiskSizeGB = o.rootDiskSizeGB ?: 80 + m.imageName = o.imageName ?: "m1.large" + if (! aEnv()) { + if (o['dev-diskSizeGB'] != null) m.diskSizeGB = o['dev-diskSizeGB'] + if (o['dev-volumeSizeGB'] != null) m.volumeSizeGB = o['dev-volumeSizeGB'] + if (o['dev-memorySizeMB'] != null) m.memorySizeMB = o['dev-memorySizeMB'] + } + m.incomingSecurityRules = [ + "manager": [ + "ipProtocol": "tcp", + "portRangeStart": "1", + "portRangeEnd": "59996", + ] + ] + if (n == "vm-docker-host") { + m.incomingSecurityRules['udp'] = [ + "ipProtocol": "udp", + "portRangeStart": "162", + "portRangeEnd": "6162", + ] + } + // println object2json(m).toString(2) + return m + } + + def serviceFqdn(deploymentTypeName = null, extra = null) { + if (deploymentTypeName == null) deploymentTypeName = serviceName + return dnsName(deploymentTypeName,tenant,"global",extra) + } + + def httpProtocol(deploymentTypeName = null) { + if (deploymentTypeName == null) deploymentTypeName = serviceName + // TODO + return "http" + } + + + def siteServiceFqdn(deploymentTypeName = null, extra = null) { + if (deploymentTypeName == null) deploymentTypeName = serviceName + return dnsName(deploymentTypeName,tenant,"site",extra) + } + + def serversFqdn(deploymentTypeName = null, tName = instanceName) { + def res = [] + servers(deploymentTypeName,tName).each { n -> res += "$n.${tenants[tName]['dns-surfix']}" } + return res + } + + def privateKey = null + def vmKey = null + def vmName = null + def password(s) { + def o = env.passwords ?: [:] + boolean error = false + s.split('\\.').each { n -> + if (error) return + if (o[n] == null) { + o = "TBD: env.yaml@passwords.$s" + error = true + } + else + o = o[n] + } + if (privateKey != null && vmKey != null && o.startsWith("rsa:")) { + def key = verifyKey(privateKey) + o = CryptoUtils.decryptPrivate(key, o.substring(4)); + def k = vmKey + if (vmKey.startsWith("rsa:")) { + k = CryptoUtils.decryptPrivate(key, vmKey.substring(4)); + } +// System.err.println "+++++ s=$serviceName i=$instanceName vm=$vmName s=$s k=$k o=$o" + o = "%{vm.decrypt('${CryptoUtils.encrypt(k,o)}')}" + } + return o.trim() + } + + public static String verifyKey(String privateKey) { + try { + def key = CryptoUtils.getKey(privateKey) + if (decode64(key) == null) { + System.err.println "ERROR: BAD private key: bad base64 encoding: $privateKey" + System.exit(1) + } + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + KeySpec keySpec = new PKCS8EncodedKeySpec(decode64(key)); + PrivateKey key1 = keyFactory.generatePrivate(keySpec); + return key + } catch (Exception e) { + System.err.println "ERROR: BAD private key: $privateKey" + System.exit(1) + } + + } + + + def streams(s) { + def o = env.streams ?: [:] + boolean error = false + s.split('\\.').each { n -> + if (error) return + if (o[n] == null) { + o = "TBD: env.yaml@streams.$s" + error = true + } + else + o = o[n] + } + return o + } + + def env(s) { + def o = env + boolean error = false + s.split('\\.').each { n -> + if (error) return + if (o[n] == null) { + o = "TBD:env.yaml@$s" + error = true + } + else + o = o[n] + } + return o + } + + def vmEnv(s) { + def o = (env['vm-templates'] ?: [:])[serviceName] ?: [:] + boolean error = false + s.split('\\.').each { n -> + if (error) return + if (o[n] == null) { + o = "TBD:env.yaml@vm-templates.${serviceName}.$s" + error = true + } + else + o = o[n] + } + return o + } + + def allServersFqdn(deploymentTypeName = null) { + if (deploymentTypeName == null) deploymentTypeName = serviceName + def d = deploymentType[deploymentTypeName] + def res = [] + if (d == null) return [ + "NO DeploymentType $deploymentTypeName" + ] + if (d.instances == null) return [ + "NO instances DeploymentType $deploymentTypeName" + ] + d.instances.each { instanceName, instance -> + instance.servers.each { n, v -> + res += "$n.${tenants[instanceName]['dns-surfix']}" + } + } + return res + } + + def servers(deploymentTypeName = null, tName = instanceName) { + if (deploymentTypeName == null) deploymentTypeName = serviceName + def d = deploymentType[deploymentTypeName] + def res = [] + if (d == null) return [ + "NO DeploymentType $deploymentTypeName" + ] + if (d.instances == null) return [ + "NO instances DeploymentType $deploymentTypeName" + ] + if (d.instances[tName] == null) return [ + "NO instance DeploymentType $deploymentTypeName with name $instanceName" + ] + d.instances[tName].servers.each { n, v -> + res += n + } + return res + } + def allServers(deploymentTypeName = null) { + if (deploymentTypeName == null) deploymentTypeName = serviceName + def d = deploymentType[deploymentTypeName] + def res = [] + if (d == null) return [ + "NO DeploymentType $deploymentTypeName" + ] + if (d.instances == null) return [ + "NO instances DeploymentType $deploymentTypeName" + ] + d.instances.each { n1, v1 -> + v1.servers.each { n, v -> + res += n + } + } + return res + } + + def eforc() { + def res = [:] + def list = [] + def d = [:] + deploymentType.each { n, v -> + d[n]=v + } + d['vm-all'] = [ + type : ['openstack-vm-type': networking ] + ] + d.each { n, v -> +// println "n=$n v=${p(v)}" + def x = [outbound:[:],inbound:[:]] + res[n] = x + def out + if (n.startsWith('vm-')) { + def vm = v.type['openstack-vm-type'] ?: [:] +// println "n=$n vm=$vm" + out = vm['application-outbound-security-rules'] ?: [:] + } + else { + out = v.type['application-outbound-security-rules'] ?: [:] + } +// println "n=$n out=$out" + out.each { n1, v1 -> +// println "n1=$n1 v1=$v1 dest=${destination2deployment(n1,v1)}" + if (v1['only-local']) return + x.outbound[n1] = [] + findEndpoints(n).each { from -> + destination2deployment(n1,v1).each { n2 -> +// println "n1=$n1 v1=$v1 endpoints=${findEndpoints(n2,v1)}" + findEndpoints(n2,v1).each { to -> + if (from == to) return + if (both_local(from,to)) return + def ip1 = findIps(n,from) + def ip2 = findIps(n2,to,v1) + def ports = v1.ports ?: ( v1.port ?: 'TBD') + def protocol = v1.protocol ?: 'tcp' +// println "out=$n1 from=$from to=$to $ip1 $ip2" + x.outbound[n1] += [ + from: "$n@$from($ip1)", + to: "$n2@$to($ip2) ${protocol}:$ports", + ] + ip1.each { y1 -> + def subnet1 = ip2subnet(y1,from) + ip2.each { y2 -> + def subnet2 = ip2subnet(y2,to) + list += [[n,"in",n1,n,n2,from,to,y1,y2,subnet1,subnet2,protocol,ports]] + } + } + } + } + } + } + def inn + if (n.startsWith('vm-')) { + def vm = v.type['openstack-vm-type'] ?: [:] +// println "n=$n vm=$vm" + inn = vm['application-inbound-security-rules'] ?: [:] + } + else { + inn = v.type['application-inbound-security-rules'] ?: [:] + } +// println "n=$n in=$in" + inn.each { n1, v1 -> +// println "n1=$n1 v1=$v1" + if (v1['only-local']) return + x.inbound[n1] = [] + destination2deployment(n1,v1).each { n2 -> + findEndpoints(n2,v1).each { from -> + findEndpoints(n).each { to -> + if (from == to) return + if (both_local(from,to)) return + def ip1 = findIps(n2,from,v1) + def ip2 = findIps(n,to) + def ports = v1.ports ?: [ ( v1.port ?: 'TBD') ] + def protocol = v1.protocol ?: 'tcp' + // println "in=$n1 from=$from to=$to $ip1 $ip2" + x.inbound[n1] += [ + from: "$n2@$from($ip1)", + to: "$n@$to($ip2) $protocol:$ports", + ] + ip1.each { y1 -> + def subnet1 = ip2subnet(y1,from) + ip2.each { y2 -> + def subnet2 = ip2subnet(y2,to) + list += [[n,"out",n1,n2,n,from,to,y1,y2,subnet1,subnet2,protocol,ports]] + } + } + } + } + } + } +// println p(x) +// println p(res) +// System.exit(3) + } + def res1 = [:] + res.each { n,v -> + if (v.inbound.size()==0) v.inbound=null + if (v.outbound.size()==0) v.outbound=null + if (v.inbound == null && v.outbound ==null) return + res1[n] = v + } + def m2 = [:] + list.each { l -> + def siteA = l[5] + def siteB = l[6] + def sA = l[9] + def sB = l[10] + def protocol = l[11] + def ports = l[12] + def k = "$siteA:$siteB:$sA:$sB:$protocol" + if (m2[k] == null) { + m2[k] = [ + siteA:siteA, + siteB:siteB, + subnetA:sA, + subnetB:sB, + protocol:protocol, + ports : [] + ] + } + ports.each { port -> + if ( ! m2[k].ports.contains(port)) + m2[k].ports.add(port) + } + } + def list2 = [] + m2.each { n, v -> + list2 += [ [ v.siteA, v.siteB, v.subnetA, v.subnetB, v.protocol, v.ports.join(":") ]] + } + return [m:res1,list:list,m2:m2,list2:list2] + } + def site2subnet = [:] + def ip2subnet(ip,site) { + if (tenants[site]== null) return ip + if (! IpUtils.isIpv4(ip) ) return ip + def subnets = tenants[site].subnets ?: [] + def res = null + subnets.each { subnet -> + if (res != null) return + String[] a = subnet.split("/") + def ip2 = a[0] + def len = a[1] + if (! IpUtils.isIpv4(ip2) || ! len.isInteger()) { + println "Bad subnet: $subnet at $site" + System.exit(2) + } + if (IpUtils.containedIn(IpUtils.toInetAddress(ip),IpUtils.toInetAddress(ip2),len.toInteger())) res = subnet + } + if (res != null) return res + if (site2subnet[site] == null) site2subnet[site] = [] as Set + site2subnet[site] += "${IpUtils.mask(IpUtils.toInetAddress(ip),29)}/29".substring(1) + return "$ip not in any $site subnets" + } + def both_local(from,to) { + if (tenants[from] == null || tenants[from].type != "opendcae-local-ntc") return false + if (tenants[to] == null || tenants[to].type != "opendcae-local-ntc") return false + return true + } + + def dns() { + def cnames = [:] + def arecords = [:] + def gss = [:] + def currentCnames = (env['dns'] ?: [:])['current-cnames'] ?: [:] + def currentGss = (env['dns'] ?: [:])['current-gss'] ?: [:] + def res = ['dns-arecords':arecords, 'dns-cnames':cnames, 'dns-gss':gss] + deploymentType.each { n, v -> + if (!n.startsWith('vm-')) return + v.instances.each { n1, v1 -> + v1.servers.each { n2, v2 -> + (v2['dns-cnames'] ?: []).each { d -> + if (cnames[d] == null) cnames[d] = [value :"", values:[],status:dnsLookup(d)] + cnames[d].values += v2['dns-name'] ?: "$n2 missing DNS" + cnames[d].value = currentCnames[d] ?: cnames[d].values[0] + } + (v2['dns-gss'] ?: []).each { d -> + if (gss[d] == null) gss[d] = [value :"", values:[],status:dnsLookup(d,false)] + gss[d].values += v2['dns-name'] ?: "$n2 missing DNS" + gss[d].value = currentGss[d] ?: gss[d].values[0] + } + (v2['dns-arecords'] ?: []).each { d -> + if (arecords[d] == null) arecords[d] = [values:[],status:dnsLookup(d)] + def dns = v2['dns-name'] ?: "$n2 missing DNS" + def ip = ipAssignments[n2] ?: "TBD - ip-assignment.yaml@$n2" + arecords[d].values += "$dns $ip" + } + } + } + } + deploymentType.each { n, v -> + if (!n.startsWith('vm-')) return + (v.type['dns-gss'] ?: []).each { gssType -> +// println "n=$n gssType=$gssType" + switch (gssType) { + case "gss": + def d = dnsName(n,null,'global') + cnames[d] = [value:dnsName(n,null,'gss'),status:dnsLookup(d,false)] + break; + case "gss-edge": + v.instances.each { n1, v1 -> +// println "n=$n gssType=$gssType n1=$n1 v1=$v1" + def v2 = tenants[n1] + def d = dnsName(n,v2,'site') + cnames[d] = [value:dnsName(n,v2,'gss-edge'),status:dnsLookup(d,false)] + } + break; + } + } + (v.type['dns-cnames'] ?: []).each { cnameType -> +// println "n=$n cnameType=$cnameType" + switch (cnameType) { + case "central-site": + def d = dnsName(n,null,'global') + cnames[d] = [values:[],status:dnsLookup(d,false)] + v.instances.each { n1, v1 -> + def v2 = tenants[n1] + if (v2.type != "opendcae-central") return + def d1 = dnsName(n,v2,'site') + if (cnames[d].value == null) cnames[d].value = d1 + cnames[d].values += d1 + } +// println "n=$n cnameType=$cnameType ${p(cnames[d])}" +// System.exit(3) + break; + } + } + (deploymentType[n].type['dns-service'] ?: [:]).each { n3, v3 -> + switch (v3['cluster-type']) { + case "gss" : + def d = dnsName(n,null,'global',n3) + cnames[d] = [value:dnsName(n,null,'gss',n3),status:dnsLookup(d)] + break + case "gss-edge" : + v.instances.each { n1, v1 -> + def v2 = tenants[n1] + def d = dnsName(n,v2,'site',n3) + cnames[d] = [value:dnsName(n,v2,'gss-edge',n3),status:dnsLookup(d)] + } +// println "n=$n n3=$n3 ${p(cnames)}" +// System.exit(3) + break + } + } + } + return res + } + + def dnsLookup(n,boolean showDetails = true) { + def x = "nslookup $n".execute().text + List res = [] + if (x.contains("server can't find")) return "Not registered" + def first = true + x.split('\n').each { line -> + if (line.startsWith("Address:")) { + if (first) { + first = false + return + } + def ip = line.substring(9) + res += "${ip2hostname(ip)} $ip" + } + } + return showDetails ? res.sort() : "Registered" + } + def ip2hostname(ip) { + def res = null + deploymentType.each { n, v -> + if (!n.startsWith('vm-')) return + v.instances.each { n1, v1 -> + v1.servers.each { n2, v2 -> + if (ip == v2.ip) res = n2 + } + } + } + return res ?: "Unknown server" + } + def ssl() { + def res = [:] + deploymentType.each { n, v -> + if (!n.startsWith('vm-')) return + v.instances.each { n1, v1 -> + v1.servers.each { n2, v2 -> + res[n2] = [ names: v2['dns-arecords']] + res[n2].names += v2['dns-cnames'] + res[n2].names += v2['dns-gss'] + File f = new File("$root/$release-$envName/certificates/${n2}.pkcs12") + if (!f.exists()) + res[n2].status = "No certificate" + else + res[n2].status = passwords[n2] ? "Certificate Exists" : "No Password" + } + } + } + return res + } + + def destination2deployment(n,extra) { + if (extra['destination-entity-type']) { + def res = [] + deploymentType.each { n1, v -> + if (n1.startsWith(extra['destination-entity-type'])) res += n1 + } + return res + } + return [ extra['destination-entity'] ?: n ] + } + + def findEndpoints(n, extra = [:]) { + if (n == "vm-all") { + return tenants.collect { n1, t -> n1 } + } + n = extra['destination-entity'] ?: n + if (deploymentType[n]) + return deploymentType[n].tenantNames + // external entity + return [ n ] + } + def findIps(String n, String t, extra = [:]) { + n = extra['destination-entity'] ?: n + if (n == "vm-all") { + def res = [] + deploymentType.each { n1, v1 -> + if (! n1.startsWith("vm-")) return + res += findIps(n1,t,extra) + } + return res + } + if (deploymentType[n] == null) { + // external entity + def v = ((env.networking ?: [:])['external-entities'] ?: [:])[n] + if (v == null) return ["TBD - env.yaml@networking.external-entities.$n" ] + if (v.ips != null) return v.ips + return v.collect {n1,v1 -> v1.ip} + } + def v = deploymentType[n].instances[t] +// println "n=$n v=${p(deploymentType[n].instances[t])}" + if (n.startsWith("vm-")) { +// println "n=$n v=${p(v.servers)}" + if (v==null) return [] + return v.servers.collect { n1,v1 -> v1.ip } + } +// println "n=$n v=${p(deploymentType.collect {n1,v1 -> n1})}" +// println p(dockers) + return findIps(v.hostService,v.hostServiceInstance) + } + def streams2bus() { + def res = [:] + def otherFeeds = [:] + streams.streams.each { n, v -> +// println "n=$n v=${object2json(v).toString(2)}" + def streamNames = [] + def location = [:] + def auth = [:] + switch (v['databus-type']) { + case "topic": + streamNames += "topic:$n" + auth["topic:$n"] = "aaf" + break + case "topic-public": + streamNames += "topic:$n" + auth["topic:$n"] = "none" + break + case "ecomp": + streamNames += "ecomp:$n" + break + case "local": + tenants.each { n1, v1 -> streamNames += "local:$n:$n1" } + break + case "local-ecomp": + streamNames += "ecomp:$n" + tenants.each { n1, v1 -> + streamNames += "local:$n:$n1" + otherFeeds["local:$n:$n1"] = [ "ecomp:$n" ] + } + break + default: println "Unknown databus type: ${v['databus-type']}" + } + streamNames.each { streamName -> + switch (v['stream-type']) { + case "data-router": + def stream = [ + '$class' : "org.openecomp.dcae.controller.core.stream.DatabusStreamFeed", + publishers : [:], + subscribers : [:], + feedDescription : v['description'], + asprClassification : v['aspr-classification'], + ] + if (v['databus-type'] == "local-ecomp") { + stream.publishers['forward'] = [:] + } + res[streamName] = stream + v.publishers.each { n1, v1 -> + switch (v1['publisher-type']) { + default: + if (streamName.startsWith("local")) { + def loc = streamName.split(':')[2] + def n2 = "$n1:$loc" + stream.publishers[n2] = [ + localStreamId : v1['local-name'], + dcaeLocationName: loc + ] + } + if (streamName.startsWith("ecomp")) { + locationTypes['opendcae-central'].tenantNames.each { n3 -> +// System.err.println "n1=$n1 n3=$n3 ${deploymentType[n1].instances[n3]}" + if (deploymentType[n1].instances[n3] == null || deploymentType[n1].instances[n3].size() == 0) return + def n2 = "$n1:$n3" +// System.err.println "n2=$n2" + stream.publishers[n2] = [ localStreamId : v1['local-name'] ] + } + } + } + } + v.subscribers.each { n1, v1 -> + switch (v1['subscriber-type']) { + case "external": + if (streamName.startsWith("ecomp")) { + def n2 = "external:$n1" + stream.subscribers[n2] = [:] + stream.subscribers[n2].deliveryURL = substitute(v1['subscriber-url'],[:],null,null) + stream.subscribers[n2].username = substitute(v1['subscriber-user'],[:],null,null) + stream.subscribers[n2].userpwd = substitute(v1['subscriber-password'],[:],null,null) + } + break + default: + if (streamName.startsWith("local")) { + def loc = streamName.split(':')[2] + def n2 = "$n1:${loc}" + stream.subscribers[n2] = [ + dcaeLocationName : loc, + localStreamId : v1['local-name'], + deliveryURL : substitute(v1['subscriber-url'],[:],n2,loc) + ] + } + } + } + if (otherFeeds[streamName]) { + // Add additional subscriber for forwarding to that feed + otherFeeds[streamName].each { n3 -> + def n2 = "forward:$n3" + stream.subscribers[n2] = [ + otherFeedName : n3 + ] + } + } + break + case "message-router": + def stream = [ + '$class' : "org.openecomp.dcae.controller.core.stream.DatabusStreamTopic", + clients : [:], + topicDescription : v['description'], + asprClassification : v['aspr-classification'], + authenticationMethod : auth[streamName], + ] + res[streamName] = stream + tenants.each { loc, w1 -> + v.publishers.each { n1, v1 -> + def n2 = "$n1:${loc}" + stream.clients[n2] = [ + localStreamId : v1['local-name'], + clientRole : v1['role'], + username : v1['user'] ? substitute(v1['user'],[:],n1,loc) : null, + userpwd : v1['password'] ? substitute(v1['password'],[:],n1,loc) : null, + action : ["pub","view"], + dcaeLocationName: loc, + ] + } + v.subscribers.each { n1, v1 -> + def n2 = "$n1:${loc}" + stream.clients[n2] = [ + localStreamId : v1['local-name'], + clientRole : v1['role'], + username : v1['user'] ? substitute(v1['user'],[:],n1,loc) : null, + userpwd : v1['password'] ? substitute(v1['password'],[:],n1,loc) : null, + action : ["sub","view"], + dcaeLocationName: loc, + ] + } + } + break + } + } + } +// println "res=${object2json(res).toString(2)}" + return res + } + def substitute(o, env1, s, i) { + SimpleTemplateEngine engine = new SimpleTemplateEngine() + String res = o + env1.dcae = this + env1.passwords = env.passwords + init(s, i) + switch (o) { + case List: + def l = [] + o.each { e -> + l += substitute(e, env1, s, i) + } + return l + case Map: + def m = [:] + o.each { n,v -> + m[n] = substitute(v, env1, s, i) + } + return m + } + try { + res = engine.createTemplate("$o").make(env1) + if (res.startsWith("_LIST_:") && res.endsWith(":_LIST_")) { + res = res.replace("_LIST_:","").replace(":_LIST_","") + JSONArray a = new JSONArray(res) + return json2object(a) + } + } catch (e) { + System.out.println "$o" + System.err.println "ERROR $e" + System.exit(2) + } + return res + } + + def orchOld(format = null) { + def res = [ + central : [ + postgresURL: "jdbc:postgresql://${serviceFqdn('vm-postgres-sql')}:5432/XXX", + postgresUser: "YYYYY", + postgresPassword: "\${env.passwords.postgres.XXX.YYYYY}", + dmaapDcaeLocation: "????", + dmaapMRHosts: allServersFqdn("vm-databus-mr-node") + ], + locations:[:] + ] + tenants.each { n, tenant -> + res[n] = [ + locationType: tenant.type, + dmaapDcaeLocation : n, + dmaapMrService : dnsName("vm-databus-mr-node",tenant,"site"), + aaiLocationName: tenant['aai-location-name'] ?: "TBD tenant.yaml#${n}.aai-location-name", + clli: tenant['clli'] ?: "TBD tenant.yaml#${n}.clli", + docker_host_service : " ??? PLACEHOLDER_FOR_DOCKER_HOST_SERVICE_INSTANCE_THIS_EDGE", + docker_registry : "??? PLACEHOLDER_FOR_DOCKER_REGISTRY_HOST_PORT_THIS_EDGE", + ] + } + + /* + "locations" : { + "central" : { + "postgresURL? : PLACEHOLDER_FOR_POSTGRES_URL, + ?postgresUser? : PLACEHOLDER_FOR_POSTGRES_USER, + ?postgresPassword?: PLACEHOLDER_FOR_POSTGRESS_PASSWORD, + ?dmaapDcaeLocation?: PLACEHOLDER_FOR_DMAAP_DCAE_LOCATION_CENTRAL, + ?dmaapMRHosts? : PLACEHOLDER_FOR_DMAAP_MR_HOSTS_CENTRAL + }, + "PLACEHOLDER_FOR_CLLI_CODE_FOR_EDGE_LOCATION_1" : { + "cdap_cluster_service" : PLACEHOLDER_FOR_CDAP_CLUSTER_SERVICE_INSTANCE_THIS_EDGE, + ?docker_host_service? : PLACEHOLDER_FOR_DOCKER_HOST_SERVICE_INSTANCE_THIS_EDGE, + ?docker_registry? : PLACEHOLDER_FOR_DOCKER_REGISTRY_HOST_PORT_THIS_EDGE, + "dmaapDcaeLocation" : PLACEHOLDER_FOR_DMAAP_DCAE_LOCATION_THIS_EDGE, + ?dmaapMRHosts? : [ PLACEHOLDER_FOR_LIST_OF_MR_HOSTS_THIS_EDGE + }, + "PLACEHOLDER_FOR_CLLI_CODE_FOR_EDGE_LOCATION_2" : { + Similar to above + } + /* Repeat for all edge locations in the environment + * Could use a looping construct if your template language has one + */ + switch (format) { + case "base64" : return "'" + object2json(res).toString(2).bytes.encodeBase64(true) + "'" + default: return res + } + } + + def orch(format = null) { + def postgres = release == "1607" ? 'vm-postgres-sql' : 'vm-postgresql-central' + def res = [ + central : [ + postgresHost: "${serviceFqdn(postgres)}", + postgresDTIPassword: "${password('postgres.dti.viewer')}" + ] + ] + tenants.each { n, tenant -> + res[tenant['aai-location-name'] ?: "TBD - tenants.yaml@${n}.aai-location-name"] = [ + aaiLocationName:tenant['aai-location-name'], + locationType: tenant.type, + dcaeLocationName : n, + dmaapMrService : dnsName("vm-databus-mr-node",tenant,"site"), + dockerHost1: serversFqdn("vm-docker-host-1", n)[0], + dockerHost2: serversFqdn("vm-docker-host-2", n)[0], + dockerHost3: serversFqdn("vm-docker-host-3", n)[0], + ] + } + + switch (format) { + case "base64" : return "'${object2json(res).toString(2).bytes.encodeBase64(true)}'".replace('\n','\n\n') + case "json" : return object2json(res).toString(2) + default: return res + } + } + + + def controllerCluster() { + def res = [servers:[:]] + def ee = (env['vm-templates'] ?: [:])['vm-controller'] ?: [:] + def roles = ee['server-roles'] ?: [:] + deploymentType['vm-controller'].instances.each { n, v -> + v.servers.each { n1, v1 -> + + println "$n1 ${roles[n1] ?: 'UNKNOWN'}" + res.servers[n1] = [ + role : roles[n1] ?: 'UNKNOWN', + data : [ + state :[:] + ] + ] + } + } + return res + } + def chefTopo() { + def topo = "$release-$envName" + def chef = [ + id: topo, + name: topo, + chef_environment: "_default", + tags: [], + strategy: "via_cookbook", + strategy_data: [ cookbook: topo, filename: "topology"], + nodes : [] + ] + deploymentType.each { n, v -> + if (! n.startsWith("vm-")) return + println "$n" + v.instances.each { n1, v1 -> + v1.servers.each { n2, v2 -> +// println "$n $n1 $n2 $v2" + chef.nodes += [ + name : v2['dns-name'], + tags : [], + chef_environment: "_default", + run_list: [ "recipe[$release]","recipe[dcae-nagios]" ], + normal: [ tags: [] ] + ] + } + } + } + return chef + } + + def flavor(n,t) { + def tt = tenants[t] + if (tt == null) return "NONE $n $t" + def v = deploymentType[n] + if (!aEnv()) + return v['vm-type'].replace('vm-','dcae-') + def vmType = v.type['openstack-vm-type'] ?: [:] + def e = (env['vm-templates'] ?: [:])[v['vm-type']] ?:[:] + def d = e['openstack-flavor-name'] ? e['openstack-flavor-name'] : vmType['openstack-flavor-name'] + switch (d) { + case String: return d + case Map: return d[tt['type']] + } + } + + def showFlavors() { + def res = [:] + deploymentType.each { n, v -> + if (!n.startsWith('vm')) return + res[n] = [:] + v.instances.each { n1, v1 -> + res[n][n1] = flavor(n,n1) + } + } + return res + } + def list(x) { + return "_LIST_:${object2json(x)}:_LIST_" + } + + static main(args) { + + } +} diff --git a/dcae-controller-core/dcae-controller-operation-utils/src/main/java/org/openecomp/dcae/controller/operation/utils/DocUtils.java b/dcae-controller-core/dcae-controller-operation-utils/src/main/java/org/openecomp/dcae/controller/operation/utils/DocUtils.java new file mode 100644 index 0000000..7b30cf5 --- /dev/null +++ b/dcae-controller-core/dcae-controller-operation-utils/src/main/java/org/openecomp/dcae/controller/operation/utils/DocUtils.java @@ -0,0 +1,309 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.operation.utils; + +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.yaml.snakeyaml.DumperOptions; +import org.yaml.snakeyaml.Yaml; + +import org.openecomp.ncomp.utils.maps.CounterMap; +import org.openecomp.ncomp.webservice.utils.JsonUtils; + +import static org.openecomp.ncomp.sirius.manager.console.Utils.*; + +public class DocUtils { + protected String env; + protected static String root = "/home/vagrant/git/org.openecomp.dcae.controller.operation"; + protected String release; + +// public DocUtils(String release, String env) { +// super(); +// this.release = release; +// this.env = env; +// } + + public DocUtils(String release, String env, String root1, String root2) { + super(); + this.release = release; + this.env = env; + if (root1 != null) root = root1; + } + + + @SuppressWarnings("rawtypes") + public Map tenants() { + String fileName = release + "-" + env + "/tenants.yaml"; + Map o = (Map) file2object(fileName); + return o; + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + public Map vms() { + LinkedHashMap> s = new LinkedHashMap>(); + LinkedHashMap> ss = new LinkedHashMap>(); + CounterMap index = new CounterMap(); + Map locationTypes = locationTypes(); + Map vmTypes = (Map) types("vm"); + Map tenants = tenants(); + for (String t : locationTypes.keySet()) { + for (String tenantKey : tenants.keySet()) { + Map tenant = (Map) tenants.get(tenantKey); + if (! t.equals(tenant.get("type"))) continue; + Map locationType = (Map) locationTypes.get(t); + Map vmDeployments = (Map) locationType.get("vm-deployments"); + for (String vmDeploymentKey : vmDeployments.keySet()) { + Map vmDeployment = (Map) vmDeployments.get(vmDeploymentKey); + Map vmType = (Map) vmTypes.get(vmDeployment.get("vm-type")); + if (s.get(vmDeploymentKey) == null) { + LinkedHashMap s1 = new LinkedHashMap(); + s.put(vmDeploymentKey, s1); + s1.put("vm-type", vmDeployment.get("vm-type")); + s1.put("release", vmDeployment.get("release")); + s1.put("milestone", vmDeployment.get("milestone")); + boolean useController = (Boolean) get(vmType,"lifecycle-management", "use-dcae-manager",new Boolean(false)); + s1.put("use-controller", useController); + LinkedHashMap s2 = new LinkedHashMap(); + s1.put("locations", s2); + ss.put(vmDeploymentKey, s2); + } +// System.err.println (" XXx:" + t + " " + vmDeploymentKey + " " + vmTypes.keySet()+ " " + vmDeployment.get("vm-type")); +// if (vmType.containsKey("error")) continue; + if (vmType == null) { + + } + Integer numVms = (Integer) vmType.get("number-vms-per-location"); + if (numVms == null) numVms = 2; +// System.err.println (" XXx:" + t + " " + vmDeploymentKey + " " + vmType.keySet()+ " " + tenant.keySet()); + LinkedHashMap s1 = new LinkedHashMap(); + LinkedHashMap sss = new LinkedHashMap(); + s1.put("dcae-service", vmDeploymentKey); + s1.put("dcae-service-instance", tenantKey); + s1.put("dcae-container", "/locations/" + tenantKey); + LinkedHashMap s2 = new LinkedHashMap(); + s1.put("vms", s2); + String shortName = short_name(vmDeployment.get("vm-type")); + String indexKey = tenant.get("name-short") + ":" + shortName; + numVms = (Integer) vmType.get("number-vms-per-location"); + if (numVms == null) numVms = 2; + for (int i = 0 ; i < numVms; i++) { + String name = vmname(tenant,vmType,index.get(indexKey)); +// System.err.println ("new VM: " + name + " " + index.get(indexKey)); + index.increment(indexKey); + LinkedHashMap s3 = new LinkedHashMap(); + s3.put("dns-name", name + "." + tenant.get("dns-surfix")); + s2.put(name, s3); + } + ss.get(vmDeploymentKey).put(vmDeploymentKey+"-"+tenantKey, s1); + } + } + } + return s; + } + + private String short_name(Object object) { + String fileName = release + "/vm-templates/" + object + ".yaml"; + Map o = (Map) file2object(fileName); + return (String) o.get("short-name"); + } + + Map locationTypes() { + String fileName = release + "/location-types.yaml"; + @SuppressWarnings("unchecked") + Map locationTypes = (Map) file2object(fileName); + return locationTypes; + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + public Map dockers() { + LinkedHashMap s = new LinkedHashMap(); + Map locationTypes = locationTypes(); + Map dockerTypes = (Map) types("docker"); + Map tenants = tenants(); + for (String t : locationTypes.keySet()) { + for (String tenantKey : tenants.keySet()) { + Map tenant = (Map) tenants.get(tenantKey); + if (! t.equals(tenant.get("type"))) continue; + Map locationType = (Map) locationTypes.get(t); + Map dockerDeployments = (Map) locationType.get("docker-deployments"); + if (dockerDeployments == null) continue; + for (String dockerDeploymentKey : dockerDeployments.keySet()) { + Map dockerDeployment = (Map) dockerDeployments.get(dockerDeploymentKey); + Map dockerType = (Map) dockerTypes.get(dockerDeployment.get("docker-type")); +// if (dockerType.containsKey("error")) continue; +// System.err.println (" XXx:" + t + " " + vmDeploymentKey + " " + vmType.keySet()+ " " + container.keySet()); + LinkedHashMap s1 = new LinkedHashMap(); + s1.put("docker-type", dockerDeployment.get("docker-type")); + s1.put("release", dockerDeployment.get("release")); + s1.put("milestone", dockerDeployment.get("milestone")); + s1.put("use-controller", true); + s1.put("dcae-service", dockerDeploymentKey); + s1.put("dcae-service-instance", tenantKey); + String container = (String) dockerDeployment.get("container"); +// container = container.replace("${location-name}", tenantKey); + s1.put("dcae-container", container); + s1.put("location-type", t); + s.put(dockerDeploymentKey, s1); + } + } + } + return s; + } + + private Map containers() { + // TODO Auto-generated method stub + return null; + } + + private Object get(Map m, String k1, String k2, Object def) { + Object o = m.get(k1); + if (o instanceof Map) { + @SuppressWarnings("unchecked") + Map m1 = (Map) o; + return get(m1,k2,def); + } + return def; + } + + private Object get(Map m, String k1, Object def) { + Object o = m.get(k1); + return o == null ? def : o; + } + + static LinkedHashMap env2char = new LinkedHashMap(); + + static { + env2char.put("DEV", "zldc"); + env2char.put("FTL", "zldc"); + env2char.put("FTL2", "zldc"); + env2char.put("IST", "zltc"); + env2char.put("ISTFTL", "zltc"); + env2char.put("ETE", "zlsc"); + env2char.put("PROD", "zlpc"); + } + + + private String vmname(Map tenant, Map vmType, int i) { + String env1 = (String) tenant.get("environment-type"); + if (env1 == null) env1 = env; + String s = env2char.get(env1); + if (s == null) s = env2char.get("DEV"); + return s + tenant.get("name-short") + vmType.get("short-name") + String.format("%02d", i); + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + public Map types(String dType) { + LinkedHashMap s = new LinkedHashMap(); + Map locationTypes = locationTypes(); + for (String locationType : locationTypes.keySet()) { + Map o1 = (Map) locationTypes.get(locationType); + Map o2 = (Map) o1.get(dType + "-deployments"); + if (o2 == null) continue; + for (String type : o2.keySet()) { + Map o3 = (Map) o2.get(type); + if (o3.containsKey(dType + "-type")) + type = (String) o3.get(dType + "-type"); + if (s.containsKey(type)) continue; + String path = release + "/" + dType + "-templates/" + type + ".yaml"; + s.put(type,file2object(path)); + } + } + return s; + } + + protected static Object file2object(String path) { + return file2object(path, true); + } + protected static Object file2object(String path, boolean required) { +// System.err.println (root + "/" + path); + try { + if (path.endsWith(".json")) { +// System.err.println (root + "/" + path); + return json2object(JsonUtils.file2json(root + "/" + path)); + } + else { + Yaml yaml = new Yaml(); + String s = new String(Files.readAllBytes(Paths.get(root + "/" + path)), StandardCharsets.UTF_8); + Object o = yaml.load(s); + if (o != null) return o; + } + } catch (org.yaml.snakeyaml.parser.ParserException e) { + System.err.println("YAML exception: " + path + " " + e); + System.exit(2); + } catch (Exception e) { + System.err.println("exception: " + path + " " + e.getClass()); + if (required) + System.err.println("exception: " + path + " " + e); + else { +// System.err.println("exception: " + path + " " + e); + return null; + } + } + HashMap m = new HashMap(); + m.put("error", "No information about: " + path); + return m; + } + + private static String object2yaml(Object object, List l) { + DumperOptions options = new DumperOptions(); + options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK); + options.setSplitLines(true); + options.setWidth(100000); + Yaml y = new Yaml(options); + Object o = object2json(object); + if (o instanceof JSONArray) { + JSONObject j = new JSONObject(); + j.put("ARRAY", object); + o = j; + } + JSONObject json = (JSONObject) o; + if (l != null) { + for (String s : l) { + if (json.has(s)) + json.remove(s); + } + } + // the replace is due to JSONObject changes " + d = new File("${root2 ?: root}/$release-$env/$dd") + if (d.exists()) + FileUtils.deleteDirectory(d) + } + println "destinationRoot=$destinationRoot" + } + + void copyFile(File source, File destination, boolean doSub = false) { + destination.getParentFile().mkdirs() + if (doSub && source.bytes == source.text.bytes) { + // TEXT file + destination << substitute(source.text,[:],"???","???") + } + else + destination.bytes = source.bytes + } + + void copyDirectory(File sourceDir, File destDir, boolean doSub = false) throws IOException { + if (!destDir.exists()) { + destDir.mkdirs(); + } + for (File f : sourceDir.listFiles()) { + File dest = new File(destDir, f.getName()); + if (f.isDirectory()) { + copyDirectory(f, dest, doSub); + continue; + } + if (f.isFile()) { + copyFile(f, dest, doSub); + } + } + } + void copyFileFromDirectory(File sourceDir, File destDir) throws IOException { + if (!destDir.exists()) { + destDir.mkdirs(); + } + for (File f : sourceDir.listFiles()) { + File dest = new File(destDir, f.getName()); + if (f.isDirectory()) { + copyDirectory(f, dest); + continue; + } + if (f.isFile()) { + copyFile(f, dest); + } + } + } + + def void createChefConfiguration() { + save2("/topologies/${release}-${env}", platformConfig.chefTopo(), "chef") + if (release == "1607") return + platformConfig.deploymentType.each { n, v -> + if (v.type == null || ! n.startsWith("vm-")) return + def ooo = v.type['vm-setup'] + def oo = [ + 'nagios-configuration' : ooo['nagios-configuration'], + 'splunk-configuration' : ooo['splunk-configuration'], + 'configuration-files':[:] + ] + def xx = oo['configuration-files'] + v.instances.each { i, instance -> + def n2 = v['vm-type'] + [ + [dirname : "$root/$release/vm-config/$n2", nameType : "a"], + [dirname : "$root/$release/vm-config-chef/$n2", nameType : "a"], + [dirname : "$root/$release/other-config/$n2", nameType : "b"], + [dirname : "$root/$release/monitoring-config", nameType: "c"] + ].each { v3 -> + def dir = new File(v3.dirname) + if (dir.exists()) { + recurseFiles(dir).each { File file -> + def nn + switch (v3.nameType) { + case "a": nn = "$n2-$file.name"; break; + case "b": nn = "$file.name"; break; + case "c": nn = "monitoring-agent-$file.name"; break; + } + if (nn.endsWith(".base64")) { + nn = nn.replace(".base64","") + xx[nn] = [ destination: "/var/config/DCAE/chef/$nn", encoding:"base64", content: file.text] + } + else + xx[nn] = [ destination: "/var/config/DCAE/chef/$nn", content: file.text] + } + } + } + def o = [] + String str + str = object2json(oo) + str = DocUtils.object2yaml(oo,[]) +// println str +// str = str.replace("\\n", "\\\\n").replace("\\\\", "\\") +// println str +// def ENV = ((envMapGlobal['vm-templates'] ?: [:])[n2]) ?: [:] +// println "ENV $n2 $ENV" +// str = substitute(str,ENV,n,i) +// f.getParentFile().mkdirs() +// println str +// f << str +// System.exit(0) + instance.servers.each { n3, v3 -> + def ENV = ((envMapGlobal['vm-templates'] ?: [:])[n2]) ?: [:] +// println "ENV $n2 $ENV" + platformConfig.vmKey = certificatePassword(n3) + platformConfig.vmName = n3 +// println "n3=$n3 v3=$v3 vmKey=$platformConfig.vmKey" +// System.exit(0) + def str1 = substitute(str,ENV,n,i) + saveYaml("files/${n3}",str1,"chef") + platformConfig.vmKey = null + } + } + } + } + + def recurseFiles(File dir) { + def l = [] + dir.eachFileRecurse (FileType.FILES) { file -> l += file } + return l.sort { it } + } + + def void createConfiguration() { + def envMap = file2object("$release-$env/env.yaml", false) + save("/configuration", new JSONObject()) + File dir = new File(root + "/" + release + "/controller-template") + File dir2 = new File(destinationRoot + "/resources") + File dir3 = new File(destinationRoot + "/resources/descriptors") + copyDirectory(dir, dir2); + (platformConfig.env['users'] ?: [:]).each { n, v -> + save("/users/$n",v) + } + ["vm","docker","cdap","other"].each { t -> + File dir4 = new File("$root/$release/${t}-descriptors") + dir4.listFiles().each { f -> + copyFile(f, new File(dir3,f.name)); + } + } + File config1 = new File(root + "/" + release + "/vm-config/vm-controller") + File config2 = new File(destinationRoot + "/config") + copyDirectory(config1, config2, true); + File config11 = new File(root + "/" + release + "-" + env + "/config") + File config21 = new File(destinationRoot + "/config") + copyDirectory(config11, config21); + File cert1 = new File(root + "/" + release + "-" + env + "/certificates") + File cert2 = new File(destinationRoot + "/config") + copyDirectory(cert1, cert2); + // TODO remove this old stuff +// println platformConfig.types.collect { String n, v -> n } + platformConfig.types.each { String n, v -> + if (!n.startsWith("vm")) return + if (!platformConfig.types[n]['openstack-vm-type']) { + System.err.println "No vm type for $n" + return + } + def n1 = n.replace("vm-", "dcae-") + save("/openstack/vmTypes/$n1",platformConfig.genVmType(n)) + } + def chef = file2object("$release-$env/chef.yaml", false) + def maven = file2object("$release-$env/maven.yaml", false) + def ssl = file2object("$release-$env/ssl.yaml", false) + platformConfig.deploymentType.each { n, v -> + if (v.type == null || ! n.startsWith("vm-")) return + if (v.type['vm-setup'] == null) v.type['vm-setup'] = ['configuration-files' :[:]] + def oo = v.type['vm-setup'] + if (oo['configuration-files'] == null) oo['configuration-files'] = [:] + def xx = oo['configuration-files'] + v.instances.each { i, instance -> + File f = new File("$destinationRoot/config/instances/$n/${i}.yaml") +// println platformConfig.p(oo) + if (v.type['openstack-vm-type'] && v.type['openstack-vm-type']['disk-partitions']) { + xx.mount_config = [ + destination: "/tmp/dcae-mount.conf", + content: DocUtils.object2yaml(v.type['openstack-vm-type']['disk-partitions'],[]) + ] + } + if (chef) { + chef['pem-files'].each { n1, v1 -> + xx["chef-$n1"] = v1 + } + } + if (maven && maven.settings) { + xx["maven-settings"] = maven.settings + } + if (ssl && ssl.certificates) { + ssl.certificates.each { n4, v4 -> + xx[n4] = v4 + } + } + def aa = file2object("$release-$env/vm-instances/${n}.yaml", false) ?: [:] + def aaa = aa['configuration-files'] ?: [:] + aaa.each { n4, v4 -> + xx[n4] = v4 + } + def n2 = v['vm-type'] + def vmConfigDir = new File("$root/$release/vm-config/$n2") + if (vmConfigDir.exists()) { + recurseFiles(vmConfigDir).each { file -> + def nn = "$n2-$file.name" + if (nn.endsWith(".base64")) { + nn = nn.replace(".base64","") + xx[nn] = [ destination: "/tmp/$nn", encoding:"base64", content: file.text] + } + else + xx[nn] = [ destination: "/tmp/$nn", content: file.text] + } + } + def vmConfigDir2 = new File("$root/$release-$env/vm-config/$n2") + System.err.println "XXXXX: $vmConfigDir2" + if (vmConfigDir2.exists()) { + System.err.println "XXXXX: $vmConfigDir2" + recurseFiles(vmConfigDir2).each { file -> + System.err.println "XXXXX: $file" + def nn = "$n2-$file.name" + if (nn.endsWith(".base64")) { + nn = nn.replace(".base64","") + xx[nn] = [ destination: "/tmp/$nn", encoding:"base64", content: file.text] + } + else + xx[nn] = [ destination: "/tmp/$nn", content: file.text] + } + } + def otherConfigDir = new File("$root/$release/other-config/$n2") + if (otherConfigDir.exists()) { + recurseFiles(otherConfigDir).each { file -> + def nn = "$file.name" + xx[nn] = [ + destination: "/tmp/$nn", + content: file.text + ] + } + } + recurseFiles(new File("$root/$release/monitoring-config")).each { file -> + def nn = "monitoring-agent-$file.name" + xx[nn] = [ + destination: "/tmp/$nn", + content: file.text + ] + } + def o = [] + String str + str = object2json(oo) + str = DocUtils.object2yaml(oo,[]) +// println str + str = str.replace("\\n", "\\\\n").replace("\\\\", "\\") +// println str + def ENV = ((envMapGlobal['vm-templates'] ?: [:])[n2]) ?: [:] +// println "ENV $n2 $ENV" + str = substitute(str,ENV,n,i) + f.getParentFile().mkdirs() +// println str + f << str +// System.exit(0) + if (release == "1607") { + instance.servers.each { n3, v3 -> + saveYaml("files/${n3}",str,"chef") + } + } + } + } + save("/databus",[streams : platformConfig.streams2bus()]) + save("/cluster",platformConfig.controllerCluster()) + } + + void createLocations() { + Map tenants = tenants(); + o.openstack = OpenstackFactory.eINSTANCE.createOpenStackController() + save("/openstack", new JSONObject()) + tenants.each { n, tenant -> + DcaeLocation loc = ServiceFactory.eINSTANCE.createDcaeLocation() + o.getLocations().add(loc) + loc.name = n + loc.locationType = tenant.type + if (tenant.openstack != null) { + OpenStackLocation l = genEcore(LocationPackage.eINSTANCE.openStackLocation, tenant.openstack) + l.name = n + o.openstack.locations += l + OpenStackProject p = genEcore(LocationPackage.eINSTANCE.openStackProject, tenant.openstack.tenant) + l.projects += p + loc.openstackProject = p + l.allowCreateFlavor = (! platformConfig.aEnv() ) + save("/openstack/locations/$n",l) + } + save("/locations/$n",loc) + } + } + + def throw1(s) { + throw new RuntimeException(s) + } + + void createServiceInstances() { + def envMap = file2object("$release-$env/env.yaml", false) ?: ['vm-templates':[:]] + vms().each { n1, vmDeployment -> +// System.err.println "$n1 $vmDeployment" + def t = vmDeployment['vm-type'] + vmDeployment.locations.each { n , vm -> +// System.err.println "$n $vm" + def m = [:] + def s = vm['dcae-service'] + def i = vm['dcae-service-instance'] + def descriptor = file2object("$release/vm-descriptors/${s}.json", false) + if (descriptor == null) { + System.err.println "No descriptor for $s" + return + } + def template = file2object("$release/vm-service-instance-templates/${n}.yaml", false) + def vmTemplate = file2object("$release/vm-templates/${t}.yaml") +// System.err.println "$n descript=$descriptor" +// System.err.println "$n template=$template" + m['$class'] = "${descriptor.servicePackage}.${descriptor.serviceInstanceClass}" + m.vmType = [ '$ref' : "/openstack/vmTypes/${t.replace('vm-','dcae-')}" ] + m.location = [ '$ref' : vm['dcae-container'] ] + m.numberOfServers = vmTemplate['number-vms-per-location'] + m.iedsAdmin = (envMap['ieds'] ?: [:])['admin-user'] ?: "TBD - env.yaml@ieds.admin-user" + m.chefUser = (envMap['chef'] ?: [:])['user'] ?: "TBD - env.yaml@chef.user" + m.chefOrg = (envMap['chef'] ?: [:])['org'] ?: "TBD - env.yaml@chef.group" + m.chefTopology = "$release-$env" + m.openstackFlavor = platformConfig.flavor(s,i) + if ((vmTemplate['dns-arecords'] ?: []).contains('site')) { + platformConfig.init(s,i) + m.serviceFqdn = platformConfig.siteServiceFqdn() + } + ["users","adminUsers"].each { xx -> + def xx1 = envMap['vm-templates'] ?: [:] + if (xx1 == null) { throw1 "No vm-templates in $release-$env/env.yaml" } + def xx2 = xx1[t] + if (xx2 == null) { xx2 = xx1['default'] ?: [users:[],adminUsers:[]] } + if (xx2 == null) { throw1 "No vm-template for $t in $release-$env/env.yaml" } + def xx3 = xx.replace("U", "-u") +// System.err.println "$xx1 $t" + m[xx] = [] + xx2[xx3].each { u -> + m[xx] += [ '$ref' : "/users/$u" ] + } + } + m.servers = [:] + vm.vms.each { n2, vm2 -> + m.servers[n2] = [ + certificatePassword: certificatePassword(n2), + networks : [ public : [ + dnsName:vm2['dns-name'], + ip:ipAssignment(n2), + ]] + ] + } +// System.err.println "$n m=$m" + m.applicationIds = vmTemplate['application-ids'] ?: ["dcae"] + m.adminId = vmTemplate['admin-id'] ?: "attcloud" + def iConf = vmTemplate['controller-instance-configuration'] ?: [:] + iConf.each { nn, v -> m[nn] = substitute(v,envMap['vm-templates'][t],s,i) } + // manager port + def x = vmTemplate['lifecycle-management'] ?: ['use-dcae-manager': false] + if (! x['use-dcae-manager']) { + m.managerPortNumber = -1 + } + else { + m.managerPortNumber = x['manager-port'] ?: 9999 + } + def installSteps = vmTemplate['installation-steps'] ?: [] + m.steps = [:] + def stepIndex = 0 + def pp = "org.openecomp.dcae.controller.service.vm" + installSteps.each { step -> + def stepName = "step-${stepIndex++}" + switch (step.step) { + case "shell": + m.steps[stepName] = [ + '$class' : "${pp}.ShellInstallationStep", + command : substitute(step.command,[:],s,i) + ] + break + case "maven-artifact": + m.steps[stepName] = [ + '$class' : "${pp}.MavenArtifactInstallationStep", + groupId : step['group-id'], + artifactId : step['artifact-id'], + version : substitute(step['version'],[:],s,i), + type : step['type'], + assemblyId : step['assembly-id'], + applicationId : step['application-id'], + ] + break + case "http": + m.steps[stepName] = [ + '$class' : "${pp}.HttpInstallationStep", + url : substitute(step['url'],[:],s,i), + userName : substitute(step['user-name'],[:],s,i), + password : substitute(step['password'],[:],s,i), + type : step['type'], + artifactId : step['artifact-id'], + applicationId : step['application-id'], + ] + break + default: + System.err.println "Unknown step: $s $i: $step.step" + } + } + save("/services/$s/instances/$i",m,true) + def m1 = [:] + def sConf = vmTemplate['controller-configuration'] ?: [:] + sConf.each { nn, v -> m1[nn] = v } + m1['$class'] = "${descriptor.servicePackage}.${descriptor.serviceClass}" + save("/services/$s",m1,true) + // System.exit(0) + } + } + } + void createDockerServiceInstances() { + def envMap = file2object("$release-$env/env.yaml", false) + dockers().each { s, dockerDeployment -> + def t = dockerDeployment['docker-type'] + Map tenants = tenants(); + def dockerTemplate = file2object("$release/docker-templates/${t}.yaml") + def dockerInstances = file2object("$release-$env/docker-instances/${s}.yaml",false) + def descriptor = file2object("$release/docker-descriptors/${s}.json", false) + if (descriptor == null) { + System.err.println "no docker descriptor for $s" + return + } +// println dockerDeployment +// println dockerTemplate +// println dockerInstances + tenants.each { i, tenant -> + if (tenant.type != dockerDeployment['location-type']) return + def m = [:] + m.hostService = ['$ref' : substitute(dockerDeployment['dcae-container'],[:],s,i) ] + def iConf = dockerTemplate['controller-instance-configuration'] ?: [:] + iConf.each { nn, v -> m[nn] = substitute(v,(envMap['docker-templates'] ?: [:])[t],s,i) } + if (dockerInstances != null && dockerInstances.instances != null) { + def iConf2 = dockerInstances.instances[i] ?: [:] + iConf2.each { nn, v -> m[nn] = v } + } + def x = dockerTemplate['lifecycle-management'] ?: ['use-dcae-manager': true] + if (! x['use-dcae-manager']) { + m.managerPortNumber = -1 + } + else { + m.managerPortNumber = x['manager-port'] ?: 9999 + } + save("/services/$s/instances/$i",m,true) +// createCloudifyBlueprint("docker",s,i,m) +// println m +// System.exit(3) + } + def m1 = [:] + def sConf = dockerTemplate['controller-configuration'] ?: [:] + sConf.each { nn, v -> m1[nn] = v } + m1['$class'] = "${descriptor.servicePackage}.${descriptor.serviceClass}" + save("/services/$s",m1,true) + } + } + + def p(o) { + object2json(o).toString(2) + } + + void createGeneralServiceInstances(t) { + def envMap = file2object("$release-$env/env.yaml", false) + platformConfig.deploymentType.each { s, v -> + if (! s.startsWith(t)) return + def instances = file2object("$release-$env/$t-instances/${s}.yaml",false) ?: [:] + def descriptor = file2object("$release/$t-descriptors/${s}.json", false) + if (descriptor == null) { + System.err.println "no $t descriptor for $s" + return + } + v.instances.each { i, v2 -> + def m = [:] + m.clusterService = ['$ref' : "/services/$v2.hostService/instances/$v2.hostServiceInstance" ] + def iConf = v.type['controller-instance-configuration'] ?: [:] + iConf.each { nn, vv -> m[nn] = substitute(vv,[:],s,i) } + def iConf2 = instances[i] ?: [:] + iConf2.each { nn, vv -> m[nn] = vv } + save("/services/$s/instances/$i",m,true) +// createCloudifyBlueprint("docker",s,i,m) +// println p(m) +// println p(v) +// System.exit(3) + } +// def m1 = [:] +// def sConf = dockerTemplate['controller-configuration'] ?: [:] +// sConf.each { nn, vv -> m1[nn] = vv } +// m1['$class'] = "${descriptor.servicePackage}.${descriptor.serviceClass}" +// save("/services/$s",m1,true) + } + } + + def createCloudifyBlueprint(t,s,i,m) { + def blue = file2object("$release/cloudify-templates/${t}.yaml", false) + def str = object2json(m).toString(2) +// println blue + blue.node_templates.docker.properties = [ + deployment_JSON : str, + service_name : s, + ] + saveYaml("/blueprints/$s-$i",blue,"cloudify") + } + + def createEforc() { + def x = platformConfig.eforc() + saveYaml("/eforc",x.m,"general") + saveYaml("/dns",platformConfig.dns(),"general") + saveYaml("/ssl",platformConfig.ssl(),"general") + saveTable("/eforc-table",x.list,"general") + saveTable("/eforc-subnet-table",x.list2,"general") + saveYaml("/flavors",platformConfig.showFlavors(),"general") + } + + def envMapGlobal = file2object("$release-$env/env.yaml", false) ?: [:] + def substitute(o, env, s, i) { + SimpleTemplateEngine engine = new SimpleTemplateEngine() + String res = o + env = env ?: [:] + env.dcae = platformConfig + env.passwords = envMapGlobal.passwords ?: [:] + env.ENV = env +// env['class'] = '$class' + platformConfig.init(s, i) + switch (o) { + case List: + def l = [] + o.each { e -> + l += substitute(e, env, s, i) + } + return l + case Map: + def m = [:] + o.each { n,v -> + m[n] = substitute(v, env, s, i) + } + return m + } + try { + res = engine.createTemplate("$o").make(env) + if (res.startsWith("_LIST_:") && res.endsWith(":_LIST_")) { + res = res.replace("_LIST_:","").replace(":_LIST_","") + JSONArray a = new JSONArray(res) + return json2object(a) + } + } catch (e) { + System.out.println "$o" + System.out.println "$env" + System.err.println "ERROR $e" + System.err.println "ERROR ${e.printStackTrace()}" + System.exit(2) + } + return res + } + + String ipAssignment(n) { + def m = file2object("$release-$env/ip-assignment.yaml") + return m[n] + } + String certificatePassword(n) { + def m = file2object("$release-$env/certificates/passwords.yaml") + return m[n] + } + + def genEcore(EClass eclass,m) { + if (m == null) return null + JSONObject json = object2json(yamlNames2ecore(m)) +// System.err.println json.toString(2) + return server.json2ecore(eclass, json) + + } + + String yamlNames2ecore2(String n) { + String r = "" + boolean first = true + n.split("-").each { n1 -> + if (first) { + first = false + r+=n1 + } else { + r += StringUtil.capitalize(n1) + } + } +// System.err.println "$n $r" + return r + } + def yamlNames2ecore(o) { + switch (o) { + case List: + def l = [] + o.each { l = yamlNames2ecore(it) } + return l + case Map: + def m1 = [:] + o.each { k,v -> m1[yamlNames2ecore2(k)] = yamlNames2ecore(v) } + return m1 + case boolean: + case long: + case int: + case double: + case Boolean: + case Long: + case Integer: + case String: return o; break + case GString: return o.toString(); break + case null: break; + default: println "Unable to convert: $o ${o.getClass().name}" + } + + } + + void save(String path, o, isService = false ) { + File f = new File(destinationRoot + "/${isService ? 'services-' : ''}resources/${path}.json") + f.getParentFile().mkdirs() + if (f.exists()) f.delete() + switch (o) { + case EObject: f << ManagementServer.ecore2json(o, 1000, null, false).toString(2); break + case JSONObject : f << o.toString(2); break + case Map : f << object2json(o).toString(2); break + default: System.err.println "Unable to save object: path=$path $o" + } +// println "Wrote $f" + } + + void save2(String path, o, String type ) { + File f + switch (type) { + case "chef": f = new File("$destRoot/$release-$env/chef-repo-gen/${path}.json") + } + f.getParentFile().mkdirs() + if (f.exists()) f.delete() + switch (o) { + case EObject: f << ManagementServer.ecore2json(o, 1000, null, false).toString(2); break + case JSONObject : f << o.toString(2); break + case Map : f << object2json(o).toString(2); break + default: System.err.println "Unable to save2 object: path=$path $o" + } + } + + void saveYaml(String path, o, String type ) { + File f + switch (type) { + case "cloudify": f = new File("$destRoot/$release-$env/cloudify-gen/${path}.yaml"); break + case "general": f = new File("$destRoot/$release-$env/general-gen/${path}.yaml"); break + case "chef": f = new File("$destRoot/$release-$env/chef-repo-gen/${path}.yaml"); break + } + f.getParentFile().mkdirs() + if (f.exists()) f.delete() + switch (o) { + case String : f << o; break + case Map : f << object2yaml(o, []); break + default: System.err.println "Unable to save yaml object: path=$path $o" + } + } + void saveTable(String path, l, String type ) { + File f + switch (type) { + case "cloudify": f = new File("$destRoot/$release-$env/cloudify-gen/${path}.csv");break + case "general": f = new File("$destRoot/$release-$env/general-gen/${path}.csv");break + case "chef": f = new File("$destRoot/$release-$env/chef-repo-gen/${path}.csv");break + } + f.getParentFile().mkdirs() + if (f.exists()) f.delete() + l.each { row -> f << "${row.join(",")}\n" } + } + + static main(args) { +// println object2yaml(file2object("1607/dcae_admin_db_pgaas.json"), []) + String root = args.length > 1 ? args[1] : null + String destRoot = args.length > 2 ? args[2] : null + String rel = args.length > 3 ? args[3] : "1607" + GenControllerConfiguration d = new GenControllerConfiguration(rel, args[0], root, destRoot); + d.platformConfig.privateKey = args.length > 4 ? args[4] : null + d.createGeneralServiceInstances('cdap'); + d.createGeneralServiceInstances('other'); + d.createDockerServiceInstances(); + d.createConfiguration(); + d.createLocations(); + d.createServiceInstances(); + d.createChefConfiguration(); + d.createEforc() + System.exit(0); + } + +} diff --git a/dcae-controller-core/dcae-controller-platform-model/.classpath b/dcae-controller-core/dcae-controller-platform-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-core/dcae-controller-platform-model/.gitignore b/dcae-controller-core/dcae-controller-platform-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/dcae-controller-core/dcae-controller-platform-model/.project b/dcae-controller-core/dcae-controller-platform-model/.project new file mode 100644 index 0000000..8a6051e --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/.project @@ -0,0 +1,34 @@ + + + dcae-controller-platform-model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dcae-controller-core/dcae-controller-platform-model/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-core/dcae-controller-platform-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-core/dcae-controller-platform-model/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-core/dcae-controller-platform-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-core/dcae-controller-platform-model/LICENSE.txt b/dcae-controller-core/dcae-controller-platform-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-core/dcae-controller-platform-model/META-INF/MANIFEST.MF b/dcae-controller-core/dcae-controller-platform-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..66d0365 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/META-INF/MANIFEST.MF @@ -0,0 +1,25 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: dcae-controller-platform-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Export-Package: org.openecomp.dcae.controller.platform.controller, + org.openecomp.dcae.controller.platform.controller.impl, + org.openecomp.dcae.controller.platform.controller.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-openstack-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + dcae-controller-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-agent-model;bundle-version="0.1.0";visibility:=reexport, + dcae-controller-service-vm-model;bundle-version="0.1.0";visibility:=reexport +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/dcae-controller-core/dcae-controller-platform-model/build.properties b/dcae-controller-core/dcae-controller-platform-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/build.properties @@ -0,0 +1,11 @@ +# + +bin.includes = .,\ + src/main/xcore/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/xcore-gen/,\ + src/main/xcore/ +output.. = target/classes/ diff --git a/dcae-controller-core/dcae-controller-platform-model/plugin.properties b/dcae-controller-core/dcae-controller-platform-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/dcae-controller-core/dcae-controller-platform-model/plugin.xml b/dcae-controller-core/dcae-controller-platform-model/plugin.xml new file mode 100644 index 0000000..95c4d61 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/plugin.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + diff --git a/dcae-controller-core/dcae-controller-platform-model/pom.xml b/dcae-controller-core/dcae-controller-platform-model/pom.xml new file mode 100644 index 0000000..388b635 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/pom.xml @@ -0,0 +1,42 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-platform-model + + org.openecomp.ncomp.maven + ncomp-maven-xcore + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore + + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + ${project.version} + + + org.openecomp.ncomp.core + ncomp-core-model + ${project.version} + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-agent-model + ${project.version} + + + org.openecomp.ncomp.openstack + ncomp-openstack-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-core-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-vm-model + ${project.version} + + diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerCluster.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerCluster.java new file mode 100644 index 0000000..4ff0aa6 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerCluster.java @@ -0,0 +1,181 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller; + +import org.openecomp.ncomp.core.types.metrics.DateMetricAttribute; +import java.util.Date; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Cluster'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.platform.controller.ControllerCluster#getMyServerName My Server Name}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.ControllerCluster#getRole Role}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.ControllerCluster#getStateTime State Time}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.ControllerCluster#getServers Servers}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.ControllerCluster#getRemoteServers Remote Servers}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerCluster() + * @model + * @generated + */ +public interface ControllerCluster extends EObject { + /** + * Returns the value of the 'My Server Name' attribute. + * + *

+ * If the meaning of the 'My Server Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'My Server Name' attribute. + * @see #setMyServerName(String) + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerCluster_MyServerName() + * @model unique="false" + * @generated + */ + String getMyServerName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.platform.controller.ControllerCluster#getMyServerName My Server Name}' attribute. + * + * + * @param value the new value of the 'My Server Name' attribute. + * @see #getMyServerName() + * @generated + */ + void setMyServerName(String value); + + /** + * Returns the value of the 'Role' attribute. + * The literals are from the enumeration {@link org.openecomp.dcae.controller.platform.controller.ServerRole}. + * + *

+ * If the meaning of the 'Role' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Role' attribute. + * @see org.openecomp.dcae.controller.platform.controller.ServerRole + * @see #setRole(ServerRole) + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerCluster_Role() + * @model unique="false" + * @generated + */ + ServerRole getRole(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.platform.controller.ControllerCluster#getRole Role}' attribute. + * + * + * @param value the new value of the 'Role' attribute. + * @see org.openecomp.dcae.controller.platform.controller.ServerRole + * @see #getRole() + * @generated + */ + void setRole(ServerRole value); + + /** + * Returns the value of the 'State Time' attribute. + * + *

+ * If the meaning of the 'State Time' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'State Time' attribute. + * @see #setStateTime(DateMetricAttribute) + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerCluster_StateTime() + * @model unique="false" dataType="org.openecomp.ncomp.core.DateMetricAttribute" + * @generated + */ + DateMetricAttribute getStateTime(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.platform.controller.ControllerCluster#getStateTime State Time}' attribute. + * + * + * @param value the new value of the 'State Time' attribute. + * @see #getStateTime() + * @generated + */ + void setStateTime(DateMetricAttribute value); + + /** + * Returns the value of the 'Servers' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServer}. + * + *

+ * If the meaning of the 'Servers' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Servers' containment reference list. + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerCluster_Servers() + * @model containment="true" + * @generated + */ + EList getServers(); + + /** + * Returns the value of the 'Remote Servers' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServer}. + * + *

+ * If the meaning of the 'Remote Servers' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Remote Servers' containment reference list. + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerCluster_RemoteServers() + * @model containment="true" + * @generated + */ + EList getRemoteServers(); + + /** + * + * + * @model serverNameUnique="false" dataNameUnique="false" + * @generated + */ + void pushData(String serverName, String dataName); + + /** + * + * + * @model serverNameUnique="false" dataNameUnique="false" timeUnique="false" contentUnique="false" + * @generated + */ + void receiveData(String serverName, String dataName, Date time, String content); + +} // ControllerCluster diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerClusterServer.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerClusterServer.java new file mode 100644 index 0000000..cff1a76 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerClusterServer.java @@ -0,0 +1,120 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; +import org.openecomp.ncomp.core.NamedEntity; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Cluster Server'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServer#getRole Role}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServer#getData Data}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServer#getServer Server}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerClusterServer() + * @model + * @generated + */ +public interface ControllerClusterServer extends NamedEntity { + + /** + * Returns the value of the 'Role' attribute. + * The literals are from the enumeration {@link org.openecomp.dcae.controller.platform.controller.ServerRole}. + * + *

+ * If the meaning of the 'Role' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Role' attribute. + * @see org.openecomp.dcae.controller.platform.controller.ServerRole + * @see #setRole(ServerRole) + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerClusterServer_Role() + * @model unique="false" + * @generated + */ + ServerRole getRole(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServer#getRole Role}' attribute. + * + * + * @param value the new value of the 'Role' attribute. + * @see org.openecomp.dcae.controller.platform.controller.ServerRole + * @see #getRole() + * @generated + */ + void setRole(ServerRole value); + + /** + * Returns the value of the 'Data' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData}. + * + *

+ * If the meaning of the 'Data' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Data' containment reference list. + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerClusterServer_Data() + * @model containment="true" + * @generated + */ + EList getData(); + + /** + * Returns the value of the 'Server' reference. + * + *

+ * If the meaning of the 'Server' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Server' reference. + * @see #setServer(DcaeBasicServer) + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerClusterServer_Server() + * @model + * @generated + */ + DcaeBasicServer getServer(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServer#getServer Server}' reference. + * + * + * @param value the new value of the 'Server' reference. + * @see #getServer() + * @generated + */ + void setServer(DcaeBasicServer value); +} // ControllerClusterServer diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerClusterServerData.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerClusterServerData.java new file mode 100644 index 0000000..9a547f0 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerClusterServerData.java @@ -0,0 +1,237 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.types.metrics.DateMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +/** + * + * A representation of the model object 'Cluster Server Data'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getPushInterval Push Interval}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getLastPush Last Push}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getNumberDataPushes Number Data Pushes}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getNumberDataPushErrors Number Data Push Errors}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getLastDataReceived Last Data Received}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getNumberDataReceived Number Data Received}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getNumberDataReceivedErrors Number Data Received Errors}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerClusterServerData() + * @model + * @generated + */ +public interface ControllerClusterServerData extends NamedEntity { + /** + * Returns the value of the 'Push Interval' attribute. + * The default value is "5min". + * + *

+ * If the meaning of the 'Push Interval' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Push Interval' attribute. + * @see #setPushInterval(String) + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerClusterServerData_PushInterval() + * @model default="5min" unique="false" + * @generated + */ + String getPushInterval(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getPushInterval Push Interval}' attribute. + * + * + * @param value the new value of the 'Push Interval' attribute. + * @see #getPushInterval() + * @generated + */ + void setPushInterval(String value); + + /** + * Returns the value of the 'Last Push' attribute. + * + *

+ * If the meaning of the 'Last Push' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Last Push' attribute. + * @see #setLastPush(DateMetricAttribute) + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerClusterServerData_LastPush() + * @model unique="false" dataType="org.openecomp.ncomp.core.DateMetricAttribute" + * @generated + */ + DateMetricAttribute getLastPush(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getLastPush Last Push}' attribute. + * + * + * @param value the new value of the 'Last Push' attribute. + * @see #getLastPush() + * @generated + */ + void setLastPush(DateMetricAttribute value); + + /** + * Returns the value of the 'Number Data Pushes' attribute. + * + *

+ * If the meaning of the 'Number Data Pushes' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Data Pushes' attribute. + * @see #setNumberDataPushes(IncreasingULongMetricAttribute) + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerClusterServerData_NumberDataPushes() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * @generated + */ + IncreasingULongMetricAttribute getNumberDataPushes(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getNumberDataPushes Number Data Pushes}' attribute. + * + * + * @param value the new value of the 'Number Data Pushes' attribute. + * @see #getNumberDataPushes() + * @generated + */ + void setNumberDataPushes(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Number Data Push Errors' attribute. + * + *

+ * If the meaning of the 'Number Data Push Errors' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Data Push Errors' attribute. + * @see #setNumberDataPushErrors(IncreasingULongMetricAttribute) + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerClusterServerData_NumberDataPushErrors() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * @generated + */ + IncreasingULongMetricAttribute getNumberDataPushErrors(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getNumberDataPushErrors Number Data Push Errors}' attribute. + * + * + * @param value the new value of the 'Number Data Push Errors' attribute. + * @see #getNumberDataPushErrors() + * @generated + */ + void setNumberDataPushErrors(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Last Data Received' attribute. + * + *

+ * If the meaning of the 'Last Data Received' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Last Data Received' attribute. + * @see #setLastDataReceived(DateMetricAttribute) + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerClusterServerData_LastDataReceived() + * @model unique="false" dataType="org.openecomp.ncomp.core.DateMetricAttribute" + * @generated + */ + DateMetricAttribute getLastDataReceived(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getLastDataReceived Last Data Received}' attribute. + * + * + * @param value the new value of the 'Last Data Received' attribute. + * @see #getLastDataReceived() + * @generated + */ + void setLastDataReceived(DateMetricAttribute value); + + /** + * Returns the value of the 'Number Data Received' attribute. + * + *

+ * If the meaning of the 'Number Data Received' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Data Received' attribute. + * @see #setNumberDataReceived(IncreasingULongMetricAttribute) + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerClusterServerData_NumberDataReceived() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * @generated + */ + IncreasingULongMetricAttribute getNumberDataReceived(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getNumberDataReceived Number Data Received}' attribute. + * + * + * @param value the new value of the 'Number Data Received' attribute. + * @see #getNumberDataReceived() + * @generated + */ + void setNumberDataReceived(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Number Data Received Errors' attribute. + * + *

+ * If the meaning of the 'Number Data Received Errors' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Data Received Errors' attribute. + * @see #setNumberDataReceivedErrors(IncreasingULongMetricAttribute) + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerClusterServerData_NumberDataReceivedErrors() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * @generated + */ + IncreasingULongMetricAttribute getNumberDataReceivedErrors(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getNumberDataReceivedErrors Number Data Received Errors}' attribute. + * + * + * @param value the new value of the 'Number Data Received Errors' attribute. + * @see #getNumberDataReceivedErrors() + * @generated + */ + void setNumberDataReceivedErrors(IncreasingULongMetricAttribute value); + +} // ControllerClusterServerData diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerFactory.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerFactory.java new file mode 100644 index 0000000..09766af --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerFactory.java @@ -0,0 +1,108 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage + * @generated + */ +public interface ControllerFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ControllerFactory eINSTANCE = org.openecomp.dcae.controller.platform.controller.impl.ControllerFactoryImpl.init(); + + /** + * Returns a new object of class 'Dcae Platform Controller'. + * + * + * @return a new object of class 'Dcae Platform Controller'. + * @generated + */ + DcaePlatformController createDcaePlatformController(); + + /** + * Returns a new object of class 'Dcae Data Bus'. + * + * + * @return a new object of class 'Dcae Data Bus'. + * @generated + */ + DcaeDataBus createDcaeDataBus(); + + /** + * Returns a new object of class 'Cluster'. + * + * + * @return a new object of class 'Cluster'. + * @generated + */ + ControllerCluster createControllerCluster(); + + /** + * Returns a new object of class 'Cluster Server'. + * + * + * @return a new object of class 'Cluster Server'. + * @generated + */ + ControllerClusterServer createControllerClusterServer(); + + /** + * Returns a new object of class 'Cluster Server Data'. + * + * + * @return a new object of class 'Cluster Server Data'. + * @generated + */ + ControllerClusterServerData createControllerClusterServerData(); + + /** + * Returns a new object of class 'Virtual Machine Service'. + * + * + * @return a new object of class 'Virtual Machine Service'. + * @generated + */ + ControllerVirtualMachineService createControllerVirtualMachineService(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ControllerPackage getControllerPackage(); + +} //ControllerFactory diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerPackage.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerPackage.java new file mode 100644 index 0000000..2f0d0cb --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerPackage.java @@ -0,0 +1,1641 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller; + +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.openecomp.ncomp.core.CorePackage; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.platform.controller.ControllerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-platform-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.platform'" + * @generated + */ +public interface ControllerPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "controller"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.platform.controller"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "controller"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ControllerPackage eINSTANCE = org.openecomp.dcae.controller.platform.controller.impl.ControllerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl Dcae Platform Controller}' class. + * + * + * @see org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerPackageImpl#getDcaePlatformController() + * @generated + */ + int DCAE_PLATFORM_CONTROLLER = 0; + + /** + * The feature id for the 'Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER__CONFIGURATION = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Component' containment reference. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER__COMPONENT = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Cluster' containment reference. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER__CLUSTER = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Openstack' containment reference. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER__OPENSTACK = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Locations' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER__LOCATIONS = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Databus' containment reference. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER__DATABUS = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Descriptors' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER__DESCRIPTORS = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Services' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER__SERVICES = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Users' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER__USERS = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 8; + + /** + * The feature id for the 'Admin Users' reference list. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER__ADMIN_USERS = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 9; + + /** + * The number of structural features of the 'Dcae Platform Controller' class. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER_FEATURE_COUNT = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 10; + + /** + * The operation id for the 'Logs' operation. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER___LOGS__JSONOBJECT_ELIST = ServerPackage.SOUTH_BOUND_API_WITH_PROXY___LOGS__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Metrics' operation. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER___METRICS__JSONOBJECT_ELIST = ServerPackage.SOUTH_BOUND_API_WITH_PROXY___METRICS__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Properties' operation. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER___PROPERTIES__JSONOBJECT_ELIST = ServerPackage.SOUTH_BOUND_API_WITH_PROXY___PROPERTIES__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Upload Info' operation. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER___UPLOAD_INFO__JSONOBJECT_ELIST = ServerPackage.SOUTH_BOUND_API_WITH_PROXY___UPLOAD_INFO__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Get Values' operation. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 0; + + /** + * The operation id for the 'Get Values All' operation. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 1; + + /** + * The operation id for the 'Get Messages' operation. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 2; + + /** + * The operation id for the 'Get Request Logger' operation. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 3; + + /** + * The operation id for the 'Evaluate' operation. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER___EVALUATE__STRING_FUNCTION = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 4; + + /** + * The operation id for the 'Update' operation. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER___UPDATE__STRING_FUNCTION = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 5; + + /** + * The operation id for the 'Deploy Descriptor' operation. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER___DEPLOY_DESCRIPTOR__STRING = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 6; + + /** + * The operation id for the 'Refresh Data Bus' operation. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER___REFRESH_DATA_BUS__STRING = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 7; + + /** + * The number of operations of the 'Dcae Platform Controller' class. + * + * + * @generated + * @ordered + */ + int DCAE_PLATFORM_CONTROLLER_OPERATION_COUNT = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 8; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.platform.controller.impl.DcaeDataBusImpl Dcae Data Bus}' class. + * + * + * @see org.openecomp.dcae.controller.platform.controller.impl.DcaeDataBusImpl + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerPackageImpl#getDcaeDataBus() + * @generated + */ + int DCAE_DATA_BUS = 1; + + /** + * The feature id for the 'Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_DATA_BUS__STREAMS = 0; + + /** + * The feature id for the 'Locations' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_DATA_BUS__LOCATIONS = 1; + + /** + * The feature id for the 'Mr Clusters' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_DATA_BUS__MR_CLUSTERS = 2; + + /** + * The feature id for the 'Dr Nodes' containment reference list. + * + * + * @generated + * @ordered + */ + int DCAE_DATA_BUS__DR_NODES = 3; + + /** + * The number of structural features of the 'Dcae Data Bus' class. + * + * + * @generated + * @ordered + */ + int DCAE_DATA_BUS_FEATURE_COUNT = 4; + + /** + * The number of operations of the 'Dcae Data Bus' class. + * + * + * @generated + * @ordered + */ + int DCAE_DATA_BUS_OPERATION_COUNT = 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterImpl Cluster}' class. + * + * + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterImpl + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerPackageImpl#getControllerCluster() + * @generated + */ + int CONTROLLER_CLUSTER = 2; + + /** + * The feature id for the 'My Server Name' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER__MY_SERVER_NAME = 0; + + /** + * The feature id for the 'Role' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER__ROLE = 1; + + /** + * The feature id for the 'State Time' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER__STATE_TIME = 2; + + /** + * The feature id for the 'Servers' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER__SERVERS = 3; + + /** + * The feature id for the 'Remote Servers' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER__REMOTE_SERVERS = 4; + + /** + * The number of structural features of the 'Cluster' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_FEATURE_COUNT = 5; + + /** + * The operation id for the 'Push Data' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER___PUSH_DATA__STRING_STRING = 0; + + /** + * The operation id for the 'Receive Data' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER___RECEIVE_DATA__STRING_STRING_DATE_STRING = 1; + + /** + * The number of operations of the 'Cluster' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_OPERATION_COUNT = 2; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerImpl Cluster Server}' class. + * + * + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerImpl + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerPackageImpl#getControllerClusterServer() + * @generated + */ + int CONTROLLER_CLUSTER_SERVER = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Role' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER__ROLE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Data' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER__DATA = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Server' reference. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER__SERVER = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Cluster Server' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Cluster Server' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerDataImpl Cluster Server Data}' class. + * + * + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerDataImpl + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerPackageImpl#getControllerClusterServerData() + * @generated + */ + int CONTROLLER_CLUSTER_SERVER_DATA = 4; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER_DATA__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER_DATA__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER_DATA__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER_DATA__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Push Interval' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER_DATA__PUSH_INTERVAL = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Last Push' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER_DATA__LAST_PUSH = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Number Data Pushes' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_PUSHES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Number Data Push Errors' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_PUSH_ERRORS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Last Data Received' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER_DATA__LAST_DATA_RECEIVED = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Number Data Received' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_RECEIVED = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Number Data Received Errors' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_RECEIVED_ERRORS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 6; + + /** + * The number of structural features of the 'Cluster Server Data' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER_DATA_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 7; + + /** + * The number of operations of the 'Cluster Server Data' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_CLUSTER_SERVER_DATA_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.platform.controller.impl.ControllerVirtualMachineServiceImpl Virtual Machine Service}' class. + * + * + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerVirtualMachineServiceImpl + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerPackageImpl#getControllerVirtualMachineService() + * @generated + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE = 5; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE__NAME = VmPackage.VIRTUAL_MACHINE_SERVICE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE__LAST_POLLED = VmPackage.VIRTUAL_MACHINE_SERVICE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE__LAST_CHANGED = VmPackage.VIRTUAL_MACHINE_SERVICE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE__CREATED = VmPackage.VIRTUAL_MACHINE_SERVICE__CREATED; + + /** + * The feature id for the 'Instances' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE__INSTANCES = VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER = VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER; + + /** + * The number of structural features of the 'Virtual Machine Service' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE_FEATURE_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_FEATURE_COUNT + 0; + + /** + * The operation id for the 'Deploy' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE___DEPLOY__STRING_STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___DEPLOY__STRING_STRING; + + /** + * The operation id for the 'Undeploy' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE___UNDEPLOY__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___UNDEPLOY__STRING; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE___TEST__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___TEST__STRING; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE___SUSPEND__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___SUSPEND__STRING; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE___RESUME__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___RESUME__STRING; + + /** + * The operation id for the 'Push Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Poll Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE___POLL_MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___POLL_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE___MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Operation' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT = VmPackage.VIRTUAL_MACHINE_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT; + + /** + * The operation id for the 'Update Configuration From Policy' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING; + + /** + * The operation id for the 'Run Health Tests' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE___RUN_HEALTH_TESTS = VmPackage.VIRTUAL_MACHINE_SERVICE___RUN_HEALTH_TESTS; + + /** + * The operation id for the 'Update Deployment Status' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS; + + /** + * The number of operations of the 'Virtual Machine Service' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_VIRTUAL_MACHINE_SERVICE_OPERATION_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.platform.controller.ServerRole Server Role}' enum. + * + * + * @see org.openecomp.dcae.controller.platform.controller.ServerRole + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerPackageImpl#getServerRole() + * @generated + */ + int SERVER_ROLE = 6; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController Dcae Platform Controller}'. + * + * + * @return the meta object for class 'Dcae Platform Controller'. + * @see org.openecomp.dcae.controller.platform.controller.DcaePlatformController + * @generated + */ + EClass getDcaePlatformController(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getCluster Cluster}'. + * + * + * @return the meta object for the containment reference 'Cluster'. + * @see org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getCluster() + * @see #getDcaePlatformController() + * @generated + */ + EReference getDcaePlatformController_Cluster(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getOpenstack Openstack}'. + * + * + * @return the meta object for the containment reference 'Openstack'. + * @see org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getOpenstack() + * @see #getDcaePlatformController() + * @generated + */ + EReference getDcaePlatformController_Openstack(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getLocations Locations}'. + * + * + * @return the meta object for the containment reference list 'Locations'. + * @see org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getLocations() + * @see #getDcaePlatformController() + * @generated + */ + EReference getDcaePlatformController_Locations(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getDatabus Databus}'. + * + * + * @return the meta object for the containment reference 'Databus'. + * @see org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getDatabus() + * @see #getDcaePlatformController() + * @generated + */ + EReference getDcaePlatformController_Databus(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getServices Services}'. + * + * + * @return the meta object for the containment reference list 'Services'. + * @see org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getServices() + * @see #getDcaePlatformController() + * @generated + */ + EReference getDcaePlatformController_Services(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getUsers Users}'. + * + * + * @return the meta object for the containment reference list 'Users'. + * @see org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getUsers() + * @see #getDcaePlatformController() + * @generated + */ + EReference getDcaePlatformController_Users(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getDescriptors Descriptors}'. + * + * + * @return the meta object for the containment reference list 'Descriptors'. + * @see org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getDescriptors() + * @see #getDcaePlatformController() + * @generated + */ + EReference getDcaePlatformController_Descriptors(); + + /** + * Returns the meta object for the reference list '{@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getAdminUsers Admin Users}'. + * + * + * @return the meta object for the reference list 'Admin Users'. + * @see org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getAdminUsers() + * @see #getDcaePlatformController() + * @generated + */ + EReference getDcaePlatformController_AdminUsers(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#deployDescriptor(java.lang.String) Deploy Descriptor}' operation. + * + * + * @return the meta object for the 'Deploy Descriptor' operation. + * @see org.openecomp.dcae.controller.platform.controller.DcaePlatformController#deployDescriptor(java.lang.String) + * @generated + */ + EOperation getDcaePlatformController__DeployDescriptor__String(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#refreshDataBus(java.lang.String) Refresh Data Bus}' operation. + * + * + * @return the meta object for the 'Refresh Data Bus' operation. + * @see org.openecomp.dcae.controller.platform.controller.DcaePlatformController#refreshDataBus(java.lang.String) + * @generated + */ + EOperation getDcaePlatformController__RefreshDataBus__String(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.platform.controller.DcaeDataBus Dcae Data Bus}'. + * + * + * @return the meta object for class 'Dcae Data Bus'. + * @see org.openecomp.dcae.controller.platform.controller.DcaeDataBus + * @generated + */ + EClass getDcaeDataBus(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.platform.controller.DcaeDataBus#getStreams Streams}'. + * + * + * @return the meta object for the containment reference list 'Streams'. + * @see org.openecomp.dcae.controller.platform.controller.DcaeDataBus#getStreams() + * @see #getDcaeDataBus() + * @generated + */ + EReference getDcaeDataBus_Streams(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.platform.controller.DcaeDataBus#getLocations Locations}'. + * + * + * @return the meta object for the containment reference list 'Locations'. + * @see org.openecomp.dcae.controller.platform.controller.DcaeDataBus#getLocations() + * @see #getDcaeDataBus() + * @generated + */ + EReference getDcaeDataBus_Locations(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.platform.controller.DcaeDataBus#getMrClusters Mr Clusters}'. + * + * + * @return the meta object for the containment reference list 'Mr Clusters'. + * @see org.openecomp.dcae.controller.platform.controller.DcaeDataBus#getMrClusters() + * @see #getDcaeDataBus() + * @generated + */ + EReference getDcaeDataBus_MrClusters(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.platform.controller.DcaeDataBus#getDrNodes Dr Nodes}'. + * + * + * @return the meta object for the containment reference list 'Dr Nodes'. + * @see org.openecomp.dcae.controller.platform.controller.DcaeDataBus#getDrNodes() + * @see #getDcaeDataBus() + * @generated + */ + EReference getDcaeDataBus_DrNodes(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.platform.controller.ControllerCluster Cluster}'. + * + * + * @return the meta object for class 'Cluster'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerCluster + * @generated + */ + EClass getControllerCluster(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.platform.controller.ControllerCluster#getMyServerName My Server Name}'. + * + * + * @return the meta object for the attribute 'My Server Name'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerCluster#getMyServerName() + * @see #getControllerCluster() + * @generated + */ + EAttribute getControllerCluster_MyServerName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.platform.controller.ControllerCluster#getRole Role}'. + * + * + * @return the meta object for the attribute 'Role'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerCluster#getRole() + * @see #getControllerCluster() + * @generated + */ + EAttribute getControllerCluster_Role(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.platform.controller.ControllerCluster#getStateTime State Time}'. + * + * + * @return the meta object for the attribute 'State Time'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerCluster#getStateTime() + * @see #getControllerCluster() + * @generated + */ + EAttribute getControllerCluster_StateTime(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.platform.controller.ControllerCluster#getServers Servers}'. + * + * + * @return the meta object for the containment reference list 'Servers'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerCluster#getServers() + * @see #getControllerCluster() + * @generated + */ + EReference getControllerCluster_Servers(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.platform.controller.ControllerCluster#getRemoteServers Remote Servers}'. + * + * + * @return the meta object for the containment reference list 'Remote Servers'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerCluster#getRemoteServers() + * @see #getControllerCluster() + * @generated + */ + EReference getControllerCluster_RemoteServers(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.platform.controller.ControllerCluster#pushData(java.lang.String, java.lang.String) Push Data}' operation. + * + * + * @return the meta object for the 'Push Data' operation. + * @see org.openecomp.dcae.controller.platform.controller.ControllerCluster#pushData(java.lang.String, java.lang.String) + * @generated + */ + EOperation getControllerCluster__PushData__String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.platform.controller.ControllerCluster#receiveData(java.lang.String, java.lang.String, java.util.Date, java.lang.String) Receive Data}' operation. + * + * + * @return the meta object for the 'Receive Data' operation. + * @see org.openecomp.dcae.controller.platform.controller.ControllerCluster#receiveData(java.lang.String, java.lang.String, java.util.Date, java.lang.String) + * @generated + */ + EOperation getControllerCluster__ReceiveData__String_String_Date_String(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServer Cluster Server}'. + * + * + * @return the meta object for class 'Cluster Server'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerClusterServer + * @generated + */ + EClass getControllerClusterServer(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServer#getRole Role}'. + * + * + * @return the meta object for the attribute 'Role'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerClusterServer#getRole() + * @see #getControllerClusterServer() + * @generated + */ + EAttribute getControllerClusterServer_Role(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServer#getData Data}'. + * + * + * @return the meta object for the containment reference list 'Data'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerClusterServer#getData() + * @see #getControllerClusterServer() + * @generated + */ + EReference getControllerClusterServer_Data(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServer#getServer Server}'. + * + * + * @return the meta object for the reference 'Server'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerClusterServer#getServer() + * @see #getControllerClusterServer() + * @generated + */ + EReference getControllerClusterServer_Server(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData Cluster Server Data}'. + * + * + * @return the meta object for class 'Cluster Server Data'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData + * @generated + */ + EClass getControllerClusterServerData(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getPushInterval Push Interval}'. + * + * + * @return the meta object for the attribute 'Push Interval'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getPushInterval() + * @see #getControllerClusterServerData() + * @generated + */ + EAttribute getControllerClusterServerData_PushInterval(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getLastPush Last Push}'. + * + * + * @return the meta object for the attribute 'Last Push'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getLastPush() + * @see #getControllerClusterServerData() + * @generated + */ + EAttribute getControllerClusterServerData_LastPush(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getNumberDataPushes Number Data Pushes}'. + * + * + * @return the meta object for the attribute 'Number Data Pushes'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getNumberDataPushes() + * @see #getControllerClusterServerData() + * @generated + */ + EAttribute getControllerClusterServerData_NumberDataPushes(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getNumberDataPushErrors Number Data Push Errors}'. + * + * + * @return the meta object for the attribute 'Number Data Push Errors'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getNumberDataPushErrors() + * @see #getControllerClusterServerData() + * @generated + */ + EAttribute getControllerClusterServerData_NumberDataPushErrors(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getLastDataReceived Last Data Received}'. + * + * + * @return the meta object for the attribute 'Last Data Received'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getLastDataReceived() + * @see #getControllerClusterServerData() + * @generated + */ + EAttribute getControllerClusterServerData_LastDataReceived(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getNumberDataReceived Number Data Received}'. + * + * + * @return the meta object for the attribute 'Number Data Received'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getNumberDataReceived() + * @see #getControllerClusterServerData() + * @generated + */ + EAttribute getControllerClusterServerData_NumberDataReceived(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getNumberDataReceivedErrors Number Data Received Errors}'. + * + * + * @return the meta object for the attribute 'Number Data Received Errors'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData#getNumberDataReceivedErrors() + * @see #getControllerClusterServerData() + * @generated + */ + EAttribute getControllerClusterServerData_NumberDataReceivedErrors(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.platform.controller.ControllerVirtualMachineService Virtual Machine Service}'. + * + * + * @return the meta object for class 'Virtual Machine Service'. + * @see org.openecomp.dcae.controller.platform.controller.ControllerVirtualMachineService + * @generated + */ + EClass getControllerVirtualMachineService(); + + /** + * Returns the meta object for enum '{@link org.openecomp.dcae.controller.platform.controller.ServerRole Server Role}'. + * + * + * @return the meta object for enum 'Server Role'. + * @see org.openecomp.dcae.controller.platform.controller.ServerRole + * @generated + */ + EEnum getServerRole(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ControllerFactory getControllerFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl Dcae Platform Controller}' class. + * + * + * @see org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerPackageImpl#getDcaePlatformController() + * @generated + */ + EClass DCAE_PLATFORM_CONTROLLER = eINSTANCE.getDcaePlatformController(); + + /** + * The meta object literal for the 'Cluster' containment reference feature. + * + * + * @generated + */ + EReference DCAE_PLATFORM_CONTROLLER__CLUSTER = eINSTANCE.getDcaePlatformController_Cluster(); + + /** + * The meta object literal for the 'Openstack' containment reference feature. + * + * + * @generated + */ + EReference DCAE_PLATFORM_CONTROLLER__OPENSTACK = eINSTANCE.getDcaePlatformController_Openstack(); + + /** + * The meta object literal for the 'Locations' containment reference list feature. + * + * + * @generated + */ + EReference DCAE_PLATFORM_CONTROLLER__LOCATIONS = eINSTANCE.getDcaePlatformController_Locations(); + + /** + * The meta object literal for the 'Databus' containment reference feature. + * + * + * @generated + */ + EReference DCAE_PLATFORM_CONTROLLER__DATABUS = eINSTANCE.getDcaePlatformController_Databus(); + + /** + * The meta object literal for the 'Services' containment reference list feature. + * + * + * @generated + */ + EReference DCAE_PLATFORM_CONTROLLER__SERVICES = eINSTANCE.getDcaePlatformController_Services(); + + /** + * The meta object literal for the 'Users' containment reference list feature. + * + * + * @generated + */ + EReference DCAE_PLATFORM_CONTROLLER__USERS = eINSTANCE.getDcaePlatformController_Users(); + + /** + * The meta object literal for the 'Descriptors' containment reference list feature. + * + * + * @generated + */ + EReference DCAE_PLATFORM_CONTROLLER__DESCRIPTORS = eINSTANCE.getDcaePlatformController_Descriptors(); + + /** + * The meta object literal for the 'Admin Users' reference list feature. + * + * + * @generated + */ + EReference DCAE_PLATFORM_CONTROLLER__ADMIN_USERS = eINSTANCE.getDcaePlatformController_AdminUsers(); + + /** + * The meta object literal for the 'Deploy Descriptor' operation. + * + * + * @generated + */ + EOperation DCAE_PLATFORM_CONTROLLER___DEPLOY_DESCRIPTOR__STRING = eINSTANCE.getDcaePlatformController__DeployDescriptor__String(); + + /** + * The meta object literal for the 'Refresh Data Bus' operation. + * + * + * @generated + */ + EOperation DCAE_PLATFORM_CONTROLLER___REFRESH_DATA_BUS__STRING = eINSTANCE.getDcaePlatformController__RefreshDataBus__String(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.platform.controller.impl.DcaeDataBusImpl Dcae Data Bus}' class. + * + * + * @see org.openecomp.dcae.controller.platform.controller.impl.DcaeDataBusImpl + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerPackageImpl#getDcaeDataBus() + * @generated + */ + EClass DCAE_DATA_BUS = eINSTANCE.getDcaeDataBus(); + + /** + * The meta object literal for the 'Streams' containment reference list feature. + * + * + * @generated + */ + EReference DCAE_DATA_BUS__STREAMS = eINSTANCE.getDcaeDataBus_Streams(); + + /** + * The meta object literal for the 'Locations' containment reference list feature. + * + * + * @generated + */ + EReference DCAE_DATA_BUS__LOCATIONS = eINSTANCE.getDcaeDataBus_Locations(); + + /** + * The meta object literal for the 'Mr Clusters' containment reference list feature. + * + * + * @generated + */ + EReference DCAE_DATA_BUS__MR_CLUSTERS = eINSTANCE.getDcaeDataBus_MrClusters(); + + /** + * The meta object literal for the 'Dr Nodes' containment reference list feature. + * + * + * @generated + */ + EReference DCAE_DATA_BUS__DR_NODES = eINSTANCE.getDcaeDataBus_DrNodes(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterImpl Cluster}' class. + * + * + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterImpl + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerPackageImpl#getControllerCluster() + * @generated + */ + EClass CONTROLLER_CLUSTER = eINSTANCE.getControllerCluster(); + + /** + * The meta object literal for the 'My Server Name' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_CLUSTER__MY_SERVER_NAME = eINSTANCE.getControllerCluster_MyServerName(); + + /** + * The meta object literal for the 'Role' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_CLUSTER__ROLE = eINSTANCE.getControllerCluster_Role(); + + /** + * The meta object literal for the 'State Time' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_CLUSTER__STATE_TIME = eINSTANCE.getControllerCluster_StateTime(); + + /** + * The meta object literal for the 'Servers' containment reference list feature. + * + * + * @generated + */ + EReference CONTROLLER_CLUSTER__SERVERS = eINSTANCE.getControllerCluster_Servers(); + + /** + * The meta object literal for the 'Remote Servers' containment reference list feature. + * + * + * @generated + */ + EReference CONTROLLER_CLUSTER__REMOTE_SERVERS = eINSTANCE.getControllerCluster_RemoteServers(); + + /** + * The meta object literal for the 'Push Data' operation. + * + * + * @generated + */ + EOperation CONTROLLER_CLUSTER___PUSH_DATA__STRING_STRING = eINSTANCE.getControllerCluster__PushData__String_String(); + + /** + * The meta object literal for the 'Receive Data' operation. + * + * + * @generated + */ + EOperation CONTROLLER_CLUSTER___RECEIVE_DATA__STRING_STRING_DATE_STRING = eINSTANCE.getControllerCluster__ReceiveData__String_String_Date_String(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerImpl Cluster Server}' class. + * + * + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerImpl + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerPackageImpl#getControllerClusterServer() + * @generated + */ + EClass CONTROLLER_CLUSTER_SERVER = eINSTANCE.getControllerClusterServer(); + + /** + * The meta object literal for the 'Role' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_CLUSTER_SERVER__ROLE = eINSTANCE.getControllerClusterServer_Role(); + + /** + * The meta object literal for the 'Data' containment reference list feature. + * + * + * @generated + */ + EReference CONTROLLER_CLUSTER_SERVER__DATA = eINSTANCE.getControllerClusterServer_Data(); + + /** + * The meta object literal for the 'Server' reference feature. + * + * + * @generated + */ + EReference CONTROLLER_CLUSTER_SERVER__SERVER = eINSTANCE.getControllerClusterServer_Server(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerDataImpl Cluster Server Data}' class. + * + * + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerDataImpl + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerPackageImpl#getControllerClusterServerData() + * @generated + */ + EClass CONTROLLER_CLUSTER_SERVER_DATA = eINSTANCE.getControllerClusterServerData(); + + /** + * The meta object literal for the 'Push Interval' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_CLUSTER_SERVER_DATA__PUSH_INTERVAL = eINSTANCE.getControllerClusterServerData_PushInterval(); + + /** + * The meta object literal for the 'Last Push' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_CLUSTER_SERVER_DATA__LAST_PUSH = eINSTANCE.getControllerClusterServerData_LastPush(); + + /** + * The meta object literal for the 'Number Data Pushes' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_PUSHES = eINSTANCE.getControllerClusterServerData_NumberDataPushes(); + + /** + * The meta object literal for the 'Number Data Push Errors' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_PUSH_ERRORS = eINSTANCE.getControllerClusterServerData_NumberDataPushErrors(); + + /** + * The meta object literal for the 'Last Data Received' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_CLUSTER_SERVER_DATA__LAST_DATA_RECEIVED = eINSTANCE.getControllerClusterServerData_LastDataReceived(); + + /** + * The meta object literal for the 'Number Data Received' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_RECEIVED = eINSTANCE.getControllerClusterServerData_NumberDataReceived(); + + /** + * The meta object literal for the 'Number Data Received Errors' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_RECEIVED_ERRORS = eINSTANCE.getControllerClusterServerData_NumberDataReceivedErrors(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.platform.controller.impl.ControllerVirtualMachineServiceImpl Virtual Machine Service}' class. + * + * + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerVirtualMachineServiceImpl + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerPackageImpl#getControllerVirtualMachineService() + * @generated + */ + EClass CONTROLLER_VIRTUAL_MACHINE_SERVICE = eINSTANCE.getControllerVirtualMachineService(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.platform.controller.ServerRole Server Role}' enum. + * + * + * @see org.openecomp.dcae.controller.platform.controller.ServerRole + * @see org.openecomp.dcae.controller.platform.controller.impl.ControllerPackageImpl#getServerRole() + * @generated + */ + EEnum SERVER_ROLE = eINSTANCE.getServerRole(); + + } + +} //ControllerPackage diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerVirtualMachineService.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerVirtualMachineService.java new file mode 100644 index 0000000..af9c4cb --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ControllerVirtualMachineService.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; + +/** + * + * A representation of the model object 'Virtual Machine Service'. + * + * + * + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getControllerVirtualMachineService() + * @model + * @generated + */ +public interface ControllerVirtualMachineService extends VirtualMachineService { +} // ControllerVirtualMachineService diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/DcaeDataBus.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/DcaeDataBus.java new file mode 100644 index 0000000..d104318 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/DcaeDataBus.java @@ -0,0 +1,117 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller; + +import org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode; +import org.openecomp.dcae.controller.core.stream.DatabusLocation; +import org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster; +import org.openecomp.dcae.controller.core.stream.DatabusStream; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Dcae Data Bus'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.platform.controller.DcaeDataBus#getStreams Streams}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.DcaeDataBus#getLocations Locations}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.DcaeDataBus#getMrClusters Mr Clusters}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.DcaeDataBus#getDrNodes Dr Nodes}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getDcaeDataBus() + * @model + * @generated + */ +public interface DcaeDataBus extends EObject { + /** + * Returns the value of the 'Streams' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.stream.DatabusStream}. + * + *

+ * If the meaning of the 'Streams' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Streams' containment reference list. + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getDcaeDataBus_Streams() + * @model containment="true" ordered="false" + * @generated + */ + EList getStreams(); + + /** + * Returns the value of the 'Locations' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.stream.DatabusLocation}. + * + *

+ * If the meaning of the 'Locations' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Locations' containment reference list. + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getDcaeDataBus_Locations() + * @model containment="true" ordered="false" + * @generated + */ + EList getLocations(); + + /** + * Returns the value of the 'Mr Clusters' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster}. + * + *

+ * If the meaning of the 'Mr Clusters' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Mr Clusters' containment reference list. + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getDcaeDataBus_MrClusters() + * @model containment="true" ordered="false" + * @generated + */ + EList getMrClusters(); + + /** + * Returns the value of the 'Dr Nodes' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode}. + * + *

+ * If the meaning of the 'Dr Nodes' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dr Nodes' containment reference list. + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getDcaeDataBus_DrNodes() + * @model containment="true" ordered="false" + * @generated + */ + EList getDrNodes(); + +} // DcaeDataBus diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/DcaePlatformController.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/DcaePlatformController.java new file mode 100644 index 0000000..a3a9204 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/DcaePlatformController.java @@ -0,0 +1,233 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller; + +import org.openecomp.dcae.controller.core.service.DcaeLocation; +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; +import org.openecomp.ncomp.core.User; +import org.openecomp.ncomp.openstack.OpenStackController; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Dcae Platform Controller'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getCluster Cluster}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getOpenstack Openstack}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getLocations Locations}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getDatabus Databus}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getDescriptors Descriptors}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getServices Services}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getUsers Users}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getAdminUsers Admin Users}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getDcaePlatformController() + * @model + * @generated + */ +public interface DcaePlatformController extends SouthBoundApiWithProxy, AbstractManagementServer { + /** + * Returns the value of the 'Cluster' containment reference. + * + *

+ * If the meaning of the 'Cluster' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Cluster' containment reference. + * @see #setCluster(ControllerCluster) + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getDcaePlatformController_Cluster() + * @model containment="true" + * @generated + */ + ControllerCluster getCluster(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getCluster Cluster}' containment reference. + * + * + * @param value the new value of the 'Cluster' containment reference. + * @see #getCluster() + * @generated + */ + void setCluster(ControllerCluster value); + + /** + * Returns the value of the 'Openstack' containment reference. + * + *

+ * If the meaning of the 'Openstack' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Openstack' containment reference. + * @see #setOpenstack(OpenStackController) + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getDcaePlatformController_Openstack() + * @model containment="true" + * @generated + */ + OpenStackController getOpenstack(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getOpenstack Openstack}' containment reference. + * + * + * @param value the new value of the 'Openstack' containment reference. + * @see #getOpenstack() + * @generated + */ + void setOpenstack(OpenStackController value); + + /** + * Returns the value of the 'Locations' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.service.DcaeLocation}. + * + *

+ * If the meaning of the 'Locations' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Locations' containment reference list. + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getDcaePlatformController_Locations() + * @model containment="true" ordered="false" + * @generated + */ + EList getLocations(); + + /** + * Returns the value of the 'Databus' containment reference. + * + *

+ * If the meaning of the 'Databus' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Databus' containment reference. + * @see #setDatabus(DcaeDataBus) + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getDcaePlatformController_Databus() + * @model containment="true" + * @generated + */ + DcaeDataBus getDatabus(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController#getDatabus Databus}' containment reference. + * + * + * @param value the new value of the 'Databus' containment reference. + * @see #getDatabus() + * @generated + */ + void setDatabus(DcaeDataBus value); + + /** + * Returns the value of the 'Services' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.service.DcaeService}. + * + *

+ * If the meaning of the 'Services' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Services' containment reference list. + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getDcaePlatformController_Services() + * @model containment="true" ordered="false" + * @generated + */ + EList getServices(); + + /** + * Returns the value of the 'Users' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.User}. + * + *

+ * If the meaning of the 'Users' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Users' containment reference list. + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getDcaePlatformController_Users() + * @model containment="true" ordered="false" + * @generated + */ + EList getUsers(); + + /** + * Returns the value of the 'Descriptors' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor}. + * + *

+ * If the meaning of the 'Descriptors' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Descriptors' containment reference list. + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getDcaePlatformController_Descriptors() + * @model containment="true" ordered="false" + * @generated + */ + EList getDescriptors(); + + /** + * Returns the value of the 'Admin Users' reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.User}. + * + *

+ * If the meaning of the 'Admin Users' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Admin Users' reference list. + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getDcaePlatformController_AdminUsers() + * @model + * @generated + */ + EList getAdminUsers(); + + /** + * + * + * @model nameUnique="false" + * @generated + */ + void deployDescriptor(String name); + + /** + * + * + * @model nameMatchUnique="false" + * @generated + */ + void refreshDataBus(String nameMatch); + +} // DcaePlatformController diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ServerRole.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ServerRole.java new file mode 100644 index 0000000..0286a1b --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/ServerRole.java @@ -0,0 +1,278 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Server Role', + * and utility methods for working with them. + * + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#getServerRole() + * @model + * @generated + */ +public enum ServerRole implements Enumerator { + /** + * The 'UNKNOWN' literal object. + * + * + * @see #UNKNOWN_VALUE + * @generated + * @ordered + */ + UNKNOWN(0, "UNKNOWN", "UNKNOWN"), /** + * The 'STANDALONE' literal object. + * + * + * @see #STANDALONE_VALUE + * @generated + * @ordered + */ + STANDALONE(0, "STANDALONE", "STANDALONE"), + + /** + * The 'MASTER' literal object. + * + * + * @see #MASTER_VALUE + * @generated + * @ordered + */ + MASTER(0, "MASTER", "MASTER"), + + /** + * The 'SLAVE' literal object. + * + * + * @see #SLAVE_VALUE + * @generated + * @ordered + */ + SLAVE(0, "SLAVE", "SLAVE"); + + /** + * The 'UNKNOWN' literal value. + * + *

+ * If the meaning of 'UNKNOWN' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #UNKNOWN + * @model + * @generated + * @ordered + */ + public static final int UNKNOWN_VALUE = 0; + + /** + * The 'STANDALONE' literal value. + * + *

+ * If the meaning of 'STANDALONE' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #STANDALONE + * @model + * @generated + * @ordered + */ + public static final int STANDALONE_VALUE = 0; + + /** + * The 'MASTER' literal value. + * + *

+ * If the meaning of 'MASTER' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #MASTER + * @model + * @generated + * @ordered + */ + public static final int MASTER_VALUE = 0; + + /** + * The 'SLAVE' literal value. + * + *

+ * If the meaning of 'SLAVE' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #SLAVE + * @model + * @generated + * @ordered + */ + public static final int SLAVE_VALUE = 0; + + /** + * An array of all the 'Server Role' enumerators. + * + * + * @generated + */ + private static final ServerRole[] VALUES_ARRAY = + new ServerRole[] { + UNKNOWN, + STANDALONE, + MASTER, + SLAVE, + }; + + /** + * A public read-only list of all the 'Server Role' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Server Role' literal with the specified literal value. + * + * + * @generated + */ + public static ServerRole get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + ServerRole result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Server Role' literal with the specified name. + * + * + * @generated + */ + public static ServerRole getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + ServerRole result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Server Role' literal with the specified integer value. + * + * + * @generated + */ + public static ServerRole get(int value) { + switch (value) { + case UNKNOWN_VALUE: return UNKNOWN; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private ServerRole(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //ServerRole diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerClusterImpl.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerClusterImpl.java new file mode 100644 index 0000000..7c03e75 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerClusterImpl.java @@ -0,0 +1,428 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller.impl; + +import org.openecomp.dcae.controller.platform.controller.ControllerCluster; +import org.openecomp.dcae.controller.platform.controller.ControllerClusterServer; +import org.openecomp.dcae.controller.platform.controller.ControllerPackage; + +import org.openecomp.dcae.controller.platform.controller.ServerRole; +import org.openecomp.ncomp.core.types.metrics.DateMetricAttribute; +import java.lang.reflect.InvocationTargetException; +import java.util.Collection; +import java.util.Date; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Cluster'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterImpl#getMyServerName My Server Name}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterImpl#getRole Role}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterImpl#getStateTime State Time}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterImpl#getServers Servers}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterImpl#getRemoteServers Remote Servers}
  • + *
+ *

+ * + * @generated + */ +public class ControllerClusterImpl extends MinimalEObjectImpl.Container implements ControllerCluster { + /** + * The default value of the '{@link #getMyServerName() My Server Name}' attribute. + * + * + * @see #getMyServerName() + * @generated + * @ordered + */ + protected static final String MY_SERVER_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMyServerName() My Server Name}' attribute. + * + * + * @see #getMyServerName() + * @generated + * @ordered + */ + protected String myServerName = MY_SERVER_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getRole() Role}' attribute. + * + * + * @see #getRole() + * @generated + * @ordered + */ + protected static final ServerRole ROLE_EDEFAULT = ServerRole.UNKNOWN; + + /** + * The cached value of the '{@link #getRole() Role}' attribute. + * + * + * @see #getRole() + * @generated + * @ordered + */ + protected ServerRole role = ROLE_EDEFAULT; + + /** + * The default value of the '{@link #getStateTime() State Time}' attribute. + * + * + * @see #getStateTime() + * @generated + * @ordered + */ + protected static final DateMetricAttribute STATE_TIME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getStateTime() State Time}' attribute. + * + * + * @see #getStateTime() + * @generated + * @ordered + */ + protected DateMetricAttribute stateTime = STATE_TIME_EDEFAULT; + + /** + * The cached value of the '{@link #getServers() Servers}' containment reference list. + * + * + * @see #getServers() + * @generated + * @ordered + */ + protected EList servers; + + /** + * The cached value of the '{@link #getRemoteServers() Remote Servers}' containment reference list. + * + * + * @see #getRemoteServers() + * @generated + * @ordered + */ + protected EList remoteServers; + + /** + * + * + * @generated + */ + protected ControllerClusterImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ControllerPackage.Literals.CONTROLLER_CLUSTER; + } + + /** + * + * + * @generated + */ + public String getMyServerName() { + return myServerName; + } + + /** + * + * + * @generated + */ + public void setMyServerName(String newMyServerName) { + String oldMyServerName = myServerName; + myServerName = newMyServerName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.CONTROLLER_CLUSTER__MY_SERVER_NAME, oldMyServerName, myServerName)); + } + + /** + * + * + * @generated + */ + public ServerRole getRole() { + return role; + } + + /** + * + * + * @generated + */ + public void setRole(ServerRole newRole) { + ServerRole oldRole = role; + role = newRole == null ? ROLE_EDEFAULT : newRole; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.CONTROLLER_CLUSTER__ROLE, oldRole, role)); + } + + /** + * + * + * @generated + */ + public DateMetricAttribute getStateTime() { + return stateTime; + } + + /** + * + * + * @generated + */ + public void setStateTime(DateMetricAttribute newStateTime) { + DateMetricAttribute oldStateTime = stateTime; + stateTime = newStateTime; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.CONTROLLER_CLUSTER__STATE_TIME, oldStateTime, stateTime)); + } + + /** + * + * + * @generated + */ + public EList getServers() { + if (servers == null) { + servers = new EObjectContainmentEList(ControllerClusterServer.class, this, ControllerPackage.CONTROLLER_CLUSTER__SERVERS); + } + return servers; + } + + /** + * + * + * @generated + */ + public EList getRemoteServers() { + if (remoteServers == null) { + remoteServers = new EObjectContainmentEList(ControllerClusterServer.class, this, ControllerPackage.CONTROLLER_CLUSTER__REMOTE_SERVERS); + } + return remoteServers; + } + + /** + * + * + * @generated + */ + public void pushData(String serverName, String dataName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void receiveData(String serverName, String dataName, Date time, String content) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ControllerPackage.CONTROLLER_CLUSTER__SERVERS: + return ((InternalEList)getServers()).basicRemove(otherEnd, msgs); + case ControllerPackage.CONTROLLER_CLUSTER__REMOTE_SERVERS: + return ((InternalEList)getRemoteServers()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ControllerPackage.CONTROLLER_CLUSTER__MY_SERVER_NAME: + return getMyServerName(); + case ControllerPackage.CONTROLLER_CLUSTER__ROLE: + return getRole(); + case ControllerPackage.CONTROLLER_CLUSTER__STATE_TIME: + return getStateTime(); + case ControllerPackage.CONTROLLER_CLUSTER__SERVERS: + return getServers(); + case ControllerPackage.CONTROLLER_CLUSTER__REMOTE_SERVERS: + return getRemoteServers(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ControllerPackage.CONTROLLER_CLUSTER__MY_SERVER_NAME: + setMyServerName((String)newValue); + return; + case ControllerPackage.CONTROLLER_CLUSTER__ROLE: + setRole((ServerRole)newValue); + return; + case ControllerPackage.CONTROLLER_CLUSTER__STATE_TIME: + setStateTime((DateMetricAttribute)newValue); + return; + case ControllerPackage.CONTROLLER_CLUSTER__SERVERS: + getServers().clear(); + getServers().addAll((Collection)newValue); + return; + case ControllerPackage.CONTROLLER_CLUSTER__REMOTE_SERVERS: + getRemoteServers().clear(); + getRemoteServers().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ControllerPackage.CONTROLLER_CLUSTER__MY_SERVER_NAME: + setMyServerName(MY_SERVER_NAME_EDEFAULT); + return; + case ControllerPackage.CONTROLLER_CLUSTER__ROLE: + setRole(ROLE_EDEFAULT); + return; + case ControllerPackage.CONTROLLER_CLUSTER__STATE_TIME: + setStateTime(STATE_TIME_EDEFAULT); + return; + case ControllerPackage.CONTROLLER_CLUSTER__SERVERS: + getServers().clear(); + return; + case ControllerPackage.CONTROLLER_CLUSTER__REMOTE_SERVERS: + getRemoteServers().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ControllerPackage.CONTROLLER_CLUSTER__MY_SERVER_NAME: + return MY_SERVER_NAME_EDEFAULT == null ? myServerName != null : !MY_SERVER_NAME_EDEFAULT.equals(myServerName); + case ControllerPackage.CONTROLLER_CLUSTER__ROLE: + return role != ROLE_EDEFAULT; + case ControllerPackage.CONTROLLER_CLUSTER__STATE_TIME: + return STATE_TIME_EDEFAULT == null ? stateTime != null : !STATE_TIME_EDEFAULT.equals(stateTime); + case ControllerPackage.CONTROLLER_CLUSTER__SERVERS: + return servers != null && !servers.isEmpty(); + case ControllerPackage.CONTROLLER_CLUSTER__REMOTE_SERVERS: + return remoteServers != null && !remoteServers.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ControllerPackage.CONTROLLER_CLUSTER___PUSH_DATA__STRING_STRING: + pushData((String)arguments.get(0), (String)arguments.get(1)); + return null; + case ControllerPackage.CONTROLLER_CLUSTER___RECEIVE_DATA__STRING_STRING_DATE_STRING: + receiveData((String)arguments.get(0), (String)arguments.get(1), (Date)arguments.get(2), (String)arguments.get(3)); + return null; + } + return super.eInvoke(operationID, arguments); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (myServerName: "); + result.append(myServerName); + result.append(", role: "); + result.append(role); + result.append(", stateTime: "); + result.append(stateTime); + result.append(')'); + return result.toString(); + } + +} //ControllerClusterImpl diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerClusterServerDataImpl.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerClusterServerDataImpl.java new file mode 100644 index 0000000..6aedded --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerClusterServerDataImpl.java @@ -0,0 +1,512 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller.impl; + +import org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData; +import org.openecomp.dcae.controller.platform.controller.ControllerPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.types.metrics.DateMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Cluster Server Data'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerDataImpl#getPushInterval Push Interval}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerDataImpl#getLastPush Last Push}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerDataImpl#getNumberDataPushes Number Data Pushes}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerDataImpl#getNumberDataPushErrors Number Data Push Errors}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerDataImpl#getLastDataReceived Last Data Received}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerDataImpl#getNumberDataReceived Number Data Received}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerDataImpl#getNumberDataReceivedErrors Number Data Received Errors}
  • + *
+ *

+ * + * @generated + */ +public class ControllerClusterServerDataImpl extends NamedEntityImpl implements ControllerClusterServerData { + /** + * The default value of the '{@link #getPushInterval() Push Interval}' attribute. + * + * + * @see #getPushInterval() + * @generated + * @ordered + */ + protected static final String PUSH_INTERVAL_EDEFAULT = "5min"; + + /** + * The cached value of the '{@link #getPushInterval() Push Interval}' attribute. + * + * + * @see #getPushInterval() + * @generated + * @ordered + */ + protected String pushInterval = PUSH_INTERVAL_EDEFAULT; + + /** + * The default value of the '{@link #getLastPush() Last Push}' attribute. + * + * + * @see #getLastPush() + * @generated + * @ordered + */ + protected static final DateMetricAttribute LAST_PUSH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLastPush() Last Push}' attribute. + * + * + * @see #getLastPush() + * @generated + * @ordered + */ + protected DateMetricAttribute lastPush = LAST_PUSH_EDEFAULT; + + /** + * The default value of the '{@link #getNumberDataPushes() Number Data Pushes}' attribute. + * + * + * @see #getNumberDataPushes() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_DATA_PUSHES_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNumberDataPushes() Number Data Pushes}' attribute. + * + * + * @see #getNumberDataPushes() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberDataPushes = NUMBER_DATA_PUSHES_EDEFAULT; + + /** + * The default value of the '{@link #getNumberDataPushErrors() Number Data Push Errors}' attribute. + * + * + * @see #getNumberDataPushErrors() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_DATA_PUSH_ERRORS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNumberDataPushErrors() Number Data Push Errors}' attribute. + * + * + * @see #getNumberDataPushErrors() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberDataPushErrors = NUMBER_DATA_PUSH_ERRORS_EDEFAULT; + + /** + * The default value of the '{@link #getLastDataReceived() Last Data Received}' attribute. + * + * + * @see #getLastDataReceived() + * @generated + * @ordered + */ + protected static final DateMetricAttribute LAST_DATA_RECEIVED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLastDataReceived() Last Data Received}' attribute. + * + * + * @see #getLastDataReceived() + * @generated + * @ordered + */ + protected DateMetricAttribute lastDataReceived = LAST_DATA_RECEIVED_EDEFAULT; + + /** + * The default value of the '{@link #getNumberDataReceived() Number Data Received}' attribute. + * + * + * @see #getNumberDataReceived() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_DATA_RECEIVED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNumberDataReceived() Number Data Received}' attribute. + * + * + * @see #getNumberDataReceived() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberDataReceived = NUMBER_DATA_RECEIVED_EDEFAULT; + + /** + * The default value of the '{@link #getNumberDataReceivedErrors() Number Data Received Errors}' attribute. + * + * + * @see #getNumberDataReceivedErrors() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_DATA_RECEIVED_ERRORS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNumberDataReceivedErrors() Number Data Received Errors}' attribute. + * + * + * @see #getNumberDataReceivedErrors() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberDataReceivedErrors = NUMBER_DATA_RECEIVED_ERRORS_EDEFAULT; + + /** + * + * + * @generated + */ + protected ControllerClusterServerDataImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ControllerPackage.Literals.CONTROLLER_CLUSTER_SERVER_DATA; + } + + /** + * + * + * @generated + */ + public String getPushInterval() { + return pushInterval; + } + + /** + * + * + * @generated + */ + public void setPushInterval(String newPushInterval) { + String oldPushInterval = pushInterval; + pushInterval = newPushInterval; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__PUSH_INTERVAL, oldPushInterval, pushInterval)); + } + + /** + * + * + * @generated + */ + public DateMetricAttribute getLastPush() { + return lastPush; + } + + /** + * + * + * @generated + */ + public void setLastPush(DateMetricAttribute newLastPush) { + DateMetricAttribute oldLastPush = lastPush; + lastPush = newLastPush; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__LAST_PUSH, oldLastPush, lastPush)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberDataPushes() { + return numberDataPushes; + } + + /** + * + * + * @generated + */ + public void setNumberDataPushes(IncreasingULongMetricAttribute newNumberDataPushes) { + IncreasingULongMetricAttribute oldNumberDataPushes = numberDataPushes; + numberDataPushes = newNumberDataPushes; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_PUSHES, oldNumberDataPushes, numberDataPushes)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberDataPushErrors() { + return numberDataPushErrors; + } + + /** + * + * + * @generated + */ + public void setNumberDataPushErrors(IncreasingULongMetricAttribute newNumberDataPushErrors) { + IncreasingULongMetricAttribute oldNumberDataPushErrors = numberDataPushErrors; + numberDataPushErrors = newNumberDataPushErrors; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_PUSH_ERRORS, oldNumberDataPushErrors, numberDataPushErrors)); + } + + /** + * + * + * @generated + */ + public DateMetricAttribute getLastDataReceived() { + return lastDataReceived; + } + + /** + * + * + * @generated + */ + public void setLastDataReceived(DateMetricAttribute newLastDataReceived) { + DateMetricAttribute oldLastDataReceived = lastDataReceived; + lastDataReceived = newLastDataReceived; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__LAST_DATA_RECEIVED, oldLastDataReceived, lastDataReceived)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberDataReceived() { + return numberDataReceived; + } + + /** + * + * + * @generated + */ + public void setNumberDataReceived(IncreasingULongMetricAttribute newNumberDataReceived) { + IncreasingULongMetricAttribute oldNumberDataReceived = numberDataReceived; + numberDataReceived = newNumberDataReceived; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_RECEIVED, oldNumberDataReceived, numberDataReceived)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberDataReceivedErrors() { + return numberDataReceivedErrors; + } + + /** + * + * + * @generated + */ + public void setNumberDataReceivedErrors(IncreasingULongMetricAttribute newNumberDataReceivedErrors) { + IncreasingULongMetricAttribute oldNumberDataReceivedErrors = numberDataReceivedErrors; + numberDataReceivedErrors = newNumberDataReceivedErrors; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_RECEIVED_ERRORS, oldNumberDataReceivedErrors, numberDataReceivedErrors)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__PUSH_INTERVAL: + return getPushInterval(); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__LAST_PUSH: + return getLastPush(); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_PUSHES: + return getNumberDataPushes(); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_PUSH_ERRORS: + return getNumberDataPushErrors(); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__LAST_DATA_RECEIVED: + return getLastDataReceived(); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_RECEIVED: + return getNumberDataReceived(); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_RECEIVED_ERRORS: + return getNumberDataReceivedErrors(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__PUSH_INTERVAL: + setPushInterval((String)newValue); + return; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__LAST_PUSH: + setLastPush((DateMetricAttribute)newValue); + return; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_PUSHES: + setNumberDataPushes((IncreasingULongMetricAttribute)newValue); + return; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_PUSH_ERRORS: + setNumberDataPushErrors((IncreasingULongMetricAttribute)newValue); + return; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__LAST_DATA_RECEIVED: + setLastDataReceived((DateMetricAttribute)newValue); + return; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_RECEIVED: + setNumberDataReceived((IncreasingULongMetricAttribute)newValue); + return; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_RECEIVED_ERRORS: + setNumberDataReceivedErrors((IncreasingULongMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__PUSH_INTERVAL: + setPushInterval(PUSH_INTERVAL_EDEFAULT); + return; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__LAST_PUSH: + setLastPush(LAST_PUSH_EDEFAULT); + return; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_PUSHES: + setNumberDataPushes(NUMBER_DATA_PUSHES_EDEFAULT); + return; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_PUSH_ERRORS: + setNumberDataPushErrors(NUMBER_DATA_PUSH_ERRORS_EDEFAULT); + return; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__LAST_DATA_RECEIVED: + setLastDataReceived(LAST_DATA_RECEIVED_EDEFAULT); + return; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_RECEIVED: + setNumberDataReceived(NUMBER_DATA_RECEIVED_EDEFAULT); + return; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_RECEIVED_ERRORS: + setNumberDataReceivedErrors(NUMBER_DATA_RECEIVED_ERRORS_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__PUSH_INTERVAL: + return PUSH_INTERVAL_EDEFAULT == null ? pushInterval != null : !PUSH_INTERVAL_EDEFAULT.equals(pushInterval); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__LAST_PUSH: + return LAST_PUSH_EDEFAULT == null ? lastPush != null : !LAST_PUSH_EDEFAULT.equals(lastPush); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_PUSHES: + return NUMBER_DATA_PUSHES_EDEFAULT == null ? numberDataPushes != null : !NUMBER_DATA_PUSHES_EDEFAULT.equals(numberDataPushes); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_PUSH_ERRORS: + return NUMBER_DATA_PUSH_ERRORS_EDEFAULT == null ? numberDataPushErrors != null : !NUMBER_DATA_PUSH_ERRORS_EDEFAULT.equals(numberDataPushErrors); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__LAST_DATA_RECEIVED: + return LAST_DATA_RECEIVED_EDEFAULT == null ? lastDataReceived != null : !LAST_DATA_RECEIVED_EDEFAULT.equals(lastDataReceived); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_RECEIVED: + return NUMBER_DATA_RECEIVED_EDEFAULT == null ? numberDataReceived != null : !NUMBER_DATA_RECEIVED_EDEFAULT.equals(numberDataReceived); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_RECEIVED_ERRORS: + return NUMBER_DATA_RECEIVED_ERRORS_EDEFAULT == null ? numberDataReceivedErrors != null : !NUMBER_DATA_RECEIVED_ERRORS_EDEFAULT.equals(numberDataReceivedErrors); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (pushInterval: "); + result.append(pushInterval); + result.append(", lastPush: "); + result.append(lastPush); + result.append(", numberDataPushes: "); + result.append(numberDataPushes); + result.append(", numberDataPushErrors: "); + result.append(numberDataPushErrors); + result.append(", lastDataReceived: "); + result.append(lastDataReceived); + result.append(", numberDataReceived: "); + result.append(numberDataReceived); + result.append(", numberDataReceivedErrors: "); + result.append(numberDataReceivedErrors); + result.append(')'); + return result.toString(); + } + +} //ControllerClusterServerDataImpl diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerClusterServerImpl.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerClusterServerImpl.java new file mode 100644 index 0000000..517f38e --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerClusterServerImpl.java @@ -0,0 +1,297 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller.impl; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; +import org.openecomp.dcae.controller.platform.controller.ControllerClusterServer; +import org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData; +import org.openecomp.dcae.controller.platform.controller.ControllerPackage; +import org.openecomp.dcae.controller.platform.controller.ServerRole; +import org.openecomp.ncomp.core.impl.NamedEntityImpl; +import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Cluster Server'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerImpl#getRole Role}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerImpl#getData Data}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterServerImpl#getServer Server}
  • + *
+ *

+ * + * @generated + */ +public class ControllerClusterServerImpl extends NamedEntityImpl implements ControllerClusterServer { + /** + * The default value of the '{@link #getRole() Role}' attribute. + * + * + * @see #getRole() + * @generated + * @ordered + */ + protected static final ServerRole ROLE_EDEFAULT = ServerRole.UNKNOWN; + /** + * The cached value of the '{@link #getRole() Role}' attribute. + * + * + * @see #getRole() + * @generated + * @ordered + */ + protected ServerRole role = ROLE_EDEFAULT; + /** + * The cached value of the '{@link #getData() Data}' containment reference list. + * + * + * @see #getData() + * @generated + * @ordered + */ + protected EList data; + + /** + * The cached value of the '{@link #getServer() Server}' reference. + * + * + * @see #getServer() + * @generated + * @ordered + */ + protected DcaeBasicServer server; + + /** + * + * + * @generated + */ + protected ControllerClusterServerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ControllerPackage.Literals.CONTROLLER_CLUSTER_SERVER; + } + + /** + * + * + * @generated + */ + public ServerRole getRole() { + return role; + } + + /** + * + * + * @generated + */ + public void setRole(ServerRole newRole) { + ServerRole oldRole = role; + role = newRole == null ? ROLE_EDEFAULT : newRole; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.CONTROLLER_CLUSTER_SERVER__ROLE, oldRole, role)); + } + + /** + * + * + * @generated + */ + public EList getData() { + if (data == null) { + data = new EObjectContainmentEList(ControllerClusterServerData.class, this, ControllerPackage.CONTROLLER_CLUSTER_SERVER__DATA); + } + return data; + } + + /** + * + * + * @generated + */ + public DcaeBasicServer getServer() { + if (server != null && server.eIsProxy()) { + InternalEObject oldServer = (InternalEObject)server; + server = (DcaeBasicServer)eResolveProxy(oldServer); + if (server != oldServer) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ControllerPackage.CONTROLLER_CLUSTER_SERVER__SERVER, oldServer, server)); + } + } + return server; + } + + /** + * + * + * @generated + */ + public DcaeBasicServer basicGetServer() { + return server; + } + + /** + * + * + * @generated + */ + public void setServer(DcaeBasicServer newServer) { + DcaeBasicServer oldServer = server; + server = newServer; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.CONTROLLER_CLUSTER_SERVER__SERVER, oldServer, server)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ControllerPackage.CONTROLLER_CLUSTER_SERVER__DATA: + return ((InternalEList)getData()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ControllerPackage.CONTROLLER_CLUSTER_SERVER__ROLE: + return getRole(); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER__DATA: + return getData(); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER__SERVER: + if (resolve) return getServer(); + return basicGetServer(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ControllerPackage.CONTROLLER_CLUSTER_SERVER__ROLE: + setRole((ServerRole)newValue); + return; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER__DATA: + getData().clear(); + getData().addAll((Collection)newValue); + return; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER__SERVER: + setServer((DcaeBasicServer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ControllerPackage.CONTROLLER_CLUSTER_SERVER__ROLE: + setRole(ROLE_EDEFAULT); + return; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER__DATA: + getData().clear(); + return; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER__SERVER: + setServer((DcaeBasicServer)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ControllerPackage.CONTROLLER_CLUSTER_SERVER__ROLE: + return role != ROLE_EDEFAULT; + case ControllerPackage.CONTROLLER_CLUSTER_SERVER__DATA: + return data != null && !data.isEmpty(); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER__SERVER: + return server != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (role: "); + result.append(role); + result.append(')'); + return result.toString(); + } + +} //ControllerClusterServerImpl diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerFactoryImpl.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerFactoryImpl.java new file mode 100644 index 0000000..d7e6478 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerFactoryImpl.java @@ -0,0 +1,222 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller.impl; + +import org.openecomp.dcae.controller.platform.controller.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ControllerFactoryImpl extends EFactoryImpl implements ControllerFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ControllerFactory init() { + try { + ControllerFactory theControllerFactory = (ControllerFactory)EPackage.Registry.INSTANCE.getEFactory(ControllerPackage.eNS_URI); + if (theControllerFactory != null) { + return theControllerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ControllerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ControllerFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ControllerPackage.DCAE_PLATFORM_CONTROLLER: return createDcaePlatformController(); + case ControllerPackage.DCAE_DATA_BUS: return createDcaeDataBus(); + case ControllerPackage.CONTROLLER_CLUSTER: return createControllerCluster(); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER: return createControllerClusterServer(); + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA: return createControllerClusterServerData(); + case ControllerPackage.CONTROLLER_VIRTUAL_MACHINE_SERVICE: return createControllerVirtualMachineService(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case ControllerPackage.SERVER_ROLE: + return createServerRoleFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case ControllerPackage.SERVER_ROLE: + return convertServerRoleToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public DcaePlatformController createDcaePlatformController() { + DcaePlatformControllerImpl dcaePlatformController = new DcaePlatformControllerImpl(); + return dcaePlatformController; + } + + /** + * + * + * @generated + */ + public DcaeDataBus createDcaeDataBus() { + DcaeDataBusImpl dcaeDataBus = new DcaeDataBusImpl(); + return dcaeDataBus; + } + + /** + * + * + * @generated + */ + public ControllerCluster createControllerCluster() { + ControllerClusterImpl controllerCluster = new ControllerClusterImpl(); + return controllerCluster; + } + + /** + * + * + * @generated + */ + public ControllerClusterServer createControllerClusterServer() { + ControllerClusterServerImpl controllerClusterServer = new ControllerClusterServerImpl(); + return controllerClusterServer; + } + + /** + * + * + * @generated + */ + public ControllerClusterServerData createControllerClusterServerData() { + ControllerClusterServerDataImpl controllerClusterServerData = new ControllerClusterServerDataImpl(); + return controllerClusterServerData; + } + + /** + * + * + * @generated + */ + public ControllerVirtualMachineService createControllerVirtualMachineService() { + ControllerVirtualMachineServiceImpl controllerVirtualMachineService = new ControllerVirtualMachineServiceImpl(); + return controllerVirtualMachineService; + } + + /** + * + * + * @generated + */ + public ServerRole createServerRoleFromString(EDataType eDataType, String initialValue) { + ServerRole result = ServerRole.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertServerRoleToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public ControllerPackage getControllerPackage() { + return (ControllerPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ControllerPackage getPackage() { + return ControllerPackage.eINSTANCE; + } + +} //ControllerFactoryImpl diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerPackageImpl.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerPackageImpl.java new file mode 100644 index 0000000..8725d12 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerPackageImpl.java @@ -0,0 +1,700 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller.impl; + +import org.openecomp.dcae.controller.core.service.ServicePackage; +import org.openecomp.dcae.controller.core.stream.StreamPackage; +import org.openecomp.dcae.controller.platform.controller.ControllerCluster; +import org.openecomp.dcae.controller.platform.controller.ControllerClusterServer; +import org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData; +import org.openecomp.dcae.controller.platform.controller.ControllerFactory; +import org.openecomp.dcae.controller.platform.controller.ControllerPackage; +import org.openecomp.dcae.controller.platform.controller.ControllerVirtualMachineService; +import org.openecomp.dcae.controller.platform.controller.DcaeDataBus; +import org.openecomp.dcae.controller.platform.controller.DcaePlatformController; +import org.openecomp.dcae.controller.platform.controller.ServerRole; +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.openecomp.ncomp.core.CorePackage; +import org.openecomp.ncomp.openstack.OpenstackPackage; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ControllerPackageImpl extends EPackageImpl implements ControllerPackage { + /** + * + * + * @generated + */ + private EClass dcaePlatformControllerEClass = null; + + /** + * + * + * @generated + */ + private EClass dcaeDataBusEClass = null; + + /** + * + * + * @generated + */ + private EClass controllerClusterEClass = null; + + /** + * + * + * @generated + */ + private EClass controllerClusterServerEClass = null; + + /** + * + * + * @generated + */ + private EClass controllerClusterServerDataEClass = null; + + /** + * + * + * @generated + */ + private EClass controllerVirtualMachineServiceEClass = null; + + /** + * + * + * @generated + */ + private EEnum serverRoleEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage#eNS_URI + * @see #init() + * @generated + */ + private ControllerPackageImpl() { + super(eNS_URI, ControllerFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ControllerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ControllerPackage init() { + if (isInited) return (ControllerPackage)EPackage.Registry.INSTANCE.getEPackage(ControllerPackage.eNS_URI); + + // Obtain or create and register package + ControllerPackageImpl theControllerPackage = (ControllerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ControllerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ControllerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + VmPackage.eINSTANCE.eClass(); + ServerPackage.eINSTANCE.eClass(); + OpenstackPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theControllerPackage.createPackageContents(); + + // Initialize created meta-data + theControllerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theControllerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ControllerPackage.eNS_URI, theControllerPackage); + return theControllerPackage; + } + + /** + * + * + * @generated + */ + public EClass getDcaePlatformController() { + return dcaePlatformControllerEClass; + } + + /** + * + * + * @generated + */ + public EReference getDcaePlatformController_Cluster() { + return (EReference)dcaePlatformControllerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getDcaePlatformController_Openstack() { + return (EReference)dcaePlatformControllerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getDcaePlatformController_Locations() { + return (EReference)dcaePlatformControllerEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getDcaePlatformController_Databus() { + return (EReference)dcaePlatformControllerEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getDcaePlatformController_Services() { + return (EReference)dcaePlatformControllerEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EReference getDcaePlatformController_Users() { + return (EReference)dcaePlatformControllerEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EReference getDcaePlatformController_Descriptors() { + return (EReference)dcaePlatformControllerEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getDcaePlatformController_AdminUsers() { + return (EReference)dcaePlatformControllerEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EOperation getDcaePlatformController__DeployDescriptor__String() { + return dcaePlatformControllerEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EOperation getDcaePlatformController__RefreshDataBus__String() { + return dcaePlatformControllerEClass.getEOperations().get(1); + } + + /** + * + * + * @generated + */ + public EClass getDcaeDataBus() { + return dcaeDataBusEClass; + } + + /** + * + * + * @generated + */ + public EReference getDcaeDataBus_Streams() { + return (EReference)dcaeDataBusEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getDcaeDataBus_Locations() { + return (EReference)dcaeDataBusEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getDcaeDataBus_MrClusters() { + return (EReference)dcaeDataBusEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getDcaeDataBus_DrNodes() { + return (EReference)dcaeDataBusEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getControllerCluster() { + return controllerClusterEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getControllerCluster_MyServerName() { + return (EAttribute)controllerClusterEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerCluster_Role() { + return (EAttribute)controllerClusterEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerCluster_StateTime() { + return (EAttribute)controllerClusterEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getControllerCluster_Servers() { + return (EReference)controllerClusterEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getControllerCluster_RemoteServers() { + return (EReference)controllerClusterEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EOperation getControllerCluster__PushData__String_String() { + return controllerClusterEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EOperation getControllerCluster__ReceiveData__String_String_Date_String() { + return controllerClusterEClass.getEOperations().get(1); + } + + /** + * + * + * @generated + */ + public EClass getControllerClusterServer() { + return controllerClusterServerEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getControllerClusterServer_Role() { + return (EAttribute)controllerClusterServerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getControllerClusterServer_Data() { + return (EReference)controllerClusterServerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getControllerClusterServer_Server() { + return (EReference)controllerClusterServerEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getControllerClusterServerData() { + return controllerClusterServerDataEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getControllerClusterServerData_PushInterval() { + return (EAttribute)controllerClusterServerDataEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerClusterServerData_LastPush() { + return (EAttribute)controllerClusterServerDataEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerClusterServerData_NumberDataPushes() { + return (EAttribute)controllerClusterServerDataEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerClusterServerData_NumberDataPushErrors() { + return (EAttribute)controllerClusterServerDataEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerClusterServerData_LastDataReceived() { + return (EAttribute)controllerClusterServerDataEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerClusterServerData_NumberDataReceived() { + return (EAttribute)controllerClusterServerDataEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerClusterServerData_NumberDataReceivedErrors() { + return (EAttribute)controllerClusterServerDataEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EClass getControllerVirtualMachineService() { + return controllerVirtualMachineServiceEClass; + } + + /** + * + * + * @generated + */ + public EEnum getServerRole() { + return serverRoleEEnum; + } + + /** + * + * + * @generated + */ + public ControllerFactory getControllerFactory() { + return (ControllerFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + dcaePlatformControllerEClass = createEClass(DCAE_PLATFORM_CONTROLLER); + createEReference(dcaePlatformControllerEClass, DCAE_PLATFORM_CONTROLLER__CLUSTER); + createEReference(dcaePlatformControllerEClass, DCAE_PLATFORM_CONTROLLER__OPENSTACK); + createEReference(dcaePlatformControllerEClass, DCAE_PLATFORM_CONTROLLER__LOCATIONS); + createEReference(dcaePlatformControllerEClass, DCAE_PLATFORM_CONTROLLER__DATABUS); + createEReference(dcaePlatformControllerEClass, DCAE_PLATFORM_CONTROLLER__DESCRIPTORS); + createEReference(dcaePlatformControllerEClass, DCAE_PLATFORM_CONTROLLER__SERVICES); + createEReference(dcaePlatformControllerEClass, DCAE_PLATFORM_CONTROLLER__USERS); + createEReference(dcaePlatformControllerEClass, DCAE_PLATFORM_CONTROLLER__ADMIN_USERS); + createEOperation(dcaePlatformControllerEClass, DCAE_PLATFORM_CONTROLLER___DEPLOY_DESCRIPTOR__STRING); + createEOperation(dcaePlatformControllerEClass, DCAE_PLATFORM_CONTROLLER___REFRESH_DATA_BUS__STRING); + + dcaeDataBusEClass = createEClass(DCAE_DATA_BUS); + createEReference(dcaeDataBusEClass, DCAE_DATA_BUS__STREAMS); + createEReference(dcaeDataBusEClass, DCAE_DATA_BUS__LOCATIONS); + createEReference(dcaeDataBusEClass, DCAE_DATA_BUS__MR_CLUSTERS); + createEReference(dcaeDataBusEClass, DCAE_DATA_BUS__DR_NODES); + + controllerClusterEClass = createEClass(CONTROLLER_CLUSTER); + createEAttribute(controllerClusterEClass, CONTROLLER_CLUSTER__MY_SERVER_NAME); + createEAttribute(controllerClusterEClass, CONTROLLER_CLUSTER__ROLE); + createEAttribute(controllerClusterEClass, CONTROLLER_CLUSTER__STATE_TIME); + createEReference(controllerClusterEClass, CONTROLLER_CLUSTER__SERVERS); + createEReference(controllerClusterEClass, CONTROLLER_CLUSTER__REMOTE_SERVERS); + createEOperation(controllerClusterEClass, CONTROLLER_CLUSTER___PUSH_DATA__STRING_STRING); + createEOperation(controllerClusterEClass, CONTROLLER_CLUSTER___RECEIVE_DATA__STRING_STRING_DATE_STRING); + + controllerClusterServerEClass = createEClass(CONTROLLER_CLUSTER_SERVER); + createEAttribute(controllerClusterServerEClass, CONTROLLER_CLUSTER_SERVER__ROLE); + createEReference(controllerClusterServerEClass, CONTROLLER_CLUSTER_SERVER__DATA); + createEReference(controllerClusterServerEClass, CONTROLLER_CLUSTER_SERVER__SERVER); + + controllerClusterServerDataEClass = createEClass(CONTROLLER_CLUSTER_SERVER_DATA); + createEAttribute(controllerClusterServerDataEClass, CONTROLLER_CLUSTER_SERVER_DATA__PUSH_INTERVAL); + createEAttribute(controllerClusterServerDataEClass, CONTROLLER_CLUSTER_SERVER_DATA__LAST_PUSH); + createEAttribute(controllerClusterServerDataEClass, CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_PUSHES); + createEAttribute(controllerClusterServerDataEClass, CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_PUSH_ERRORS); + createEAttribute(controllerClusterServerDataEClass, CONTROLLER_CLUSTER_SERVER_DATA__LAST_DATA_RECEIVED); + createEAttribute(controllerClusterServerDataEClass, CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_RECEIVED); + createEAttribute(controllerClusterServerDataEClass, CONTROLLER_CLUSTER_SERVER_DATA__NUMBER_DATA_RECEIVED_ERRORS); + + controllerVirtualMachineServiceEClass = createEClass(CONTROLLER_VIRTUAL_MACHINE_SERVICE); + + // Create enums + serverRoleEEnum = createEEnum(SERVER_ROLE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + ServerPackage theServerPackage = (ServerPackage)EPackage.Registry.INSTANCE.getEPackage(ServerPackage.eNS_URI); + OpenstackPackage theOpenstackPackage = (OpenstackPackage)EPackage.Registry.INSTANCE.getEPackage(OpenstackPackage.eNS_URI); + ServicePackage theServicePackage = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + StreamPackage theStreamPackage = (StreamPackage)EPackage.Registry.INSTANCE.getEPackage(StreamPackage.eNS_URI); + org.openecomp.dcae.controller.core.server.ServerPackage theServerPackage_1 = (org.openecomp.dcae.controller.core.server.ServerPackage)EPackage.Registry.INSTANCE.getEPackage(org.openecomp.dcae.controller.core.server.ServerPackage.eNS_URI); + VmPackage theVmPackage = (VmPackage)EPackage.Registry.INSTANCE.getEPackage(VmPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + dcaePlatformControllerEClass.getESuperTypes().add(theServerPackage.getSouthBoundApiWithProxy()); + dcaePlatformControllerEClass.getESuperTypes().add(theServerPackage.getAbstractManagementServer()); + controllerClusterServerEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + controllerClusterServerDataEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + controllerVirtualMachineServiceEClass.getESuperTypes().add(theVmPackage.getVirtualMachineService()); + + // Initialize classes, features, and operations; add parameters + initEClass(dcaePlatformControllerEClass, DcaePlatformController.class, "DcaePlatformController", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDcaePlatformController_Cluster(), this.getControllerCluster(), null, "cluster", null, 0, 1, DcaePlatformController.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDcaePlatformController_Openstack(), theOpenstackPackage.getOpenStackController(), null, "openstack", null, 0, 1, DcaePlatformController.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDcaePlatformController_Locations(), theServicePackage.getDcaeLocation(), null, "locations", null, 0, -1, DcaePlatformController.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getDcaePlatformController_Databus(), this.getDcaeDataBus(), null, "databus", null, 0, 1, DcaePlatformController.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDcaePlatformController_Descriptors(), theServicePackage.getDcaeServiceDescriptor(), null, "descriptors", null, 0, -1, DcaePlatformController.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getDcaePlatformController_Services(), theServicePackage.getDcaeService(), null, "services", null, 0, -1, DcaePlatformController.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getDcaePlatformController_Users(), theCorePackage.getUser(), null, "users", null, 0, -1, DcaePlatformController.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getDcaePlatformController_AdminUsers(), theCorePackage.getUser(), null, "adminUsers", null, 0, -1, DcaePlatformController.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + EOperation op = initEOperation(getDcaePlatformController__DeployDescriptor__String(), null, "deployDescriptor", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "name", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getDcaePlatformController__RefreshDataBus__String(), null, "refreshDataBus", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "nameMatch", 0, 1, !IS_UNIQUE, IS_ORDERED); + + initEClass(dcaeDataBusEClass, DcaeDataBus.class, "DcaeDataBus", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDcaeDataBus_Streams(), theStreamPackage.getDatabusStream(), null, "streams", null, 0, -1, DcaeDataBus.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getDcaeDataBus_Locations(), theStreamPackage.getDatabusLocation(), null, "locations", null, 0, -1, DcaeDataBus.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getDcaeDataBus_MrClusters(), theStreamPackage.getDatabusMessageRouterCluster(), null, "mrClusters", null, 0, -1, DcaeDataBus.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getDcaeDataBus_DrNodes(), theStreamPackage.getDatabusDataRouterNode(), null, "drNodes", null, 0, -1, DcaeDataBus.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(controllerClusterEClass, ControllerCluster.class, "ControllerCluster", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getControllerCluster_MyServerName(), theEcorePackage.getEString(), "myServerName", null, 0, 1, ControllerCluster.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerCluster_Role(), this.getServerRole(), "role", null, 0, 1, ControllerCluster.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerCluster_StateTime(), theCorePackage.getDateMetricAttribute(), "stateTime", null, 0, 1, ControllerCluster.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getControllerCluster_Servers(), this.getControllerClusterServer(), null, "servers", null, 0, -1, ControllerCluster.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getControllerCluster_RemoteServers(), this.getControllerClusterServer(), null, "remoteServers", null, 0, -1, ControllerCluster.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + op = initEOperation(getControllerCluster__PushData__String_String(), null, "pushData", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "serverName", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "dataName", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getControllerCluster__ReceiveData__String_String_Date_String(), null, "receiveData", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "serverName", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "dataName", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEDate(), "time", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "content", 0, 1, !IS_UNIQUE, IS_ORDERED); + + initEClass(controllerClusterServerEClass, ControllerClusterServer.class, "ControllerClusterServer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getControllerClusterServer_Role(), this.getServerRole(), "role", null, 0, 1, ControllerClusterServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getControllerClusterServer_Data(), this.getControllerClusterServerData(), null, "data", null, 0, -1, ControllerClusterServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getControllerClusterServer_Server(), theServerPackage_1.getDcaeBasicServer(), null, "server", null, 0, 1, ControllerClusterServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(controllerClusterServerDataEClass, ControllerClusterServerData.class, "ControllerClusterServerData", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getControllerClusterServerData_PushInterval(), theEcorePackage.getEString(), "pushInterval", "5min", 0, 1, ControllerClusterServerData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerClusterServerData_LastPush(), theCorePackage.getDateMetricAttribute(), "lastPush", null, 0, 1, ControllerClusterServerData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerClusterServerData_NumberDataPushes(), theCorePackage.getIncreasingULongMetricAttribute(), "numberDataPushes", null, 0, 1, ControllerClusterServerData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerClusterServerData_NumberDataPushErrors(), theCorePackage.getIncreasingULongMetricAttribute(), "numberDataPushErrors", null, 0, 1, ControllerClusterServerData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerClusterServerData_LastDataReceived(), theCorePackage.getDateMetricAttribute(), "lastDataReceived", null, 0, 1, ControllerClusterServerData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerClusterServerData_NumberDataReceived(), theCorePackage.getIncreasingULongMetricAttribute(), "numberDataReceived", null, 0, 1, ControllerClusterServerData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerClusterServerData_NumberDataReceivedErrors(), theCorePackage.getIncreasingULongMetricAttribute(), "numberDataReceivedErrors", null, 0, 1, ControllerClusterServerData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(controllerVirtualMachineServiceEClass, ControllerVirtualMachineService.class, "ControllerVirtualMachineService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Initialize enums and add enum literals + initEEnum(serverRoleEEnum, ServerRole.class, "ServerRole"); + addEEnumLiteral(serverRoleEEnum, ServerRole.UNKNOWN); + addEEnumLiteral(serverRoleEEnum, ServerRole.STANDALONE); + addEEnumLiteral(serverRoleEEnum, ServerRole.MASTER); + addEEnumLiteral(serverRoleEEnum, ServerRole.SLAVE); + + // Create resource + createResource(eNS_URI); + } + +} //ControllerPackageImpl diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerVirtualMachineServiceImpl.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerVirtualMachineServiceImpl.java new file mode 100644 index 0000000..9efe9bc --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/ControllerVirtualMachineServiceImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller.impl; + +import org.openecomp.dcae.controller.platform.controller.ControllerPackage; +import org.openecomp.dcae.controller.platform.controller.ControllerVirtualMachineService; + +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Virtual Machine Service'. + * + *

+ *

+ * + * @generated + */ +public class ControllerVirtualMachineServiceImpl extends VirtualMachineServiceImpl implements ControllerVirtualMachineService { + /** + * + * + * @generated + */ + protected ControllerVirtualMachineServiceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ControllerPackage.Literals.CONTROLLER_VIRTUAL_MACHINE_SERVICE; + } + +} //ControllerVirtualMachineServiceImpl diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/DcaeDataBusImpl.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/DcaeDataBusImpl.java new file mode 100644 index 0000000..eb17eff --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/DcaeDataBusImpl.java @@ -0,0 +1,276 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller.impl; + +import org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode; +import org.openecomp.dcae.controller.core.stream.DatabusLocation; +import org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster; +import org.openecomp.dcae.controller.core.stream.DatabusStream; +import org.openecomp.dcae.controller.platform.controller.ControllerPackage; +import org.openecomp.dcae.controller.platform.controller.DcaeDataBus; +import java.util.Collection; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Dcae Data Bus'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.DcaeDataBusImpl#getStreams Streams}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.DcaeDataBusImpl#getLocations Locations}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.DcaeDataBusImpl#getMrClusters Mr Clusters}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.DcaeDataBusImpl#getDrNodes Dr Nodes}
  • + *
+ *

+ * + * @generated + */ +public class DcaeDataBusImpl extends MinimalEObjectImpl.Container implements DcaeDataBus { + /** + * The cached value of the '{@link #getStreams() Streams}' containment reference list. + * + * + * @see #getStreams() + * @generated + * @ordered + */ + protected EList streams; + + /** + * The cached value of the '{@link #getLocations() Locations}' containment reference list. + * + * + * @see #getLocations() + * @generated + * @ordered + */ + protected EList locations; + /** + * The cached value of the '{@link #getMrClusters() Mr Clusters}' containment reference list. + * + * + * @see #getMrClusters() + * @generated + * @ordered + */ + protected EList mrClusters; + /** + * The cached value of the '{@link #getDrNodes() Dr Nodes}' containment reference list. + * + * + * @see #getDrNodes() + * @generated + * @ordered + */ + protected EList drNodes; + + /** + * + * + * @generated + */ + protected DcaeDataBusImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ControllerPackage.Literals.DCAE_DATA_BUS; + } + + /** + * + * + * @generated + */ + public EList getStreams() { + if (streams == null) { + streams = new EObjectContainmentEList(DatabusStream.class, this, ControllerPackage.DCAE_DATA_BUS__STREAMS); + } + return streams; + } + + /** + * + * + * @generated + */ + public EList getLocations() { + if (locations == null) { + locations = new EObjectContainmentEList(DatabusLocation.class, this, ControllerPackage.DCAE_DATA_BUS__LOCATIONS); + } + return locations; + } + + /** + * + * + * @generated + */ + public EList getMrClusters() { + if (mrClusters == null) { + mrClusters = new EObjectContainmentEList(DatabusMessageRouterCluster.class, this, ControllerPackage.DCAE_DATA_BUS__MR_CLUSTERS); + } + return mrClusters; + } + + /** + * + * + * @generated + */ + public EList getDrNodes() { + if (drNodes == null) { + drNodes = new EObjectContainmentEList(DatabusDataRouterNode.class, this, ControllerPackage.DCAE_DATA_BUS__DR_NODES); + } + return drNodes; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ControllerPackage.DCAE_DATA_BUS__STREAMS: + return ((InternalEList)getStreams()).basicRemove(otherEnd, msgs); + case ControllerPackage.DCAE_DATA_BUS__LOCATIONS: + return ((InternalEList)getLocations()).basicRemove(otherEnd, msgs); + case ControllerPackage.DCAE_DATA_BUS__MR_CLUSTERS: + return ((InternalEList)getMrClusters()).basicRemove(otherEnd, msgs); + case ControllerPackage.DCAE_DATA_BUS__DR_NODES: + return ((InternalEList)getDrNodes()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ControllerPackage.DCAE_DATA_BUS__STREAMS: + return getStreams(); + case ControllerPackage.DCAE_DATA_BUS__LOCATIONS: + return getLocations(); + case ControllerPackage.DCAE_DATA_BUS__MR_CLUSTERS: + return getMrClusters(); + case ControllerPackage.DCAE_DATA_BUS__DR_NODES: + return getDrNodes(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ControllerPackage.DCAE_DATA_BUS__STREAMS: + getStreams().clear(); + getStreams().addAll((Collection)newValue); + return; + case ControllerPackage.DCAE_DATA_BUS__LOCATIONS: + getLocations().clear(); + getLocations().addAll((Collection)newValue); + return; + case ControllerPackage.DCAE_DATA_BUS__MR_CLUSTERS: + getMrClusters().clear(); + getMrClusters().addAll((Collection)newValue); + return; + case ControllerPackage.DCAE_DATA_BUS__DR_NODES: + getDrNodes().clear(); + getDrNodes().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ControllerPackage.DCAE_DATA_BUS__STREAMS: + getStreams().clear(); + return; + case ControllerPackage.DCAE_DATA_BUS__LOCATIONS: + getLocations().clear(); + return; + case ControllerPackage.DCAE_DATA_BUS__MR_CLUSTERS: + getMrClusters().clear(); + return; + case ControllerPackage.DCAE_DATA_BUS__DR_NODES: + getDrNodes().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ControllerPackage.DCAE_DATA_BUS__STREAMS: + return streams != null && !streams.isEmpty(); + case ControllerPackage.DCAE_DATA_BUS__LOCATIONS: + return locations != null && !locations.isEmpty(); + case ControllerPackage.DCAE_DATA_BUS__MR_CLUSTERS: + return mrClusters != null && !mrClusters.isEmpty(); + case ControllerPackage.DCAE_DATA_BUS__DR_NODES: + return drNodes != null && !drNodes.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //DcaeDataBusImpl diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/DcaePlatformControllerImpl.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/DcaePlatformControllerImpl.java new file mode 100644 index 0000000..6827e84 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/impl/DcaePlatformControllerImpl.java @@ -0,0 +1,835 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller.impl; + +import org.openecomp.dcae.controller.core.service.DcaeLocation; +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; +import org.openecomp.dcae.controller.platform.controller.ControllerCluster; +import org.openecomp.dcae.controller.platform.controller.ControllerPackage; +import org.openecomp.dcae.controller.platform.controller.DcaeDataBus; +import org.openecomp.dcae.controller.platform.controller.DcaePlatformController; +import org.openecomp.ncomp.component.Component; +import org.openecomp.ncomp.core.User; +import org.openecomp.ncomp.core.function.Function; +import org.openecomp.ncomp.core.function.ValuePair; +import org.openecomp.ncomp.core.logs.LogMessage; +import org.openecomp.ncomp.core.metrics.DoubleMetric; +import org.openecomp.ncomp.core.metrics.MetricValueOption; +import org.openecomp.ncomp.openstack.OpenStackController; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration; +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import org.openecomp.ncomp.sirius.manager.server.impl.SouthBoundApiWithProxyImpl; +import java.lang.reflect.InvocationTargetException; +import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.json.JSONObject; + +/** + * + * An implementation of the model object 'Dcae Platform Controller'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl#getConfiguration Configuration}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl#getComponent Component}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl#getCluster Cluster}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl#getOpenstack Openstack}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl#getLocations Locations}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl#getDatabus Databus}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl#getDescriptors Descriptors}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl#getServices Services}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl#getUsers Users}
  • + *
  • {@link org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl#getAdminUsers Admin Users}
  • + *
+ *

+ * + * @generated + */ +public class DcaePlatformControllerImpl extends SouthBoundApiWithProxyImpl implements DcaePlatformController { + /** + * The cached value of the '{@link #getConfiguration() Configuration}' containment reference. + * + * + * @see #getConfiguration() + * @generated + * @ordered + */ + protected AbstractManagementServerConfiguration configuration; + + /** + * The cached value of the '{@link #getComponent() Component}' containment reference. + * + * + * @see #getComponent() + * @generated + * @ordered + */ + protected Component component; + + /** + * The cached value of the '{@link #getCluster() Cluster}' containment reference. + * + * + * @see #getCluster() + * @generated + * @ordered + */ + protected ControllerCluster cluster; + + /** + * The cached value of the '{@link #getOpenstack() Openstack}' containment reference. + * + * + * @see #getOpenstack() + * @generated + * @ordered + */ + protected OpenStackController openstack; + + /** + * The cached value of the '{@link #getLocations() Locations}' containment reference list. + * + * + * @see #getLocations() + * @generated + * @ordered + */ + protected EList locations; + + /** + * The cached value of the '{@link #getDatabus() Databus}' containment reference. + * + * + * @see #getDatabus() + * @generated + * @ordered + */ + protected DcaeDataBus databus; + + /** + * The cached value of the '{@link #getDescriptors() Descriptors}' containment reference list. + * + * + * @see #getDescriptors() + * @generated + * @ordered + */ + protected EList descriptors; + + /** + * The cached value of the '{@link #getServices() Services}' containment reference list. + * + * + * @see #getServices() + * @generated + * @ordered + */ + protected EList services; + + /** + * The cached value of the '{@link #getUsers() Users}' containment reference list. + * + * + * @see #getUsers() + * @generated + * @ordered + */ + protected EList users; + + /** + * The cached value of the '{@link #getAdminUsers() Admin Users}' reference list. + * + * + * @see #getAdminUsers() + * @generated + * @ordered + */ + protected EList adminUsers; + + /** + * + * + * @generated + */ + protected DcaePlatformControllerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ControllerPackage.Literals.DCAE_PLATFORM_CONTROLLER; + } + + /** + * + * + * @generated + */ + public AbstractManagementServerConfiguration getConfiguration() { + return configuration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetConfiguration(AbstractManagementServerConfiguration newConfiguration, NotificationChain msgs) { + AbstractManagementServerConfiguration oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ControllerPackage.DCAE_PLATFORM_CONTROLLER__CONFIGURATION, oldConfiguration, newConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setConfiguration(AbstractManagementServerConfiguration newConfiguration) { + if (newConfiguration != configuration) { + NotificationChain msgs = null; + if (configuration != null) + msgs = ((InternalEObject)configuration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ControllerPackage.DCAE_PLATFORM_CONTROLLER__CONFIGURATION, null, msgs); + if (newConfiguration != null) + msgs = ((InternalEObject)newConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ControllerPackage.DCAE_PLATFORM_CONTROLLER__CONFIGURATION, null, msgs); + msgs = basicSetConfiguration(newConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.DCAE_PLATFORM_CONTROLLER__CONFIGURATION, newConfiguration, newConfiguration)); + } + + /** + * + * + * @generated + */ + public Component getComponent() { + return component; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetComponent(Component newComponent, NotificationChain msgs) { + Component oldComponent = component; + component = newComponent; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ControllerPackage.DCAE_PLATFORM_CONTROLLER__COMPONENT, oldComponent, newComponent); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setComponent(Component newComponent) { + if (newComponent != component) { + NotificationChain msgs = null; + if (component != null) + msgs = ((InternalEObject)component).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ControllerPackage.DCAE_PLATFORM_CONTROLLER__COMPONENT, null, msgs); + if (newComponent != null) + msgs = ((InternalEObject)newComponent).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ControllerPackage.DCAE_PLATFORM_CONTROLLER__COMPONENT, null, msgs); + msgs = basicSetComponent(newComponent, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.DCAE_PLATFORM_CONTROLLER__COMPONENT, newComponent, newComponent)); + } + + /** + * + * + * @generated + */ + public ControllerCluster getCluster() { + return cluster; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetCluster(ControllerCluster newCluster, NotificationChain msgs) { + ControllerCluster oldCluster = cluster; + cluster = newCluster; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ControllerPackage.DCAE_PLATFORM_CONTROLLER__CLUSTER, oldCluster, newCluster); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setCluster(ControllerCluster newCluster) { + if (newCluster != cluster) { + NotificationChain msgs = null; + if (cluster != null) + msgs = ((InternalEObject)cluster).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ControllerPackage.DCAE_PLATFORM_CONTROLLER__CLUSTER, null, msgs); + if (newCluster != null) + msgs = ((InternalEObject)newCluster).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ControllerPackage.DCAE_PLATFORM_CONTROLLER__CLUSTER, null, msgs); + msgs = basicSetCluster(newCluster, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.DCAE_PLATFORM_CONTROLLER__CLUSTER, newCluster, newCluster)); + } + + /** + * + * + * @generated + */ + public OpenStackController getOpenstack() { + return openstack; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetOpenstack(OpenStackController newOpenstack, NotificationChain msgs) { + OpenStackController oldOpenstack = openstack; + openstack = newOpenstack; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ControllerPackage.DCAE_PLATFORM_CONTROLLER__OPENSTACK, oldOpenstack, newOpenstack); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setOpenstack(OpenStackController newOpenstack) { + if (newOpenstack != openstack) { + NotificationChain msgs = null; + if (openstack != null) + msgs = ((InternalEObject)openstack).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ControllerPackage.DCAE_PLATFORM_CONTROLLER__OPENSTACK, null, msgs); + if (newOpenstack != null) + msgs = ((InternalEObject)newOpenstack).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ControllerPackage.DCAE_PLATFORM_CONTROLLER__OPENSTACK, null, msgs); + msgs = basicSetOpenstack(newOpenstack, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.DCAE_PLATFORM_CONTROLLER__OPENSTACK, newOpenstack, newOpenstack)); + } + + /** + * + * + * @generated + */ + public EList getLocations() { + if (locations == null) { + locations = new EObjectContainmentEList(DcaeLocation.class, this, ControllerPackage.DCAE_PLATFORM_CONTROLLER__LOCATIONS); + } + return locations; + } + + /** + * + * + * @generated + */ + public DcaeDataBus getDatabus() { + return databus; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetDatabus(DcaeDataBus newDatabus, NotificationChain msgs) { + DcaeDataBus oldDatabus = databus; + databus = newDatabus; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ControllerPackage.DCAE_PLATFORM_CONTROLLER__DATABUS, oldDatabus, newDatabus); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setDatabus(DcaeDataBus newDatabus) { + if (newDatabus != databus) { + NotificationChain msgs = null; + if (databus != null) + msgs = ((InternalEObject)databus).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ControllerPackage.DCAE_PLATFORM_CONTROLLER__DATABUS, null, msgs); + if (newDatabus != null) + msgs = ((InternalEObject)newDatabus).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ControllerPackage.DCAE_PLATFORM_CONTROLLER__DATABUS, null, msgs); + msgs = basicSetDatabus(newDatabus, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllerPackage.DCAE_PLATFORM_CONTROLLER__DATABUS, newDatabus, newDatabus)); + } + + /** + * + * + * @generated + */ + public EList getServices() { + if (services == null) { + services = new EObjectContainmentEList(DcaeService.class, this, ControllerPackage.DCAE_PLATFORM_CONTROLLER__SERVICES); + } + return services; + } + + /** + * + * + * @generated + */ + public EList getUsers() { + if (users == null) { + users = new EObjectContainmentEList(User.class, this, ControllerPackage.DCAE_PLATFORM_CONTROLLER__USERS); + } + return users; + } + + /** + * + * + * @generated + */ + public EList getDescriptors() { + if (descriptors == null) { + descriptors = new EObjectContainmentEList(DcaeServiceDescriptor.class, this, ControllerPackage.DCAE_PLATFORM_CONTROLLER__DESCRIPTORS); + } + return descriptors; + } + + /** + * + * + * @generated + */ + public EList getAdminUsers() { + if (adminUsers == null) { + adminUsers = new EObjectResolvingEList(User.class, this, ControllerPackage.DCAE_PLATFORM_CONTROLLER__ADMIN_USERS); + } + return adminUsers; + } + + /** + * + * + * @generated + */ + public void deployDescriptor(String name) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void refreshDataBus(String nameMatch) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EList getValues(JSONObject cx, String path, Long start, Long end, MetricValueOption option, boolean relativeInterval) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EList getValuesAll(JSONObject cx, String path, EList metrics, Long start, Long end, MetricValueOption option, boolean relativeInterval) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EList getMessages(JSONObject cx, String path, Long start, Long end) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public LoggerInfo getRequestLogger(String userName, String action, String resourcePath, JSONObject context) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EList evaluate(String path, Function function) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void update(String path, Function function) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__CONFIGURATION: + return basicSetConfiguration(null, msgs); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__COMPONENT: + return basicSetComponent(null, msgs); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__CLUSTER: + return basicSetCluster(null, msgs); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__OPENSTACK: + return basicSetOpenstack(null, msgs); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__LOCATIONS: + return ((InternalEList)getLocations()).basicRemove(otherEnd, msgs); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__DATABUS: + return basicSetDatabus(null, msgs); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__DESCRIPTORS: + return ((InternalEList)getDescriptors()).basicRemove(otherEnd, msgs); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__SERVICES: + return ((InternalEList)getServices()).basicRemove(otherEnd, msgs); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__USERS: + return ((InternalEList)getUsers()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__CONFIGURATION: + return getConfiguration(); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__COMPONENT: + return getComponent(); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__CLUSTER: + return getCluster(); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__OPENSTACK: + return getOpenstack(); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__LOCATIONS: + return getLocations(); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__DATABUS: + return getDatabus(); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__DESCRIPTORS: + return getDescriptors(); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__SERVICES: + return getServices(); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__USERS: + return getUsers(); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__ADMIN_USERS: + return getAdminUsers(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__CONFIGURATION: + setConfiguration((AbstractManagementServerConfiguration)newValue); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__COMPONENT: + setComponent((Component)newValue); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__CLUSTER: + setCluster((ControllerCluster)newValue); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__OPENSTACK: + setOpenstack((OpenStackController)newValue); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__LOCATIONS: + getLocations().clear(); + getLocations().addAll((Collection)newValue); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__DATABUS: + setDatabus((DcaeDataBus)newValue); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__DESCRIPTORS: + getDescriptors().clear(); + getDescriptors().addAll((Collection)newValue); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__SERVICES: + getServices().clear(); + getServices().addAll((Collection)newValue); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__USERS: + getUsers().clear(); + getUsers().addAll((Collection)newValue); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__ADMIN_USERS: + getAdminUsers().clear(); + getAdminUsers().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__CONFIGURATION: + setConfiguration((AbstractManagementServerConfiguration)null); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__COMPONENT: + setComponent((Component)null); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__CLUSTER: + setCluster((ControllerCluster)null); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__OPENSTACK: + setOpenstack((OpenStackController)null); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__LOCATIONS: + getLocations().clear(); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__DATABUS: + setDatabus((DcaeDataBus)null); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__DESCRIPTORS: + getDescriptors().clear(); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__SERVICES: + getServices().clear(); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__USERS: + getUsers().clear(); + return; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__ADMIN_USERS: + getAdminUsers().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__CONFIGURATION: + return configuration != null; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__COMPONENT: + return component != null; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__CLUSTER: + return cluster != null; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__OPENSTACK: + return openstack != null; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__LOCATIONS: + return locations != null && !locations.isEmpty(); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__DATABUS: + return databus != null; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__DESCRIPTORS: + return descriptors != null && !descriptors.isEmpty(); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__SERVICES: + return services != null && !services.isEmpty(); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__USERS: + return users != null && !users.isEmpty(); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__ADMIN_USERS: + return adminUsers != null && !adminUsers.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == AbstractManagementServer.class) { + switch (derivedFeatureID) { + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__CONFIGURATION: return ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER__COMPONENT: return ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == AbstractManagementServer.class) { + switch (baseFeatureID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION: return ControllerPackage.DCAE_PLATFORM_CONTROLLER__CONFIGURATION; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT: return ControllerPackage.DCAE_PLATFORM_CONTROLLER__COMPONENT; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedOperationID(int baseOperationID, Class baseClass) { + if (baseClass == AbstractManagementServer.class) { + switch (baseOperationID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN: return ControllerPackage.DCAE_PLATFORM_CONTROLLER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN: return ControllerPackage.DCAE_PLATFORM_CONTROLLER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG: return ControllerPackage.DCAE_PLATFORM_CONTROLLER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT: return ControllerPackage.DCAE_PLATFORM_CONTROLLER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___EVALUATE__STRING_FUNCTION: return ControllerPackage.DCAE_PLATFORM_CONTROLLER___EVALUATE__STRING_FUNCTION; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___UPDATE__STRING_FUNCTION: return ControllerPackage.DCAE_PLATFORM_CONTROLLER___UPDATE__STRING_FUNCTION; + default: return -1; + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + @SuppressWarnings("unchecked") + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ControllerPackage.DCAE_PLATFORM_CONTROLLER___DEPLOY_DESCRIPTOR__STRING: + deployDescriptor((String)arguments.get(0)); + return null; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER___REFRESH_DATA_BUS__STRING: + refreshDataBus((String)arguments.get(0)); + return null; + case ControllerPackage.DCAE_PLATFORM_CONTROLLER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN: + return getValues((JSONObject)arguments.get(0), (String)arguments.get(1), (Long)arguments.get(2), (Long)arguments.get(3), (MetricValueOption)arguments.get(4), (Boolean)arguments.get(5)); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN: + return getValuesAll((JSONObject)arguments.get(0), (String)arguments.get(1), (EList)arguments.get(2), (Long)arguments.get(3), (Long)arguments.get(4), (MetricValueOption)arguments.get(5), (Boolean)arguments.get(6)); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG: + return getMessages((JSONObject)arguments.get(0), (String)arguments.get(1), (Long)arguments.get(2), (Long)arguments.get(3)); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT: + return getRequestLogger((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (JSONObject)arguments.get(3)); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER___EVALUATE__STRING_FUNCTION: + return evaluate((String)arguments.get(0), (Function)arguments.get(1)); + case ControllerPackage.DCAE_PLATFORM_CONTROLLER___UPDATE__STRING_FUNCTION: + update((String)arguments.get(0), (Function)arguments.get(1)); + return null; + } + return super.eInvoke(operationID, arguments); + } + +} //DcaePlatformControllerImpl diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/util/ControllerAdapterFactory.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/util/ControllerAdapterFactory.java new file mode 100644 index 0000000..7f54b1a --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/util/ControllerAdapterFactory.java @@ -0,0 +1,346 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.platform.controller.*; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.ncomp.core.NamedEntity; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage + * @generated + */ +public class ControllerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ControllerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ControllerAdapterFactory() { + if (modelPackage == null) { + modelPackage = ControllerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ControllerSwitch modelSwitch = + new ControllerSwitch() { + @Override + public Adapter caseDcaePlatformController(DcaePlatformController object) { + return createDcaePlatformControllerAdapter(); + } + @Override + public Adapter caseDcaeDataBus(DcaeDataBus object) { + return createDcaeDataBusAdapter(); + } + @Override + public Adapter caseControllerCluster(ControllerCluster object) { + return createControllerClusterAdapter(); + } + @Override + public Adapter caseControllerClusterServer(ControllerClusterServer object) { + return createControllerClusterServerAdapter(); + } + @Override + public Adapter caseControllerClusterServerData(ControllerClusterServerData object) { + return createControllerClusterServerDataAdapter(); + } + @Override + public Adapter caseControllerVirtualMachineService(ControllerVirtualMachineService object) { + return createControllerVirtualMachineServiceAdapter(); + } + @Override + public Adapter caseSouthBoundApi(SouthBoundApi object) { + return createSouthBoundApiAdapter(); + } + @Override + public Adapter caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return createSouthBoundApiWithProxyAdapter(); + } + @Override + public Adapter caseAbstractManagementServer(AbstractManagementServer object) { + return createAbstractManagementServerAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseDcaeService(DcaeService object) { + return createDcaeServiceAdapter(); + } + @Override + public Adapter caseVirtualMachineService(VirtualMachineService object) { + return createVirtualMachineServiceAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.platform.controller.DcaePlatformController Dcae Platform Controller}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.platform.controller.DcaePlatformController + * @generated + */ + public Adapter createDcaePlatformControllerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.platform.controller.DcaeDataBus Dcae Data Bus}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.platform.controller.DcaeDataBus + * @generated + */ + public Adapter createDcaeDataBusAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.platform.controller.ControllerCluster Cluster}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.platform.controller.ControllerCluster + * @generated + */ + public Adapter createControllerClusterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServer Cluster Server}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.platform.controller.ControllerClusterServer + * @generated + */ + public Adapter createControllerClusterServerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData Cluster Server Data}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData + * @generated + */ + public Adapter createControllerClusterServerDataAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.platform.controller.ControllerVirtualMachineService Virtual Machine Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.platform.controller.ControllerVirtualMachineService + * @generated + */ + public Adapter createControllerVirtualMachineServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApi South Bound Api}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApi + * @generated + */ + public Adapter createSouthBoundApiAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy South Bound Api With Proxy}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy + * @generated + */ + public Adapter createSouthBoundApiWithProxyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer Abstract Management Server}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer + * @generated + */ + public Adapter createAbstractManagementServerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeService Dcae Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeService + * @generated + */ + public Adapter createDcaeServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService Virtual Machine Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService + * @generated + */ + public Adapter createVirtualMachineServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ControllerAdapterFactory diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/util/ControllerSwitch.java b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/util/ControllerSwitch.java new file mode 100644 index 0000000..cb46d3c --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore-gen/org/openecomp/dcae/controller/platform/controller/util/ControllerSwitch.java @@ -0,0 +1,341 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.platform.controller.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.platform.controller.*; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.ncomp.core.NamedEntity; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.platform.controller.ControllerPackage + * @generated + */ +public class ControllerSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ControllerPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ControllerSwitch() { + if (modelPackage == null) { + modelPackage = ControllerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ControllerPackage.DCAE_PLATFORM_CONTROLLER: { + DcaePlatformController dcaePlatformController = (DcaePlatformController)theEObject; + T result = caseDcaePlatformController(dcaePlatformController); + if (result == null) result = caseAbstractManagementServer(dcaePlatformController); + if (result == null) result = caseSouthBoundApiWithProxy(dcaePlatformController); + if (result == null) result = caseSouthBoundApi(dcaePlatformController); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ControllerPackage.DCAE_DATA_BUS: { + DcaeDataBus dcaeDataBus = (DcaeDataBus)theEObject; + T result = caseDcaeDataBus(dcaeDataBus); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ControllerPackage.CONTROLLER_CLUSTER: { + ControllerCluster controllerCluster = (ControllerCluster)theEObject; + T result = caseControllerCluster(controllerCluster); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ControllerPackage.CONTROLLER_CLUSTER_SERVER: { + ControllerClusterServer controllerClusterServer = (ControllerClusterServer)theEObject; + T result = caseControllerClusterServer(controllerClusterServer); + if (result == null) result = caseNamedEntity(controllerClusterServer); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ControllerPackage.CONTROLLER_CLUSTER_SERVER_DATA: { + ControllerClusterServerData controllerClusterServerData = (ControllerClusterServerData)theEObject; + T result = caseControllerClusterServerData(controllerClusterServerData); + if (result == null) result = caseNamedEntity(controllerClusterServerData); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ControllerPackage.CONTROLLER_VIRTUAL_MACHINE_SERVICE: { + ControllerVirtualMachineService controllerVirtualMachineService = (ControllerVirtualMachineService)theEObject; + T result = caseControllerVirtualMachineService(controllerVirtualMachineService); + if (result == null) result = caseVirtualMachineService(controllerVirtualMachineService); + if (result == null) result = caseDcaeService(controllerVirtualMachineService); + if (result == null) result = caseNamedEntity(controllerVirtualMachineService); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Platform Controller'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Platform Controller'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaePlatformController(DcaePlatformController object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Data Bus'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Data Bus'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeDataBus(DcaeDataBus object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Cluster'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Cluster'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseControllerCluster(ControllerCluster object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Cluster Server'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Cluster Server'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseControllerClusterServer(ControllerClusterServer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Cluster Server Data'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Cluster Server Data'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseControllerClusterServerData(ControllerClusterServerData object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseControllerVirtualMachineService(ControllerVirtualMachineService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'South Bound Api'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'South Bound Api'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApi(SouthBoundApi object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'South Bound Api With Proxy'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'South Bound Api With Proxy'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Abstract Management Server'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Abstract Management Server'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAbstractManagementServer(AbstractManagementServer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeService(DcaeService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineService(VirtualMachineService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ControllerSwitch diff --git a/dcae-controller-core/dcae-controller-platform-model/src/main/xcore/controller.xcore b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore/controller.xcore new file mode 100644 index 0000000..7b243b0 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-model/src/main/xcore/controller.xcore @@ -0,0 +1,95 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-platform-model/src/main/xcore-gen") + +package org.openecomp.dcae.controller.platform.controller + +import org.openecomp.dcae.controller.core.service.DcaeLocation +import org.openecomp.dcae.controller.core.service.DcaeService +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor +import org.openecomp.dcae.controller.core.stream.DatabusStream +import org.openecomp.ncomp.core.DateMetricAttribute +import org.openecomp.ncomp.core.IncreasingULongMetricAttribute +import org.openecomp.ncomp.core.NamedEntity +import org.openecomp.ncomp.core.User +import org.openecomp.ncomp.openstack.OpenStackController +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy +import org.openecomp.dcae.controller.core.server.DcaeBasicServer +import org.openecomp.dcae.controller.core.stream.DatabusLocation +import org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster +import org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode +import org.openecomp.dcae.controller.service.vm.VirtualMachineService + +class DcaePlatformController extends SouthBoundApiWithProxy, AbstractManagementServer { + contains ControllerCluster cluster + contains OpenStackController openstack + contains unordered DcaeLocation[] locations + contains DcaeDataBus databus + contains unordered DcaeServiceDescriptor[] descriptors + contains unordered DcaeService[] services + contains unordered User[] users + refers User[] adminUsers + op void deployDescriptor(String name) + op void refreshDataBus(String nameMatch) +} + +class DcaeDataBus { + contains unordered DatabusStream[] streams + contains unordered DatabusLocation[] locations + contains unordered DatabusMessageRouterCluster[] mrClusters + contains unordered DatabusDataRouterNode[] drNodes +} + +enum ServerRole { + UNKNOWN, STANDALONE, MASTER, SLAVE +} + +class ControllerCluster { + String myServerName + ServerRole role + DateMetricAttribute stateTime + contains ControllerClusterServer[] servers + contains ControllerClusterServer[] remoteServers + op void pushData(String serverName, String dataName) + op void receiveData(String serverName, String dataName, Date time, String content) +} + +class ControllerClusterServer extends NamedEntity { + ServerRole role + contains ControllerClusterServerData[] data + refers DcaeBasicServer server +} + +class ControllerClusterServerData extends NamedEntity { + String pushInterval = "5min" + DateMetricAttribute lastPush + IncreasingULongMetricAttribute numberDataPushes + IncreasingULongMetricAttribute numberDataPushErrors + DateMetricAttribute lastDataReceived + IncreasingULongMetricAttribute numberDataReceived + IncreasingULongMetricAttribute numberDataReceivedErrors +} + +class ControllerVirtualMachineService extends VirtualMachineService { + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/.classpath b/dcae-controller-core/dcae-controller-platform-server/.classpath new file mode 100644 index 0000000..5d4cb9c --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/.classpath @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-core/dcae-controller-platform-server/.gitignore b/dcae-controller-core/dcae-controller-platform-server/.gitignore new file mode 100644 index 0000000..eefdc10 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/.gitignore @@ -0,0 +1,3 @@ +/target/ +.*.sw? +/config/ diff --git a/dcae-controller-core/dcae-controller-platform-server/.project b/dcae-controller-core/dcae-controller-platform-server/.project new file mode 100644 index 0000000..68e4826 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/.project @@ -0,0 +1,35 @@ + + + dcae-controller-platform-server + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/dcae-controller-core/dcae-controller-platform-server/.settings/org.eclipse.core.resources.prefs b/dcae-controller-core/dcae-controller-platform-server/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/dcae-controller-core/dcae-controller-platform-server/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-core/dcae-controller-platform-server/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-core/dcae-controller-platform-server/.settings/org.eclipse.jdt.groovy.core.prefs b/dcae-controller-core/dcae-controller-platform-server/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/dcae-controller-core/dcae-controller-platform-server/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-core/dcae-controller-platform-server/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-core/dcae-controller-platform-server/LICENSE.txt b/dcae-controller-core/dcae-controller-platform-server/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-core/dcae-controller-platform-server/META-INF/MANIFEST.MF b/dcae-controller-core/dcae-controller-platform-server/META-INF/MANIFEST.MF new file mode 100644 index 0000000..c8db2b0 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/META-INF/MANIFEST.MF @@ -0,0 +1,21 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: dcae-controller-platform-server +Bundle-SymbolicName: dcae-controller-platform-server +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.dcae.controller.platform.server.tools, + org.openecomp.dcae.controller.platform.servers.controller +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + dcae-controller-platform-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + ncomp-openstack-controller;bundle-version="0.1.0", + ncomp-openstack-model;bundle-version="0.1.0", + dcae-controller-core-model;bundle-version="0.1.0", + dcae-controller-service-vm-model, + operation-utils;bundle-version="0.1.0", + dcae-controller-service-cdap-model, + dcae-controller-service-docker-model diff --git a/dcae-controller-core/dcae-controller-platform-server/build.properties b/dcae-controller-core/dcae-controller-platform-server/build.properties new file mode 100644 index 0000000..e704e8b --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/build.properties @@ -0,0 +1,6 @@ +source.. = src/main/java/,\ + src/main/sirius-gen/ +bin.includes = META-INF/,\ + . +output.. = bin/,\ + target/classes/ diff --git a/dcae-controller-core/dcae-controller-platform-server/pom.xml b/dcae-controller-core/dcae-controller-platform-server/pom.xml new file mode 100644 index 0000000..4fa9c14 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/pom.xml @@ -0,0 +1,179 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-platform-server + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-base + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-base + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-assembly-plugin + 2.6 + + + zipfile + + single + + package + + false + ${project.artifactId}-${project.version} + + src/assembly/assemble_zip.xml + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/lib + false + true + true + false + false + false + org.opendaylight,com.brocade.odl,ch.qos.logback,org.bouncycastle + runtime + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + attach-artifacts + package + + attach-artifact + + + + + target/${project.artifactId}-${project.version}-runtime.zip + zip + runtime + + + + + + + + + + + + org.openecomp.dcae.controller + dcae-controller-platform-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-vm-model + ${project.version} + + + org.openecomp.ncomp.openstack + ncomp-openstack-controller + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-vm-adaptor + ${project.version} + + + org.openecomp.dcae.operation + operation-utils + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-core-utils + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-cdap-adaptor + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-docker-adaptor + ${project.version} + + + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/assembly/assemble_zip.xml b/dcae-controller-core/dcae-controller-platform-server/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..298661d --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/assembly/assemble_zip.xml @@ -0,0 +1,62 @@ + + + + runtime + + zip + + + + false + + + + target + lib + + dcae-controller-platform-server-${project.version}.jar + + + + target/assembly/ + . + + + + + . + lib + + *.jar + + + + src/main/server-gen/bin + bin + 0744 + + + + + src/main/server/bin + bin + 0744 + + + + + src/main/server-gen/scripts + scripts + + + src/main/server/scripts + scripts + + + + + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/server/tools/Generator.java b/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/server/tools/Generator.java new file mode 100644 index 0000000..d9bd272 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/server/tools/Generator.java @@ -0,0 +1,79 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.platform.server.tools; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelFactory; +import org.openecomp.ncomp.sirius.manager.generator.ControllerGenerator; +import org.openecomp.ncomp.gwt.siriusportal.model.*; +import org.openecomp.dcae.controller.platform.controller.ControllerFactory; +import org.openecomp.dcae.controller.service.vm.VmFactory; +import org.openecomp.utils.YamlToJava; + + +public class Generator { + + /** + * @param args + */ + public static void main(String[] args) { + EObject o = ControllerFactory.eINSTANCE.createDcaePlatformController(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix(); + dir= "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerPlatformServer"); + m.setTitle("ControllerPlatformServer"); + ControllerGenerator g = new ControllerGenerator(o,m); + g.setEnableIRequestHandler(true); + g.setEnableISiriusPlugin(true); + g.setEnableISwaggerHandler(true); + EObject cluster = ControllerFactory.eINSTANCE.createControllerCluster(); + g.addApi("cluster", cluster, m, false, true); + EObject cont = ControllerFactory.eINSTANCE.createControllerVirtualMachineService(); + g.addApi("cont", cont, m, false, true); + EObject gui = ModelFactory.eINSTANCE.createGuiClientApi(); + g.addObject("gui",gui,m); + g.addAlias("/test"); + g.addAlias("/swagger"); + g.addFactory("org.openecomp.ncomp.servers.openstack.OsOpenstackFactory"); + g.addFactory("org.openecomp.ncomp.servers.openstack.loc.OsLocationFactory"); + g.generate(dir); + g.generateScripts("src/main/server-gen/bin","controller-platform-server"); + // create ECOMP Logging messages + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; + YamlToJava.convert("src/main/resources/DcaeController.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/DcaePlatformController.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/ControllerCluster.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/ControllerVirtualMachineService.yaml", dir + "/logging", pName); + String pName1 = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".gui.logging"; + YamlToJava.convert("src/main/sirius-gen/GuiClientApi.yaml", dir + "/gui/logging", pName1); + } + + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterProvider.java b/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterProvider.java new file mode 100644 index 0000000..69644fd --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterProvider.java @@ -0,0 +1,242 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.platform.servers.controller; + +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.Date; + +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.Jetty8Client; +import org.openecomp.ncomp.sirius.manager.Jetty8ClientOld; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; +import org.openecomp.ncomp.sirius.manager.Subject; + +import org.apache.log4j.Logger; +import org.json.JSONException; +import org.json.JSONObject; + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; +import org.openecomp.ncomp.sirius.manager.metrics.MetricManager; +import org.openecomp.ncomp.webservice.utils.DateUtils; +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.platform.controller.ControllerCluster; +import org.openecomp.dcae.controller.platform.controller.ControllerClusterServer; +import org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData; +import org.openecomp.dcae.controller.platform.controller.DcaePlatformController; +import org.openecomp.dcae.controller.platform.controller.ServerRole; +import org.openecomp.dcae.controller.platform.servers.controller.logging.DcaeControllerMessageEnum; +import org.openecomp.dcae.controller.platform.servers.controller.logging.DcaeControllerOperationEnum; +import org.openecomp.dcae.controller.service.vm.PhysicalMachine; +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; +import org.openecomp.logger.EcompLogger; + +public class DcaeControllerClusterProvider extends BasicAdaptorProvider implements ISiriusPlugin { + private static final Logger logger = Logger.getLogger(DcaeControllerClusterProvider.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + ControllerCluster o; + + public DcaeControllerClusterProvider(ISiriusServer controller, ControllerCluster o) { + super(controller, o); + this.o = o; + } + + public void pushData(String serverName, String dataName) { + ControllerClusterServer s = findServer(serverName); + ControllerClusterServerData d = findData(s, dataName); + DcaeControllerClusterConsole console = console(s); + Date now = new Date(); + MetricManager metrics = controller.getServer().metrics; + metrics.setDateMetric(d, "lastPush", new Date()); + metrics.addIncreasingULongMetric(d, "numberDataPushes", 1L, false); + try { + console.receiveData("/resources/cluster", o.getMyServerName(), dataName, now, getContent(dataName)); + } catch (Exception e) { + e.printStackTrace(); + metrics.addIncreasingULongMetric(d, "numberDataPushErrors", 1L, false); + } + } + + private ControllerClusterServer findServer(String serverName) { + for (ControllerClusterServer s : o.getServers()) { + if (s.getName().equals(serverName)) + return s; + } + throw new RuntimeException("Unknown server: " + serverName); + } + + private ControllerClusterServerData findData(ControllerClusterServer s, String name) { + for (ControllerClusterServerData d : s.getData()) { + if (d.getName().equals(name)) + return d; + } + throw new RuntimeException("Unknown date: " + name); + } + + private String getContent(String dataName) { + if (dataName.equals("state")) { + JSONObject json = ManagementServer.ecore2json(o.eContainer(), 10000, null, true); + if (json.has("cluster")) + json.remove("cluster"); + if (json.has("configuration")) + json.remove("configuration"); + if (json.has("component")) + json.remove("component"); + // json = new JSONObject(); + return json.toString(); + } + throw new RuntimeException("Unknown server: " + dataName); + } + + private DcaeControllerClusterConsole console(ControllerClusterServer s) { + DcaeControllerClusterClient c = new DcaeControllerClusterClient("console.properties", "localhost"); + GenericHttpClient client = (GenericHttpClient) c.client; + if (client.getBaseAddress() == null) { + throw new RuntimeException("unable to determine baseaddress in controller.properties for: cluster"); + } + String b = client.getBaseAddress(); + b = b.replaceFirst("localhost", s.getServer().getNetworks().get(0).getDnsName()); + client.setBaseAddress(b); + logger.info("using baseAdress: " + client.getBaseAddress()); + System.out.println("CLUSTER: " + client.getBaseAddress()); + return new DcaeControllerClusterConsole(client); + } + + public void receiveData(String serverName, String dataName, Date time, String content) { + if (o.getRole() != ServerRole.SLAVE) { + logger.info("Ignoring data replication since not slave"); + return; + } + ControllerClusterServer s = findServer(serverName); + ControllerClusterServerData d = findData(s, dataName); + MetricManager metrics = controller.getServer().metrics; + metrics.setDateMetric(d, "lastDataReceived", new Date()); + metrics.addIncreasingULongMetric(d, "numberDataReceived", 1L, false); + + try { + if (dataName.equals("state")) { + JSONObject json = new JSONObject(content); + json.put("$updateEnumWithDefault", 1); + json.put("$forcedUpdate", 1); + Subject s1 = new Subject(controller.getServer().getObject()); + controller.getServer().update("controller", s1, json, true); + } + } catch (Exception e) { + e.printStackTrace(); + metrics.addIncreasingULongMetric(d, "numberDataReceivedErrors", 1L, false); + } + } + + @Override + public void start() { + System.out.println("CLUSTER: start"); + try { + String hostname = InetAddress.getLocalHost().getHostName(); + if (hostname.indexOf(".") > 0) + hostname = hostname.substring(0, hostname.indexOf(".")); + o.setMyServerName(hostname); + Subject subject = controller.getServer().find("/services/vm-controller"); + VirtualMachineService service = (subject != null) ? (VirtualMachineService) subject.o : null; + if (service == null) { + logger.warn("No controller service"); + return; + } + for (ControllerClusterServer s : o.getServers()) { + for (VirtualMachineServiceInstance instance : service.getInstances()) { + for (DcaeBasicServer server : instance.getServers()) { + if (server.getName().equals(s.getName())) { + s.setServer(server); + } + } + } + } + } catch (UnknownHostException e) { + e.printStackTrace(); + } + System.out.println("CLUSTER: start"); + Thread t = new Thread("cluster replication") { + @Override + public void run() { + System.out.println("CLUSTER 2: run"); + ecomplogger.setOperation(DcaeControllerOperationEnum.CLUSTER_DATA_REPLICATION); + while (true) { + try { + System.out.println("CLUSTER 3: run"); + for (ControllerClusterServer s : o.getServers()) { + if (s.getName().equals(o.getMyServerName())) + o.setRole(s.getRole()); + } + controller.getServer().isSlave = o.getRole() == ServerRole.SLAVE; + if (o.getRole() == ServerRole.MASTER) { + System.out.println("CLUSTER 3: run"); + ecomplogger.newRequestId(); + ecomplogger.recordAuditEventStart(); + for (ControllerClusterServer s : o.getServers()) { + System.out.println("CLUSTER 4: run: " + s.getName() + " " + s.getRole()); + if (s.getRole() != ServerRole.SLAVE) + continue; + if (s.getName().equals(o.getMyServerName())) + continue; + System.out.println("CLUSTER 5: run"); + for (ControllerClusterServerData d : s.getData()) { + try { + System.out.println("CLUSTER 6: run: " + d.getName()); + Date last = d.getLastPush() == null ? null : d.getLastPush().last; + long i = DateUtils.stringToDuration(d.getPushInterval()); + System.out.println("CLUSTER 7: run"); + long now = new Date().getTime(); + if (last != null && last.getTime() + i > now) + continue; + System.out.println("CLUSTER 8: run"); + o.pushData(s.getName(), d.getName()); + System.out.println("CLUSTER 9: run"); + } catch (Exception e) { + ecomplogger.warn(DcaeControllerMessageEnum.CLUSTER_DATA_REPLICATION_FAILED, + s.getName()); + ManagementServerUtils.printStackTrace(e); + } + } + } + ecomplogger.recordAuditEventEnd(); + } + Thread.sleep(60000); // sleep 60 seconds + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("cluster replication: " + e); + try { + Thread.sleep(30000); + } catch (InterruptedException e1) { + } + } + } + } + + }; + t.start(); + } + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceProvider.java b/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceProvider.java new file mode 100644 index 0000000..4ab98ec --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceProvider.java @@ -0,0 +1,89 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.platform.servers.controller; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.apache.log4j.Logger; +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.service.HealthTestStatus; +import org.openecomp.dcae.controller.core.service.ServiceFactory; +import org.openecomp.dcae.controller.core.stream.DatabusStream; +import org.openecomp.dcae.controller.core.stream.DatabusStreamFeed; +import org.openecomp.dcae.controller.core.stream.DatabusStreamTopic; +import org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient; +import org.openecomp.dcae.controller.platform.controller.ControllerVirtualMachineService; +import org.openecomp.dcae.controller.platform.controller.DcaePlatformController; +import org.openecomp.dcae.controller.service.servers.vm.DcaeVirtualMachineServiceProvider; + +public class DcaeControllerVirtualMachineServiceProvider extends DcaeVirtualMachineServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeControllerVirtualMachineServiceProvider.class); + ControllerVirtualMachineService o; + + public DcaeControllerVirtualMachineServiceProvider(ISiriusServer controller, ControllerVirtualMachineService o) { + super(controller, o); + this.o = o; + } + + @Override + public HealthTestResponse test(String instance) { + DcaePlatformController c = (DcaePlatformController) o.eContainer(); + HealthTestResponse res = ServiceFactory.eINSTANCE.createHealthTestResponse(); + if (c.getDatabus() == null) { + res.setStatus(HealthTestStatus.RED); + res.setMessageCode("No Databus"); + return res; + } + if (c.getDatabus().getLocations().size() == 0) { + res.setStatus(HealthTestStatus.RED); + res.setMessageCode("No Databus Locations"); + return res; + } + for (DatabusStream s : c.getDatabus().getStreams()) { + if (s instanceof DatabusStreamFeed) { + DatabusStreamFeed f = (DatabusStreamFeed) s; + if (f.getFeedName() == null || f.getFeedName().startsWith("ERROR")) { + res.setStatus(HealthTestStatus.RED); + res.setMessageCode("Feed Error: " + f.getName()); + return res; + } + } + if (s instanceof DatabusStreamTopic) { + DatabusStreamTopic t = (DatabusStreamTopic) s; + if (t.getTopicName() == null || t.getTopicName().startsWith("ERROR")) { + res.setStatus(HealthTestStatus.RED); + res.setMessageCode("Topic Error: " + t.getName()); + return res; + } + for (DatabusStreamTopicClient client : t.getClients()) { + if (client.getTopicURL() == null) { + res.setStatus(HealthTestStatus.RED); + res.setMessageCode("Topic Error: null URL: " + t.getName() + "@" + client.getName()); + return res; + } + } + } + } + res.setStatus(HealthTestStatus.GREEN); + return res; + + } +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProvider.java b/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProvider.java new file mode 100644 index 0000000..7574312 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProvider.java @@ -0,0 +1,1158 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.platform.servers.controller; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.math.BigInteger; +import java.security.SecureRandom; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Properties; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.json.JSONArray; +import org.json.JSONObject; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; +import org.openecomp.dcae.controller.core.service.DcaeLocation; +import org.openecomp.dcae.controller.core.service.DcaePolicyEntity; +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; +import org.openecomp.dcae.controller.core.stream.DatabusDataRouterNode; +import org.openecomp.dcae.controller.core.stream.DatabusEntity; +import org.openecomp.dcae.controller.core.stream.DatabusLocation; +import org.openecomp.dcae.controller.core.stream.DatabusMessageRouterCluster; +import org.openecomp.dcae.controller.core.stream.DatabusStream; +import org.openecomp.dcae.controller.core.stream.DatabusStreamFeed; +import org.openecomp.dcae.controller.core.stream.DatabusStreamFeedPublisher; +import org.openecomp.dcae.controller.core.stream.DatabusStreamFeedSubscriber; +import org.openecomp.dcae.controller.core.stream.DatabusStreamTopic; +import org.openecomp.dcae.controller.core.stream.DatabusStreamTopicAction; +import org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient; +import org.openecomp.dcae.controller.core.stream.DcaeStream; +import org.openecomp.dcae.controller.core.stream.DmaapStream; +import org.openecomp.dcae.controller.core.stream.StreamAuthentication; +import org.openecomp.dcae.controller.core.stream.StreamFactory; +import org.openecomp.dcae.controller.platform.controller.ControllerPackage; +import org.openecomp.dcae.controller.platform.controller.DcaeDataBus; +import org.openecomp.dcae.controller.platform.controller.DcaePlatformController; +import org.openecomp.dcae.controller.platform.controller.ServerRole; +import org.openecomp.dcae.controller.platform.servers.controller.logging.DcaeControllerMessageEnum; +import org.openecomp.dcae.controller.platform.servers.controller.logging.DcaeControllerOperationEnum; +import org.openecomp.dcae.controller.service.cdap.CdapService; +import org.openecomp.dcae.controller.service.cdap.CdapServiceInstance; +import org.openecomp.dcae.controller.service.docker.DockerService; +import org.openecomp.dcae.controller.service.docker.DockerServiceInstance; +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; +import org.openecomp.logger.EcompLogger; +import org.openecomp.ncomp.core.DeploymentStatus; +import org.openecomp.ncomp.core.NamedEntity; +import org.openecomp.ncomp.sirius.manager.BasicManagementServerProvider; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ISwaggerHandler; +import org.openecomp.ncomp.sirius.manager.JavaHttpClient; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; +import org.openecomp.ncomp.sirius.manager.Subject; +import org.openecomp.ncomp.sirius.manager.SwaggerUtils; +import org.openecomp.ncomp.utils.CryptoUtils; +import org.openecomp.ncomp.utils.PropertyUtil; +import org.openecomp.ncomp.webservice.utils.DateUtils; +import org.openecomp.ncomp.webservice.utils.JsonUtils; + +public class DcaeDcaePlatformControllerProvider extends BasicManagementServerProvider { + private static final Logger logger = Logger.getLogger(DcaeDcaePlatformControllerProvider.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + DcaePlatformController o; + + public DcaeDcaePlatformControllerProvider(ISiriusServer controller, DcaePlatformController o) { + super(controller, o); + this.o = o; + } + + public void start() { + if (o.getCluster() == null) { + DcaeControllerFactory f3 = new DcaeControllerFactory(controller); + o.setCluster(f3.createControllerCluster()); + } + Thread t = new Thread("health checks") { + @Override + public void run() { + ecomplogger.setOperation(DcaeControllerOperationEnum.HEALTHCHECK); + while (true) { + try { + if (!controller.getServer().isSlave) { + ecomplogger.newRequestId(); + ecomplogger.recordAuditEventStart(); + for (DcaeService s : o.getServices()) { + try { + s.runHealthTests(); + } catch (Exception e) { + ecomplogger.warn(DcaeControllerMessageEnum.HEALTHCHECK_SERVICE_FAILED, s.getName()); + ManagementServerUtils.printStackTrace(e); + } + } + ecomplogger.recordAuditEventEnd(); + } + Thread.sleep(60000); // sleep 60 seconds + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("health checks: " + e); + try { + Thread.sleep(30000); + } catch (InterruptedException e1) { + } + } + } + } + }; + t.start(); + + Thread t2 = new Thread("policy polling") { + @Override + public void run() { + long frequency = 300000; // 5 minute default + try { + Properties props = PropertyUtil.getPropertiesFromClasspath("controller.properties"); + if (props.containsKey("policy.pollingFrequency")) { + frequency = Long.parseLong(props.getProperty("policy.pollingFrequency")); + } + } catch (Exception e) { + e.printStackTrace(); + } + ecomplogger.setOperation(DcaeControllerOperationEnum.POLICY_POLLING); + while (true) { + try { + System.out.println("PPPPPPPPPPP polling start"); + switch (o.getCluster().getRole()) { + case MASTER: + case UNKNOWN: + case STANDALONE: + ecomplogger.newRequestId(); + ecomplogger.recordAuditEventStart(); + System.out.println("PPPPPPPPPPP polling start"); + for (DcaeService s : o.getServices()) { + for (DcaeServiceInstance i : instances(s)) { + System.out.println("PPPPPPPPPPP updateObjectUsingPolicy list: " + s.getName() + "/" + i.getName()); + if (i.getStatus() != DeploymentStatus.DEPLOYED) + continue; + EList l = findPolicyEnabledObjects(i); + System.out.println("PPPPPPPPPPP updateObjectUsingPolicy list: " + l); + for (DcaePolicyEntity o2 : l) { + try { + System.out.println("PPPPPPPPPPP updateObjectUsingPolicy: " + o2); + updateObjectUsingPolicy(o2, s, i); + } catch (Exception e) { + ecomplogger.warn(DcaeControllerMessageEnum.POLICY_POLLING_FAILED, + ManagementServer.object2ref(o2), e.toString()); + ManagementServerUtils.printStackTrace(e); + } + } + } + } + ecomplogger.recordAuditEventEnd(); + break; + case SLAVE: + break; + } + System.out.println("PPPPPPPPPPP frequency: " + frequency); + Thread.sleep(frequency); // sleep 5 seconds + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("policy polling: " + e); + System.out.println("PPPPPPPPPPP error: " + e); + try { + Thread.sleep(30000); + } catch (InterruptedException e1) { + } + } + } + } + + }; + t2.start(); + + Thread t3 = new Thread("databus polling") { + @Override + public void run() { + ecomplogger.setOperation(DcaeControllerOperationEnum.DATABUS_POLLING); + while (true) { + try { + switch (o.getCluster().getRole()) { + case MASTER: + case UNKNOWN: + case STANDALONE: + ecomplogger.newRequestId(); + ecomplogger.recordAuditEventStart(); + try { + updateDatabusInformation(); + } catch (Exception e) { + ecomplogger.warn(DcaeControllerMessageEnum.DATABUS_POLLING_FAILED, e.toString()); + ManagementServerUtils.printStackTrace(e); + } + ecomplogger.recordAuditEventEnd(); + break; + case SLAVE: + break; + } + Thread.sleep(1 * 60000); // sleep 1 minutes + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("health checks: " + e); + try { + Thread.sleep(30000); + } catch (InterruptedException e1) { + } + } + } + } + + }; + t3.start(); + + } + + protected void updateDatabusInformation() { + if (o.getDatabus() == null) + return; + databusPoll(o.getDatabus()); + databusUpdateController(o.getDatabus()); + for (DatabusStream stream : o.getDatabus().getStreams()) { + try { + if (stream instanceof DatabusStreamFeed) { + DatabusStreamFeed feed = (DatabusStreamFeed) stream; + if (feed.getFeedName() == null) { + databusAddFeed(feed, o.getDatabus()); + } + } + if (stream instanceof DatabusStreamTopic) { + DatabusStreamTopic topic = (DatabusStreamTopic) stream; + if (topic.getTopicName() == null) { + databusAddTopic(topic); + } + } + } catch (Exception e) { + System.err.println("DATABUS ERROR:" + stream.getName() + " " + e); + e.printStackTrace(); + } + } + HashMap> inputs = new HashMap>(); + HashMap> outputs = new HashMap>(); + for (DatabusStream stream : o.getDatabus().getStreams()) { + // if (!stream.getName().startsWith("local:")) + // continue; + if (stream instanceof DatabusStreamFeed) { + DatabusStreamFeed feed = (DatabusStreamFeed) stream; + for (DatabusStreamFeedPublisher p : feed.getPublishers()) { + addStream(outputs, "file", "publish", p.getName(), p.getLocalStreamId(), p.getUsername(), + p.getUserpwd(), feed.getPublishURL(), "password"); + } + for (DatabusStreamFeedSubscriber s : feed.getSubscribers()) { + addStream(inputs, "file", "subscribe", s.getName(), s.getLocalStreamId(), s.getUsername(), + s.getUserpwd(), s.getDeliveryURL(), "password"); + } + } + if (stream instanceof DatabusStreamTopic) { + DatabusStreamTopic topic = (DatabusStreamTopic) stream; + for (DatabusStreamTopicClient p : topic.getClients()) { + // System.err.println("UPDATE: " + p.getName() + " " + + // p.getTopicURL()); + if (p.getAction().contains(DatabusStreamTopicAction.PUB)) + addStream(outputs, "message", "publish", p.getName(), p.getLocalStreamId(), p.getUsername(), + p.getUserpwd(), p.getTopicURL(), topic.getAuthenticationMethod().toString()); + else + addStream(inputs, "message", "subscribe", p.getName(), p.getLocalStreamId(), p.getUsername(), + p.getUserpwd(), p.getTopicURL(), topic.getAuthenticationMethod().toString()); + } + } + } + for (DcaeService s : o.getServices()) { + for (DcaeServiceInstance i : instances(s)) { + if (inputs.get(i) == null && outputs.get(i) == null) + continue; + String before = streamsHash(i); + i.getInputStreams().clear(); + if (inputs.get(i) != null) + i.getInputStreams().addAll(inputs.get(i)); + i.getOutputStreams().clear(); + if (outputs.get(i) != null) + i.getOutputStreams().addAll(outputs.get(i)); + String after = streamsHash(i); + if (i.getStatus() == DeploymentStatus.DEPLOYED && !before.equals(after)) { + s.pushManagerConfiguration(i.getName()); + } + } + } + } + + private String streamsHash(DcaeServiceInstance i) { + StringBuffer buf = new StringBuffer(); + for (DcaeStream s : i.getInputStreams()) { + buf.append(streamHash(s)).append("::"); + } + for (DcaeStream s : i.getOutputStreams()) { + buf.append(streamHash(s)).append("::"); + } + return buf.toString(); + } + + private Object streamHash(DcaeStream s) { + StringBuffer buf = new StringBuffer(); + if (s instanceof DmaapStream) { + DmaapStream ss = (DmaapStream) s; + buf.append(ss.getDmaapUrl()).append(":"); + buf.append(ss.getDmaapPassword()).append(":"); + buf.append(ss.getDmaapUserName()).append(":"); + buf.append(ss.getDmaapDataType()).append(":"); + } + return buf.toString(); + } + + private void databusUpdateController(DcaeDataBus databus) { + JavaHttpClient client = new JavaHttpClient("controller.properties", "databus"); + String drService = client.props.getProperty("databus.mr.service", "/services/vm-databus-dr-node"); + String mrService = client.props.getProperty("databus.mr.service", "/services/vm-databus-mr-node"); + Date time = new Date(); + HashMap headers = new HashMap(); + headers.put("Content-Type", "application/json"); + JSONObject json2 = new JSONObject(); + json2.put("dmaapName", client.props.get("databus.dmaapName")); + json2.put("drProvUrl", client.props.get("databus.drProvUrl")); + json2.put("version", "1"); + json2.put("topicNsRoot", "org.openecomp.dcae.dmaap"); + json2.put("bridgeAdminTopic", "DCAE_MM_AGENT"); + try { + client.httpJsonTransaction("/webapi/dmaap", "PUT", headers, json2); + System.err.println("DATABUS: dmaap: " + json2); + } catch (Exception e) { + System.err.println("DATABUS: dmaap: FAILED"); + } + for (DcaeLocation l : o.getLocations()) { + if (findNamed(databus.getLocations(), l.getName()) != null) + continue; + // Need to update Databus Controller. + JSONObject json = new JSONObject(); + json.put("dcaeLocationName", l.getName()); + json.put("dcaeLayer", l.getLocationType()); + client.httpJsonTransaction("/webapi/dcaeLocations", "POST", headers, json); + } + Subject s = controller.getServer().find(drService); + if (s == null || s.o == null) { + logger.warn("No vm-databus-dr-node service: " + drService); + } else { + VirtualMachineService drNodeService = (VirtualMachineService) s.o; + for (VirtualMachineServiceInstance i : drNodeService.getInstances()) { + for (DcaeBasicServer server : i.getServers()) { + boolean found = findNamed(databus.getDrNodes(), server.getName()) != null; + if (!found && i.getStatus() == DeploymentStatus.DEPLOYED) { + // Need to update Databus Controller. + JSONObject json = new JSONObject(); + json.put("hostName", server.getName()); + json.put("dcaeLocationName", i.getName()); + json.put("fqdn", server.getNetworks().get(0).getDnsName()); + client.httpJsonTransaction("/webapi/dr_nodes", "POST", headers, json); + System.err.println("DATABUS: add dr node: " + server.getName() + " " + time); + } + if (found && i.getStatus() != DeploymentStatus.DEPLOYED) { + client.httpJsonTransaction("/webapi/dr_nodes/" + server.getName(), "DELETE", headers, null); + System.err.println("DATABUS: delete dr node: " + server.getName() + " " + time); + } + } + } + } + s = controller.getServer().find(mrService); + if (s == null || s.o == null) { + logger.error("No vm-databus-mr-node service: " + mrService); + } else { + VirtualMachineService mrNodeService = (VirtualMachineService) s.o; + for (VirtualMachineServiceInstance i : mrNodeService.getInstances()) { + boolean found = findNamed(databus.getMrClusters(), i.getName()) != null; + if (!found && i.getStatus() == DeploymentStatus.DEPLOYED) { + // Need to update Databus Controller. + JSONObject json = new JSONObject(); + json.put("dcaeLocationName", i.getName()); + JSONArray a = new JSONArray(); + json.put("hosts", a); + for (DcaeBasicServer server : i.getServers()) { + a.put(server.getNetworks().get(0).getDnsName()); + } + json.put("fqdn", i.getServiceFqdn()); + client.httpJsonTransaction("/webapi/mr_clusters", "POST", headers, json); + System.err.println("DATABUS: add mr cluster: " + i.getName() + " " + time); + } + if (found && i.getStatus() != DeploymentStatus.DEPLOYED) { + // TODO + client.httpJsonTransaction("/webapi/mr_clusters/" + i.getName(), "DELETE", headers, null); + System.err.println("DATABUS: delete mr cluster: " + i.getName() + " " + time); + } + } + } + } + + private T findNamed(EList l, String name) { + for (T t : l) { + if (t.getName() != null && t.getName().equals(name)) + return t; + } + return null; + } + + private void addStream(HashMap> m, String type, String action, String name, + String id, String username, String userpwd, String url, String authMethod) { + // name is service:locationName + String a[] = name.split(":"); + if (a.length != 2) + return; + String path = "/services/" + a[0]; + Subject s = controller.getServer().find(path); + if (s == null || s.o == null) + return; + DcaeService s1 = (DcaeService) s.o; + for (DcaeServiceInstance i : instances(s1)) { + if (!a[1].equals(location(i))) + continue; + DmaapStream d = StreamFactory.eINSTANCE.createDmaapStream(); + d.setName(id); + d.setDmaapAuthMethod(authMethod); + d.setDmaapAction(action); + d.setDmaapDataType(type); + d.setDmaapUrl(url); + d.setDmaapUserName(username); + d.setDmaapPassword(userpwd); + // System.err.println("UPDATE: " + d); + List l = m.get(i); + if (l == null) { + l = new ArrayList(); + m.put(i, l); + } + l.add(d); + } + } + + static int numberOfErrors = 0; + static int tooMany = 40; + + // XX remove static + + private void databusAddFeed(DatabusStreamFeed feed, DcaeDataBus bus) { + if (feed.getFeedName() != null && !feed.getFeedName().equals("")) + return; + if (numberOfErrors > tooMany) { + logger.warn("Too many added"); + feed.setFeedName("FAILED TOO MANY"); + return; + } + try { + JavaHttpClient client = new JavaHttpClient("controller.properties", "databus"); + HashMap headers = new HashMap(); + headers.put("Content-Type", "application/json"); + JSONObject json = ManagementServer.ecore2json(feed, 100, feed.eClass(), true); + System.err.println("FEED0: " + feed.getName() + " " + json.toString(2)); + if (feed.getPublishers().size() == 0) { + // Add a generic publisher + DatabusStreamFeedPublisher p = StreamFactory.eINSTANCE.createDatabusStreamFeedPublisher(); + p.setName("auto-add"); + feed.getPublishers().add(p); + } + if (feed.getSubscribers().size() == 0) + return; + for (DatabusStreamFeedSubscriber s : feed.getSubscribers()) { + if (s.getOtherFeedName() == null) { + continue; + } + DatabusStreamFeed feed2 = findFeed(bus, s.getOtherFeedName()); + if (feed2 == null) + return; + System.err.println("FEED X1: " + s.getOtherFeedName() + " " + feed2.getName()); + System.err.println("FEED X2: " + feed2.getPublishURL() + " " + feed2.getPublishers().size()); + if (feed2.getPublishURL() == null || feed2.getPublishers().size() == 0) + return; + s.setDeliveryURL(feed2.getPublishURL()); + DatabusStreamFeedPublisher p = feed2.getPublishers().get(0); + s.setUsername(p.getUsername()); + s.setUserpwd(p.getUserpwd()); + System.err.println("FEED X2: " + s.getDeliveryURL() + " " + s.getUserpwd()); + } + json = ManagementServer.ecore2json(feed, 100, feed.eClass(), true); + String feedName = feed.getName() + ":" + new Date().getTime(); + json.put("feedVersion", "1.0"); + json.put("feedName", feedName); + json.put("owner", "controller"); + JSONArray a = new JSONArray(); + JSONObject pub = json.getJSONObject("publishers"); + for (Iterator i = pub.keys(); i.hasNext();) { + String k = i.next(); + JSONObject json1 = pub.getJSONObject(k); + if (!k.startsWith("external")) { + String user = "dcae"; + if (json1.has("dcaeLocationName")) + user = json1.getString("dcaeLocationName"); + json1.put("username", user); + json1.put("userpwd", password()); + } else { + if (json1.has("userpwd")) + json1.put("userpwd", JavaHttpClient.decryptPassword(json1.getString("userpwd"))); + } + if (json1.has("localStreamId")) + json1.remove("localStreamId"); + if (json1.has("feedId")) + json1.remove("feedId"); + if (json1.has("pubId")) + json1.remove("pubId"); + if (json1.has("status")) + json1.remove("status"); + a.put(json1); + } + json.put("pubs", a); + json.remove("publishers"); + JSONArray a1 = new JSONArray(); + JSONObject sub = json.getJSONObject("subscribers"); + for (Iterator i = sub.keys(); i.hasNext();) { + String k = i.next(); + JSONObject json1 = sub.getJSONObject(k); + if (!k.startsWith("external") && !k.startsWith("forward")) { + String user = "dcae"; + if (json1.has("dcaeLocationName")) + user = json1.getString("dcaeLocationName"); + json1.put("username", user); + json1.put("userpwd", password()); + } else { + if (json1.has("userpwd")) + json1.put("userpwd", JavaHttpClient.decryptPassword(json1.getString("userpwd"))); + } + if (json1.has("localStreamId")) + json1.remove("localStreamId"); + if (json1.has("otherFeedName")) + json1.remove("otherFeedName"); + if (json1.has("suspended")) + json1.remove("suspended"); + if (json1.has("use100")) + json1.remove("use100"); + if (json1.has("feedId")) + json1.remove("feedId"); + if (json1.has("logURL")) + json1.remove("logURL"); + if (json1.has("owner")) + json1.remove("owner"); + if (json1.has("subId")) + json1.remove("subId"); + a1.put(json1); + } + json.put("subs", a1); + json.remove("subscribers"); + System.err.println("FEED1: " + json.toString(2)); + JSONObject res = client.httpJsonTransaction("/webapi/feeds", "POST", headers, json); + if (res == null) { + numberOfErrors++; + feed.setFeedName("FAILED"); + logger.warn("unable to create feed: " + feed.getName() + " " + json.toString(2)); + return; + } + System.err.println("FEED2: " + res.toString(2)); + JSONArray aa1 = res.getJSONArray("pubs"); + JSONObject pub1 = new JSONObject(); + for (int i = 0; i < aa1.length() && i < feed.getPublishers().size(); i++) { + pub1.put(feed.getPublishers().get(i).getName(), aa1.getJSONObject(i)); + } + res.put("publishers", pub1); + res.remove("pubs"); + JSONArray aa2 = res.getJSONArray("subs"); + JSONObject sub1 = new JSONObject(); + for (int i = 0; i < aa2.length(); i++) { + if (aa2.get(i) instanceof JSONObject) + sub1.put(feed.getSubscribers().get(i).getName(), aa2.getJSONObject(i)); + else { + JSONObject j2 = new JSONObject(); + j2.put("username", "NULL"); + sub1.put(feed.getSubscribers().get(i).getName(), j2); + } + } + res.put("subscribers", sub1); + res.remove("subs"); + System.err.println("FEED3: " + res.toString(2)); + // XX use second + // ManagementServer s = server; + ManagementServer s = controller.getServer(); + DatabusStreamFeed feed1 = (DatabusStreamFeed) s.json2ecore(feed.eClass(), res); + System.err.println("FEED4: " + ManagementServer.ecore2json(feed1, 100, feed.eClass(), true).toString(2)); + encryptPasswords(feed1); + ManagementServer.merge(feed, feed1, res, true, null); + if (feed.getFeedName() == null) { + feed.setFeedName("FAILED with no name"); + } + System.err.println("FEED5: " + ManagementServer.ecore2json(feed, 100, feed.eClass(), true).toString(2)); + } catch (Exception e) { + numberOfErrors++; + feed.setFeedName("ERROR: " + e.toString()); + } + } + + private void encryptPasswords(DatabusStreamFeed feed) { + for (DatabusStreamFeedPublisher p : feed.getPublishers()) { + if (p.getUserpwd().startsWith("rsa:")) + continue; + p.setUserpwd(encryptPassword(p.getUserpwd())); + } + for (DatabusStreamFeedSubscriber s : feed.getSubscribers()) { + if (s.getUserpwd().startsWith("rsa:")) + continue; + s.setUserpwd(encryptPassword(s.getUserpwd())); + } + } + + private String encryptPassword(String v) { + if (publicKey == null) + publicKey = CryptoUtils.getKey("config/server.public"); + return "rsa:" + CryptoUtils.encryptPublic(publicKey, v); + } + + private static DatabusStreamFeed findFeed(DcaeDataBus bus, String otherFeedName) { + for (DatabusStream s : bus.getStreams()) { + if (s instanceof DatabusStreamFeed) { + DatabusStreamFeed f = (DatabusStreamFeed) s; + if (f.getName().equals(otherFeedName)) + return f; + } + } + return null; + } + + // XX remove static + @SuppressWarnings("unused") + private void databusAddTopic(DatabusStreamTopic topic) { + if (topic.getTopicName() != null) + return; + if (topic.getClients().size() == 0) + return; + String topicName = topic.getName().replace("topic:", ""); + if (topic.getAuthenticationMethod() == StreamAuthentication.NONE) { + for (DatabusStreamTopicClient c : topic.getClients()) { + DatabusMessageRouterCluster m = findNamed(o.getDatabus().getMrClusters(), c.getDcaeLocationName()); + if (m == null) + return; + c.setFqtn("unauthenticated." + topicName); + String protocol = m.getTopicProtocol() + "://"; + // TODO fix OPENECOMP hack + // c.setTopicURL(protocol + m.getServiceFqdn() + ":" + + // m.getTopicPort() + "/" + c.getFqtn()); + c.setTopicURL("http://" + m.getServiceFqdn() + ":" + "3904" + "/" + c.getFqtn()); + } + topic.setTopicName(topicName); + return; + } + if (numberOfErrors > tooMany) { + logger.warn("Too many added"); + topic.setTopicName("FAILED TOO MANY"); + return; + } + for (DatabusStreamTopicClient p : topic.getClients()) + p.setTopicURL(null); + try { + JavaHttpClient client = new JavaHttpClient("controller.properties", "databus"); + HashMap headers = new HashMap(); + headers.put("Content-Type", "application/json"); + JSONObject json = ManagementServer.ecore2json(topic, 100, topic.eClass(), true); + if (topic.getFqtn() != null) { + client.httpJsonTransaction("/webapi/topics/" + topic.getFqtn(), "DELETE", headers, null); + System.err.println("TOPIC0: delete existing topic: " + topicName); + } else + System.err.println("TOPIC0: new topic: " + topicName); + json.put("topicName", topicName); + json.put("owner", "controller"); + json.put("txenabled", false); + JSONArray a = new JSONArray(); + JSONObject clients = json.getJSONObject("clients"); + for (Iterator i = clients.keys(); i.hasNext();) { + String k = i.next(); + JSONObject json1 = clients.getJSONObject(k); + if (json1.has("localStreamId")) + json1.remove("localStreamId"); + if (json1.has("username")) + json1.remove("username"); + if (json1.has("userpwd")) + json1.remove("userpwd"); + if (json1.has("fqtn")) + json1.remove("fqtn"); + if (json1.has("mrClientId")) + json1.remove("mrClientId"); + a.put(json1); + } + json.put("clients", a); + System.err.println("TOPIC1: " + json.toString(2)); + JSONObject res; + try { + res = client.httpJsonTransaction("/webapi/topics", "POST", headers, json); + } catch (Exception e) { + if (e.getMessage().contains("topic already exists")) { + String s = e.getMessage(); + int i = s.indexOf("topic already exists"); + s = s.substring(i + "topic already exists: ".length()).replace("\"}", ""); + topic.setFqtn(s); + System.err.println("TOPIC2: topic already exists without FQTN"); + return; + } + throw e; + } + if (res == null) { + numberOfErrors++; + logger.warn("unable to create topic: " + topic.getName() + " " + json.toString(2)); + return; + } + System.err.println("TOPIC2: " + res.toString(2)); + JSONArray aa1 = res.getJSONArray("clients"); + JSONObject clients1 = new JSONObject(); + for (int i = 0; i < aa1.length() && i < topic.getClients().size(); i++) { + clients1.put(topic.getClients().get(i).getName(), aa1.getJSONObject(i)); + } + res.put("clients", clients1); + System.err.println("TOPIC3: " + res.toString(2)); + // XX use second + // ManagementServer s = server; + ManagementServer s = controller.getServer(); + DatabusStreamTopic topic1 = (DatabusStreamTopic) s.json2ecore(topic.eClass(), res); + System.err.println("TOPIC4: " + ManagementServer.ecore2json(topic1, 100, topic.eClass(), true).toString(2)); + ManagementServer.merge(topic, topic1, res, true, null); + if (topic.getTopicName() == null) { + topic.setTopicName("FAILED with no name"); + } + System.err.println("TOPIC5: " + ManagementServer.ecore2json(topic, 100, topic.eClass(), true).toString(2)); + } catch (Exception e) { + numberOfErrors++; + topic.setTopicName("ERROR: " + e.toString()); + } + } + + private static String password() { + return new BigInteger(130, new SecureRandom()).toString(32); + } + + static ManagementServer server; + + public static void main(String[] args) throws IOException { + server = new ManagementServer(); + JSONObject json = JsonUtils + .file2json("CONFIG/controller-gen/resources/databus.json"); + DcaeDataBus d = (DcaeDataBus) server.json2ecore(ControllerPackage.eINSTANCE.getDcaeDataBus(), json); + databusPoll(d); + for (DatabusStream stream : d.getStreams()) { + if (stream instanceof DatabusStreamFeed) { + DatabusStreamFeed feed = (DatabusStreamFeed) stream; + if (feed.getFeedName() == null) { + // XX comment out + // databusAddFeed(feed,d); + } + } + if (stream instanceof DatabusStreamTopic) { + DatabusStreamTopic feed = (DatabusStreamTopic) stream; + if (feed.getTopicName() == null) { + // XX comment out + // databusAddTopic(feed); + } + } + } + System.out.println("FEED5: " + ManagementServer.ecore2json(d, 100, null, true).toString(2)); + // updateDatabusInformation(); + } + + private static void databusPoll(DcaeDataBus d) { + JavaHttpClient client = new JavaHttpClient("controller.properties", "databus"); + HashMap headers = new HashMap(); + headers.put("Content-Type", "application/json"); + // locations + JSONObject res1 = client.httpJsonTransaction("/webapi/dcaeLocations", "GET", headers, null); + // System.err.println("DATABUS0: locations" + res1.toString(2)); + databusJson2locations(res1, d); + // mr_clusters + JSONObject res2 = client.httpJsonTransaction("/webapi/mr_clusters", "GET", headers, null); + // System.err.println("DATABUS0: mr_clusters" + res2.toString(2)); + databusJson2mrClusters(res2, d); + // dr_nodes + JSONObject res3 = client.httpJsonTransaction("/webapi/dr_nodes", "GET", headers, null); + // System.err.println("DATABUS0: dr_nodes" + res3.toString(2)); + databusJson2drNodes(res3, d); + + } + + private static void databusJson2drNodes(JSONObject json, DcaeDataBus d) { + JSONArray a = json.getJSONArray("$list"); + List l = new ArrayList(); + for (int i = 0; i < a.length(); i++) { + JSONObject locJson = a.getJSONObject(i); + DatabusDataRouterNode drNode = StreamFactory.eINSTANCE.createDatabusDataRouterNode(); + drNode.setName(locJson.getString("hostName")); + drNode.setVersion(getString(locJson, "version")); + drNode.setHostFqdn(getString(locJson, "fqdn")); + drNode.setDcaeLocationName(getString(locJson, "dcaeLocationName")); + databusUpdateEntity(drNode, locJson); + l.add(drNode); + } + d.getDrNodes().clear(); + d.getDrNodes().addAll(l); + } + + private static void databusJson2mrClusters(JSONObject json, DcaeDataBus d) { + JSONArray a = json.getJSONArray("$list"); + List l = new ArrayList(); + for (int i = 0; i < a.length(); i++) { + JSONObject locJson = a.getJSONObject(i); + DatabusMessageRouterCluster c = StreamFactory.eINSTANCE.createDatabusMessageRouterCluster(); + c.setName(locJson.getString("dcaeLocationName")); + c.setServiceFqdn(getString(locJson, "fqdn")); + c.setDcaeLocationName(locJson.getString("dcaeLocationName")); + JSONArray aa = locJson.getJSONArray("hosts"); + for (int j = 0; j < aa.length(); j++) { + c.getHostFqdn().add(aa.getString(j)); + } + c.setTopicPort(getString(locJson, "topicPort")); + c.setTopicProtocol(getString(locJson, "topicProtocol")); + databusUpdateEntity(c, locJson); + l.add(c); + } + d.getMrClusters().clear(); + d.getMrClusters().addAll(l); + } + + private static String getString(JSONObject json, String key) { + return json.has(key) ? json.getString(key) : null; + } + + private static void databusJson2locations(JSONObject json, DcaeDataBus d) { + JSONArray a = json.getJSONArray("$list"); + List l = new ArrayList(); + for (int i = 0; i < a.length(); i++) { + JSONObject locJson = a.getJSONObject(i); + DatabusLocation loc = StreamFactory.eINSTANCE.createDatabusLocation(); + loc.setName(locJson.getString("dcaeLocationName")); + loc.setDcaeLayer(getString(locJson, "dcaeLayer")); + databusUpdateEntity(loc, locJson); + l.add(loc); + } + d.getLocations().clear(); + d.getLocations().addAll(l); + } + + private static void databusUpdateEntity(DatabusEntity e, JSONObject json) { + e.setStatus(getString(json, "status")); + e.setLastModified(json.has("lastMod") ? DateUtils.dateFromString(json.getString("lastMod")) : null); + e.setType(getString(json, "type")); + } + + private void updateObjectUsingPolicy(DcaePolicyEntity o2, DcaeService s, DcaeServiceInstance i) { + if (location(i) == null) + return; + System.out.println("PPPPPPPPPPP START: "); + JavaHttpClient client = new JavaHttpClient("controller.properties", "policy"); + if (client.getBaseAddress() == null) { + logger.warn("No Policy Endpoint configured"); + return; + } + HashMap headers = new HashMap(); + JSONObject json = new JSONObject(); + headers.put("ClientAuth", "cHl0aG9uOnRlc3Q="); + headers.put("Environment", "TEST"); + JSONObject json2 = new JSONObject(); + // json.put("configAttributes", json2); + String uuid = ManagementServer.object2ref(o2).toLowerCase(); + for (Object k : client.props.keySet()) { + String key = (String) k; + if (key.startsWith("policy.substitution.")) { + uuid = uuid.replace(key.substring(20), client.props.getProperty(key)); + } + } + json2.put("uuid", uuid); + json.put("policyName", ".*"); + JSONObject res = client.httpJsonTransaction("/PyPDPServer/getConfig", "POST", headers, json); + System.out.println("PPPPPPPPPPP 0: " + uuid); + JSONArray a = res.getJSONArray("$list"); + for (int j = 0; j < a.length(); j++) { + JSONObject c1 = a.getJSONObject(j); +// if (c1.has("matchingConditions") && c1.getJSONObject("matchingConditions").has("ECOMPName")) { +// if (c1.getJSONObject("matchingConditions").getString("ECOMPName").equals("DCAE")) +// continue; +// } + System.out.println("PPPPPPPPPPP 1: " + c1.toString(2)); + JSONObject newConfig; + try { + newConfig = new JSONObject(c1.getString("config")); + } catch (Exception e) { + System.out.println("PPPPPPPPPPP 1.1: " + c1.toString(2)); + continue; + } + System.out.println("PPPPPPPPPPP 2: " + newConfig.toString(2) + " uuid:" + newConfig.get("uuid")); + if (!uuid.equals(newConfig.getString("uuid").toLowerCase())) + continue; + JSONObject content = new JSONObject(newConfig.getString("content")); + System.out.println("PPPPPPPPPPP 3: " + content.toString(2)); + content.put("policyName", newConfig.getString("policyName")); + content.put("policyDescription", newConfig.getString("description")); + content.put("policyConfigName", newConfig.getString("configName")); + content.put("policyTemplateVersion", newConfig.getString("templateVersion")); + content.put("policyVersion", newConfig.getString("version")); + content.put("policyPriority", newConfig.getString("priority")); + content.put("policyScope", newConfig.getString("policyScope")); + System.out.println("PPPPPPPPPPP 4: " + content.toString(2)); + ManagementServer server = controller.getServer(); + EObject oo = server.json2ecore(o2.eClass(), content); + // System.out.println("PPPPPPPPPPP 4_1: " + + // ManagementServer.ecore2json(oo, 1000, null, true).toString(2)); + JSONObject before = cleanJson(o2); + ManagementServer.merge(o2, oo, null, true, null); + JSONObject after = cleanJson(o2); + ManagementServer.ecore2json(o2, 1000, null, true); + if (!before.toString(2).equals(after.toString(2))) { + System.out.println("PPPPPPPPPPP configuration change 5: " + ManagementServer.object2ref(i)); + System.out.println("PPPPPPPPPPP before: " + before.toString(2)); + System.out.println("PPPPPPPPPPP after: " + after.toString(2)); + s.pushManagerConfiguration(i.getName()); + } + return; + } + System.out.println("PPPPPPPPPPP ERROR no policy found: " + uuid); + } + + private JSONObject cleanJson(EObject o2) { + JSONObject json = ManagementServer.ecore2json(o2, 1000, null, true); + removeLastChanged(json); + return json; + } + + private void removeLastChanged(Object o) { + if (o instanceof JSONObject) { + JSONObject json = (JSONObject) o; + json.remove("lastChanged"); + for (Iterator i = json.keys(); i.hasNext();) { + String key = i.next(); + removeLastChanged(json.get(key)); + } + } + if (o instanceof JSONArray) { + JSONArray a = (JSONArray) o; + for (int i = 0; i < a.length(); i++) { + removeLastChanged(a.get(i)); + } + } + } + + private String location(DcaeServiceInstance i) { + if (i instanceof VirtualMachineServiceInstance) { + VirtualMachineServiceInstance i1 = (VirtualMachineServiceInstance) i; + if (i1.getLocation() == null) + return null; + return i1.getLocation().getName(); + } + if (i instanceof CdapServiceInstance) { + CdapServiceInstance i1 = (CdapServiceInstance) i; + if (i1.getClusterService() == null) + return null; + return location(i1.getClusterService()); + } + if (i instanceof DockerServiceInstance) { + DockerServiceInstance i1 = (DockerServiceInstance) i; + if (i1.getHostService() == null) + return null; + return location(i1.getHostService()); + } + throw new RuntimeException("unknown service instance: " + i); + } + + protected EList instances(DcaeService s) { + if (s instanceof VirtualMachineService) { + VirtualMachineService s1 = (VirtualMachineService) s; + return s1.getInstances(); + } + if (s instanceof CdapService) { + CdapService s1 = (CdapService) s; + return s1.getInstances(); + } + if (s instanceof DockerService) { + DockerService s1 = (DockerService) s; + return s1.getInstances(); + } + throw new RuntimeException("unknown service: " + s); + } + + private EList findPolicyEnabledObjects(EObject o2) { + EList res = new BasicEList(); + findPolicyEnabledObjects(o2, res); + return res; + } + + private void findPolicyEnabledObjects(EObject o2, EList res) { + if (o2 == null) + return; + if (o2 instanceof DcaePolicyEntity) { + res.add((DcaePolicyEntity) o2); + } + for (EReference ref : o2.eClass().getEAllContainments()) { + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) o2.eGet(ref); + for (EObject o3 : l) { + findPolicyEnabledObjects(o3, res); + } + } else + findPolicyEnabledObjects((EObject) o2.eGet(ref), res); + } + } + + public void deployDescriptor(String name) { + runCmd("bin/dcae-controller.sh deploy-descriptor --name " + name); + } + + private void runCmd(String cmd) { + Runtime run = Runtime.getRuntime(); + Process pr; + try { + logger.info("running: " + cmd); + pr = run.exec(cmd); + int status = pr.waitFor(); + logger.info("done: " + cmd); + BufferedReader buf = new BufferedReader(new InputStreamReader(pr.getInputStream())); + String line = ""; + while ((line = buf.readLine()) != null) { + logger.info("output: " + line); + } + buf = new BufferedReader(new InputStreamReader(pr.getErrorStream())); + while ((line = buf.readLine()) != null) { + System.err.println(line); + logger.warn("error: " + line); + } + if (status != 0) { + throw new RuntimeException("command failed: " + cmd); + } + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + public Object handleJson(String userName, String action, String resourcePath, JSONObject json, JSONObject context) { + System.err.println("XXXXXX handleJson: " + action + " " + resourcePath + " " + context); + switch ((String) context.get("path")) { + case "/test": + if (o.getCluster().getRole() == ServerRole.MASTER) { + return new JSONObject("{ status: 'OKAY'}"); + } + throw new RuntimeException("Not Master Controller"); + case "/swagger": + return controller.getServer().getSwaggerJson(); + } + System.err.println("XXXXXXX: request not handled: path=" + resourcePath + " action=" + action + " json=" + + ((json != null) ? json.toString(2) : "NULL") + " context=" + + ((context != null) ? context.toString(2) : "NULL")); + return null; + + } + + public Object handleBinary(String userName, String action, String resourcePath, InputStream in) { + // TODO Auto-generated method stub + return null; + } + + public void refreshDataBus(String nameMatch) { + System.err.println("BBBBBBBBB: numberOfErrors=" + numberOfErrors + " tooMany=" + tooMany + " nameMatch=" + + nameMatch); + numberOfErrors = 0; + for (DatabusStream s : o.getDatabus().getStreams()) { + if (nameMatch != null && !s.getName().matches(nameMatch)) + continue; + if (s instanceof DatabusStreamFeed) { + DatabusStreamFeed f = (DatabusStreamFeed) s; + if (f.getFeedName() == null) + continue; + System.err.println("BBBBBBBBB: feed change to null " + ManagementServer.object2ref(s) + " " + + f.getFeedName()); + f.setFeedName(null); + for (DatabusStreamFeedPublisher c : f.getPublishers()) { + c.setFeedId(null); + c.setPubId(null); + c.setStatus(null); + } + for (DatabusStreamFeedSubscriber c : f.getSubscribers()) { + c.setFeedId(null); + c.setSubId(null); + c.setOwner(null); + c.setLogURL(null); + } + } + if (s instanceof DatabusStreamTopic) { + DatabusStreamTopic t = (DatabusStreamTopic) s; + if (t.getTopicName() == null) + continue; + System.err.println("BBBBBBBBB: topic change to null " + ManagementServer.object2ref(s) + " " + + t.getTopicName()); + t.setTopicName(null); + for (DatabusStreamTopicClient c : t.getClients()) { + c.setTopicURL(null); + c.setMrClientId(null); + c.setFqtn(null); + } + } + } + } + + @SuppressWarnings("unused") + private String privateKey = CryptoUtils.getKey("config/server.private"); + private String publicKey = null; + + public void updateSwagger(String path, SwaggerUtils swagger) { + swagger.addTag(path, "DCAE Controller API"); + swagger.addTag(path + "/configuration", "Server Basic Configuration"); + swagger.addTag(path + "/cluster", "Cluster Configuration"); + if (o.getOpenstack() instanceof ISwaggerHandler) { + ISwaggerHandler handler = (ISwaggerHandler) o.getOpenstack(); + handler.updateSwagger(path + "/openstack", swagger); + } + swagger.addTag(path + "/locations", "DCAE Locations Configuration"); + swagger.addTag(path + "/databus", "DataBus Configuration"); + swagger.addTag(path + "/services", "DCAE Services"); + for (DcaeService s : o.getServices()) { + String path1 = path + "/services/" + s.getName(); + swagger.addTag(path1, ""); + if (instances(s).size() > 0) { + // Use instance as a API guide to handle inheritance. + // swagger.autoAddApi(path1 + "/instances/{instanceName}", + // instances(s).get(0)); + } + // swagger.autoAddApi(path1, s); + } + DcaeService s = o.getServices().get(o.getServices().size() - 1); + swagger.autoAddApi(path + "/services/" + s.getName() + "/instances/{instanceName}", instances(s).get(0)); + // Add missing automatically + + swagger.autoAdd(path, o.eClass(), 1, new ArrayList()); + } +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiProvider.java b/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiProvider.java new file mode 100644 index 0000000..ca6d6f4 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiProvider.java @@ -0,0 +1,83 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.platform.servers.controller.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProvider extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProvider.class); + GuiClientApi o; + + public DcaeGuiClientApiProvider(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + public static void ecoreSetup() { + // TODO Auto-generated method stub + + } + + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/resources/DcaeController.yaml b/dcae-controller-core/dcae-controller-platform-server/src/main/resources/DcaeController.yaml new file mode 100644 index 0000000..120d5ad --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/resources/DcaeController.yaml @@ -0,0 +1,45 @@ +operations: + HEALTHCHECK: + description: Heath Check for all DCAE service instances. + POLICY_POLLING: + description: Polling of new configuration from ECOMP Policy for all DCAE service instances. + DATABUS_POLLING: + description: Polling of new configuration from DCAE Data Bus Controller. + CLUSTER_DATA_REPLICATION: + description: Data replication from master to slave controllers. +messages: + HEALTHCHECK_SERVICE_FAILED: + errorCode: DCAE-CONTROLLER-HEALTHCHECK-SERVICE-FAILED-5001W + messageFormat: '{0}' + parameters: + service-name: + description: Name of Service for which the health check fails. + resolution: Contact Tier 4. This is a software bug. + description: Heath Check on the service level fails. + POLICY_POLLING_FAILED: + errorCode: DCAE-CONTROLLER-POLICY-POLLING-FAILED-5001W + messageFormat: '{0} {1}' + parameters: + object-path: + description: Object resource path for which the policy polling fails. + exception: + description: Exception that happened. + resolution: Contact Tier 4. This is a software bug. + description: Police Polling on the service level fails. + DATABUS_POLLING_FAILED: + errorCode: DCAE-CONTROLLER-DATABUS-POLLING-FAILED-5001W + messageFormat: '{0}' + parameters: + exception: + description: Exception that happened. + resolution: Contact Tier 4. This is a software bug. + description: Databus Polling on the service level fails. + + CLUSTER_DATA_REPLICATION_FAILED: + errorCode: DCAE-CONTROLLER-CLUSTER_DATA_REPLICATION-FAILED-5001W + messageFormat: '{0}' + parameters: + exception: + description: Exception that happened. + resolution: Contact Tier 4. This is a software bug. + description: Data Replication fails. \ No newline at end of file diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server-gen/bin/controller-platform-server-controller b/dcae-controller-core/dcae-controller-platform-server/src/main/server-gen/bin/controller-platform-server-controller new file mode 100644 index 0000000..4f6f870 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server-gen/bin/controller-platform-server-controller @@ -0,0 +1,138 @@ +#!/bin/bash + +# setup env if needed. java 6 required +## JAVA_HOME= + +############################## DO NOT EDIT BELOW ########################## + +SNAME="Dcae Controller" +PNAME=controller-platform-server-controller +CLASS=org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerServer + +############################## COMMON BELOW ########################## + +check_status () +{ + if [ -f "${_PIDFILE}" ]; then + _PID=`cat "${_PIDFILE}"` + check_status_of_pid $_PID + else + _STATUS="$SNAME (no pidfile) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + +remove_pid_file () +{ + if [ -f "${_PIDFILE}" ]; then + rm "${_PIDFILE}" + fi +} + + +_DIR=`dirname "$0"` +_DIR=`dirname "$_DIR"` + +_PIDFILE=$_DIR/PID + +CMD=$1 +shift + +check_status + +CP=$(find $_DIR/lib/*/* -name \*.jar 2>/dev/null | xargs -I X printf ":%s" X) + +JVMARGS=$(grep 'server.jvmargs' $_DIR/config/controller.properties | sed -e 's/.*=//') + +case $CMD in + status) + echo $_STATUS + exit 0 + ;; + console) + $GROOVY_HOME/bin/groovysh -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP + ;; + run) + $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + groovy) + $GROOVY_HOME/bin/groovy -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + start) + if [ "$_RUNNING" = "1" ]; then + echo $_STATUS + exit 0 + fi + mkdir -p $_DIR/logs + if [ -e $_DIR/logs/$PNAME.out.1 ]; then mv $_DIR/logs/$PNAME.out.1 $_DIR/logs/$PNAME.out.2; fi + if [ -e $_DIR/logs/$PNAME.err.1 ]; then mv $_DIR/logs/$PNAME.err.1 $_DIR/logs/$PNAME.err.2; fi + if [ -e $_DIR/logs/$PNAME.out ]; then mv $_DIR/logs/$PNAME.out $_DIR/logs/$PNAME.out.1; fi + if [ -e $_DIR/logs/$PNAME.err ]; then mv $_DIR/logs/$PNAME.err $_DIR/logs/$PNAME.err.1; fi + + nohup $JAVA_HOME/bin/java $JVMARGS -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" $CLASS >> $_DIR/logs/$PNAME.out 2>> $_DIR/logs/$PNAME.err & + + _PID=$! + echo $_PID > $_PIDFILE + sleep 5 + check_status + echo $_STATUS + if [ "$_RUNNING" = "1" ]; then + exit 0 + else + echo "Failed to start - make sure the $SNAME is fully configured properly" + exit 1 + fi + ;; + stop) + if [ "$_RUNNING" = "0" ]; then + echo $_STATUS + remove_pid_file + exit 0 + fi + echo "Stopping $SNAME..." + _PID_TO_KILL=$_PID; + echo "$SNAME (pid=${_PID_TO_KILL}) is stopping..." + kill -TERM $_PID_TO_KILL + sleep 5 + check_status_of_pid $_PID_TO_KILL + if [ "$_RUNNING" = "1" ]; then + kill -TERM $_PID_TO_KILL + fi + while [ "$_RUNNING" = "1" ]; do + sleep 2 + check_status_of_pid $_PID_TO_KILL + done + remove_pid_file + echo "$SNAME has stopped." + exit 0 + ;; + *) + echo "$0 start|stop" + ;; +esac + + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/bin/dcae-controller.sh b/dcae-controller-core/dcae-controller-platform-server/src/main/server/bin/dcae-controller.sh new file mode 100644 index 0000000..51a6416 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/bin/dcae-controller.sh @@ -0,0 +1,130 @@ +#!/bin/bash + +cd $(dirname $(dirname $(readlink -e $0))) + +ROOT=$(pwd) +CMD=$ROOT/bin/controller-platform-server-controller + +mkdir -p logs/ +echo $(date) bin/dcae-controller.sh "$@" >> logs/dcae-controller.sh.log + +if [ -e /opt/app/dcae-controller-platform-server ]; then + ### IST/ETE/PROD deployment + ### verify/fix JAVA and GROOVY setup + FOO=todo +fi + +CMD1=$1 +shift + +case $CMD1 in + start|stop|restart|console) + if [ -e makefile ]; then + make $CMD1 + exit + fi + case $CMD1 in + start) + JVMARGS=$(cat config/controller.properties | grep JVMARGS | sed 's/[^=]*=//') + $CMD $CMD1 $JVMARGS + ;; + stop|console) + $CMD $CMD1 + ;; + *) + $CMD stop + JVMARGS=$(cat config/controller.properties | grep JVMARGS | sed 's/[^=]*=//') + $CMD start $JVMARGS + ;; + esac + exit + ;; + backup|restore) + exit + ;; + config) + /opt/app/dcae-controller-core-utils/bin/setup_https.sh config/controller.properties + exit + ;; + sync-install) + ENV=$1 + DIR=$2 + if [ ! -e config/server.private ]; then + echo "No private key: $(pwd)/config/server.private" + exit 1 + fi + for f in $DIR/config/*; do + echo "Updating config/$(basename $f)" + rm -rf config/$(basename $f) + cp -rp $f config/$(basename $f) + done + for jar in /opt/app/dcae-*-{jars,model,manager,adaptor}/lib/*.jar /opt/app/ncomp-*-{jars,model,manager,adaptor}/lib/*.jar; do + echo "Updating $jar" + cp $jar lib/ + done + exit + ;; + add-service-artifact) + G=$1 + A=$2 + V=$3 + F=$HOME/.m2/repository/$(echo $G | sed 'sx\.x/xg')/$A/$V/$A-$V.jar + #echo Local artifact $F + #if [ ! -e $F ]; then + #mvn org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=$G:$A:$V:jar -DoutputDirectory=/tmp + #F=/tmp/$A-$V.jar + #fi + if [ ! -e $F ]; then F=/home/ubuntu/$A-$V.jar; fi + if [ ! -e $F ]; then echo "unable to find service artifact"; exit 1; fi + if [ -e lib/$A-*.jar ]; then + #echo removing old version + rm -f lib/$A-*.jar + fi + cp $F lib/ + touch config/runtime.properties + sed -i /factory.$A/d config/runtime.properties + jar tf $F | grep Factory.java | grep -v /gui/ | sed 's/.java$//' | sed sx/x.xg | awk -vA=$A '{ print "factory." A "." NR "=" $1}' >> config/runtime.properties + echo bin/dcae-controller.sh add-service-artifact "$@" >> config/init.sh + sort -u config/init.sh > config/init.sh.tmp + mv config/init.sh.tmp config/init.sh + exit + ;; + add-manager) + C2=$1 + U=$2 + P=$(echo $3 | sed 's/%/ /g') + MFILE=config/managers.properties + sed -i /$C2/d $MFILE + echo $C2.endpoint=http://IP:PORT >> $MFILE + echo $C2.user=$U >> $MFILE + echo $C2.password=$P >> $MFILE + exit + ;; + "") + echo " start" + for f in scripts/*groovy; do + cmd=$(basename $f | sed 's/.groovy$//') + echo " $cmd" + done + exit + ;; + usage) + echo ================ start ============================= + echo dcae-controller.sh start + for f in scripts/*groovy; do + cmd=$(basename $f | sed 's/.groovy$//') + echo ================ $cmd ============================= + bin/controller-platform-server-controller groovy scripts/$cmd + done + exit + ;; +esac + +if [ ! -e scripts/$CMD1.groovy ]; then + echo $0 $CMD1 does not exists. + exit 1 +fi + +bin/controller-platform-server-controller groovy scripts/$CMD1.groovy "$@" + + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/console.properties b/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/console.properties new file mode 100644 index 0000000..4b63607 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:PORT +localhost.user=console +localhost.password=CONSOLE_PW diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/controller.properties b/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/controller.properties new file mode 100644 index 0000000..21ff0a6 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/controller.properties @@ -0,0 +1,8 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = PORT +server.user.console = CONSOLE_PW +server.user.gui = GUI_PW +server.user.client = CLIENT_PW +server.user.monitor = MONITOR_PW diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/gui.properties b/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/gui.properties new file mode 100644 index 0000000..e69de29 diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/log4j.properties b/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/log4j.properties new file mode 100644 index 0000000..529c40e --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/log4j.properties @@ -0,0 +1,91 @@ +#log4j.debug=0 +log4j.rootLogger=warn, file +log4j.logger.org.openecomp.ncomp=info, file +log4j.additivity.org.openecomp.ncomp=false +log4j.logger.org.openecomp.ncomp.datarouter=warn, file +log4j.additivity.org.openecomp.ncomp.datarouter=false +#log4j.logger.org.apache.http.headers=debug, file +#log4j.logger.org.apache.http.wire=debug, file + +## uploaded logger +log4j.logger.org.openecomp.ncomp.sirius.manager.uploaded=info, uploaded +log4j.additivity.org.openecomp.ncomp.sirius.manager.uploaded=false +## request logging +log4j.logger.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=info, requests +log4j.additivity.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=false +## openstack polling +log4j.logger.org.openecomp.ncomp.openstack.OpenStackUtil.polling=info, polling +log4j.additivity.org.openecomp.ncomp.openstack.OpenStackUtil.polling=false + +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=logs/dcae-controller.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n +log4j.appender.file.MaxFileSize=50MB +log4j.appender.file.MaxBackupIndex=5 + +log4j.appender.uploaded=org.apache.log4j.RollingFileAppender +log4j.appender.uploaded.File=logs/dcae-controller-uploaded.log +log4j.appender.uploaded.layout=org.apache.log4j.PatternLayout +log4j.appender.uploaded.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n +log4j.appender.uploaded.MaxFileSize=50MB +log4j.appender.uploaded.MaxBackupIndex=5 + +log4j.appender.requests=org.apache.log4j.RollingFileAppender +log4j.appender.requests.File=logs/dcae-controller-requests.log +log4j.appender.requests.layout=org.apache.log4j.PatternLayout +log4j.appender.requests.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n +log4j.appender.requests.MaxFileSize=50MB +log4j.appender.requests.MaxBackupIndex=5 + +log4j.appender.polling=org.apache.log4j.RollingFileAppender +log4j.appender.polling.File=logs/dcae-controller-polling.log +log4j.appender.polling.layout=org.apache.log4j.PatternLayout +log4j.appender.polling.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n +log4j.appender.polling.MaxFileSize=50MB +log4j.appender.polling.MaxBackupIndex=5 + + +### ECOMP Logging + +log4j.logger.com.att.eelf.audit=info, audit +log4j.additivity.com.att.eelf.audit=false +log4j.logger.com.att.eelf.audit=info, metrics +log4j.additivity.com.att.eelf.metrics=false +log4j.logger.com.att.eelf.audit=info, error +log4j.additivity.com.att.eelf.error=false +log4j.logger.com.att.eelf.audit=info, debug +log4j.additivity.com.att.eelf.debug=false + +log4j.appender.audit=org.apache.log4j.RollingFileAppender +log4j.appender.audit.File=logs/audit.log +log4j.appender.audit.layout=org.apache.log4j.PatternLayout +log4j.appender.audit.layout.ConversionPattern=%d{MM/dd-HH:mm:ss.SSS}|%logger|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{Timer}|%m%n + +log4j.appender.audit.MaxFileSize=50MB +log4j.appender.audit.MaxBackupIndex=5 + +log4j.appender.metrics=org.apache.log4j.RollingFileAppender +log4j.appender.metrics.File=logs/audit.log +log4j.appender.metrics.layout=org.apache.log4j.PatternLayout +log4j.appender.metrics.layout.ConversionPattern=%d{MM/dd-HH:mm:ss.SSS}|%logger|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{Timer}|%m%n + +log4j.appender.metrics.MaxFileSize=50MB +log4j.appender.metrics.MaxBackupIndex=5 + +log4j.appender.error=org.apache.log4j.RollingFileAppender +log4j.appender.error.File=logs/audit.log +log4j.appender.error.layout=org.apache.log4j.PatternLayout +log4j.appender.error.layout.ConversionPattern=%d{MM/dd-HH:mm:ss.SSS}|%logger|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{Timer}|%m%n + +log4j.appender.error.MaxFileSize=50MB +log4j.appender.error.MaxBackupIndex=5 + +log4j.appender.debug=org.apache.log4j.RollingFileAppender +log4j.appender.debug.File=logs/audit.log +log4j.appender.debug.layout=org.apache.log4j.PatternLayout +log4j.appender.debug.layout.ConversionPattern=%d{MM/dd-HH:mm:ss.SSS}|%logger|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{Timer}|%m%n + +log4j.appender.debug.MaxFileSize=50MB +log4j.appender.debug.MaxBackupIndex=5 + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/makefile b/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/makefile new file mode 100644 index 0000000..a43b607 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/makefile @@ -0,0 +1,9 @@ + +restart: stop start + +start: + M2_HOME=/home/ncomp/.m2 bin/controller-platform-server-controller start +stop: + bin/controller-platform-server-controller stop +console: + bin/controller-platform-server-controller console diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/pw.sh.sh b/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/pw.sh.sh new file mode 100644 index 0000000..af4ae0d --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/config/pw.sh.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +### used to generate random passwords + + +echo '#!/bin/bash' +echo "" + +echo 'cat \' + +for i in CONSOLE GUI CLIENT MONITOR +do + echo ' |' sed s/${i}_PW/$(echo $i:$(date +%s) | sha256sum | base64 | head -c 20 ; echo)/ \\ +done + \ No newline at end of file diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-dcae-location.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-dcae-location.groovy new file mode 100644 index 0000000..9aff1e2 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-dcae-location.groovy @@ -0,0 +1,50 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh add-dcae-location OPTIONS') +cli.n(longOpt:'name', args:1, 'Name of DCAE location') +cli.l(longOpt:'location', args:1, 'Name of Openstack location') +cli.p(longOpt:'project', args:1, 'Name of Openstack Project') + +def options = cli.parse(args) + +if (options == null || ! options.name || ! options.location || ! options.project ) { + println "Bad Usage:" + cli.usage() + System.exit(1) +} + +server.create("/locations/$options.name", [ openstackProject : [ '$ref' : "/openstack/locations/$options.location/projects/$options.project" ] ]) +// needed to persist. +server.update("/",[:]) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-openstack-location.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-openstack-location.groovy new file mode 100644 index 0000000..3ab8669 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-openstack-location.groovy @@ -0,0 +1,46 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh add-openstack-location OPTIONS') +cli.n(longOpt:'location', args:1, 'Name of location') +cli.k(longOpt:'keystoneURL', args:1, 'Keystone URL') +cli.b(longOpt:'bypassIp', args:1, 'Bypass Ip') +cli.v(longOpt:'version', args:1, 'Openstack version') + +def options = cli.parse(args) + +if (options == null || ! options.location || ! options.keystoneURL || ! options.bypassIp ) { + cli.usage() + System.exit(0) +} + +server.create("/openstack/locations/$options.location", [keystoneUrl:options.keystoneURL, bypassIp:options.bypassIp, version : options.version]) diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-openstack-project.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-openstack-project.groovy new file mode 100644 index 0000000..ab5ab07 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-openstack-project.groovy @@ -0,0 +1,48 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh add-openstack-project OPTIONS') +cli.o(longOpt:'location', args:1, 'Name of Openstack location') +cli.n(longOpt:'project', args:1, 'Name of project') +cli.t(longOpt:'tenantId', args:1, 'Tenant Id') +cli.u(longOpt:'user', args:1, 'User Id for this Tenant') + +def options = cli.parse(args) + +if (options == null || ! options.project || ! options.tenantId || ! options.user || ! options.location ) { + cli.usage() + System.exit(0) +} + +server.create("/openstack/locations/$options.location/projects/$options.project", [tenantId:options.tenantId, adminUser:options.user]) +server.update("/openstack/locations/$options.location/projects/$options.project", [:]) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-service-instance.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-service-instance.groovy new file mode 100644 index 0000000..19808ac --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-service-instance.groovy @@ -0,0 +1,91 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh add-service-instance OPTIONS') +cli.i(longOpt:'instance', args:1, 'Name of Service Instance') +cli.s(longOpt:'service', args:1, 'Name of Service (optional but then descriptor)') +cli.c(longOpt:'config', args:1, 'JSON configuration (optional)') +cli.f(longOpt:'configFile', args:1, 'JSON configuration File (optional)') +cli.C(longOpt:'className', args:1, 'Service Class (optional)') +cli.d(longOpt:'descriptor', args:1, 'Descriptor (optional)') +cli._(longOpt:'debug', args:0, 'Debug') +cli._(longOpt:'controllerEndpoint', args:1, 'Name of controller endpoint (optional)') + +def options = cli.parse(args) + +if (options == null || ! options.instance || ( ! options.service && ! options.descriptor ) ) { + cli.usage() + System.exit(1) +} + +server = new DcaeDcaePlatformControllerConsole("console.properties",options.controllerEndpoint ? options.controllerEndpoint : "localhost") +def service = options.descriptor ? options.descriptor : options.service + + +if (options.config && options.configFile) { + println "only one of --config and --configFile can be specified." + System.exit(1) +} + +def o = [:] + +if (options.config) { + o = Utils.json2object(new JSONObject(options.config)) +} + +if (options.configFile) { + File f = new File(options.configFile) + if (!f.exists()) { + println "Configuration File does not exists: $f.absolutePath" + System.exit(1) + } + o = Utils.json2object(new JSONObject(f.text)) +} + + +if (options.className) o['$class'] = options.className + +if (options.descriptor) { + def d = server.list("/descriptors/$options.descriptor",100) + o['$class'] = "${d.servicePackage}.${d.serviceInstanceClass}" + if (d.vmType != null) o.vmType = [ '$ref' : "/openstack/vmTypes/$d.vmType" ] + if (d.managerPortNumber != null) o.managerPortNumber = d.managerPortNumber +} + +if (options.debug) { + println o +} + +server.create("/services/$service/instances/$options.instance", o) +// needed to persist. +server.update("/",[:]) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-service.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-service.groovy new file mode 100644 index 0000000..e2c8c36 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/add-service.groovy @@ -0,0 +1,71 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh add-service OPTIONS') +cli.s(longOpt:'service', args:1, 'Name of Service') +cli.c(longOpt:'config', args:1, 'JSON configuration (optional)') +cli.f(longOpt:'configFile', args:1, 'JSON configuration File (optional)') +cli.C(longOpt:'className', args:1, 'Service Class') + +def options = cli.parse(args) + +if (options == null || ! options.service || ! options.className ) { + cli.usage() + System.exit(1) +} + +if (options.config && options.configFile) { + println "only one of --config and --configFile can be specified." + System.exit(1) +} + +def o = [:] + +if (options.config) { + o = Utils.json2object(new JSONObject(options.config)) +} + +if (options.configFile) { + File f = new File(options.configFile) + if (!f.exists()) { + println "Configuration File does not exists: $f.absolutePath" + System.exit(1) + } + o = Utils.json2object(new JSONObject(f.text)) +} + + +o['$class'] = options.className + +server.create("/services/$options.service", o) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/configure-service-instance.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/configure-service-instance.groovy new file mode 100644 index 0000000..29e9935 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/configure-service-instance.groovy @@ -0,0 +1,50 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh configure-service-instance OPTIONS') +cli.s(longOpt:'service', args:1, 'Name of Service') +cli.i(longOpt:'instance', args:1, 'Name of Service Instance') +cli._(longOpt:'controllerEndpoint', args:1, 'Name of controller endpoint (optional)') + +def options = cli.parse(args) + +if (options == null || ! options.service || ! options.instance ) { + cli.usage() + System.exit(1) +} +server = new DcaeDcaePlatformControllerConsole("console.properties",options.controllerEndpoint ? options.controllerEndpoint : "localhost") + +def o = [ + instanceName : options.instance, +] + +server.operation("/services/$options.service", "pushManagerConfiguration", o) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/console.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/console.groovy new file mode 100644 index 0000000..fa62023 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/console.groovy @@ -0,0 +1,27 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/create-keypair.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/create-keypair.groovy new file mode 100644 index 0000000..d7cc2ee --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/create-keypair.groovy @@ -0,0 +1,51 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.openecomp.ncomp.utils.CryptoUtils +import java.text.SimpleDateFormat + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh operation-service-instance OPTIONS') +cli.f(longOpt:'fileroot', args:1, 'File name Root') + +def options = cli.parse(args) + +if (options == null || ! options.fileroot ) { + cli.usage() + System.exit(1) +} + +["private","public"].each { x -> + def f = new File("${options.fileroot}.$x") + if (! f.exists() ) return + println "$f already exists. Proceed? [no, yes]" + def r = System.in.newReader().readLine() + switch (r) { + case "yes": break + default: System.exit(0) + } + def t = new SimpleDateFormat("yyyy-MM-dd-HH-mm").format(f.lastModified()) + f.renameTo "${options.fileroot}.$x.$t" +} + +CryptoUtils.createKeyPair(options.fileroot); + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/create-object.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/create-object.groovy new file mode 100644 index 0000000..43f9664 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/create-object.groovy @@ -0,0 +1,57 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh create-object OPTIONS') +cli.p(longOpt:'path', args:1, argName:'path', 'Resource Path') +cli.f(longOpt:'file', args:1, argName:'configFile', 'JSON configuration File (optional)') +cli.C(longOpt:'className', args:1, argName:'className', 'Class Name') + +def options = cli.parse(args) + +if (options == null || ! options.path || ! options.file ) { + cli.usage() + System.exit(1) +} + +File f = new File(options.file) +if (!f.exists()) { + println "Configuration File does not exists: $f.absolutePath" + System.exit(1) +} +o = Utils.json2object(new JSONObject(f.text)) + + +if ( options.className ) o['$class'] = options.className + +server.create(options.path, o) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/databus-refresh.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/databus-refresh.groovy new file mode 100644 index 0000000..b0791ba --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/databus-refresh.groovy @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh databus-refresh OPTIONS') +cli.m(longOpt:'nameMatch', args:1, 'Name Match') + +def options = cli.parse(args) + +if (options == null || ! options.nameMatch) { + cli.usage() + System.exit(1) +} + +def o = [nameMatch:options.nameMatch] + +server.operation("/", "refreshDataBus", o) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/decrypt-value.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/decrypt-value.groovy new file mode 100644 index 0000000..de75151 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/decrypt-value.groovy @@ -0,0 +1,38 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.openecomp.ncomp.utils.CryptoUtils + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh encrypt-password OPTIONS') +cli.v(longOpt:'value', args:1, 'Value to decrypt') + +def options = cli.parse(args) + +if (options == null || ! options.value ) { + cli.usage() + System.exit(1) +} + +str = CryptoUtils.decryptPrivate(CryptoUtils.getKey("config/server.private"),options.value); + +println "$str" diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/delete-object.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/delete-object.groovy new file mode 100644 index 0000000..1a6278e --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/delete-object.groovy @@ -0,0 +1,45 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh delete-object OPTIONS') +cli.p(longOpt:'path', args:1, argName:'path', 'Resource Path') + +def options = cli.parse(args) + +if (options == null || ! options.path ) { + cli.usage() + System.exit(1) +} + +server.delete(options.path) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-descriptor.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-descriptor.groovy new file mode 100644 index 0000000..9487c79 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-descriptor.groovy @@ -0,0 +1,82 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh deploy-descriptor OPTIONS') +cli.n(longOpt:'name', args:1, 'Descriptor Name') +cli._(longOpt:'debug', args:0, 'Debug') + +def options = cli.parse(args) + +if (options == null || ! options.name ) { + cli.usage() + System.exit(1) +} + +def d = server.list("/descriptors/$options.name",100) + +if (options.debug) { + println Utils.p(d) +} + +/* +if (d.artifact != null) { +Utils.runCmd("bin/dcae-controller.sh add-service-artifact org.openecomp.dcae.controller $d.artifact-model 0.1.0-SNAPSHOT",5000) + +switch (d.artifact) { +case "dcae-controller-service-cdap": + Utils.runCmd("bin/dcae-controller.sh add-service-artifact org.openecomp.dcae.controller $d.artifact-adaptor 0.1.0-SNAPSHOT", 5000) ; break +default: + Utils.runCmd("bin/dcae-controller.sh add-service-artifact org.openecomp.dcae.controller $d.artifact-manager 0.1.0-SNAPSHOT", 5000) +} + +switch (d['$class']) { + case "org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor": + if (d.encryptedPassword == null || ! d.encryptedPassword.startsWith("rsa:") ) { + System.err.println "Bad Password: $d.encryptedPassword" + System.exit(2) + } + def p = d.encryptedPassword.replace(" ","%") + Utils.runCmd("bin/dcae-controller.sh add-manager ${d.servicePackage}.${d.serviceInstanceClass} $d.managerUser $p",5000) +} + + +Utils.runCmd("bin/dcae-controller.sh stop", 20000) +Utils.runCmd("bin/dcae-controller.sh start", 30000) + +Utils.runCmd("sleep 25",60000) +} +*/ + +def o = [:] +o['$class'] = "${d.servicePackage}.${d.serviceClass}" +if (d.managerPortNumber != null) o.managerPortNumber = d.managerPortNumber + +// creating service +server.create("/services/$options.name", o) diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-manual-vm-service-instance.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-manual-vm-service-instance.groovy new file mode 100644 index 0000000..f25dbea --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-manual-vm-service-instance.groovy @@ -0,0 +1,58 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh deploy-service-instance OPTIONS') +cli.i(longOpt:'instance', args:1, 'Name of Service Instance') +cli.s(longOpt:'service', args:1, 'Name of Service') +cli._(longOpt:'publicIp', args:1, 'Public IP') +cli._(longOpt:'privateIp', args:1, 'Private IP') +cli._(longOpt:'port', args:1, 'Port Number') + +def options = cli.parse(args) + +if (options == null || ! options.service || ! options.instance ) { + cli.usage() + System.exit(1) +} + +def o = [ + '$class':"org.openecomp.dcae.controller.service.vm.PhysicalMachine", +] + +if (options.publicIp) o.publicIp = options.publicIp +if (options.privateIp) o.privateIp = options.privateIp +if (options.port) o.managerPortNumber = options.port + +def n ="manual:$options.service:$options.instance:0" + +server.create("/services/$options.service/instances/$options.instance/servers/$n", o) diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-service-instance.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-service-instance.groovy new file mode 100644 index 0000000..61c45c5 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-service-instance.groovy @@ -0,0 +1,51 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh deploy-service-instance OPTIONS') +cli.i(longOpt:'instance', args:1, argName:'instance', 'Name of Service Instance') +cli.s(longOpt:'service', args:1, argName:'service', 'Name of Service') +cli.c(longOpt:'container', args:1, argName:'container', 'Path to Service Container') +cli._(longOpt:'controllerEndpoint', args:1, 'Name of controller endpoint (optional)') + +def options = cli.parse(args) + +if (options == null || ! options.service || ! options.instance ) { + cli.usage() + System.exit(1) +} + +server = new DcaeDcaePlatformControllerConsole("console.properties",options.controllerEndpoint ? options.controllerEndpoint : "localhost") + +def o = [ instanceName: options.instance ] + +if (options.container) o.containerPath = options.container +server.operation("/services/$options.service", "deploy", o) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-undeployed-descriptors.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-undeployed-descriptors.groovy new file mode 100644 index 0000000..1b9c7cb --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-undeployed-descriptors.groovy @@ -0,0 +1,59 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh deploy-undeployed-descriptors OPTIONS') + +def options = cli.parse(args) + +if (options == null ) { + println "Bad Usage:" + cli.usage() + System.exit(1) +} + +l1 = server.list("/descriptors").descriptors +l2 = server.list("/services").services + +println "descriptors: $l1" +println "services: $l2" + +(l1 - l2).each { n -> + d = server.list("/descriptors/$n") + switch (d['$class']) { + case null: break + default: + println "Deploying undeployed descriptor $n" + Utils.runCmd("bin/dcae-controller.sh deploy-descriptor --name $n", 100000) + l3 = server.list("/",0).services + if (l3.contains(n)) + println "Done: services: ${server.list("/services").services}" + else + System.err.println "Failed to deploy $n: services: ${server.list("/services").services}" + } +} + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-user.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-user.groovy new file mode 100644 index 0000000..5100faa --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-user.groovy @@ -0,0 +1,50 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh deploy-user OPTIONS') +cli.p(longOpt:'project', args:1, 'Openstack Project') +cli.l(longOpt:'location', args:1, 'Openstack Location') +cli.u(longOpt:'user', args:1, 'User') + +def options = cli.parse(args) + +if (options == null || ! options.user || ! options.location || ! options.project ) { + cli.usage() + System.exit(1) +} + +server.operation("/openstack/locations/$options.location", "deployUser", [ + projectName : options.project, + user : [ '$ref' : "/users/$options.user", '$refroot' :"/" ] +]) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-vmType.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-vmType.groovy new file mode 100644 index 0000000..40669d8 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/deploy-vmType.groovy @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh deploy-vmType OPTIONS') +cli.v(longOpt:'vmType', args:1, 'Name of VmType') +cli.l(longOpt:'location', args:1, 'Openstack Location') +cli.p(longOpt:'project', args:1, 'Openstack Project') + +def options = cli.parse(args) + +if (options == null || ! options.vmType || ! options.location || ! options.project ) { + cli.usage() + System.exit(1) +} + +server.operation("/openstack/locations/$options.location", "deployVmType", [ projectName : options.project, vmTypeName : options.vmType ]) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/encrypt-file.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/encrypt-file.groovy new file mode 100644 index 0000000..ee146c1 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/encrypt-file.groovy @@ -0,0 +1,64 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.openecomp.ncomp.utils.CryptoUtils +import java.security.SecureRandom; +import java.math.BigInteger; +import org.json.JSONObject; +import org.yaml.snakeyaml.DumperOptions; +import org.yaml.snakeyaml.Yaml; +import static org.openecomp.ncomp.sirius.manager.console.Utils.*; + +class X { +static def object2yaml(Object object) { + DumperOptions options = new DumperOptions(); + options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK); + options.setSplitLines(true); + options.setWidth(100000); + Yaml y = new Yaml(options); + JSONObject json = (JSONObject) object2json(object); + def data = y.load(json.toString()); + return y.dump(data); +} +} + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh encrypt-file OPTIONS') +cli.k(longOpt:'key', args:1, 'Public Key File') +cli.f(longOpt:'file', args:1, 'File') + +def options = cli.parse(args) + +if (options == null || ! options.key || ! options.file ) { + cli.usage() + System.exit(1) +} + +def password = new BigInteger(130, new SecureRandom()).toString(32); + +println password + +str = CryptoUtils.encrypt(password,new File(options.file).text).replace("\r",""); + +str1 = CryptoUtils.encryptPublic(CryptoUtils.getKey(options.key),password).replace("\r",""); + +println X.object2yaml(['encrypted-file': [ content:str, 'encrypted-password' : str1 ]]) diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/encrypt-password.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/encrypt-password.groovy new file mode 100644 index 0000000..d13ce8c --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/encrypt-password.groovy @@ -0,0 +1,43 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.openecomp.ncomp.utils.CryptoUtils + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh encrypt-password OPTIONS') +cli.k(longOpt:'key', args:1, 'Public Key File') + +def options = cli.parse(args) + +if (options == null || ! options.key ) { + cli.usage() + System.exit(1) +} + +def password = System.console().readLine 'Password to encrypt?' + + +str = CryptoUtils.encryptPublic(CryptoUtils.getKey(options.key),password); + +str = str.replace('\n',' ').replace('\r',' ') + +println "rsa:$str" diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/get-service-instance-configuration.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/get-service-instance-configuration.groovy new file mode 100644 index 0000000..bf1b44e --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/get-service-instance-configuration.groovy @@ -0,0 +1,46 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh get-service-instance-configuration OPTIONS') +cli.i(longOpt:'instance', args:1, 'Name of Service Instance') +cli.s(longOpt:'service', args:1, 'Name of Service') + +def options = cli.parse(args) + +if (options == null || ! options.instance || ! options.service ) { + cli.usage() + System.exit(1) +} + +println Utils.object2json(server.list("/services/$options.service/instances/$options.instance", 100)).toString(2) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/get-service-instance-manager-configuration.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/get-service-instance-manager-configuration.groovy new file mode 100644 index 0000000..cf18a8d --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/get-service-instance-manager-configuration.groovy @@ -0,0 +1,48 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh get-service-instance-configuration OPTIONS') +cli.i(longOpt:'instance', args:1, 'Name of Service Instance') +cli.s(longOpt:'service', args:1, 'Name of Service') +cli._(longOpt:'controllerEndpoint', args:1, 'Name of controller endpoint (optional)') + +def options = cli.parse(args) + +if (options == null || ! options.instance || ! options.service ) { + cli.usage() + System.exit(1) +} + +server = new DcaeDcaePlatformControllerConsole("console.properties",options.controllerEndpoint ? options.controllerEndpoint : "localhost") +def o = [ instanceName : options.instance ] +println Utils.object2json(server.operation("/services/$options.service", "managerConfiguration", o)).toString(2) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/init-controller.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/init-controller.groovy new file mode 100644 index 0000000..28d0a78 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/init-controller.groovy @@ -0,0 +1,32 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + +try { server.delete("/openstack") } catch (e) {} +server.create("/openstack", [:]) diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/list-object.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/list-object.groovy new file mode 100644 index 0000000..9c1b03a --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/list-object.groovy @@ -0,0 +1,48 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh list-object OPTIONS') +cli.p(longOpt:'path', args:1, argName:'path', 'Resource Path') +cli.l(longOpt:'levels', args:1, argName:'levels', 'Resource Path') + +def options = cli.parse(args) + +if (options == null || ! options.path ) { + cli.usage() + System.exit(1) +} + +def levels = options.levels ? Integer.parseInt(options.levels) : 0 + +println Utils.p(server.list(options.path,levels)) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/operation-service-instance.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/operation-service-instance.groovy new file mode 100644 index 0000000..b71031b --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/operation-service-instance.groovy @@ -0,0 +1,66 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh operation-service-instance OPTIONS') +cli.s(longOpt:'service', args:1, 'Name of Service') +cli.i(longOpt:'instance', args:1, 'Name of Service Instance') +cli.o(longOpt:'operation', args:1, 'Name of Operation') +cli.p(longOpt:'parameters', args:1, 'JSON Object with parameters (optional)') + +def options = cli.parse(args) + +if (options == null || ! options.service || ! options.operation || ! options.instance ) { + cli.usage() + System.exit(1) +} + +def o = [ + instanceName : options.instance, + operation : options.operation, +] + +if (options.parameters) { + o.parameters = "$options.parameters" +} + +def res = server.operation("/services/$options.service", "managerOperation", o) + +try { + def json = new JSONObject(res.returns) + println json.toString(2) +} +catch (e) { + println res.returns +} + + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/operation-service.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/operation-service.groovy new file mode 100644 index 0000000..7a0e5c0 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/operation-service.groovy @@ -0,0 +1,53 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh operation-service OPTIONS') +cli.s(longOpt:'service', args:1, 'Name of Service') +cli.o(longOpt:'operation', args:1, 'Name of Operation') +cli.p(longOpt:'parameters', args:1, 'JSON Object with parameters (optional)') + +def options = cli.parse(args) + +if (options == null || ! options.service || ! options.operation ) { + cli.usage() + System.exit(1) +} + +def o = [:] + +if (options.parameters) { + o = Utils.json2object(new JSONObject(options.parameters)) +} + +println Utils.object2json(server.operation("/services/$options.service", options.operation, o)).toString(2) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/rackspace-substitute.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/rackspace-substitute.groovy new file mode 100644 index 0000000..855e151 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/rackspace-substitute.groovy @@ -0,0 +1,60 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.yaml.snakeyaml.Yaml; + +import org.openecomp.ncomp.utils.CryptoUtils; +import org.openecomp.ncomp.utils.StringUtil; + +import groovy.text.SimpleTemplateEngine +import groovy.io.FileType + +import org.openecomp.ncomp.webservice.utils.FileUtils +import static org.openecomp.ncomp.sirius.manager.console.Utils.*; + + +def cli = new CliBuilder(usage:'dcae-controller.sh rackspace-substitute OPTIONS') +cli.a(longOpt:'from', args:1, 'Source Directory') +cli.b(longOpt:'to', args:1, 'Destination Directory') +cli.f(longOpt:'file', args:1, 'Substitution YAML File') + +def options = cli.parse(args) + +def fromDir = new File(options.from) +def toDir = new File(options.to) + +if (toDir.exists()) + FileUtils.deleteDirectory(toDir) + +def f = new File(options.file) +Yaml yaml = new Yaml(); +def m = yaml.load(f.text) + +if (m['POLICY-IP'] == null) m['POLICY-IP'] = "10.0.6.1" + +fromDir.eachFileRecurse (FileType.FILES) { file -> + def ofile = new File(file.toString().replace(options.from, options.to)) + switch (file.name) { + default: + ofile.parentFile.mkdirs() + ofile.text = StringUtil.expandUsingJson(file.text, object2json(m), "@") + } +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/report.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/report.groovy new file mode 100644 index 0000000..a40e367 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/report.groovy @@ -0,0 +1,64 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh reports OPTIONS') +cli.n(longOpt:'name', args:1, 'Report Name') +cli._(longOpt:'debug', args:0, 'Debug') +cli._(longOpt:'controllerEndpoint', args:1, 'Name of controller endpoint (optional)') + +def options = cli.parse(args) +server = new DcaeDcaePlatformControllerConsole("console.properties",options.controllerEndpoint ? options.controllerEndpoint : "localhost") + +if (options == null || ! options.name ) { + cli.usage() + System.exit(1) +} + +def table = server.operation("/gui","getTable", [path:"$options.name",start:"-24hour",end:"now"]) + + +def convert(table) { +// println table.rows.get(0) + def res = [header:[],rows:[]] + table.columns.each { col -> + res.header += col.colName + } + table.rows.each { row -> + def r = [] + row.cells.each { cell -> + r += cell.value + } + res.rows += [ r ] + } + return res +} + +println Utils.pTable(convert(table.returns),"txt",System.out) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/setup-openstack-bash-shell.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/setup-openstack-bash-shell.groovy new file mode 100644 index 0000000..5dd25f8 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/setup-openstack-bash-shell.groovy @@ -0,0 +1,74 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.openecomp.ncomp.sirius.manager.JavaHttpClient; + + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh setup-openstack-bash-shell OPTIONS') +cli.l(longOpt:'location', args:1, 'Openstack Location') +cli.p(longOpt:'project', args:1, 'Openstack Project') + +def options = cli.parse(args) + +if (options == null || ! options.location || ! options.project ) { + cli.usage() + System.exit(1) +} + +def x = server.list("/openstack/locations/$options.location", 1000) +def p = x.projects[options.project] + +if (p == null) { + println "no project $options.project exists at location $options.location" + System.exit(1) +} + +def prop = org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath("openstack.properties") + +def pw = prop.getProperty("${options.location}.password.$p.adminUser") +if (pw == null) { + println "Unable to find property ${options.location}.password.$p.adminUser in openstack.properties" + System.exit(1) +} + +def f = new File(".openstack.${options.location}.${options.project}") +if (f.exists()) f.delete() + +f << "export OS_AUTH_URL=$x.keystoneUrl\n" +f << "export OS_TENANT_ID=$p.tenantId\n" +f << "export OS_TENANT_NAME=$options.location\n" +f << "export OS_PROJECT_NAME=$options.location\n" +f << "export OS_USERNAME=$p.adminUser\n" +f << "export OS_PASSWORD=${JavaHttpClient.decryptPassword(pw)}\n" +if (p.region != null) f << "export OS_REGION_NAME=$p.region\n" + +println "Wrote . $f" + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-configuration-from-directory.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-configuration-from-directory.groovy new file mode 100644 index 0000000..a155b9c --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-configuration-from-directory.groovy @@ -0,0 +1,83 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject +import org.openecomp.ncomp.sirius.manager.ManagementServer; + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh deploy-descriptor OPTIONS') +cli.d(longOpt:'directory', args:1, 'Configuration Directory') +cli._(longOpt:'force', args:0, 'Force update') +cli._(longOpt:'debug', args:0, 'Debug') + +def options = cli.parse(args) + +if (options == null || ! options.directory ) { + cli.usage() + System.exit(1) +} + +m = new ManagementServer() +m.eFactory = org.openecomp.dcae.controller.platform.controller.ControllerFactory.eINSTANCE +m.eClassName = "DcaePlatformController" +org.openecomp.dcae.controller.platform.controller.ControllerPackage.eINSTANCE +org.openecomp.dcae.controller.service.vm.VmPackage.eINSTANCE +m.addFactory(org.openecomp.dcae.controller.service.vm.VmFactory.eINSTANCE) +m.addRuntimeFactories(null) + +def o = m.load(options.directory) +o = Utils.json2object(Utils.object2json(o)) +o.services = null + +if (o.openstack != null && o.openstack.locations != null) { + o.openstack.locations.each { locN, loc -> + loc.projects.each { projectN, project -> + project.each { n2, v2 -> + switch (n2) { + case "privateNetwork" : + case "region" : + case "publicNetwork" : + case "adminUser" : + case "apiKey" : + case "tenantId" : break + default: project[n2] = null + } + } + } + } +} + +if (options.force) { o['$forcedUpdate'] = 1 } +if (options.debug) { println Utils.object2json(o).toString(2) } + + +// currently references are not handled correctly in SOMF to new objects. So doing it twice fixes that. +// first time we do not need to persist the changes on the controller +o['$nosave'] = 1 +server.update("/",o) +o['$nosave'] = null +server.update("/",o) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-configuration.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-configuration.groovy new file mode 100644 index 0000000..386515a --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-configuration.groovy @@ -0,0 +1,59 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject +import org.openecomp.ncomp.sirius.manager.ManagementServer; + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh sync-configuration OPTIONS') +cli.e(longOpt:'environment', args:1, 'Configuration Directory') +cli._(longOpt:'force', args:0, 'Force update') +cli._(longOpt:'debug', args:0, 'Debug') + +def options = cli.parse(args) + +if (options == null || ! options.environment ) { + cli.usage() + System.exit(1) +} + +def dir = "GITLINK/$options.environment/controller-gen" + +def f = new File(dir) + +if (!f.exists()) { + println "Configuration directory does not exists: $dir" + System.exit(1) +} + +Utils.runCmd("bin/dcae-controller.sh sync-install $options.environment $dir", 60000) + +Utils.runCmd("bin/dcae-controller.sh start", 60000) + +Utils.runCmd("bin/dcae-controller.sh sync-configuration-from-directory --directory $dir/resources", 600000) + +Utils.runCmd("bin/dcae-controller.sh deploy-undeployed-descriptors", 6000000) + +Utils.runCmd("bin/dcae-controller.sh sync-services-from-directory --directory $dir/services-resources", 600000) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-services-from-directory.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-services-from-directory.groovy new file mode 100644 index 0000000..845b510 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-services-from-directory.groovy @@ -0,0 +1,90 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.webservice.utils.JsonUtils + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh sync-services-from-directory OPTIONS') +cli.d(longOpt:'directory', args:1, 'Configuration Directory') +cli._(longOpt:'force', args:0, 'Force update') +cli._(longOpt:'debug', args:0, 'Debug') + +def options = cli.parse(args) + +if (options == null || ! options.directory ) { + cli.usage() + System.exit(1) +} + +m = new ManagementServer() +m.eFactory = org.openecomp.dcae.controller.platform.controller.ControllerFactory.eINSTANCE +m.eClassName = "DcaePlatformController" +org.openecomp.dcae.controller.platform.controller.ControllerPackage.eINSTANCE +org.openecomp.dcae.controller.service.vm.VmPackage.eINSTANCE +m.addFactory(org.openecomp.dcae.controller.service.vm.VmFactory.eINSTANCE) +m.addRuntimeFactories(null) + +def o = m.load(options.directory) +o = Utils.json2object(Utils.object2json(o)) + +def rootFile = new File("$options.directory/services") + +if (options.debug) { println Utils.object2json(o).toString(2) } + +def services = server.list("/services").services + +rootFile.listFiles().each { File f -> +// println "$f" + String sname = f.name + if (sname.endsWith(".json")) return + println "service $sname" + if (! services.contains(sname)) { + println "No such service: $sname" + return + } + def instances = server.list("/services/$sname/instances").instances + def dir = new File("$options.directory/services/$sname/instances") + dir.listFiles().each { File f1 -> + def iname = f1.name.replace(".json", "") + JSONObject instance = JsonUtils.file2json("$options.directory/services/$sname/instances/${iname}.json") +// println "json ${instance.toString(2)}" + instance.put('$nosave',1); +// instance.put('$useNull',1); + if (instances.contains(iname)) { + server.update("/services/$sname/instances/$iname",instance) + println "updating instance $iname" + } else { + server.create("/services/$sname/instances/$iname",instance) + println "creating instance $iname" + } + } +} + +server.update("/",[:]) + + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/tosca-add-blueprint.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/tosca-add-blueprint.groovy new file mode 100644 index 0000000..b08fdc3 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/tosca-add-blueprint.groovy @@ -0,0 +1,69 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh add-service-instance OPTIONS') +cli.i(longOpt:'instance', args:1, 'Name of Service Instance') +cli.s(longOpt:'service', args:1, 'Name of Service (optional but then descriptor)') +cli.f(longOpt:'toscaFile', args:1, 'Tosca configuration File') +cli._(longOpt:'debug', args:0, 'Debug') +cli._(longOpt:'controllerEndpoint', args:1, 'Name of controller endpoint (optional)') + +def options = cli.parse(args) + +if (options == null || ! options.instance || ! options.service || ! options.toscaFile ) { + cli.usage() + System.exit(1) +} + +server = new DcaeDcaePlatformControllerConsole("console.properties",options.controllerEndpoint ? options.controllerEndpoint : "localhost") + +def service = options.descriptor ? options.descriptor : options.service + +if (options.config) { + o = Utils.json2object(new JSONObject(options.config)) +} + +File f = new File(options.toscaFile) +if (!f.exists()) { + println "Tosca File does not exists: $f.absolutePath" + System.exit(1) +} + +def o = [instanceName:options.instance,blueprintYaml:f.text] + + +if (options.debug) { + println o +} + +server.operation("/services/$options.service", "uploadBlueprint", o) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/undeploy-service-instance-chef.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/undeploy-service-instance-chef.groovy new file mode 100644 index 0000000..1e7ed99 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/undeploy-service-instance-chef.groovy @@ -0,0 +1,68 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +import org.json.JSONObject +import org.junit.After; + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh undeploy-service-instance OPTIONS') +cli.i(longOpt:'instance', args:1, argName:'instance', 'Name of Service Instance') +cli.s(longOpt:'service', args:1, argName:'service', 'Name of Service') + +def options = cli.parse(args) + +if (options == null || ! options.service || ! options.instance ) { + cli.usage() + System.exit(1) +} + +def servers = [] + +server.listAll("/services/$options.service/instances/$options.instance/servers/.*/networks/.*").each { p -> + + def x = server.list(p) + if ( x.dnsName == null) return + servers += x.dnsName +} + +servers.each { n -> + try { + println "$n" + Utils.runCmd("knife node delete $n --yes",10000) + Utils.runCmd("knife client delete $n --yes",10000) + } + catch (e) { + println "Error removing node from CHEF" + } +} + +server.operation("/services/$options.service", "undeploy", [ instanceName: options.instance ]) + + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/undeploy-service-instance.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/undeploy-service-instance.groovy new file mode 100644 index 0000000..bc5de44 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/undeploy-service-instance.groovy @@ -0,0 +1,46 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh undeploy-service-instance OPTIONS') +cli.i(longOpt:'instance', args:1, argName:'instance', 'Name of Service Instance') +cli.s(longOpt:'service', args:1, argName:'service', 'Name of Service') + +def options = cli.parse(args) + +if (options == null || ! options.service || ! options.instance ) { + cli.usage() + System.exit(1) +} + +server.operation("/services/$options.service", "undeploy", [ instanceName: options.instance ]) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/undeploy-user.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/undeploy-user.groovy new file mode 100644 index 0000000..daac7f2 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/undeploy-user.groovy @@ -0,0 +1,50 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh undeploy-user OPTIONS') +cli.p(longOpt:'project', args:1, 'Openstack Project') +cli.l(longOpt:'location', args:1, 'Openstack Location') +cli.u(longOpt:'user', args:1, 'User') + +def options = cli.parse(args) + +if (options == null || ! options.user || ! options.location || ! options.project ) { + cli.usage() + System.exit(1) +} + +server.operation("/openstack/locations/$options.location", "undeployUser", [ + projectName : options.project, + user : [ '$ref' : "/users/$options.user", '$refroot' :"/" ] +]) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/undeploy-vmType.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/undeploy-vmType.groovy new file mode 100644 index 0000000..68c82d7 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/undeploy-vmType.groovy @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh undeploy-vmType OPTIONS') +cli.v(longOpt:'vmType', args:1, 'Name of VmType') +cli.l(longOpt:'location', args:1, 'Openstack Location') +cli.p(longOpt:'project', args:1, 'Openstack Project') + +def options = cli.parse(args) + +if (options == null || ! options.vmType || ! options.location || ! options.project ) { + cli.usage() + System.exit(1) +} + +server.operation("/openstack/locations/$options.location", "undeployVmType", [ projectName : options.project, vmTypeName : options.vmType ]) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/update-configuration-from-policy-service-instance.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/update-configuration-from-policy-service-instance.groovy new file mode 100644 index 0000000..09ef819 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/update-configuration-from-policy-service-instance.groovy @@ -0,0 +1,50 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh update-configuration-from-policy-service-instance OPTIONS') +cli.s(longOpt:'service', args:1, 'Name of Service') +cli.i(longOpt:'instance', args:1, 'Name of Service Instance') + +def options = cli.parse(args) + +if (options == null || ! options.service || ! options.instance ) { + cli.usage() + System.exit(1) +} + +def o = [ + instanceName : options.instance, +] + +server.operation("/services/$options.service", "updateConfigurationFromPolicy", o) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/update-object.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/update-object.groovy new file mode 100644 index 0000000..df45f25 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/update-object.groovy @@ -0,0 +1,67 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils +import org.json.JSONObject + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + + +// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html +def cli = new CliBuilder(usage:'dcae-controller.sh create-object OPTIONS') +cli.p(longOpt:'path', args:1, argName:'path', 'Resource Path') +cli.f(longOpt:'file', args:1, argName:'configFile', 'JSON configuration File (optional)') +cli.c(longOpt:'config', args:1, argName:'config', 'JSON configuration (optional)') + +def options = cli.parse(args) + +if (options == null || ! options.path || ( ! options.file && ! options.config ) ) { + cli.usage() + System.exit(1) +} + +if (options.config && options.file) { + println "only one of --config and --configFile can be specified." + System.exit(1) +} + +def o = [:] + +if (options.config) { + o = Utils.json2object(new JSONObject(options.config)) +} + +if (options.file) { + File f = new File(options.file) + if (!f.exists()) { + println "Configuration File does not exists: $f.absolutePath" + System.exit(1) + } + o = Utils.json2object(new JSONObject(f.text)) +} + +server.update(options.path, o) + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/wait-for.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/wait-for.groovy new file mode 100644 index 0000000..1c2f840 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/wait-for.groovy @@ -0,0 +1,101 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.yaml.snakeyaml.Yaml; + + +import groovy.text.SimpleTemplateEngine +import groovy.io.FileType +import static org.openecomp.ncomp.sirius.manager.console.Utils.*; + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole + +server = new DcaeDcaePlatformControllerConsole("console.properties","localhost") + +def cli = new CliBuilder(usage:'dcae-controller.sh wait-for OPTIONS') +cli.p(longOpt:'path', args:1, 'Resource Path') +cli.e(longOpt:'exists', args:0, 'Object Exists') +cli.a(longOpt:'attribute', args:1, 'Attribute') +cli.m(longOpt:'match', args:1, 'Match') +cli.n(longOpt:'isNull', args:0, 'Is Null') +cli.N(longOpt:'isNotNull', args:0, 'Is not Null') +cli.f(longOpt:'frequency', args:1, 'Polling Frequency (seconds)') +cli.t(longOpt:'timeout', args:1, 'Timeout (seconds)') +cli._(longOpt:'debug', args:0, 'Debug') +cli.v(longOpt:'verbose', args:0, 'Verbose') + +def options = cli.parse(args) + +if (args.length == 0 ) { + cli.usage() + System.exit(1) +} + + +def timeout = options.timeout ? Long.parseLong(options.timeout) * 1000 : 300000 // default 5 min +def frequency = options.frequency ? Long.parseLong(options.frequency) * 1000 : 30000 // default 30 seconds +def path = options.path ? options.path : "/" // default 30 seconds + +Date start = new Date() + +def status = "UNKNOWN" +while (new Date().time < start.time + timeout) { + def o = null + try { o = server.list(path,0) } catch (e) { + if (options.debug) println "LISTING error: $e" + } + if (options.debug) { + if (o) + println "object is ${object2json(o).toString(2)}" + else + println "object is NULL" + } + if ( ! options.exists && o == null) { + println "Error: caller expect the object to exists but it does not: $path" + System.exit(2) + } + if (options.exists && o == null) { + // need to keep waiting + status = "Object does not exists: $path" + } + else { + if ( ! options.attribute ) System.exit(0) + def a = options.attribute + def v = o[a] + if (options.isNull) { + if (v == null) System.exit(0) else status = "Attribute not null: $path@$a" + } + if (options.isNotNull) { + if (v != null) System.exit(0) else status = "Attribute null: $path@$a" + } + if (options.match) { + if ("$v" == options.match) System.exit(0) else status = "Attribute match: $path@$a '$v' != '$options.match'" + } + } + if (options.verbose) + println "Waiting: $status : waited ${new Date().time-start.time} milliseconds" + Thread.sleep(frequency) +} + +println "Error: Timeout: $status : waited ${new Date().time-start.time} milliseconds" +System.exit(2) + + diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerCluster.yaml b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerCluster.yaml new file mode 100644 index 0000000..a3d8f3d --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerCluster.yaml @@ -0,0 +1,25 @@ +operations: + pushData: {} + receiveData: {} + REMOTE_pushData: + decription: Remote call pushData + REMOTE_receiveData: + decription: Remote call receiveData +messages: + dummy: {} + pushData: + errorCode: pushData-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + receiveData: + errorCode: receiveData-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_pushData: + errorCode: REMOTE-pushData-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_receiveData: + errorCode: REMOTE-receiveData-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerVirtualMachineService.yaml b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerVirtualMachineService.yaml new file mode 100644 index 0000000..6ac8c34 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerVirtualMachineService.yaml @@ -0,0 +1,135 @@ +operations: + deploy: {} + undeploy: {} + test: {} + suspend: {} + resume: {} + pushManagerConfiguration: {} + pollManagerConfiguration: {} + managerConfiguration: {} + managerOperation: {} + updateConfigurationFromPolicy: {} + runHealthTests: {} + updateDeploymentStatus: {} + REMOTE_deploy: + decription: Remote call deploy + REMOTE_undeploy: + decription: Remote call undeploy + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_pushManagerConfiguration: + decription: Remote call pushManagerConfiguration + REMOTE_pollManagerConfiguration: + decription: Remote call pollManagerConfiguration + REMOTE_managerConfiguration: + decription: Remote call managerConfiguration + REMOTE_managerOperation: + decription: Remote call managerOperation + REMOTE_updateConfigurationFromPolicy: + decription: Remote call updateConfigurationFromPolicy + REMOTE_runHealthTests: + decription: Remote call runHealthTests + REMOTE_updateDeploymentStatus: + decription: Remote call updateDeploymentStatus +messages: + dummy: {} + deploy: + errorCode: deploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + undeploy: + errorCode: undeploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pushManagerConfiguration: + errorCode: pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pollManagerConfiguration: + errorCode: pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerConfiguration: + errorCode: managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerOperation: + errorCode: managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateConfigurationFromPolicy: + errorCode: updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + runHealthTests: + errorCode: runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateDeploymentStatus: + errorCode: updateDeploymentStatus-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_deploy: + errorCode: REMOTE-deploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_undeploy: + errorCode: REMOTE-undeploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pushManagerConfiguration: + errorCode: REMOTE-pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pollManagerConfiguration: + errorCode: REMOTE-pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerConfiguration: + errorCode: REMOTE-managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerOperation: + errorCode: REMOTE-managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateConfigurationFromPolicy: + errorCode: REMOTE-updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_runHealthTests: + errorCode: REMOTE-runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateDeploymentStatus: + errorCode: REMOTE-updateDeploymentStatus-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/DcaePlatformController.yaml b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/DcaePlatformController.yaml new file mode 100644 index 0000000..08497ed --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/DcaePlatformController.yaml @@ -0,0 +1,135 @@ +operations: + logs: {} + metrics: {} + properties: {} + uploadInfo: {} + getValues: {} + getValuesAll: {} + getMessages: {} + getRequestLogger: {} + evaluate: {} + update: {} + deployDescriptor: {} + refreshDataBus: {} + REMOTE_logs: + decription: Remote call logs + REMOTE_metrics: + decription: Remote call metrics + REMOTE_properties: + decription: Remote call properties + REMOTE_uploadInfo: + decription: Remote call uploadInfo + REMOTE_getValues: + decription: Remote call getValues + REMOTE_getValuesAll: + decription: Remote call getValuesAll + REMOTE_getMessages: + decription: Remote call getMessages + REMOTE_getRequestLogger: + decription: Remote call getRequestLogger + REMOTE_evaluate: + decription: Remote call evaluate + REMOTE_update: + decription: Remote call update + REMOTE_deployDescriptor: + decription: Remote call deployDescriptor + REMOTE_refreshDataBus: + decription: Remote call refreshDataBus +messages: + dummy: {} + logs: + errorCode: logs-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + metrics: + errorCode: metrics-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + properties: + errorCode: properties-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + uploadInfo: + errorCode: uploadInfo-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getValues: + errorCode: getValues-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getValuesAll: + errorCode: getValuesAll-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getMessages: + errorCode: getMessages-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getRequestLogger: + errorCode: getRequestLogger-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + evaluate: + errorCode: evaluate-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + update: + errorCode: update-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + deployDescriptor: + errorCode: deployDescriptor-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + refreshDataBus: + errorCode: refreshDataBus-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_logs: + errorCode: REMOTE-logs-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_metrics: + errorCode: REMOTE-metrics-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_properties: + errorCode: REMOTE-properties-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_uploadInfo: + errorCode: REMOTE-uploadInfo-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getValues: + errorCode: REMOTE-getValues-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getValuesAll: + errorCode: REMOTE-getValuesAll-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getMessages: + errorCode: REMOTE-getMessages-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getRequestLogger: + errorCode: REMOTE-getRequestLogger-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_evaluate: + errorCode: REMOTE-evaluate-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_update: + errorCode: REMOTE-update-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_deployDescriptor: + errorCode: REMOTE-deployDescriptor-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_refreshDataBus: + errorCode: REMOTE-refreshDataBus-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/GuiClientApi.yaml b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/GuiClientApi.yaml new file mode 100644 index 0000000..bf3d69d --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/GuiClientApi.yaml @@ -0,0 +1,69 @@ +operations: + getTree: {} + getObject: {} + getTimeSerie: {} + getTable: {} + getHtml: {} + getGraph: {} + REMOTE_getTree: + decription: Remote call getTree + REMOTE_getObject: + decription: Remote call getObject + REMOTE_getTimeSerie: + decription: Remote call getTimeSerie + REMOTE_getTable: + decription: Remote call getTable + REMOTE_getHtml: + decription: Remote call getHtml + REMOTE_getGraph: + decription: Remote call getGraph +messages: + dummy: {} + getTree: + errorCode: getTree-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getObject: + errorCode: getObject-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTimeSerie: + errorCode: getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTable: + errorCode: getTable-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getHtml: + errorCode: getHtml-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getGraph: + errorCode: getGraph-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_getTree: + errorCode: REMOTE-getTree-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getObject: + errorCode: REMOTE-getObject-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTimeSerie: + errorCode: REMOTE-getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTable: + errorCode: REMOTE-getTable-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getHtml: + errorCode: REMOTE-getHtml-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getGraph: + errorCode: REMOTE-getGraph-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerCluster.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerCluster.java new file mode 100644 index 0000000..05b41bf --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerCluster.java @@ -0,0 +1,145 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.platform.servers.controller; + + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISwaggerHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.SwaggerUtils; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.platform.servers.controller.logging.ControllerClusterOperationEnum; +import org.openecomp.dcae.controller.platform.servers.controller.logging.ControllerClusterMessageEnum; + + + + +import org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterImpl; + + + +public class DcaeControllerCluster extends ControllerClusterImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeControllerCluster.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeControllerClusterProvider controller; + ISiriusServer server; + + public DcaeControllerCluster(ISiriusServer server) { + this.server = server; + this.controller = new DcaeControllerClusterProvider(server,this); + } + + public void pushData(java.lang.String serverName, java.lang.String dataName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pushData", ApiRequestStatus.START, duration_,serverName,dataName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerClusterOperationEnum.pushData); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.pushData(serverName,dataName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushData", ApiRequestStatus.ERROR, duration_,serverName,dataName); + System.err.println("ERROR: " + e); + ecomplogger.warn(ControllerClusterMessageEnum.pushData, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushData", ApiRequestStatus.OKAY, duration_,serverName,dataName); + + } + + public void receiveData(java.lang.String serverName, java.lang.String dataName, java.util.Date time, java.lang.String content) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "receiveData", ApiRequestStatus.START, duration_,serverName,dataName,time,content); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerClusterOperationEnum.receiveData); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.receiveData(serverName,dataName,time,content); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "receiveData", ApiRequestStatus.ERROR, duration_,serverName,dataName,time,content); + System.err.println("ERROR: " + e); + ecomplogger.warn(ControllerClusterMessageEnum.receiveData, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "receiveData", ApiRequestStatus.OKAY, duration_,serverName,dataName,time,content); + + } + + + + + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + DcaeControllerClusterProvider.ecoreSetup(); + } + public DcaeControllerClusterProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterClient.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterClient.java new file mode 100644 index 0000000..a274556 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterClient.java @@ -0,0 +1,107 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.platform.servers.controller; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterImpl; +import org.openecomp.dcae.controller.platform.controller.ControllerPackage; +import org.openecomp.dcae.controller.platform.servers.controller.logging.ControllerClusterOperationEnum; +import org.openecomp.dcae.controller.platform.servers.controller.logging.ControllerClusterMessageEnum; + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformController; + + + + +@SuppressWarnings("unchecked") +public class DcaeControllerClusterClient extends ControllerClusterImpl { + public static final Logger logger = Logger.getLogger(DcaeControllerClusterClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeControllerClusterClient(String file, String name) { + DcaeDcaePlatformController.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/cluster", this); + } + + public DcaeControllerClusterClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/cluster", this); + } + + public DcaeControllerClusterClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + + public void pushData(String path, java.lang.String serverName, java.lang.String dataName) { + EClass c = ControllerPackage.eINSTANCE.getControllerCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerClusterOperationEnum.REMOTE_pushData); + + try { + client.operationPath(path, c, "pushData", null, serverName,dataName); + } + catch (Exception e) { + ecomplogger.warn(ControllerClusterMessageEnum.REMOTE_pushData, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@pushData: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + + public void receiveData(String path, java.lang.String serverName, java.lang.String dataName, java.util.Date time, java.lang.String content) { + EClass c = ControllerPackage.eINSTANCE.getControllerCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerClusterOperationEnum.REMOTE_receiveData); + + try { + client.operationPath(path, c, "receiveData", null, serverName,dataName,time,content); + } + catch (Exception e) { + ecomplogger.warn(ControllerClusterMessageEnum.REMOTE_receiveData, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@receiveData: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterConsole.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterConsole.java new file mode 100644 index 0000000..00c0b5f --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterConsole.java @@ -0,0 +1,79 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.platform.servers.controller; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeControllerClusterConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeControllerClusterConsole.class); + protected DcaeControllerClusterClient controller; + + + + + public DcaeControllerClusterConsole(String filename, String name) { + super(filename, name); + controller = new DcaeControllerClusterClient(filename,name); + client = controller.client; + + } + + public DcaeControllerClusterConsole(AbstractClient c) { + controller = new DcaeControllerClusterClient(c); + client = controller.client; + } + + + public void pushData(String path, java.lang.String serverName, java.lang.String dataName) { + + try { + controller.pushData(path,serverName,dataName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void receiveData(String path, java.lang.String serverName, java.lang.String dataName, java.util.Date time, java.lang.String content) { + + try { + controller.receiveData(path,serverName,dataName,time,content); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterProviderTemplate.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterProviderTemplate.java new file mode 100644 index 0000000..6726313 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterProviderTemplate.java @@ -0,0 +1,77 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.platform.servers.controller; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; + + +import org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterImpl; +import org.openecomp.dcae.controller.platform.controller.ControllerCluster; + + +public class DcaeControllerClusterProviderTemplate extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeControllerClusterProviderTemplate.class); + ControllerCluster o; + + public DcaeControllerClusterProviderTemplate(ISiriusServer controller, ControllerCluster o) { + super(controller, o); + this.o = o; + } + + public void pushData(java.lang.String serverName, java.lang.String dataName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void receiveData(java.lang.String serverName, java.lang.String dataName, java.util.Date time, java.lang.String content) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + + + + + + + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerFactory.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerFactory.java new file mode 100644 index 0000000..a4d1bc0 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerFactory.java @@ -0,0 +1,66 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.platform.servers.controller; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.platform.controller.DcaePlatformController; +import org.openecomp.dcae.controller.platform.controller.ControllerPackage; +import org.openecomp.dcae.controller.platform.controller.impl.ControllerFactoryImpl; + + + + +import org.openecomp.dcae.controller.platform.controller.ControllerCluster; +import org.openecomp.dcae.controller.platform.controller.ControllerVirtualMachineService; + +public class DcaeControllerFactory extends ControllerFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeControllerFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ControllerPackage.eINSTANCE; } + public DcaeControllerFactory(ISiriusServer server) { + this.server = server; + } + @Override + public DcaePlatformController createDcaePlatformController() { + return new DcaeDcaePlatformController(server); + } + + + @Override + public ControllerCluster createControllerCluster() { + return new DcaeControllerCluster(server); + } + + @Override + public ControllerVirtualMachineService createControllerVirtualMachineService() { + return new DcaeControllerVirtualMachineService(server); + } + + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineService.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineService.java new file mode 100644 index 0000000..f83bac3 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineService.java @@ -0,0 +1,415 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.platform.servers.controller; + + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISwaggerHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.SwaggerUtils; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.platform.servers.controller.logging.ControllerVirtualMachineServiceOperationEnum; +import org.openecomp.dcae.controller.platform.servers.controller.logging.ControllerVirtualMachineServiceMessageEnum; + + + + +import org.openecomp.dcae.controller.platform.controller.impl.ControllerVirtualMachineServiceImpl; + + + +public class DcaeControllerVirtualMachineService extends ControllerVirtualMachineServiceImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeControllerVirtualMachineService.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeControllerVirtualMachineServiceProvider controller; + ISiriusServer server; + + public DcaeControllerVirtualMachineService(ISiriusServer server) { + this.server = server; + this.controller = new DcaeControllerVirtualMachineServiceProvider(server,this); + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.START, duration_,instanceName,containerPath); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.deploy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.deploy(instanceName,containerPath); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.ERROR, duration_,instanceName,containerPath); + System.err.println("ERROR: " + e); + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.deploy, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.OKAY, duration_,instanceName,containerPath); + + } + + public void undeploy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.undeploy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.undeploy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.undeploy, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.test); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.test(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.test, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public void suspend(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.suspend); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.suspend(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.suspend, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void resume(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.resume); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.resume(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.resume, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.pushManagerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.pushManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.pushManagerConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.pollManagerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.pollManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.pollManagerConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.managerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.managerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.managerConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.START, duration_,instanceName,operation,parameters); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.managerOperation); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.ERROR, duration_,instanceName,operation,parameters); + System.err.println("ERROR: " + e); + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.managerOperation, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.OKAY, duration_,instanceName,operation,parameters); + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.updateConfigurationFromPolicy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.updateConfigurationFromPolicy, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void runHealthTests() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.runHealthTests); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.runHealthTests(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.runHealthTests, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.OKAY, duration_); + + } + + public void updateDeploymentStatus() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.updateDeploymentStatus); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.updateDeploymentStatus(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.updateDeploymentStatus, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.OKAY, duration_); + + } + + + + + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + DcaeControllerVirtualMachineServiceProvider.ecoreSetup(); + } + public DcaeControllerVirtualMachineServiceProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceClient.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceClient.java new file mode 100644 index 0000000..09d2371 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceClient.java @@ -0,0 +1,277 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.platform.servers.controller; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.platform.controller.impl.ControllerVirtualMachineServiceImpl; +import org.openecomp.dcae.controller.platform.controller.ControllerPackage; +import org.openecomp.dcae.controller.platform.servers.controller.logging.ControllerVirtualMachineServiceOperationEnum; +import org.openecomp.dcae.controller.platform.servers.controller.logging.ControllerVirtualMachineServiceMessageEnum; + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformController; + + + + +@SuppressWarnings("unchecked") +public class DcaeControllerVirtualMachineServiceClient extends ControllerVirtualMachineServiceImpl { + public static final Logger logger = Logger.getLogger(DcaeControllerVirtualMachineServiceClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeControllerVirtualMachineServiceClient(String file, String name) { + DcaeDcaePlatformController.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/cont", this); + } + + public DcaeControllerVirtualMachineServiceClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/cont", this); + } + + public DcaeControllerVirtualMachineServiceClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + + public void deploy(String path, java.lang.String instanceName, java.lang.String containerPath) { + EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_deploy); + + try { + client.operationPath(path, c, "deploy", null, instanceName,containerPath); + } + catch (Exception e) { + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_deploy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@deploy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + + public void undeploy(String path, java.lang.String instanceName) { + EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_undeploy); + + try { + client.operationPath(path, c, "undeploy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_undeploy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@undeploy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(String path, java.lang.String instanceName) { + EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath(path, c, "test", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@test: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public void suspend(String path, java.lang.String instanceName) { + EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_suspend); + + try { + client.operationPath(path, c, "suspend", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspend: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + + public void resume(String path, java.lang.String instanceName) { + EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_resume); + + try { + client.operationPath(path, c, "resume", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@resume: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + + public void pushManagerConfiguration(String path, java.lang.String instanceName) { + EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_pushManagerConfiguration); + + try { + client.operationPath(path, c, "pushManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_pushManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@pushManagerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + + public void pollManagerConfiguration(String path, java.lang.String instanceName) { + EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_pollManagerConfiguration); + + try { + client.operationPath(path, c, "pollManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_pollManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@pollManagerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + + public org.eclipse.emf.ecore.EObject managerConfiguration(String path, java.lang.String instanceName) { + EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_managerConfiguration); + org.eclipse.emf.ecore.EObject res; + try { + res = (org.eclipse.emf.ecore.EObject) client.operationPath(path, c, "managerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_managerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@managerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public org.json.JSONObject managerOperation(String path, java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_managerOperation); + org.json.JSONObject res; + try { + res = (org.json.JSONObject) client.operationPath(path, c, "managerOperation", null, instanceName,operation,parameters); + } + catch (Exception e) { + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_managerOperation, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@managerOperation: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public void updateConfigurationFromPolicy(String path, java.lang.String instanceName) { + EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_updateConfigurationFromPolicy); + + try { + client.operationPath(path, c, "updateConfigurationFromPolicy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateConfigurationFromPolicy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + + public void runHealthTests(String path) { + EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_runHealthTests); + + try { + client.operationPath(path, c, "runHealthTests", null); + } + catch (Exception e) { + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_runHealthTests, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@runHealthTests: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + + public void updateDeploymentStatus(String path) { + EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_updateDeploymentStatus); + + try { + client.operationPath(path, c, "updateDeploymentStatus", null); + } + catch (Exception e) { + ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_updateDeploymentStatus, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateDeploymentStatus: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceConsole.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceConsole.java new file mode 100644 index 0000000..ada979d --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceConsole.java @@ -0,0 +1,189 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.platform.servers.controller; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeControllerVirtualMachineServiceConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeControllerVirtualMachineServiceConsole.class); + protected DcaeControllerVirtualMachineServiceClient controller; + + + + + public DcaeControllerVirtualMachineServiceConsole(String filename, String name) { + super(filename, name); + controller = new DcaeControllerVirtualMachineServiceClient(filename,name); + client = controller.client; + + } + + public DcaeControllerVirtualMachineServiceConsole(AbstractClient c) { + controller = new DcaeControllerVirtualMachineServiceClient(c); + client = controller.client; + } + + + public void deploy(String path, java.lang.String instanceName, java.lang.String containerPath) { + + try { + controller.deploy(path,instanceName,containerPath); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void undeploy(String path, java.lang.String instanceName) { + + try { + controller.undeploy(path,instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(String path, java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(path,instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend(String path, java.lang.String instanceName) { + + try { + controller.suspend(path,instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume(String path, java.lang.String instanceName) { + + try { + controller.resume(path,instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pushManagerConfiguration(String path, java.lang.String instanceName) { + + try { + controller.pushManagerConfiguration(path,instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pollManagerConfiguration(String path, java.lang.String instanceName) { + + try { + controller.pollManagerConfiguration(path,instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(String path, java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + try { + res = controller.managerConfiguration(path,instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.json.JSONObject managerOperation(String path, java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + try { + res = controller.managerOperation(path,instanceName,operation,parameters); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void updateConfigurationFromPolicy(String path, java.lang.String instanceName) { + + try { + controller.updateConfigurationFromPolicy(path,instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void runHealthTests(String path) { + + try { + controller.runHealthTests(path); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void updateDeploymentStatus(String path) { + + try { + controller.updateDeploymentStatus(path); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceProviderTemplate.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceProviderTemplate.java new file mode 100644 index 0000000..0847e77 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceProviderTemplate.java @@ -0,0 +1,137 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.platform.servers.controller; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; + + +import org.openecomp.dcae.controller.platform.controller.impl.ControllerVirtualMachineServiceImpl; +import org.openecomp.dcae.controller.platform.controller.ControllerVirtualMachineService; + + +public class DcaeControllerVirtualMachineServiceProviderTemplate extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeControllerVirtualMachineServiceProviderTemplate.class); + ControllerVirtualMachineService o; + + public DcaeControllerVirtualMachineServiceProviderTemplate(ISiriusServer controller, ControllerVirtualMachineService o) { + super(controller, o); + this.o = o; + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void undeploy(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void suspend(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void resume(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void runHealthTests() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void updateDeploymentStatus() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + + + + + + + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformController.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformController.java new file mode 100644 index 0000000..402f708 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformController.java @@ -0,0 +1,448 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.platform.servers.controller; + + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISwaggerHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.SwaggerUtils; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.platform.servers.controller.logging.DcaePlatformControllerOperationEnum; +import org.openecomp.dcae.controller.platform.servers.controller.logging.DcaePlatformControllerMessageEnum; + + + + + + + +import java.util.Date; + + + + + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; + + + + + +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + + +import org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl; + + + +public class DcaeDcaePlatformController extends DcaePlatformControllerImpl implements IRequestHandler, ISwaggerHandler, ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeDcaePlatformController.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeDcaePlatformControllerProvider controller; + ISiriusServer server; + + public DcaeDcaePlatformController(ISiriusServer server) { + this.server = server; + this.controller = new DcaeDcaePlatformControllerProvider(server,this); + } + + public void deployDescriptor(java.lang.String name) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deployDescriptor", ApiRequestStatus.START, duration_,name); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.deployDescriptor); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.deployDescriptor(name); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deployDescriptor", ApiRequestStatus.ERROR, duration_,name); + System.err.println("ERROR: " + e); + ecomplogger.warn(DcaePlatformControllerMessageEnum.deployDescriptor, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deployDescriptor", ApiRequestStatus.OKAY, duration_,name); + + } + + public void refreshDataBus(java.lang.String nameMatch) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "refreshDataBus", ApiRequestStatus.START, duration_,nameMatch); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.refreshDataBus); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.refreshDataBus(nameMatch); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "refreshDataBus", ApiRequestStatus.ERROR, duration_,nameMatch); + System.err.println("ERROR: " + e); + ecomplogger.warn(DcaePlatformControllerMessageEnum.refreshDataBus, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "refreshDataBus", ApiRequestStatus.OKAY, duration_,nameMatch); + + } + + public void logs(org.json.JSONObject cx, EList logs) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.START, duration_,cx,logs); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.logs); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.logs(cx,logs); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.ERROR, duration_,cx,logs); + System.err.println("ERROR: " + e); + ecomplogger.warn(DcaePlatformControllerMessageEnum.logs, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.OKAY, duration_,cx,logs); + + } + + public void metrics(org.json.JSONObject cx, EList metrics) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.START, duration_,cx,metrics); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.metrics); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.metrics(cx,metrics); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.ERROR, duration_,cx,metrics); + System.err.println("ERROR: " + e); + ecomplogger.warn(DcaePlatformControllerMessageEnum.metrics, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.OKAY, duration_,cx,metrics); + + } + + public void properties(org.json.JSONObject cx, EList l) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.START, duration_,cx,l); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.properties); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.properties(cx,l); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.ERROR, duration_,cx,l); + System.err.println("ERROR: " + e); + ecomplogger.warn(DcaePlatformControllerMessageEnum.properties, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.OKAY, duration_,cx,l); + + } + + public void uploadInfo(org.json.JSONObject cx, EList info) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.START, duration_,cx,info); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.uploadInfo); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.uploadInfo(cx,info); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.ERROR, duration_,cx,info); + System.err.println("ERROR: " + e); + ecomplogger.warn(DcaePlatformControllerMessageEnum.uploadInfo, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.OKAY, duration_,cx,info); + + } + + public EList getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.START, duration_,cx,path,start,end,option,relativeInterval); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.getValues); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getValues(cx,path,start,end,option,relativeInterval); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.ERROR, duration_,cx,path,start,end,option,relativeInterval); + System.err.println("ERROR: " + e); + ecomplogger.warn(DcaePlatformControllerMessageEnum.getValues, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.OKAY, duration_,cx,path,start,end,option,relativeInterval); + return res; + } + + public EList getValuesAll(org.json.JSONObject cx, java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.START, duration_,cx,path,metrics,start,end,option,relativeInterval); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.getValuesAll); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getValuesAll(cx,path,metrics,start,end,option,relativeInterval); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.ERROR, duration_,cx,path,metrics,start,end,option,relativeInterval); + System.err.println("ERROR: " + e); + ecomplogger.warn(DcaePlatformControllerMessageEnum.getValuesAll, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.OKAY, duration_,cx,path,metrics,start,end,option,relativeInterval); + return res; + } + + public EList getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.START, duration_,cx,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.getMessages); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getMessages(cx,path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.ERROR, duration_,cx,path,start,end); + System.err.println("ERROR: " + e); + ecomplogger.warn(DcaePlatformControllerMessageEnum.getMessages, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.OKAY, duration_,cx,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.START, duration_,userName,action,resourcePath,context); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.getRequestLogger); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getRequestLogger(userName,action,resourcePath,context); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.ERROR, duration_,userName,action,resourcePath,context); + System.err.println("ERROR: " + e); + ecomplogger.warn(DcaePlatformControllerMessageEnum.getRequestLogger, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.OKAY, duration_,userName,action,resourcePath,context); + return res; + } + + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.START, duration_,path,function); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.evaluate); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.evaluate(path,function); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.ERROR, duration_,path,function); + System.err.println("ERROR: " + e); + ecomplogger.warn(DcaePlatformControllerMessageEnum.evaluate, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.OKAY, duration_,path,function); + return res; + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.START, duration_,path,function); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.update); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.update(path,function); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.ERROR, duration_,path,function); + System.err.println("ERROR: " + e); + ecomplogger.warn(DcaePlatformControllerMessageEnum.update, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.OKAY, duration_,path,function); + + } + + + + @Override + public Object handleJson(String userName, String action, String resourcePath, JSONObject json, JSONObject context) { + return controller.handleJson(userName,action,resourcePath,json,context); + } + + @Override + public Object handleBinary(String userName, String action, String resourcePath, InputStream in) { + return controller.handleBinary(userName,action,resourcePath,in); + } + + + +@Override +public void updateSwagger(String path, SwaggerUtils swagger) { + controller.updateSwagger(path,swagger); +} + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + DcaeDcaePlatformControllerProvider.ecoreSetup(); + } + public DcaeDcaePlatformControllerProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerClient.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerClient.java new file mode 100644 index 0000000..e9409b3 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerClient.java @@ -0,0 +1,276 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.platform.servers.controller; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl; +import org.openecomp.dcae.controller.platform.controller.ControllerPackage; +import org.openecomp.dcae.controller.platform.servers.controller.logging.DcaePlatformControllerOperationEnum; +import org.openecomp.dcae.controller.platform.servers.controller.logging.DcaePlatformControllerMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeDcaePlatformControllerClient extends DcaePlatformControllerImpl { + public static final Logger logger = Logger.getLogger(DcaeDcaePlatformControllerClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeDcaePlatformControllerClient(String file, String name) { + DcaeDcaePlatformController.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeDcaePlatformControllerClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeDcaePlatformControllerClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public void deployDescriptor(java.lang.String name) { + EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_deployDescriptor); + + try { + client.operationPath("/resources", c, "deployDescriptor", null, name); + } + catch (Exception e) { + ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_deployDescriptor, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@deployDescriptor: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void refreshDataBus(java.lang.String nameMatch) { + EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_refreshDataBus); + + try { + client.operationPath("/resources", c, "refreshDataBus", null, nameMatch); + } + catch (Exception e) { + ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_refreshDataBus, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@refreshDataBus: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void logs(org.json.JSONObject cx, EList logs) { + EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_logs); + + try { + client.operationPath("/resources", c, "logs", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,logs); + } + catch (Exception e) { + ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_logs, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@logs: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void metrics(org.json.JSONObject cx, EList metrics) { + EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_metrics); + + try { + client.operationPath("/resources", c, "metrics", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,metrics); + } + catch (Exception e) { + ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_metrics, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@metrics: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void properties(org.json.JSONObject cx, EList l) { + EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_properties); + + try { + client.operationPath("/resources", c, "properties", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,l); + } + catch (Exception e) { + ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_properties, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@properties: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void uploadInfo(org.json.JSONObject cx, EList info) { + EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_uploadInfo); + + try { + client.operationPath("/resources", c, "uploadInfo", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,info); + } + catch (Exception e) { + ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_uploadInfo, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@uploadInfo: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public EList getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_getValues); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getValues", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end,option,relativeInterval); + } + catch (Exception e) { + ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_getValues, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getValues: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList getValuesAll(org.json.JSONObject cx, java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_getValuesAll); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getValuesAll", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,metrics,start,end,option,relativeInterval); + } + catch (Exception e) { + ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_getValuesAll, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getValuesAll: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_getMessages); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getMessages", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end); + } + catch (Exception e) { + ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_getMessages, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getMessages: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_getRequestLogger); + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res; + try { + res = (org.openecomp.ncomp.sirius.manager.server.LoggerInfo) client.operationPath("/resources", c, "getRequestLogger", null, userName,action,resourcePath,context); + } + catch (Exception e) { + ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_getRequestLogger, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getRequestLogger: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_evaluate); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "evaluate", null, path,function); + } + catch (Exception e) { + ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_evaluate, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@evaluate: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_update); + + try { + client.operationPath("/resources", c, "update", null, path,function); + } + catch (Exception e) { + ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_update, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@update: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerConsole.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerConsole.java new file mode 100644 index 0000000..0ad6540 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerConsole.java @@ -0,0 +1,197 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.platform.servers.controller; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + +import org.openecomp.dcae.controller.platform.servers.controller.gui.DcaeGuiClientApiConsole; + + +public class DcaeDcaePlatformControllerConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeDcaePlatformControllerConsole.class); + protected DcaeDcaePlatformControllerClient controller; + + + DcaeControllerClusterConsole cluster; + DcaeControllerVirtualMachineServiceConsole cont; + DcaeGuiClientApiConsole gui; + + + public DcaeDcaePlatformControllerConsole(String filename, String name) { + super(filename, name); + controller = new DcaeDcaePlatformControllerClient(filename,name); + client = controller.client; + + cluster = new DcaeControllerClusterConsole(filename,name); + cont = new DcaeControllerVirtualMachineServiceConsole(filename,name); + gui = new DcaeGuiClientApiConsole(filename,name); + } + + public DcaeDcaePlatformControllerConsole(AbstractClient c) { + controller = new DcaeDcaePlatformControllerClient(c); + client = controller.client; + } + + + public void deployDescriptor(java.lang.String name) { + + try { + controller.deployDescriptor(name); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void refreshDataBus(java.lang.String nameMatch) { + + try { + controller.refreshDataBus(nameMatch); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void logs(EList logs) { + + try { + controller.logs(null,logs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void metrics(EList metrics) { + + try { + controller.metrics(null,metrics); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void properties(EList l) { + + try { + controller.properties(null,l); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void uploadInfo(EList info) { + + try { + controller.uploadInfo(null,info); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public EList getValues(java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + try { + res = controller.getValues(null,path,start,end,option,relativeInterval); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getValuesAll(java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + try { + res = controller.getValuesAll(null,path,metrics,start,end,option,relativeInterval); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getMessages(java.lang.String path, java.lang.Long start, java.lang.Long end) { + EList res = null; + try { + res = controller.getMessages(null,path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res = null; + try { + res = controller.getRequestLogger(userName,action,resourcePath,context); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EList res = null; + try { + res = controller.evaluate(path,function); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + + try { + controller.update(path,function); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProviderTemplate.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProviderTemplate.java new file mode 100644 index 0000000..09a439c --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProviderTemplate.java @@ -0,0 +1,96 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.platform.servers.controller; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import java.util.Date; + + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; + + +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + + +import org.openecomp.ncomp.sirius.manager.BasicManagementServerProvider; + + +import org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformControllerImpl; +import org.openecomp.dcae.controller.platform.controller.DcaePlatformController; + + +public class DcaeDcaePlatformControllerProviderTemplate extends BasicManagementServerProvider { + private static final Logger logger = Logger.getLogger(DcaeDcaePlatformControllerProviderTemplate.class); + DcaePlatformController o; + + public DcaeDcaePlatformControllerProviderTemplate(ISiriusServer controller, DcaePlatformController o) { + super(controller, o); + this.o = o; + } + + public void deployDescriptor(java.lang.String name) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void refreshDataBus(java.lang.String nameMatch) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + +public Object handleJson(String userName, String action, String resourcePath, JSONObject json, JSONObject context) { + // TODO Auto-generated method stub + return null; + } + + public Object handleBinary(String userName, String action, String resourcePath, InputStream in) { + // TODO Auto-generated method stub + return null; + } + + + + + + + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerServer.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerServer.java new file mode 100644 index 0000000..2dc725f --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerServer.java @@ -0,0 +1,129 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.platform.servers.controller; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.platform.controller.DcaePlatformController; + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeControllerFactory; + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeControllerFactory; + +import org.openecomp.dcae.controller.platform.servers.controller.gui.DcaeModelFactory; + + + + + +public class DcaeDcaePlatformControllerServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeDcaePlatformControllerServer.class); + String serverPath; + ManagementServer server; + DcaeDcaePlatformController controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeControllerFactory f = new DcaeControllerFactory(this); + + + String clusterPath; + ManagementServer clusterServer; + + String contPath; + ManagementServer contServer; + + String guiPath; + ManagementServer guiServer; + + + public DcaeDcaePlatformControllerServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeDcaePlatformController.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "DcaePlatformController", serverPath, filename); + server.addFactory(f); + + server.addFactory(new org.openecomp.ncomp.servers.openstack.OsOpenstackFactory(this)); + + + server.addFactory(new org.openecomp.ncomp.servers.openstack.loc.OsLocationFactory(this)); + + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeDcaePlatformController) server.find("/").o; + webServer = new Jetty8Server("controller.properties"); + webServer.add("/resources",server); + + webServer.add("/test",controller); + + webServer.add("/swagger",controller); + + + + EFactory guiFactory = new DcaeModelFactory(this); + guiPath = serverPath + "/gui"; + guiServer = new ManagementServer(guiFactory, "GuiClientApi", guiPath, "gui.properties"); + guiServer.start(); + webServer.add("/gui",guiServer); + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeDcaePlatformControllerServer s = new DcaeDcaePlatformControllerServer("controller.properties"); + s.runWebserver(); + } + public DcaePlatformController getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApi.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApi.java new file mode 100644 index 0000000..7fc89db --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApi.java @@ -0,0 +1,278 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.platform.servers.controller.gui; + + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISwaggerHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.SwaggerUtils; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.platform.servers.controller.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.platform.servers.controller.gui.logging.GuiClientApiMessageEnum; + + + + + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + + + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + + + + +import org.openecomp.ncomp.sirius.manager.Subject; + + + + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + + + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; + + + +public class DcaeGuiClientApi extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApi.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeGuiClientApiProvider controller; + ISiriusServer server; + + public DcaeGuiClientApi(ISiriusServer server) { + this.server = server; + this.controller = new DcaeGuiClientApiProvider(server,this); + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTree); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getTree(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getTree, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.OKAY, duration_); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.START, duration_,path); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getObject); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getObject(path); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.ERROR, duration_,path); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getObject, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.OKAY, duration_,path); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.START, duration_,path,start,end,duration); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTimeSerie); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.ERROR, duration_,path,start,end,duration); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getTimeSerie, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.OKAY, duration_,path,start,end,duration); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTable); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getTable(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getTable, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getHtml); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getHtml(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getHtml, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getGraph); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getGraph(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getGraph, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + + + + + + + + public static void ecoreSetup() { + DcaeGuiClientApiProvider.ecoreSetup(); + } + public DcaeGuiClientApiProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiClient.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiClient.java new file mode 100644 index 0000000..720cae3 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiClient.java @@ -0,0 +1,175 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.platform.servers.controller.gui; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.dcae.controller.platform.servers.controller.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.platform.servers.controller.gui.logging.GuiClientApiMessageEnum; + + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformController; + + + + +@SuppressWarnings("unchecked") +public class DcaeGuiClientApiClient extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeGuiClientApiClient(String file, String name) { + DcaeDcaePlatformController.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTree); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTree) client.operationPath("/gui", c, "getTree", null); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTree, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getTree: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getObject); + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiObject) client.operationPath("/gui", c, "getObject", null, path); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getObject, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getObject: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTimeSerie); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie) client.operationPath("/gui", c, "getTimeSerie", null, path,start,end,duration); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTimeSerie, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getTimeSerie: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTable); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTable) client.operationPath("/gui", c, "getTable", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTable, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getTable: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getHtml); + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml) client.operationPath("/gui", c, "getHtml", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getHtml, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getHtml: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getGraph); + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res; + try { + res = (org.openecomp.ncomp.sirius.manager.graph.GuiGraph) client.operationPath("/gui", c, "getGraph", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getGraph, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getGraph: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiConsole.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiConsole.java new file mode 100644 index 0000000..1e3b7a6 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiConsole.java @@ -0,0 +1,123 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.platform.servers.controller.gui; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeGuiClientApiConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiConsole.class); + protected DcaeGuiClientApiClient controller; + + + + + public DcaeGuiClientApiConsole(String filename, String name) { + super(filename, name); + controller = new DcaeGuiClientApiClient(filename,name); + client = controller.client; + + } + + public DcaeGuiClientApiConsole(AbstractClient c) { + controller = new DcaeGuiClientApiClient(c); + client = controller.client; + } + + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + try { + res = controller.getTree(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + try { + res = controller.getObject(path); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + try { + res = controller.getTable(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + try { + res = controller.getHtml(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + try { + res = controller.getGraph(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiProviderTemplate.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiProviderTemplate.java new file mode 100644 index 0000000..efdcdab --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiProviderTemplate.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.platform.servers.controller.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProviderTemplate extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProviderTemplate.class); + GuiClientApi o; + + public DcaeGuiClientApiProviderTemplate(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeModelFactory.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeModelFactory.java new file mode 100644 index 0000000..e2ff048 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeModelFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.platform.servers.controller.gui; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelFactoryImpl; + +import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerServer; + + + +public class DcaeModelFactory extends ModelFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeModelFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ModelPackage.eINSTANCE; } + public DcaeModelFactory(ISiriusServer server) { + this.server = server; + } + @Override + public GuiClientApi createGuiClientApi() { + return new DcaeGuiClientApi(server); + } + + + +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApi.properties b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApi.properties new file mode 100644 index 0000000..8705ab8 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApi.properties @@ -0,0 +1,78 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +getTree=\ + getTree-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getObject=\ + getObject-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTimeSerie=\ + getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTable=\ + getTable-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getHtml=\ + getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getGraph=\ + getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_getTree=\ + REMOTE-getTree-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getObject=\ + REMOTE-getObject-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTimeSerie=\ + REMOTE-getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTable=\ + REMOTE-getTable-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getHtml=\ + REMOTE-getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getGraph=\ + REMOTE-getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiMessageEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiMessageEnum.java new file mode 100644 index 0000000..9a5d804 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiMessageEnum.java @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.platform.servers.controller.gui.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum GuiClientApiMessageEnum implements EcompMessageEnum { + + dummy, + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.platform.servers.controller.gui.logging.GuiClientApi"); + } +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiOperationEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiOperationEnum.java new file mode 100644 index 0000000..aa3a949 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiOperationEnum.java @@ -0,0 +1,41 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.platform.servers.controller.gui.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum GuiClientApiOperationEnum implements EcompOperationEnum { + + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerCluster.properties b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerCluster.properties new file mode 100644 index 0000000..5866f65 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerCluster.properties @@ -0,0 +1,30 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +pushData=\ + pushData-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +receiveData=\ + receiveData-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_pushData=\ + REMOTE-pushData-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_receiveData=\ + REMOTE-receiveData-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterMessageEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterMessageEnum.java new file mode 100644 index 0000000..10ec310 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterMessageEnum.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.platform.servers.controller.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum ControllerClusterMessageEnum implements EcompMessageEnum { + + dummy, + pushData, + receiveData, + REMOTE_pushData, + REMOTE_receiveData; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.platform.servers.controller.logging.ControllerCluster"); + } +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterOperationEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterOperationEnum.java new file mode 100644 index 0000000..cece429 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterOperationEnum.java @@ -0,0 +1,33 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.platform.servers.controller.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum ControllerClusterOperationEnum implements EcompOperationEnum { + + pushData, + receiveData, + REMOTE_pushData, + REMOTE_receiveData; +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineService.properties b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineService.properties new file mode 100644 index 0000000..d32cf07 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineService.properties @@ -0,0 +1,150 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +deploy=\ + deploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +undeploy=\ + undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pushManagerConfiguration=\ + pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pollManagerConfiguration=\ + pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerConfiguration=\ + managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerOperation=\ + managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateConfigurationFromPolicy=\ + updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +runHealthTests=\ + runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateDeploymentStatus=\ + updateDeploymentStatus-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_deploy=\ + REMOTE-deploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_undeploy=\ + REMOTE-undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pushManagerConfiguration=\ + REMOTE-pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pollManagerConfiguration=\ + REMOTE-pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerConfiguration=\ + REMOTE-managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerOperation=\ + REMOTE-managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateConfigurationFromPolicy=\ + REMOTE-updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_runHealthTests=\ + REMOTE-runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateDeploymentStatus=\ + REMOTE-updateDeploymentStatus-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceMessageEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceMessageEnum.java new file mode 100644 index 0000000..65f5139 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceMessageEnum.java @@ -0,0 +1,59 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.platform.servers.controller.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum ControllerVirtualMachineServiceMessageEnum implements EcompMessageEnum { + + dummy, + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateDeploymentStatus, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateDeploymentStatus; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.platform.servers.controller.logging.ControllerVirtualMachineService"); + } +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceOperationEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceOperationEnum.java new file mode 100644 index 0000000..771b696 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceOperationEnum.java @@ -0,0 +1,53 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.platform.servers.controller.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum ControllerVirtualMachineServiceOperationEnum implements EcompOperationEnum { + + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateDeploymentStatus, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateDeploymentStatus; +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeController.properties b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeController.properties new file mode 100644 index 0000000..b8275ac --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeController.properties @@ -0,0 +1,24 @@ + +HEALTHCHECK_SERVICE_FAILED=\ + DCAE-CONTROLLER-HEALTHCHECK-SERVICE-FAILED-5001W|\ + {0}|\ + Contact Tier 4. This is a software bug.|\ + Heath Check on the service level fails. + +POLICY_POLLING_FAILED=\ + DCAE-CONTROLLER-POLICY-POLLING-FAILED-5001W|\ + {0} {1}|\ + Contact Tier 4. This is a software bug.|\ + Police Polling on the service level fails. + +DATABUS_POLLING_FAILED=\ + DCAE-CONTROLLER-DATABUS-POLLING-FAILED-5001W|\ + {0}|\ + Contact Tier 4. This is a software bug.|\ + Databus Polling on the service level fails. + +CLUSTER_DATA_REPLICATION_FAILED=\ + DCAE-CONTROLLER-CLUSTER_DATA_REPLICATION-FAILED-5001W|\ + {0}|\ + Contact Tier 4. This is a software bug.|\ + Data Replication fails. diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerMessageEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerMessageEnum.java new file mode 100644 index 0000000..f026d66 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerMessageEnum.java @@ -0,0 +1,38 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.platform.servers.controller.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum DcaeControllerMessageEnum implements EcompMessageEnum { + + HEALTHCHECK_SERVICE_FAILED, + POLICY_POLLING_FAILED, + DATABUS_POLLING_FAILED, + CLUSTER_DATA_REPLICATION_FAILED; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.platform.servers.controller.logging.DcaeController"); + } +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerOperationEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerOperationEnum.java new file mode 100644 index 0000000..44c7454 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerOperationEnum.java @@ -0,0 +1,33 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.platform.servers.controller.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum DcaeControllerOperationEnum implements EcompOperationEnum { + + HEALTHCHECK, + POLICY_POLLING, + DATABUS_POLLING, + CLUSTER_DATA_REPLICATION; +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformController.properties b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformController.properties new file mode 100644 index 0000000..a426ec8 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformController.properties @@ -0,0 +1,150 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +logs=\ + logs-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +metrics=\ + metrics-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +properties=\ + properties-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +uploadInfo=\ + uploadInfo-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getValues=\ + getValues-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getValuesAll=\ + getValuesAll-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getMessages=\ + getMessages-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getRequestLogger=\ + getRequestLogger-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +evaluate=\ + evaluate-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +update=\ + update-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +deployDescriptor=\ + deployDescriptor-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +refreshDataBus=\ + refreshDataBus-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_logs=\ + REMOTE-logs-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_metrics=\ + REMOTE-metrics-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_properties=\ + REMOTE-properties-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_uploadInfo=\ + REMOTE-uploadInfo-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getValues=\ + REMOTE-getValues-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getValuesAll=\ + REMOTE-getValuesAll-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getMessages=\ + REMOTE-getMessages-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getRequestLogger=\ + REMOTE-getRequestLogger-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_evaluate=\ + REMOTE-evaluate-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_update=\ + REMOTE-update-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_deployDescriptor=\ + REMOTE-deployDescriptor-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_refreshDataBus=\ + REMOTE-refreshDataBus-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerMessageEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerMessageEnum.java new file mode 100644 index 0000000..973543f --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerMessageEnum.java @@ -0,0 +1,59 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.platform.servers.controller.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum DcaePlatformControllerMessageEnum implements EcompMessageEnum { + + dummy, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + deployDescriptor, + refreshDataBus, + REMOTE_logs, + REMOTE_metrics, + REMOTE_properties, + REMOTE_uploadInfo, + REMOTE_getValues, + REMOTE_getValuesAll, + REMOTE_getMessages, + REMOTE_getRequestLogger, + REMOTE_evaluate, + REMOTE_update, + REMOTE_deployDescriptor, + REMOTE_refreshDataBus; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.platform.servers.controller.logging.DcaePlatformController"); + } +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerOperationEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerOperationEnum.java new file mode 100644 index 0000000..f5e0562 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerOperationEnum.java @@ -0,0 +1,53 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.platform.servers.controller.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum DcaePlatformControllerOperationEnum implements EcompOperationEnum { + + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + deployDescriptor, + refreshDataBus, + REMOTE_logs, + REMOTE_metrics, + REMOTE_properties, + REMOTE_uploadInfo, + REMOTE_getValues, + REMOTE_getValuesAll, + REMOTE_getMessages, + REMOTE_getRequestLogger, + REMOTE_evaluate, + REMOTE_update, + REMOTE_deployDescriptor, + REMOTE_refreshDataBus; +} diff --git a/dcae-controller-core/dcae-controller-platform-server/src/test/groovy/policy.groovy b/dcae-controller-core/dcae-controller-platform-server/src/test/groovy/policy.groovy new file mode 100644 index 0000000..58744b0 --- /dev/null +++ b/dcae-controller-core/dcae-controller-platform-server/src/test/groovy/policy.groovy @@ -0,0 +1,21 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + diff --git a/dcae-controller-core/pom.xml b/dcae-controller-core/pom.xml new file mode 100644 index 0000000..48e64c2 --- /dev/null +++ b/dcae-controller-core/pom.xml @@ -0,0 +1,83 @@ + + 4.0.0 + + org.openecomp.dcae.controller + dcae-controller-core + pom + dcae-controller-core + + + UTF-8 + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + + dcae-controller-core-utils + dcae-controller-operation-utils + dcae-controller-core-model + dcae-controller-platform-model + dcae-controller-platform-server + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + diff --git a/dcae-controller-service-cdap/.gitignore b/dcae-controller-service-cdap/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-cdap/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-cdap/LICENSE.txt b/dcae-controller-service-cdap/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-cdap/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.classpath b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.classpath new file mode 100644 index 0000000..d2d34b3 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.gitignore b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.project b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.project new file mode 100644 index 0000000..17cb465 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.project @@ -0,0 +1,35 @@ + + + dcae-controller-service-cdap-adaptor + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.core.resources.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/LICENSE.txt b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/META-INF/MANIFEST.MF b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/META-INF/MANIFEST.MF new file mode 100644 index 0000000..92614d2 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/META-INF/MANIFEST.MF @@ -0,0 +1,18 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: dcae-controller-service-cdap-adaptor +Bundle-SymbolicName: dcae-controller-service-cdap-adaptor +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.dcae.controller.service.cdap.adaptor.tools, + org.openecomp.dcae.controller.service.servers.cdap +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + dcae-controller-service-cdap-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + dcae-controller-service-cdap-cluster-model, + dcae-controller-service-vm-adaptor;bundle-version="0.1.0", + dcae-controller-service-cdap-cluster-manager, + dcae-controller-core-model diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/build.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/build.properties new file mode 100644 index 0000000..a1ec8c4 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/build.properties @@ -0,0 +1,3 @@ +source.. = src/main/java/ +bin.includes = META-INF/,\ + . diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/config/.gitignore b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/config/.gitignore new file mode 100644 index 0000000..5967057 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/config/.gitignore @@ -0,0 +1 @@ +/*.properties diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/pom.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/pom.xml new file mode 100644 index 0000000..4369202 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/pom.xml @@ -0,0 +1,200 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-cdap-adaptor + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-base + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-base + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-assembly-plugin + 2.6 + + + zipfile + + single + + package + + false + ${project.artifactId}-${project.version} + + src/assembly/assemble_zip.xml + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/lib + false + true + true + false + false + false + org.opendaylight,com.brocade.odl,ch.qos.logback + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/versions + + + src/main/resources/versions + + version.properties + + true + + + + + + copy-resources + + copy-resources + + validate + + ${basedir}/target/etc/bvc-extensions + + + src/main/resources/etc/bvc-extensions + + feature_config_template.cfg + feature_custom.install + + true + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + attach-artifacts + package + + attach-artifact + + + + + target/${project.artifactId}-${project.version}-runtime.zip + zip + runtime + + + + + + + + + + + + org.openecomp.dcae.controller + dcae-controller-service-cdap-model + ${project.version} + + + org.openecomp.dcae.controller + + dcae-controller-service-cdap-cluster-manager + + ${project.version} + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-agent-server + ${project.version} + + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/assembly/assemble_zip.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..b4a11b0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/assembly/assemble_zip.xml @@ -0,0 +1,61 @@ + + + + runtime + + zip + + + + false + + + + target + lib + + dcae-controller-service-cdap-adaptor-${project.version}.jar + + + + target/assembly/ + . + + + + + . + lib + + *.jar + + + + src/main/server-gen/bin + bin + 0744 + + + + + src/main/server/bin + bin + 0744 + + + + + src/main/server-gen/scripts + scripts + + + src/main/server/scripts + scripts + + + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/cdap/adaptor/tools/Generator.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/cdap/adaptor/tools/Generator.java new file mode 100644 index 0000000..0174c12 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/cdap/adaptor/tools/Generator.java @@ -0,0 +1,107 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.cdap.adaptor.tools; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.openecomp.dcae.controller.service.cdap.CdapFactory; +import org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerFactory; +import org.openecomp.utils.YamlToJava; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelFactory; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelFactory; +import org.openecomp.ncomp.sirius.manager.generator.ControllerGenerator; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; + + +public class Generator { + + /** + * @param args + */ + public static void main(String[] args) { + @SuppressWarnings("unused") + ServerPackage f = ServerPackage.eINSTANCE; + genService(); + genManager(); + } + + + public static void genManager() { + EObject o = CdapmanagerFactory.eINSTANCE.createCdapManager(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix(); + dir = "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceCdapManager"); + m.setTitle("ControllerServiceCdapManager"); + ControllerGenerator g = new ControllerGenerator(o, m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(false); + g.addFactory("org.openecomp.ncomp.servers.cdap.CdapCdapFactory"); + g.addFactory(CdapFactory.eINSTANCE); + EObject gui = ModelFactory.eINSTANCE.createGuiClientApi(); + g.addObject("gui", gui, m); + g.generate(dir); + g.generateScripts("src/main/server-gen/bin", "controller-service-Cdap-manager"); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; +// YamlToJava.convert("src/main/resources/DockerAdaptor.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/CdapManager.yaml", dir + "/logging", pName); + String pName1 = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".gui.logging"; + YamlToJava.convert("src/main/sirius-gen/GuiClientApi.yaml", dir + "/gui/logging", pName1); + } + + public static void genService() { + @SuppressWarnings("unused") + ServerPackage f = ServerPackage.eINSTANCE; + EObject o = CdapFactory.eINSTANCE.createCdapService(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix(); + dir= "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("CdapService"); + m.setTitle("CdapService"); + ControllerGenerator g = new ControllerGenerator(o,m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(true); +// EObject gui = ModelFactory.eINSTANCE.createGuiClientApi(); +// g.addObject("gui",gui,m); + //EObject e = adaptorFactory.eINSTANCE.createVpnEnterprise(); + //g.addApi("e",e,m); + //g.addFactory("org.openecomp.ncomp.sirius.servers.openstack.OsOpenstackFactory"); + //g.enableDrools(); + g.generate(dir); + g.generateScripts("src/main/server-gen/bin","controller-service-cdap-adaptor"); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; +// YamlToJava.convert("src/main/resources/DcaeServiceCdapHost.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/CdapService.yaml", dir + "/logging", pName); + } + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceProvider.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceProvider.java new file mode 100644 index 0000000..8e802e1 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceProvider.java @@ -0,0 +1,593 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.servers.cdap; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.json.JSONObject; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.service.HealthTestStatus; +import org.openecomp.dcae.controller.core.service.ServiceFactory; +import org.openecomp.dcae.controller.core.stream.DcaeStream; +import org.openecomp.dcae.controller.core.stream.DmaapStream; +import org.openecomp.dcae.controller.service.cdap.CdapApplication; +import org.openecomp.dcae.controller.service.cdap.CdapArtifact; +import org.openecomp.dcae.controller.service.cdap.CdapFactory; +import org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration; +import org.openecomp.dcae.controller.service.cdap.CdapService; +import org.openecomp.dcae.controller.service.cdap.CdapServiceInstance; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.DcaeCdapClusterManagerConsole; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.service.DcaeCdapClusterService; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.service.DcaeCdapClusterServiceProvider; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.ncomp.cdap.CdapEntityWithPreferences; +import org.openecomp.ncomp.cdap.CdapKeyPair; +import org.openecomp.ncomp.cdap.CdapNamespace; +import org.openecomp.ncomp.core.DeploymentStatus; +import org.openecomp.ncomp.core.NamedEntity; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.JavaHttpClient; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; +import org.openecomp.ncomp.sirius.manager.Subject; +import org.openecomp.ncomp.sirius.manager.metrics.MetricStore; +import org.openecomp.ncomp.utils.StringUtil; + +public class DcaeCdapServiceProvider extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeCdapServiceProvider.class); + CdapService o; + + public DcaeCdapServiceProvider(ISiriusServer controller, CdapService o) { + super(controller, o); + this.o = o; + } + + public void deploy(String instanceName, String containerPath) { + CdapServiceInstance i = findInstance(instanceName); + if (containerPath != null) { + Subject s = controller.getServer().find(containerPath); + if (s == null || s.o == null) { + throw new RuntimeException("Unable to find container object: " + containerPath); + } + if (!(s.o instanceof CdapClusterServiceInstance)) + throw new RuntimeException("Unable to deploy to this container: " + s.o); + i.setClusterService((CdapClusterServiceInstance) s.o); + } + i.setCdapName(cdapName(i)); + DcaeCdapClusterManagerConsole console = consoleCluster(i); + // console.loadArtifact(i.getCdapNamespace().getName(), i.getName(), + // i.getJarFile()); + try { + console.createNamespace(i.getCdapName()); + } catch (Exception e1) { + logger.warn("reusing existing namespace"); + } + try { + for (CdapArtifact a : i.getArtifacts()) { + if (a.getVersion() != null) + console.loadArtifact(i.getCdapName(), a.getName(), a.getJarFile(), a.getVersion()); + console.deployApp(i.getCdapName(), a.getJarFile()); + } + for (CdapApplication a : i.getApps()) { +// System.err.println("CDAP: start app 1"); + console.loadArtifact(i.getCdapName(), a.getArtifactName(), a.getJarFile(), a.getVersion()); +// System.err.println("CDAP: start app 2"); + if (a.getAppConfigFileContent() == null) + console.createApp(i.getCdapName(), a.getName(), a.getArtifactName(), a.getVersion(), "user"); + else + console.createAppWithConfig(i.getCdapName(), a.getName(), a.getArtifactName(), a.getVersion(), "user", + a.getAppConfigFileContent()); +// System.err.println("CDAP: start app 3"); + } + } catch (Exception e) { + logger.warn("unable to start CDAP app: " + ManagementServer.object2ref(i)); + e.printStackTrace(); + throw new RuntimeException("Unable to start CDAP app: " + ManagementServer.object2ref(i) + " " + e); + } + o.pushManagerConfiguration(instanceName); + } + + public void undeploy(String instanceName) { + CdapServiceInstance i = findInstance(instanceName); + DcaeCdapClusterManagerConsole console = consoleCluster(i); + if (i.getCdapName() == null) { + i.setCdapName(cdapName(i)); + } + for (String f : i.getFlowNames()) { + String[] a = f.split("\\."); + if (a.length != 2) + throw new RuntimeException("Bad flow name: " + f); + try { + console.stopFlow(i.getCdapName(), a[0], a[1]); + } catch (Exception e) { + e.printStackTrace(); + } + } + for (String a : i.getAppNames()) { + try { + console.stopApp(i.getCdapName(), a); + } catch (Exception e) { + e.printStackTrace(); + } + } + for (CdapArtifact a : i.getArtifacts()) { + try { +// console.stopApp(i.getCdapName(), a.getName()); + console.deleteApp(i.getCdapName(), a.getName()); + if (a.getVersion() != null) { + console.deleteArtifact(i.getCdapName(), a.getName(), a.getVersion()); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + for (CdapApplication a : i.getApps()) { + try { + console.stopApp(i.getCdapName(), a.getName()); + console.deleteApp(i.getCdapName(), a.getName()); + console.deleteArtifact(i.getCdapName(), a.getArtifactName(), a.getVersion()); + } catch (Exception e) { + e.printStackTrace(); + } + } +// console.deleteNamespace(i.getCdapName()); + } + + public void pushManagerConfiguration(String instanceName) { + CdapServiceInstance i = findInstance(instanceName); + o.updateInstanceConfiguration(instanceName); + DcaeCdapClusterManagerConsole console = consoleCluster(i); + for (CdapArtifact a : i.getArtifacts()) { + try { + console.stopApp(i.getCdapName(), a.getName()); + } catch (Exception e) { + e.printStackTrace(); + } + } + for (CdapApplication a : i.getApps()) { + try { + console.stopApp(i.getCdapName(), a.getName()); + } catch (Exception e) { + e.printStackTrace(); + } + } + for (String f : i.getFlowNames()) { + String[] a = f.split("\\."); + if (a.length != 2) + throw new RuntimeException("Bad flow name: " + f); + try { + console.stopFlow(i.getCdapName(), a[0], a[1]); + } catch (Exception e) { + e.printStackTrace(); + } + } + for (String w : i.getWorkerNames()) { + String[] a = w.split("\\."); + if (a.length != 2) + throw new RuntimeException("Bad worker name: " + w); + try { + console.stopWorker(i.getCdapName(), a[0], a[1]); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + for (String s : i.getServiceNames()) { + String[] a = s.split("\\."); + if (a.length != 2) + throw new RuntimeException("Bad service name: " + s); + try { + console.stopService(i.getCdapName(), a[0], a[1]); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + console.setPreferencesNameSpace(i.getCdapName(), list2string(i.getCdapConfiguration().getPreferences())); + for (CdapEntityWithPreferences w : i.getCdapConfiguration().getWorkers()) { + if (w.getPreferences().size() == 0) + continue; + String[] a = w.getName().split("\\.");if (a.length != 2) + throw new RuntimeException("Bad worker name: " + w.getName()); + console.setPreferencesWorker(i.getCdapName(), list2string(w.getPreferences()),a[0],a[1]); + } + for (CdapEntityWithPreferences s : i.getCdapConfiguration().getServices()) { + if (s.getPreferences().size() == 0) + continue; + String[] a = s.getName().split("\\.");if (a.length != 2) + throw new RuntimeException("Bad service name: " + s.getName()); + console.setPreferencesService(i.getCdapName(), list2string(s.getPreferences()),a[0],a[1]); + } + for (CdapEntityWithPreferences f : i.getCdapConfiguration().getFlows()) { + if (f.getPreferences().size() == 0) + continue; + String[] a = f.getName().split("\\.");if (a.length != 2) + throw new RuntimeException("Bad flow name: " + f.getName()); + console.setPreferencesFlow(i.getCdapName(), list2string(f.getPreferences()), a[0],a[1]); + } + for (CdapEntityWithPreferences a : i.getCdapConfiguration().getApps()) { + if (a.getPreferences().size() == 0) + continue; + console.setPreferencesApp(i.getCdapName(), list2string(a.getPreferences()), a.getName()); + } + // TODO what should we do. ?? + for (String f : i.getFlowNames()) { + String[] a = f.split("\\."); + if (a.length != 2) + throw new RuntimeException("Bad flow name: " + f); + console.startFlow(i.getCdapName(), a[0], a[1], null); + } + for (String w : i.getWorkerNames()) { + String[] a = w.split("\\."); + if (a.length != 2) + throw new RuntimeException("Bad worker name: " + w); + console.startWorker(i.getCdapName(), a[0], a[1], null); + } + for (String s : i.getServiceNames()) { + String[] a = s.split("\\."); + if (a.length != 2) + throw new RuntimeException("Bad service name: " + s); + console.startService(i.getCdapName(), a[0], a[1], null); + } + for (CdapArtifact a : i.getArtifacts()) { + try { + console.startApp(i.getCdapName(), a.getName()); + } catch (Exception e) { + e.printStackTrace(); + } + } + for (CdapApplication a : i.getApps()) { + try { + console.startApp(i.getCdapName(), a.getName()); + } catch (Exception e) { + e.printStackTrace(); + } + } + + } + + public void pollManagerConfiguration(String instanceName) { + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public EObject managerConfiguration(String instanceName) { + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public JSONObject managerOperation(String instanceName, String operation, JSONObject parameters) { + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void updateConfigurationFromPolicy(String instanceName) { + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public HealthTestResponse test(String instanceName) { + CdapServiceInstance i = findInstance(instanceName); + HealthTestResponse res = ServiceFactory.eINSTANCE.createHealthTestResponse(); + + // simple check. Verify that namespace exists in cluster. + + CdapClusterServiceInstance s = i.getClusterService(); + if (s.getStatus() != DeploymentStatus.DEPLOYED) { + res.setStatus(HealthTestStatus.YELLOW); + res.setMessageCode("Cluster not deployed"); + return res; + } + if (s.getCluster() == null) { + res.setStatus(HealthTestStatus.RED); + res.setMessageCode("No Cluster"); + return res; + } + if (i.getNamespace() == null) { + res.setStatus(HealthTestStatus.RED); + res.setMessageCode("No Namepace for instance"); + return res; + } + for (CdapNamespace n : s.getCluster().getNamespaces()) { + if (i.getNamespace().equals(n.getName())) { + res.setStatus(HealthTestStatus.GREEN); + return res; + } + } + res.setStatus(HealthTestStatus.YELLOW); + res.setMessageCode("Not deployed"); + return res; + } + + public void resume(String instanceName) { + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void suspend(String instanceName) { + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void runHealthTests() { + for (CdapServiceInstance i : o.getInstances()) { + HealthTestResponse h = null; + try { + h = o.test(i.getName()); + } catch (Exception e) { + h = ServiceFactory.eINSTANCE.createHealthTestResponse(); + h.setMessageCode("Unable to determine health: " + e); + h.setStatus(HealthTestStatus.RED); + } + i.setHealthTestStatus(h.getStatus()); + i.setHealthTestMessageCode(h.getMessageCode()); + MetricStore store = controller.getServer().metrics.getStore(i); + Date now = new Date(); + String path = "/lastHealthTest"; + store.addLongValue(path, now, now.getTime(), "DateMetricAttribute", false); + } + + } + + public void updateInstanceConfiguration(String instanceName) { + CdapServiceInstance i = findInstance(instanceName); + CdapInternalApplicationConfiguration a = CdapFactory.eINSTANCE.createCdapInternalApplicationConfiguration(); + for (DcaeStream in : i.getInputStreams()) { + if (in instanceof DmaapStream) { + updateConfigSimple(i, in, "namespace-prefs::dmaap.in." + in.getName() + ".${attrName}", a); + } + } + for (DcaeStream in : i.getOutputStreams()) { + if (in instanceof DmaapStream) { + updateConfigSimple(i, in, "namespace-prefs::dmaap.out." + in.getName() + ".${attrName}", a); + } + } + updateConfig(i, i, a); + i.setCdapConfiguration(a); + } + + private String cdapName(CdapServiceInstance i) { +// String n = "dcae:" + o.getName() + ":" + i.getName(); + // return n.replace("-", "X").replace(":", "Y"); + return i.getNamespace(); + // return "dcae"+ new Date().getTime(); + } + + private DcaeCdapClusterManagerConsole consoleCluster(CdapServiceInstance i) { + CdapClusterServiceInstance instance = i.getClusterService(); + // need to assign the leader + EList l = instance.getServers(); + instance.setLeaderServer(l.get(l.size() - 1)); + DcaeCdapClusterService service = (DcaeCdapClusterService) instance.getService(); + DcaeCdapClusterServiceProvider provider = service.getSomfProvider(); + AbstractClient c = provider.getClient(instance); + return new DcaeCdapClusterManagerConsole(c); + } + + private String list2string(EList l) { + StringBuffer buf = new StringBuffer(); + boolean first = true; + for (CdapKeyPair p : l) { + if (p.getValue() == null) + continue; + if (!first) + buf.append(" "); + first = false; + // dmaap.XX.dmaapPassword + if (p.getName().startsWith("dmaap") && p.getName().endsWith("dmaapPassword")) { + String pw = p.getValue(); + if (! pw.startsWith("rsa:")) { +// System.err.println("ZZZZZ: unencrypted pw: " + ManagementServer.object2ref(p)); + } + try { + pw = JavaHttpClient.decryptPassword(pw); + } catch (Exception e) { +// System.err.println("ZZZZZ: badly encrypted password: " + ManagementServer.object2ref(p)); + pw = "badly encrypted password"; + } + buf.append(p.getName()).append("=").append(pw); + } + else { + String v = p.getValue(); + if (v.startsWith("rsa:")) { + try { + v = JavaHttpClient.decryptPassword(v); + } catch (Exception e) { + v = "badly encrypted password"; + } + } + buf.append(p.getName()).append("=").append(v); + } + } + return buf.toString(); + } + + protected CdapServiceInstance findInstance(String instanceName) { + for (CdapServiceInstance ii : o.getInstances()) { + if (ii.getName().equals(instanceName)) { + return ii; + } + } + throw new RuntimeException("Unable to find instance: " + instanceName); + } + + private void updateConfigSimple(EObject root, EObject i, String destination, CdapInternalApplicationConfiguration a) { + if (i == null) + return; + for (EAttribute attr : i.eClass().getEAllAttributes()) { + add(root, i, attr, destination, a); + } + } + + private void updateConfig(EObject root, EObject i, CdapInternalApplicationConfiguration appConfig) { + if (i == null) + return; + for (EAttribute attr : i.eClass().getEAllAttributes()) { + EAnnotation anno = attr.getEAnnotation("http://openecomp.org/cdap"); + if (anno == null) + continue; + String destination = anno.getDetails().get("destination"); +// System.err.println("AAAAA" + attr.getName() + " " + destination); + add(root, i, attr, destination, appConfig); + } + for (EReference ref : i.eClass().getEAllContainments()) { + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) i.eGet(ref); + for (EObject o : l) { + updateConfig(root, o, appConfig); + } + } else { + updateConfig(root, (EObject) i.eGet(ref), appConfig); + } + } +// System.err.println(ManagementServer.ecore2json(appConfig, 1000, null, true).toString(2)); + } + + private void add(EObject root, EObject i, EAttribute attr, String destination, CdapInternalApplicationConfiguration appConfig) { + // Make this more complex later + if (i instanceof NamedEntity) { + NamedEntity n = (NamedEntity) i; + if (n.getName() != null) + destination = destination.replace("${name}", n.getName()); + } + destination = destination.replace("${attrName}", attr.getName()); + String path1 = ManagementServer.object2ref(root); + String path2 = ManagementServer.object2ref(i); + String path = path2.replace("/", ".").substring(path1.length() + 1); + destination = destination.replace("${path}", path ); + String[] a = destination.split(":"); + if (a.length != 3) { + throw new RuntimeException("Bad CDAP destination annotation: " + destination); + } + if ("worker-prefs".equals(a[0])) { + add(root, appConfig.getWorkers(), a[1], a[2], i, attr); + } + if ("service-prefs".equals(a[0])) { + add(root, appConfig.getServices(), a[1], a[2], i, attr); + } + if ("flow-prefs".equals(a[0])) { + add(root, appConfig.getFlows(), a[1], a[2], i, attr); + } + if ("app-prefs".equals(a[0])) { + add(root, appConfig.getApps(), a[1], a[2], i, attr); + } + if ("namespace-prefs".equals(a[0])) { + add(root, appConfig.getPreferences(), a[2], i, attr); + } + } + + private org.openecomp.ncomp.cdap.CdapFactory f = org.openecomp.ncomp.cdap.CdapFactory.eINSTANCE; + + private void add(EObject root, EList l, String name, String cdapKey, EObject i, EAttribute attr) { + CdapEntityWithPreferences p = null; + for (CdapEntityWithPreferences p1 : l) { + if (p1.getName().equals(name)) { + p = p1; + break; + } + } + if (p == null) { + p = f.createCdapEntityWithPreferences(); + l.add(p); + p.setName(name); + } + add(root,p.getPreferences(), cdapKey, i, attr); + } + + private void add(EObject root, EList prefs, String cdapKey, EObject i, EAttribute attr) { + String value; + if (attr.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) i.eGet(attr); + List l2 = new ArrayList(); + for (Object o : l) { + l2.add((String) ManagementServer.attr2jsonValue(0, o, attr.getEType())); + } + value = StringUtil.join(l2, ":"); + } + else + value = (String) ManagementServer.attr2jsonValue(0, i.eGet(attr), attr.getEType()); + CdapKeyPair pair = f.createCdapKeyPair(); + pair.setName(cdapKey); + pair.setValue(value); + prefs.add(pair); + } + + public void start() { + + Thread t = new Thread("cdap service: " + o.getName()) { + @Override + public void run() { + while (true) { + try { + if (!controller.getServer().isSlave) { + updateDeploymentStatus(); + } + Thread.sleep(60000); // sleep 60 seconds + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("vm service: " + o.getName() + " : " + e); + try { + Thread.sleep(30000); + } catch (InterruptedException e1) { + } + } + } + } + + }; + t.start(); + } + + public void updateDeploymentStatus() { +// System.out.println("CDAP updateDeploymentStatus 1: "); + for (CdapServiceInstance instance : o.getInstances()) { + // TODO Docker deployment status + instance.setStatus(DeploymentStatus.UNDEPLOYED); +// System.out.println("CDAP updateDeploymentStatus 2: " + instance.getName() + " " + instance.getNamespace()); + if (instance.getClusterService() == null) + continue; + for (CdapNamespace c : instance.getClusterService().getCluster().getNamespaces()) { +// System.out.println("CDAP updateDeploymentStatus 4: " + c.getName()); + if (instance.getNamespace() != null && instance.getNamespace().equals(c.getName())) { + instance.setStatus(DeploymentStatus.DEPLOYED); + } + } + } + } + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdap/gui/DcaeGuiClientApiProvider.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdap/gui/DcaeGuiClientApiProvider.java new file mode 100644 index 0000000..63e179c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdap/gui/DcaeGuiClientApiProvider.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.cdap.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProvider extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProvider.class); + GuiClientApi o; + + public DcaeGuiClientApiProvider(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerProvider.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerProvider.java new file mode 100644 index 0000000..22f56ee --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerProvider.java @@ -0,0 +1,99 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.cdapmanager; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; + + +import org.openecomp.dcae.controller.service.cdapmanager.impl.CdapManagerImpl; +import org.openecomp.dcae.controller.service.cdapmanager.CdapManager; + + +public class DcaeCdapManagerProvider extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeCdapManagerProvider.class); + CdapManager o; + + public DcaeCdapManagerProvider(ISiriusServer controller, CdapManager o) { + super(controller, o); + this.o = o; + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void suspend() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void resume() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String publicKey() { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void configurationChanged() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + + + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiProvider.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiProvider.java new file mode 100644 index 0000000..89a06b3 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiProvider.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.cdapmanager.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProvider extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProvider.class); + GuiClientApi o; + + public DcaeGuiClientApiProvider(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server-gen/bin/controller-service-Cdap-manager-controller b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server-gen/bin/controller-service-Cdap-manager-controller new file mode 100644 index 0000000..58985bc --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server-gen/bin/controller-service-Cdap-manager-controller @@ -0,0 +1,138 @@ +#!/bin/bash + +# setup env if needed. java 6 required +## JAVA_HOME= + +############################## DO NOT EDIT BELOW ########################## + +SNAME="Dcae Controller" +PNAME=controller-service-Cdap-manager-controller +CLASS=org.openecomp.dcae.controller.service.servers.cdapmanager.DcaeCdapManagerServer + +############################## COMMON BELOW ########################## + +check_status () +{ + if [ -f "${_PIDFILE}" ]; then + _PID=`cat "${_PIDFILE}"` + check_status_of_pid $_PID + else + _STATUS="$SNAME (no pidfile) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + +remove_pid_file () +{ + if [ -f "${_PIDFILE}" ]; then + rm "${_PIDFILE}" + fi +} + + +_DIR=`dirname "$0"` +_DIR=`dirname "$_DIR"` + +_PIDFILE=$_DIR/PID + +CMD=$1 +shift + +check_status + +CP=$(find $_DIR/lib/*/* -name \*.jar 2>/dev/null | xargs -I X printf ":%s" X) + +JVMARGS=$(grep 'server.jvmargs' $_DIR/config/cdapmanager.properties | sed -e 's/.*=//') + +case $CMD in + status) + echo $_STATUS + exit 0 + ;; + console) + $GROOVY_HOME/bin/groovysh -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP + ;; + run) + $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + groovy) + $GROOVY_HOME/bin/groovy -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + start) + if [ "$_RUNNING" = "1" ]; then + echo $_STATUS + exit 0 + fi + mkdir -p $_DIR/logs + if [ -e $_DIR/logs/$PNAME.out.1 ]; then mv $_DIR/logs/$PNAME.out.1 $_DIR/logs/$PNAME.out.2; fi + if [ -e $_DIR/logs/$PNAME.err.1 ]; then mv $_DIR/logs/$PNAME.err.1 $_DIR/logs/$PNAME.err.2; fi + if [ -e $_DIR/logs/$PNAME.out ]; then mv $_DIR/logs/$PNAME.out $_DIR/logs/$PNAME.out.1; fi + if [ -e $_DIR/logs/$PNAME.err ]; then mv $_DIR/logs/$PNAME.err $_DIR/logs/$PNAME.err.1; fi + + nohup $JAVA_HOME/bin/java $JVMARGS -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" $CLASS >> $_DIR/logs/$PNAME.out 2>> $_DIR/logs/$PNAME.err & + + _PID=$! + echo $_PID > $_PIDFILE + sleep 5 + check_status + echo $_STATUS + if [ "$_RUNNING" = "1" ]; then + exit 0 + else + echo "Failed to start - make sure the $SNAME is fully configured properly" + exit 1 + fi + ;; + stop) + if [ "$_RUNNING" = "0" ]; then + echo $_STATUS + remove_pid_file + exit 0 + fi + echo "Stopping $SNAME..." + _PID_TO_KILL=$_PID; + echo "$SNAME (pid=${_PID_TO_KILL}) is stopping..." + kill -TERM $_PID_TO_KILL + sleep 5 + check_status_of_pid $_PID_TO_KILL + if [ "$_RUNNING" = "1" ]; then + kill -TERM $_PID_TO_KILL + fi + while [ "$_RUNNING" = "1" ]; do + sleep 2 + check_status_of_pid $_PID_TO_KILL + done + remove_pid_file + echo "$SNAME has stopped." + exit 0 + ;; + *) + echo "$0 start|stop" + ;; +esac + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server-gen/bin/controller-service-cdap-adaptor-controller b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server-gen/bin/controller-service-cdap-adaptor-controller new file mode 100644 index 0000000..1aa26a7 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server-gen/bin/controller-service-cdap-adaptor-controller @@ -0,0 +1,138 @@ +#!/bin/bash + +# setup env if needed. java 6 required +## JAVA_HOME= + +############################## DO NOT EDIT BELOW ########################## + +SNAME="Dcae Controller" +PNAME=controller-service-cdap-adaptor-controller +CLASS=org.openecomp.dcae.controller.service.servers.cdap.DcaeCdapServiceServer + +############################## COMMON BELOW ########################## + +check_status () +{ + if [ -f "${_PIDFILE}" ]; then + _PID=`cat "${_PIDFILE}"` + check_status_of_pid $_PID + else + _STATUS="$SNAME (no pidfile) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + +remove_pid_file () +{ + if [ -f "${_PIDFILE}" ]; then + rm "${_PIDFILE}" + fi +} + + +_DIR=`dirname "$0"` +_DIR=`dirname "$_DIR"` + +_PIDFILE=$_DIR/PID + +CMD=$1 +shift + +check_status + +CP=$(find $_DIR/lib/*/* -name \*.jar 2>/dev/null | xargs -I X printf ":%s" X) + +JVMARGS=$(grep 'server.jvmargs' $_DIR/config/cdap.properties | sed -e 's/.*=//') + +case $CMD in + status) + echo $_STATUS + exit 0 + ;; + console) + $GROOVY_HOME/bin/groovysh -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP + ;; + run) + $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + groovy) + $GROOVY_HOME/bin/groovy -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + start) + if [ "$_RUNNING" = "1" ]; then + echo $_STATUS + exit 0 + fi + mkdir -p $_DIR/logs + if [ -e $_DIR/logs/$PNAME.out.1 ]; then mv $_DIR/logs/$PNAME.out.1 $_DIR/logs/$PNAME.out.2; fi + if [ -e $_DIR/logs/$PNAME.err.1 ]; then mv $_DIR/logs/$PNAME.err.1 $_DIR/logs/$PNAME.err.2; fi + if [ -e $_DIR/logs/$PNAME.out ]; then mv $_DIR/logs/$PNAME.out $_DIR/logs/$PNAME.out.1; fi + if [ -e $_DIR/logs/$PNAME.err ]; then mv $_DIR/logs/$PNAME.err $_DIR/logs/$PNAME.err.1; fi + + nohup $JAVA_HOME/bin/java $JVMARGS -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" $CLASS >> $_DIR/logs/$PNAME.out 2>> $_DIR/logs/$PNAME.err & + + _PID=$! + echo $_PID > $_PIDFILE + sleep 5 + check_status + echo $_STATUS + if [ "$_RUNNING" = "1" ]; then + exit 0 + else + echo "Failed to start - make sure the $SNAME is fully configured properly" + exit 1 + fi + ;; + stop) + if [ "$_RUNNING" = "0" ]; then + echo $_STATUS + remove_pid_file + exit 0 + fi + echo "Stopping $SNAME..." + _PID_TO_KILL=$_PID; + echo "$SNAME (pid=${_PID_TO_KILL}) is stopping..." + kill -TERM $_PID_TO_KILL + sleep 5 + check_status_of_pid $_PID_TO_KILL + if [ "$_RUNNING" = "1" ]; then + kill -TERM $_PID_TO_KILL + fi + while [ "$_RUNNING" = "1" ]; do + sleep 2 + check_status_of_pid $_PID_TO_KILL + done + remove_pid_file + echo "$SNAME has stopped." + exit 0 + ;; + *) + echo "$0 start|stop" + ;; +esac + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/adaptor.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/adaptor.properties new file mode 100644 index 0000000..4605389 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/adaptor.properties @@ -0,0 +1,7 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = PORT +server.user.console = CONSOLE_PW +server.user.gui = GUI_PW +server.user.client = CLIENT_PW diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/console.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/console.properties new file mode 100644 index 0000000..4b63607 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:PORT +localhost.user=console +localhost.password=CONSOLE_PW diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/gui.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/gui.properties new file mode 100644 index 0000000..e69de29 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/log4j.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/log4j.properties new file mode 100644 index 0000000..8b3b8f9 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/log4j.properties @@ -0,0 +1,24 @@ +#log4j.debug=0 +log4j.rootLogger=warn, file +log4j.logger.org.openecomp.ncomp=info, file +log4j.additivity.org.openecomp.ncomp=false +log4j.logger.org.openecomp.ncomp.datarouter=warn, file +log4j.additivity.org.openecomp.ncomp.datarouter=false +log4j.logger.org.apache.http.headers=debug, file +log4j.logger.org.apache.http.wire=debug, file + +## uploaded logger +log4j.logger.org.openecomp.ncomp.sirius.manager.uploaded=info, uploaded +log4j.additivity.org.openecomp.ncomp.sirius.manager.uploaded=false +## request logging +log4j.logger.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=info, requests +log4j.additivity.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=false + + +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=logs/BBBB.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n +log4j.appender.file.MaxFileSize=50MB +log4j.appender.file.MaxBackupIndex=5 + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/makefile b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/makefile new file mode 100644 index 0000000..717823e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/makefile @@ -0,0 +1,9 @@ + +restart: stop start + +start: + M2_HOME=/home/ncomp/.m2 bin/BBBB-controller start +stop: + bin/BBBB-controller stop +console: + bin/BBBB-controller console diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/pw.sh.sh b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/pw.sh.sh new file mode 100644 index 0000000..cd022ae --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/pw.sh.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +### used to generate random passwords + + +echo '#!/bin/bash' +echo "" + +echo 'cat \' + +for i in CONSOLE GUI CLIENT +do + echo ' |' sed s/${i}_PW/$(echo $i:$(date +%s) | sha256sum | base64 | head -c 20 ; echo)/ \\ +done + \ No newline at end of file diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/scripts/console.groovy b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/scripts/console.groovy new file mode 100644 index 0000000..9bab61a --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/scripts/console.groovy @@ -0,0 +1,27 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.openecomp.dcae.controller.service.servers.cdap.DcaeCdapServiceConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +adaptor = new DcaeCdapServiceConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/CdapManager.yaml b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/CdapManager.yaml new file mode 100644 index 0000000..6ab6771 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/CdapManager.yaml @@ -0,0 +1,69 @@ +operations: + test: {} + suspend: {} + resume: {} + publicKey: {} + configurationChanged: {} + updateStreams: {} + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_publicKey: + decription: Remote call publicKey + REMOTE_configurationChanged: + decription: Remote call configurationChanged + REMOTE_updateStreams: + decription: Remote call updateStreams +messages: + dummy: {} + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + publicKey: + errorCode: publicKey-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + configurationChanged: + errorCode: configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateStreams: + errorCode: updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_publicKey: + errorCode: REMOTE-publicKey-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_configurationChanged: + errorCode: REMOTE-configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateStreams: + errorCode: REMOTE-updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/CdapService.yaml b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/CdapService.yaml new file mode 100644 index 0000000..1bb496e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/CdapService.yaml @@ -0,0 +1,135 @@ +operations: + deploy: {} + undeploy: {} + test: {} + suspend: {} + resume: {} + pushManagerConfiguration: {} + pollManagerConfiguration: {} + managerConfiguration: {} + managerOperation: {} + updateConfigurationFromPolicy: {} + runHealthTests: {} + updateInstanceConfiguration: {} + REMOTE_deploy: + decription: Remote call deploy + REMOTE_undeploy: + decription: Remote call undeploy + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_pushManagerConfiguration: + decription: Remote call pushManagerConfiguration + REMOTE_pollManagerConfiguration: + decription: Remote call pollManagerConfiguration + REMOTE_managerConfiguration: + decription: Remote call managerConfiguration + REMOTE_managerOperation: + decription: Remote call managerOperation + REMOTE_updateConfigurationFromPolicy: + decription: Remote call updateConfigurationFromPolicy + REMOTE_runHealthTests: + decription: Remote call runHealthTests + REMOTE_updateInstanceConfiguration: + decription: Remote call updateInstanceConfiguration +messages: + dummy: {} + deploy: + errorCode: deploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + undeploy: + errorCode: undeploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pushManagerConfiguration: + errorCode: pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pollManagerConfiguration: + errorCode: pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerConfiguration: + errorCode: managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerOperation: + errorCode: managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateConfigurationFromPolicy: + errorCode: updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + runHealthTests: + errorCode: runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateInstanceConfiguration: + errorCode: updateInstanceConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_deploy: + errorCode: REMOTE-deploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_undeploy: + errorCode: REMOTE-undeploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pushManagerConfiguration: + errorCode: REMOTE-pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pollManagerConfiguration: + errorCode: REMOTE-pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerConfiguration: + errorCode: REMOTE-managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerOperation: + errorCode: REMOTE-managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateConfigurationFromPolicy: + errorCode: REMOTE-updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_runHealthTests: + errorCode: REMOTE-runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateInstanceConfiguration: + errorCode: REMOTE-updateInstanceConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/GuiClientApi.yaml b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/GuiClientApi.yaml new file mode 100644 index 0000000..bf3d69d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/GuiClientApi.yaml @@ -0,0 +1,69 @@ +operations: + getTree: {} + getObject: {} + getTimeSerie: {} + getTable: {} + getHtml: {} + getGraph: {} + REMOTE_getTree: + decription: Remote call getTree + REMOTE_getObject: + decription: Remote call getObject + REMOTE_getTimeSerie: + decription: Remote call getTimeSerie + REMOTE_getTable: + decription: Remote call getTable + REMOTE_getHtml: + decription: Remote call getHtml + REMOTE_getGraph: + decription: Remote call getGraph +messages: + dummy: {} + getTree: + errorCode: getTree-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getObject: + errorCode: getObject-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTimeSerie: + errorCode: getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTable: + errorCode: getTable-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getHtml: + errorCode: getHtml-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getGraph: + errorCode: getGraph-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_getTree: + errorCode: REMOTE-getTree-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getObject: + errorCode: REMOTE-getObject-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTimeSerie: + errorCode: REMOTE-getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTable: + errorCode: REMOTE-getTable-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getHtml: + errorCode: REMOTE-getHtml-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getGraph: + errorCode: REMOTE-getGraph-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapFactory.java new file mode 100644 index 0000000..ae21528 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.cdap; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.cdap.CdapService; +import org.openecomp.dcae.controller.service.cdap.CdapPackage; +import org.openecomp.dcae.controller.service.cdap.impl.CdapFactoryImpl; + + + + + +public class DcaeCdapFactory extends CdapFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeCdapFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return CdapPackage.eINSTANCE; } + public DcaeCdapFactory(ISiriusServer server) { + this.server = server; + } + @Override + public CdapService createCdapService() { + return new DcaeCdapService(server); + } + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapService.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapService.java new file mode 100644 index 0000000..9d71a7e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapService.java @@ -0,0 +1,408 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.cdap; + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.servers.cdap.logging.CdapServiceOperationEnum; +import org.openecomp.dcae.controller.service.servers.cdap.logging.CdapServiceMessageEnum; + + + + +import org.openecomp.dcae.controller.service.cdap.impl.CdapServiceImpl; + + + +public class DcaeCdapService extends CdapServiceImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeCdapService.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeCdapServiceProvider controller; + ISiriusServer server; + + public DcaeCdapService(ISiriusServer server) { + this.server = server; + this.controller = new DcaeCdapServiceProvider(server,this); + } + + public void updateInstanceConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateInstanceConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.updateInstanceConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.updateInstanceConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateInstanceConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapServiceMessageEnum.updateInstanceConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateInstanceConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.START, duration_,instanceName,containerPath); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.deploy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.deploy(instanceName,containerPath); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.ERROR, duration_,instanceName,containerPath); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapServiceMessageEnum.deploy, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.OKAY, duration_,instanceName,containerPath); + + } + + public void undeploy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.undeploy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.undeploy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapServiceMessageEnum.undeploy, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.test); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.test(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapServiceMessageEnum.test, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public void suspend(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.suspend); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.suspend(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapServiceMessageEnum.suspend, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void resume(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.resume); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.resume(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapServiceMessageEnum.resume, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.pushManagerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.pushManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapServiceMessageEnum.pushManagerConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.pollManagerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.pollManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapServiceMessageEnum.pollManagerConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.managerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.managerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapServiceMessageEnum.managerConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.START, duration_,instanceName,operation,parameters); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.managerOperation); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.ERROR, duration_,instanceName,operation,parameters); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapServiceMessageEnum.managerOperation, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.OKAY, duration_,instanceName,operation,parameters); + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.updateConfigurationFromPolicy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapServiceMessageEnum.updateConfigurationFromPolicy, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void runHealthTests() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.runHealthTests); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.runHealthTests(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapServiceMessageEnum.runHealthTests, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.OKAY, duration_); + + } + + + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + DcaeCdapServiceProvider.ecoreSetup(); + } + public DcaeCdapServiceProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceClient.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceClient.java new file mode 100644 index 0000000..01afc0f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceClient.java @@ -0,0 +1,276 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.cdap; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.cdap.impl.CdapServiceImpl; +import org.openecomp.dcae.controller.service.cdap.CdapPackage; +import org.openecomp.dcae.controller.service.servers.cdap.logging.CdapServiceOperationEnum; +import org.openecomp.dcae.controller.service.servers.cdap.logging.CdapServiceMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeCdapServiceClient extends CdapServiceImpl { + public static final Logger logger = Logger.getLogger(DcaeCdapServiceClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeCdapServiceClient(String file, String name) { + DcaeCdapService.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeCdapServiceClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeCdapServiceClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public void updateInstanceConfiguration(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_updateInstanceConfiguration); + + try { + client.operationPath("/resources", c, "updateInstanceConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_updateInstanceConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateInstanceConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_deploy); + + try { + client.operationPath("/resources", c, "deploy", null, instanceName,containerPath); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_deploy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@deploy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void undeploy(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_undeploy); + + try { + client.operationPath("/resources", c, "undeploy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_undeploy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@undeploy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@test: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspend: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@resume: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pushManagerConfiguration(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_pushManagerConfiguration); + + try { + client.operationPath("/resources", c, "pushManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_pushManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@pushManagerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pollManagerConfiguration(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_pollManagerConfiguration); + + try { + client.operationPath("/resources", c, "pollManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_pollManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@pollManagerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_managerConfiguration); + org.eclipse.emf.ecore.EObject res; + try { + res = (org.eclipse.emf.ecore.EObject) client.operationPath("/resources", c, "managerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_managerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@managerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_managerOperation); + org.json.JSONObject res; + try { + res = (org.json.JSONObject) client.operationPath("/resources", c, "managerOperation", null, instanceName,operation,parameters); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_managerOperation, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@managerOperation: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_updateConfigurationFromPolicy); + + try { + client.operationPath("/resources", c, "updateConfigurationFromPolicy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateConfigurationFromPolicy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void runHealthTests() { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_runHealthTests); + + try { + client.operationPath("/resources", c, "runHealthTests", null); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_runHealthTests, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@runHealthTests: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceConsole.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceConsole.java new file mode 100644 index 0000000..f6fe8f1 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceConsole.java @@ -0,0 +1,189 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.servers.cdap; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeCdapServiceConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeCdapServiceConsole.class); + protected DcaeCdapServiceClient controller; + + + + + public DcaeCdapServiceConsole(String filename, String name) { + super(filename, name); + controller = new DcaeCdapServiceClient(filename,name); + client = controller.client; + + } + + public DcaeCdapServiceConsole(AbstractClient c) { + controller = new DcaeCdapServiceClient(c); + client = controller.client; + } + + + public void updateInstanceConfiguration(java.lang.String instanceName) { + + try { + controller.updateInstanceConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + try { + controller.deploy(instanceName,containerPath); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void undeploy(java.lang.String instanceName) { + + try { + controller.undeploy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend(java.lang.String instanceName) { + + try { + controller.suspend(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume(java.lang.String instanceName) { + + try { + controller.resume(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pushManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pollManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + try { + res = controller.managerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void runHealthTests() { + + try { + controller.runHealthTests(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceProviderTemplate.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceProviderTemplate.java new file mode 100644 index 0000000..ca9ca68 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceProviderTemplate.java @@ -0,0 +1,137 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.cdap; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; + + +import org.openecomp.dcae.controller.service.cdap.impl.CdapServiceImpl; +import org.openecomp.dcae.controller.service.cdap.CdapService; + + +public class DcaeCdapServiceProviderTemplate extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeCdapServiceProviderTemplate.class); + CdapService o; + + public DcaeCdapServiceProviderTemplate(ISiriusServer controller, CdapService o) { + super(controller, o); + this.o = o; + } + + public void updateInstanceConfiguration(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void undeploy(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void suspend(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void resume(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void runHealthTests() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + + + + + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceServer.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceServer.java new file mode 100644 index 0000000..78b58cd --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceServer.java @@ -0,0 +1,98 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.servers.cdap; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.cdap.CdapService; + + + + + + +public class DcaeCdapServiceServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeCdapServiceServer.class); + String serverPath; + ManagementServer server; + DcaeCdapService controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeCdapFactory f = new DcaeCdapFactory(this); + + + + public DcaeCdapServiceServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeCdapService.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "CdapService", serverPath, filename); + server.addFactory(f); + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeCdapService) server.find("/").o; + webServer = new Jetty8Server("cdap.properties"); + webServer.add("/resources",server); + + + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeCdapServiceServer s = new DcaeCdapServiceServer("cdap.properties"); + s.runWebserver(); + } + public CdapService getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapService.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapService.properties new file mode 100644 index 0000000..364ae3b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapService.properties @@ -0,0 +1,150 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +deploy=\ + deploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +undeploy=\ + undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pushManagerConfiguration=\ + pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pollManagerConfiguration=\ + pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerConfiguration=\ + managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerOperation=\ + managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateConfigurationFromPolicy=\ + updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +runHealthTests=\ + runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateInstanceConfiguration=\ + updateInstanceConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_deploy=\ + REMOTE-deploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_undeploy=\ + REMOTE-undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pushManagerConfiguration=\ + REMOTE-pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pollManagerConfiguration=\ + REMOTE-pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerConfiguration=\ + REMOTE-managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerOperation=\ + REMOTE-managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateConfigurationFromPolicy=\ + REMOTE-updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_runHealthTests=\ + REMOTE-runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateInstanceConfiguration=\ + REMOTE-updateInstanceConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapServiceMessageEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapServiceMessageEnum.java new file mode 100644 index 0000000..15e7393 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapServiceMessageEnum.java @@ -0,0 +1,59 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.cdap.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum CdapServiceMessageEnum implements EcompMessageEnum { + + dummy, + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateInstanceConfiguration, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateInstanceConfiguration; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.servers.cdap.logging.CdapService"); + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapServiceOperationEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapServiceOperationEnum.java new file mode 100644 index 0000000..d67c6be --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapServiceOperationEnum.java @@ -0,0 +1,53 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.cdap.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum CdapServiceOperationEnum implements EcompOperationEnum { + + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateInstanceConfiguration, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateInstanceConfiguration; +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManager.java new file mode 100644 index 0000000..dcddd85 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManager.java @@ -0,0 +1,241 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.cdapmanager; + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.servers.cdapmanager.logging.CdapManagerOperationEnum; +import org.openecomp.dcae.controller.service.servers.cdapmanager.logging.CdapManagerMessageEnum; + + + + +import org.openecomp.dcae.controller.service.cdapmanager.impl.CdapManagerImpl; + + + +public class DcaeCdapManager extends CdapManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeCdapManager.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeCdapManagerProvider controller; + ISiriusServer server; + + public DcaeCdapManager(ISiriusServer server) { + this.server = server; + this.controller = new DcaeCdapManagerProvider(server,this); + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.test); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.test(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapManagerMessageEnum.test, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void suspend() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.suspend); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.suspend(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapManagerMessageEnum.suspend, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_); + + } + + public void resume() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.resume); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.resume(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapManagerMessageEnum.resume, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_); + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.publicKey); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.publicKey(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapManagerMessageEnum.publicKey, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void configurationChanged() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.configurationChanged); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.configurationChanged(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapManagerMessageEnum.configurationChanged, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.OKAY, duration_); + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.START, duration_,inputStreams,outputStreams); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.updateStreams); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.ERROR, duration_,inputStreams,outputStreams); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapManagerMessageEnum.updateStreams, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.OKAY, duration_,inputStreams,outputStreams); + + } + + + + + + + public static void ecoreSetup() { + DcaeCdapManagerProvider.ecoreSetup(); + } + public DcaeCdapManagerProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerClient.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerClient.java new file mode 100644 index 0000000..7c43951 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerClient.java @@ -0,0 +1,174 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.cdapmanager; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.cdapmanager.impl.CdapManagerImpl; +import org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage; +import org.openecomp.dcae.controller.service.servers.cdapmanager.logging.CdapManagerOperationEnum; +import org.openecomp.dcae.controller.service.servers.cdapmanager.logging.CdapManagerMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeCdapManagerClient extends CdapManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeCdapManagerClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeCdapManagerClient(String file, String name) { + DcaeCdapManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeCdapManagerClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeCdapManagerClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + EClass c = CdapmanagerPackage.eINSTANCE.getCdapManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null); + } + catch (Exception e) { + ecomplogger.warn(CdapManagerMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@test: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend() { + EClass c = CdapmanagerPackage.eINSTANCE.getCdapManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null); + } + catch (Exception e) { + ecomplogger.warn(CdapManagerMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspend: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume() { + EClass c = CdapmanagerPackage.eINSTANCE.getCdapManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null); + } + catch (Exception e) { + ecomplogger.warn(CdapManagerMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@resume: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public java.lang.String publicKey() { + EClass c = CdapmanagerPackage.eINSTANCE.getCdapManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.REMOTE_publicKey); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "publicKey", null); + } + catch (Exception e) { + ecomplogger.warn(CdapManagerMessageEnum.REMOTE_publicKey, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@publicKey: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void configurationChanged() { + EClass c = CdapmanagerPackage.eINSTANCE.getCdapManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.REMOTE_configurationChanged); + + try { + client.operationPath("/resources", c, "configurationChanged", null); + } + catch (Exception e) { + ecomplogger.warn(CdapManagerMessageEnum.REMOTE_configurationChanged, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@configurationChanged: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void updateStreams(EList inputStreams, EList outputStreams) { + EClass c = CdapmanagerPackage.eINSTANCE.getCdapManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.REMOTE_updateStreams); + + try { + client.operationPath("/resources", c, "updateStreams", null, inputStreams,outputStreams); + } + catch (Exception e) { + ecomplogger.warn(CdapManagerMessageEnum.REMOTE_updateStreams, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateStreams: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerConsole.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerConsole.java new file mode 100644 index 0000000..4378d95 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerConsole.java @@ -0,0 +1,127 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.servers.cdapmanager; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + +import org.openecomp.dcae.controller.service.servers.cdapmanager.gui.DcaeGuiClientApiConsole; + + +public class DcaeCdapManagerConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeCdapManagerConsole.class); + protected DcaeCdapManagerClient controller; + + + DcaeGuiClientApiConsole gui; + + + public DcaeCdapManagerConsole(String filename, String name) { + super(filename, name); + controller = new DcaeCdapManagerClient(filename,name); + client = controller.client; + + gui = new DcaeGuiClientApiConsole(filename,name); + } + + public DcaeCdapManagerConsole(AbstractClient c) { + controller = new DcaeCdapManagerClient(c); + client = controller.client; + } + + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend() { + + try { + controller.suspend(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume() { + + try { + controller.resume(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + try { + res = controller.publicKey(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void configurationChanged() { + + try { + controller.configurationChanged(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerProviderTemplate.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerProviderTemplate.java new file mode 100644 index 0000000..43f74c5 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerProviderTemplate.java @@ -0,0 +1,99 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.cdapmanager; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; + + +import org.openecomp.dcae.controller.service.cdapmanager.impl.CdapManagerImpl; +import org.openecomp.dcae.controller.service.cdapmanager.CdapManager; + + +public class DcaeCdapManagerProviderTemplate extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeCdapManagerProviderTemplate.class); + CdapManager o; + + public DcaeCdapManagerProviderTemplate(ISiriusServer controller, CdapManager o) { + super(controller, o); + this.o = o; + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void suspend() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void resume() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String publicKey() { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void configurationChanged() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + + + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerServer.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerServer.java new file mode 100644 index 0000000..cbe7dc6 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerServer.java @@ -0,0 +1,115 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.servers.cdapmanager; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.cdapmanager.CdapManager; + + +import org.openecomp.dcae.controller.service.servers.cdapmanager.gui.DcaeModelFactory; + + + + + +public class DcaeCdapManagerServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeCdapManagerServer.class); + String serverPath; + ManagementServer server; + DcaeCdapManager controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeCdapmanagerFactory f = new DcaeCdapmanagerFactory(this); + + + String guiPath; + ManagementServer guiServer; + + + public DcaeCdapManagerServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeCdapManager.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "CdapManager", serverPath, filename); + server.addFactory(f); + + server.addFactory(new org.openecomp.ncomp.servers.cdap.CdapCdapFactory(this)); + + + server.addFactory(org.openecomp.dcae.controller.service.cdap.CdapFactory.eINSTANCE); + + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeCdapManager) server.find("/").o; + webServer = new Jetty8Server("cdapmanager.properties"); + webServer.add("/resources",server); + + + + EFactory guiFactory = new DcaeModelFactory(this); + guiPath = serverPath + "/gui"; + guiServer = new ManagementServer(guiFactory, "GuiClientApi", guiPath, "gui.properties"); + guiServer.start(); + webServer.add("/gui",guiServer); + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeCdapManagerServer s = new DcaeCdapManagerServer("cdapmanager.properties"); + s.runWebserver(); + } + public CdapManager getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapmanagerFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapmanagerFactory.java new file mode 100644 index 0000000..3e2f416 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapmanagerFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.cdapmanager; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.cdapmanager.CdapManager; +import org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage; +import org.openecomp.dcae.controller.service.cdapmanager.impl.CdapmanagerFactoryImpl; + + + + + +public class DcaeCdapmanagerFactory extends CdapmanagerFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeCdapmanagerFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return CdapmanagerPackage.eINSTANCE; } + public DcaeCdapmanagerFactory(ISiriusServer server) { + this.server = server; + } + @Override + public CdapManager createCdapManager() { + return new DcaeCdapManager(server); + } + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApi.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApi.java new file mode 100644 index 0000000..fc913e9 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApi.java @@ -0,0 +1,271 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.cdapmanager.gui; + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.servers.cdapmanager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.servers.cdapmanager.gui.logging.GuiClientApiMessageEnum; + + + + + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + + + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + + + + +import org.openecomp.ncomp.sirius.manager.Subject; + + + + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + + + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; + + + +public class DcaeGuiClientApi extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApi.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeGuiClientApiProvider controller; + ISiriusServer server; + + public DcaeGuiClientApi(ISiriusServer server) { + this.server = server; + this.controller = new DcaeGuiClientApiProvider(server,this); + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTree); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getTree(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getTree, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.OKAY, duration_); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.START, duration_,path); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getObject); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getObject(path); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.ERROR, duration_,path); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getObject, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.OKAY, duration_,path); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.START, duration_,path,start,end,duration); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTimeSerie); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.ERROR, duration_,path,start,end,duration); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getTimeSerie, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.OKAY, duration_,path,start,end,duration); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTable); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getTable(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getTable, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getHtml); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getHtml(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getHtml, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getGraph); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getGraph(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getGraph, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + + + + + + public static void ecoreSetup() { + DcaeGuiClientApiProvider.ecoreSetup(); + } + public DcaeGuiClientApiProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiClient.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiClient.java new file mode 100644 index 0000000..3ced93a --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiClient.java @@ -0,0 +1,175 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.cdapmanager.gui; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.dcae.controller.service.servers.cdapmanager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.servers.cdapmanager.gui.logging.GuiClientApiMessageEnum; + + +import org.openecomp.dcae.controller.service.servers.cdapmanager.DcaeCdapManager; + + + + +@SuppressWarnings("unchecked") +public class DcaeGuiClientApiClient extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeGuiClientApiClient(String file, String name) { + DcaeCdapManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTree); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTree) client.operationPath("/gui", c, "getTree", null); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTree, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getTree: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getObject); + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiObject) client.operationPath("/gui", c, "getObject", null, path); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getObject, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getObject: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTimeSerie); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie) client.operationPath("/gui", c, "getTimeSerie", null, path,start,end,duration); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTimeSerie, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getTimeSerie: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTable); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTable) client.operationPath("/gui", c, "getTable", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTable, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getTable: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getHtml); + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml) client.operationPath("/gui", c, "getHtml", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getHtml, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getHtml: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getGraph); + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res; + try { + res = (org.openecomp.ncomp.sirius.manager.graph.GuiGraph) client.operationPath("/gui", c, "getGraph", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getGraph, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getGraph: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiConsole.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiConsole.java new file mode 100644 index 0000000..ea17b1d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiConsole.java @@ -0,0 +1,123 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.servers.cdapmanager.gui; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeGuiClientApiConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiConsole.class); + protected DcaeGuiClientApiClient controller; + + + + + public DcaeGuiClientApiConsole(String filename, String name) { + super(filename, name); + controller = new DcaeGuiClientApiClient(filename,name); + client = controller.client; + + } + + public DcaeGuiClientApiConsole(AbstractClient c) { + controller = new DcaeGuiClientApiClient(c); + client = controller.client; + } + + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + try { + res = controller.getTree(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + try { + res = controller.getObject(path); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + try { + res = controller.getTable(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + try { + res = controller.getHtml(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + try { + res = controller.getGraph(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiProviderTemplate.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiProviderTemplate.java new file mode 100644 index 0000000..80da073 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiProviderTemplate.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.cdapmanager.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProviderTemplate extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProviderTemplate.class); + GuiClientApi o; + + public DcaeGuiClientApiProviderTemplate(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeModelFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeModelFactory.java new file mode 100644 index 0000000..5b46e5e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeModelFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.cdapmanager.gui; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelFactoryImpl; + +import org.openecomp.dcae.controller.service.servers.cdapmanager.DcaeCdapManagerServer; + + + +public class DcaeModelFactory extends ModelFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeModelFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ModelPackage.eINSTANCE; } + public DcaeModelFactory(ISiriusServer server) { + this.server = server; + } + @Override + public GuiClientApi createGuiClientApi() { + return new DcaeGuiClientApi(server); + } + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApi.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApi.properties new file mode 100644 index 0000000..8705ab8 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApi.properties @@ -0,0 +1,78 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +getTree=\ + getTree-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getObject=\ + getObject-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTimeSerie=\ + getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTable=\ + getTable-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getHtml=\ + getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getGraph=\ + getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_getTree=\ + REMOTE-getTree-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getObject=\ + REMOTE-getObject-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTimeSerie=\ + REMOTE-getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTable=\ + REMOTE-getTable-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getHtml=\ + REMOTE-getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getGraph=\ + REMOTE-getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApiMessageEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApiMessageEnum.java new file mode 100644 index 0000000..bf9107c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApiMessageEnum.java @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.cdapmanager.gui.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum GuiClientApiMessageEnum implements EcompMessageEnum { + + dummy, + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.servers.cdapmanager.gui.logging.GuiClientApi"); + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApiOperationEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApiOperationEnum.java new file mode 100644 index 0000000..ecfbf9e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApiOperationEnum.java @@ -0,0 +1,41 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.cdapmanager.gui.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum GuiClientApiOperationEnum implements EcompOperationEnum { + + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManager.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManager.properties new file mode 100644 index 0000000..ef19f9b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManager.properties @@ -0,0 +1,78 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +publicKey=\ + publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +configurationChanged=\ + configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateStreams=\ + updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_publicKey=\ + REMOTE-publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_configurationChanged=\ + REMOTE-configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateStreams=\ + REMOTE-updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManagerMessageEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManagerMessageEnum.java new file mode 100644 index 0000000..bfc7789 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManagerMessageEnum.java @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.cdapmanager.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum CdapManagerMessageEnum implements EcompMessageEnum { + + dummy, + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.servers.cdapmanager.logging.CdapManager"); + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManagerOperationEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManagerOperationEnum.java new file mode 100644 index 0000000..4a0f398 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManagerOperationEnum.java @@ -0,0 +1,41 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.cdapmanager.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum CdapManagerOperationEnum implements EcompOperationEnum { + + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams; +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/.gitignore b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/LICENSE.txt b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.classpath b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.classpath new file mode 100644 index 0000000..d2d34b3 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.gitignore b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.gitignore new file mode 100644 index 0000000..ba2a884 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.gitignore @@ -0,0 +1,2 @@ +/target/ +/data/ diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.project b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.project new file mode 100644 index 0000000..5c9c5bf --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.project @@ -0,0 +1,35 @@ + + + dcae-controller-service-cdap-cluster-manager + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.core.resources.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.jdt.groovy.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/LICENSE.txt b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/META-INF/MANIFEST.MF b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/META-INF/MANIFEST.MF new file mode 100644 index 0000000..251ccda --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: dcae-controller-service-cdap-cluster-manager +Bundle-SymbolicName: dcae-controller-service-cdap-cluster-manager +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.dcae.controller.service.cdap.cluster.manager.tools, + org.openecomp.dcae.controller.service.cdap.cluster.servers.manager, + org.openecomp.dcae.controller.service.cdap.cluster.servers.service +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + dcae-controller-service-cdap-cluster-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + ncomp-cdap-adaptor;bundle-version="0.1.0", + dcae-controller-core-model diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/build.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/build.properties new file mode 100644 index 0000000..a1ec8c4 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/build.properties @@ -0,0 +1,3 @@ +source.. = src/main/java/ +bin.includes = META-INF/,\ + . diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/config/cdap.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/config/cdap.properties new file mode 100644 index 0000000..fc61033 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/config/cdap.properties @@ -0,0 +1,9 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = 9991 +server.user.console = ZWJlY2Ux + +cluster.endpoint=foobar +cluster.user=foo +cluster.password=bar diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/config/manager.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/config/manager.properties new file mode 100644 index 0000000..544ab4e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/config/manager.properties @@ -0,0 +1,8 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = 9922 +server.user.console = Y2Y4NDk1ZmMzYzcyMmYy +server.user.gui = ZDc5OGQ5OTViZWI3YjY0 +server.user.client = M2M1MmEyMDVmZWFhYzcw + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/pom.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/pom.xml new file mode 100644 index 0000000..b6aab57 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/pom.xml @@ -0,0 +1,198 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-cdap-cluster-manager + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-base + 0.1.0-SNAPSHOT + ../../../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-base + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-assembly-plugin + 2.6 + + + zipfile + + single + + package + + false + ${project.artifactId}-${project.version} + + src/assembly/assemble_zip.xml + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/lib + false + true + true + false + false + false + org.opendaylight,com.brocade.odl,ch.qos.logback + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/versions + + + src/main/resources/versions + + version.properties + + true + + + + + + copy-resources + + copy-resources + + validate + + ${basedir}/target/etc/bvc-extensions + + + src/main/resources/etc/bvc-extensions + + feature_config_template.cfg + feature_custom.install + + true + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + attach-artifacts + package + + attach-artifact + + + + + target/${project.artifactId}-${project.version}-runtime.zip + zip + runtime + + + + + + + + + + + + org.openecomp.dcae.controller + dcae-controller-service-cdap-cluster-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-vm-adaptor + ${project.version} + + + org.openecomp.ncomp.cdap + ncomp-cdap-adaptor + ${project.version} + + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/assembly/assemble_zip.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..d8b59e8 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/assembly/assemble_zip.xml @@ -0,0 +1,61 @@ + + + + runtime + + zip + + + + false + + + + target + lib + + dcae-controller-service-cdap-cluster-manager-${project.version}.jar + + + + target/assembly/ + . + + + + + . + lib + + *.jar + + + + src/main/server-gen/bin + bin + 0744 + + + + + src/main/server/bin + bin + 0744 + + + + + src/main/server-gen/scripts + scripts + + + src/main/server/scripts + scripts + + + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/Generator.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/Generator.java new file mode 100644 index 0000000..ec75e64 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/Generator.java @@ -0,0 +1,99 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.cdap.cluster.manager.tools; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServiceFactory; +import org.openecomp.dcae.controller.service.vm.VmFactory; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerFactory; +import org.openecomp.utils.YamlToJava; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelFactory; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelFactory; +import org.openecomp.ncomp.sirius.manager.generator.ControllerGenerator; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; + +public class Generator { + + /** + * @param args + */ + public static void main(String[] args) { + @SuppressWarnings("unused") + ServerPackage f = ServerPackage.eINSTANCE; + genManager(); + genService(); + } + + public static void genManager() { + EObject o = ManagerFactory.eINSTANCE.createCdapClusterManager(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix(); + dir = "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceCdapClusterManager"); + m.setTitle("ControllerServiceCdapClusterManager"); + ControllerGenerator g = new ControllerGenerator(o, m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(false); + g.addFactory("org.openecomp.ncomp.servers.cdap.CdapCdapFactory"); + g.addFactory(ServiceFactory.eINSTANCE); + EObject gui = ModelFactory.eINSTANCE.createGuiClientApi(); + g.addObject("gui", gui, m); + g.setProvider(VmmanagerFactory.eINSTANCE.createVirtualMachineManager(), "Dcae"); + g.generate(dir); + g.generateScripts("src/main/server-gen/bin", "controller-service-cdap-cluster-manager"); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; +// YamlToJava.convert("src/main/resources/DockerAdaptor.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/CdapClusterManager.yaml", dir + "/logging", pName); + String pName1 = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".gui.logging"; + YamlToJava.convert("src/main/sirius-gen/GuiClientApi.yaml", dir + "/gui/logging", pName1); + } + + public static void genService() { + EObject o = ServiceFactory.eINSTANCE.createCdapClusterService(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+"$", "") + "servers." + p.getNsPrefix(); + dir = "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceCdapClusterService"); + m.setTitle("ControllerServiceCdapClusterService"); + ControllerGenerator g = new ControllerGenerator(o, m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(true); + g.setProvider(VmFactory.eINSTANCE.createVirtualMachineService(), "Dcae"); + g.generate(dir); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; +// YamlToJava.convert("src/main/resources/DcaeServiceCdapHost.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/CdapClusterService.yaml", dir + "/logging", pName); + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestManager.java new file mode 100644 index 0000000..55a15bf --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestManager.java @@ -0,0 +1,65 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.cdap.cluster.manager.tools; + +import java.io.IOException; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.DcaeManagerFactory; +import org.openecomp.ncomp.cdap.CdapCluster; +import org.openecomp.ncomp.servers.cdap.CdapCdapCluster; +import org.openecomp.ncomp.servers.cdap.CdapCdapFactory; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +public class TestManager implements ISiriusServer { + + public static void main(String[] args) throws IOException { + TestManager t = new TestManager(); + t.test(); + } + private ManagementServer server; + public void test() throws IOException { + server = new ManagementServer(null, "CdapClusterService", null, "manager.properties"); + ManagerFactory f = new DcaeManagerFactory(this); + server.addFactory(f); + CdapClusterManager m = f.createCdapClusterManager(); + server.setObject(m); + CdapCdapFactory f2 = new CdapCdapFactory(this); + CdapCdapCluster c = (CdapCdapCluster) f2.createCdapCluster(); + // This assume running in DCAE vagrant VM with DCAP running on host on port 10000 + // Getting CDAP on the host is running CDAP in virtualBox + // with port 10000 on the host forwarded to CDAP VM on port 10000 + c.setBaseUrl("http://10.0.2.2:10000/v3"); + m.setCluster(c); + server.start(); + c.poll(); + m.createNamespace("foobar"); + } + @Override + public ManagementServer getServer() { + return server; + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestRemoteManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestRemoteManager.java new file mode 100644 index 0000000..2c38c03 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestRemoteManager.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.cdap.cluster.manager.tools; + +import java.io.IOException; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.DcaeCdapClusterManagerConsole; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.DcaeManagerFactory; +import org.openecomp.ncomp.cdap.CdapCluster; +import org.openecomp.ncomp.servers.cdap.CdapCdapCluster; +import org.openecomp.ncomp.servers.cdap.CdapCdapFactory; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +public class TestRemoteManager implements ISiriusServer { + + public static void main(String[] args) throws IOException { + TestRemoteManager t = new TestRemoteManager(); + t.test(); + } + private ManagementServer server; + public void test() throws IOException { + DcaeCdapClusterManagerConsole console = + new DcaeCdapClusterManagerConsole("console.properties", "remote"); + console.createNamespace("foobar"); + } + @Override + public ManagementServer getServer() { + return server; + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestServiceToManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestServiceToManager.java new file mode 100644 index 0000000..b68bdd5 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestServiceToManager.java @@ -0,0 +1,46 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.cdap.cluster.manager.tools; + +import org.openecomp.dcae.controller.service.cdap.cluster.servers.service.DcaeServiceFactory; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServiceFactory; +import org.openecomp.dcae.controller.service.vm.PhysicalMachine; +import org.openecomp.dcae.controller.service.vm.VmFactory; + +public class TestServiceToManager { + + public static void main(String[] args) { + ServiceFactory f = new DcaeServiceFactory(null); + CdapClusterService s = f.createCdapClusterService(); + CdapClusterServiceInstance i = f.createCdapClusterServiceInstance(); + s.getInstances().add(i); + i.setName("foo"); + PhysicalMachine p = VmFactory.eINSTANCE.createPhysicalMachine(); + p.setPublicIp("localhost"); + i.getServers().add(p); + i.setManagerPortNumber(9922); + s.pollManagerConfiguration("foo"); + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProvider.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProvider.java new file mode 100644 index 0000000..aad5563 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProvider.java @@ -0,0 +1,219 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager; + +import org.openecomp.ncomp.cdap.CdapCluster; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.service.HealthTestStatus; +import org.openecomp.dcae.controller.core.service.ServiceFactory; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; +import org.openecomp.dcae.controller.service.servers.vmmanager.DcaeVirtualMachineManagerProvider; + +public class DcaeCdapClusterManagerProvider extends DcaeVirtualMachineManagerProvider { + private static final Logger logger = Logger.getLogger(DcaeCdapClusterManagerProvider.class); + CdapClusterManager o; + + public DcaeCdapClusterManagerProvider(ISiriusServer controller, CdapClusterManager o) { + super(controller, o); + this.o = o; + } + @Override + public HealthTestResponse test() { + HealthTestResponse res = ServiceFactory.eINSTANCE.createHealthTestResponse(); + res.setStatus(HealthTestStatus.GREEN); + if (o.getCluster() == null || o.getCluster().getConfigurations().size() == 0) { + res.setMessageCode("CDAP not working"); + res.setStatus(HealthTestStatus.RED); + } + return res; + } + + private CdapCluster getCluster() { + if (o.getCluster() == null) { + logger.warn("Unable to find cluster"); + throw new RuntimeException("Unable to find cluster"); + } + return o.getCluster(); + } + + public String loadArtifact(String namespace, String artifactName, String jarfile, String version) { + return getCluster().loadArtifact(namespace, artifactName, jarfile, version); + } + + public String startFlow(String namespace, String appName, String flowId, String extraArgs) { + return getCluster().startFlow(namespace, appName, flowId, extraArgs); + } + + public String startService(String namespace, String appName, String serviceId, String extraArgs) { + return getCluster().startService(namespace, appName, serviceId, extraArgs); + } + + public String startApp(String namespace, String appName) { + return getCluster().startApp(namespace, appName); + } + + public String deleteApp(String namespace, String appName) { + return getCluster().deleteApp(namespace, appName); + } + + public String loadPreferencesApp(String namespace, String prefsFile, String appId) { + return getCluster().loadPreferencesApp(namespace, prefsFile, appId); + } + + public String loadPreferencesFlow(String namespace, String prefsFile, String appId, String flowId) { + return getCluster().loadPreferencesFlow(namespace, prefsFile, appId, flowId); + } + + public String loadPreferencesNameSpace(String namespace, String prefsFile) { + return getCluster().loadPreferencesNameSpace(namespace, prefsFile); + } + + public String setPreferencesApp(String namespace, String prefsString, String appId) { + return getCluster().setPreferencesApp(namespace, prefsString, appId); + } + + public String setPreferencesFlow(String namespace, String prefsString, String appId, String flowId) { + return getCluster().setPreferencesFlow(namespace, prefsString, appId, flowId); + } + + public String setPreferencesWorker(String namespace, String prefsString, String appId, String workerId) { + return getCluster().setPreferencesWorker(namespace, prefsString, appId, workerId); + } + + public String setPreferencesNameSpace(String namespace, String prefsString) { + return getCluster().setPreferencesNameSpace(namespace, prefsString); + } + + public String setFlowRunTimeArgs(String namespace, String appId, String flowId, String args) { + return getCluster().setFlowRunTimeArgs(namespace, appId, flowId, args); + } + + public String setFlowletInstances(String namespace, String appId, String flowId, String flowletId, int nInstances) { + return getCluster().setFlowletInstances(namespace, appId, flowId, flowletId, nInstances); + } + + public String stopFlow(String namespace, String appId, String flowId) { + return getCluster().stopFlow(namespace, appId, flowId); + } + + public String stopService(String namespace, String appId, String serviceId) { + return getCluster().stopService(namespace, appId, serviceId); + } + + public String truncateDataSet(String namespace, String datasetName) { + return getCluster().truncateDataSet(namespace, datasetName); + } + + public String createStream(String namespace, String newStreamId) { + return getCluster().createStream(namespace, newStreamId); + } + + public String deleteStream(String namespace, String streamId) { + return getCluster().deleteStream(namespace, streamId); + } + + public EList getStreamEvents(String namespace, String streamId, String startTime, String endTime, int limit) { + return getCluster().getStreamEvents(namespace, streamId, startTime, endTime, limit); + } + + public EList getStreamStats(String namespace, String streamId, String startTime, String endTime, int limit) { + return getCluster().getStreamStats(namespace, streamId, startTime, endTime, limit); + } + + public String sendEventToStream(String namespace, String streamId, String event) { + return getCluster().sendEventToStream(namespace, streamId, event); + } + + public String trucateStream(String namespace, String streamId) { + return getCluster().trucateStream(namespace, streamId); + } + + public String setStreamProperties(String namespace, String streamId, String propsFile) { + return getCluster().setStreamProperties(namespace, streamId, propsFile); + } + + public String createNamespace(String namespace) { + return getCluster().createNamespace(namespace); + } + public String deleteNamespace(String namespace) { + return getCluster().deleteNamespace(namespace); + } + + public String deployApp(String namespace, String jarfile) { + return getCluster().deployApp(namespace, jarfile); + } + + public String deleteArtifact(String namespace, String artifactName, String artifactVersion) { + return getCluster().deleteArtifact(namespace, artifactName, artifactVersion); + } + + public String deleteDataset(String namespace, String datasetName) { + return getCluster().deleteDataset(namespace, datasetName); + } + + public String createApp(String namespace, String appId, String artifactName, String artifactVersion, String scope) { + return getCluster().createApp(namespace, appId, artifactName, artifactVersion, scope); + } + + public String createAppWithConfig(String namespace, String appId, String artifactName, String artifactVersion, String scope, + String appConfig) { + return getCluster().createAppWithConfig(namespace, appId, artifactName, artifactVersion, scope, appConfig); + } + + public String restartApp(String namespace, String appId, String progTypes) { + return getCluster().restartApp(namespace, appId, progTypes); + } + + public String setDatasetProperties(String namespace, String datasetName, String datasetProperties) { + return getCluster().setDatasetProperties(namespace, datasetName, datasetProperties); + } + + public String setStreamTTL(String namespace, String streamName, int ttlSeconds) { + return getCluster().setStreamTTL(namespace, streamName, ttlSeconds); + } + @Override + public void configurationChanged() { +// JSONObject json = ManagementServer.ecore2json(o, 1000, null, true); +// System.err.println(json.toString(2)); + } + + public String stopApp(String namespace, String appName) { + return getCluster().stopApp(namespace, appName); + } + + public String startWorker(String namespace, String appName, + String workerId, String extraArgs) { + return getCluster().startWorker(namespace, appName, workerId, extraArgs); + } + + public String stopWorker(String namespace, String appId, String workerId) { + return getCluster().stopWorker(namespace, appId, workerId); + } + + public String setPreferencesService(String namespace, String prefsString, String appId, String serviceId) { + return getCluster().setPreferencesService(namespace, prefsString, appId, serviceId); + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiProvider.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiProvider.java new file mode 100644 index 0000000..57a6709 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiProvider.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProvider extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProvider.class); + GuiClientApi o; + + public DcaeGuiClientApiProvider(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceProvider.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceProvider.java new file mode 100644 index 0000000..c335740 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceProvider.java @@ -0,0 +1,105 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.cdap.cluster.servers.service; + +import org.openecomp.ncomp.cdap.CdapCluster; +import org.openecomp.ncomp.cdap.CdapPackage; +import org.openecomp.ncomp.core.DeploymentStatus; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; +import org.openecomp.ncomp.sirius.manager.console.Utils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.json.JSONObject; + +import org.openecomp.dcae.controller.service.servers.vm.DcaeVirtualMachineServiceProvider; +import org.openecomp.dcae.controller.service.servers.vmmanager.DcaeVirtualMachineManagerConsole; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerFactory; + +public class DcaeCdapClusterServiceProvider extends DcaeVirtualMachineServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeCdapClusterServiceProvider.class); + CdapClusterService o; + + public DcaeCdapClusterServiceProvider(ISiriusServer controller, + CdapClusterService o) { + super(controller, o); + this.o = o; + } + + @Override + public EObject managerConfiguration(String instanceName) { + CdapClusterServiceInstance i = (CdapClusterServiceInstance) findInstance(instanceName); + CdapClusterManager c = ManagerFactory.eINSTANCE.createCdapClusterManager(); + if (i.getCluster() != null) { + c.setCluster(EcoreUtil.copy(i.getCluster())); + c.getCluster().setRemote(false); + } + return c; + } + + @Override + public void start() { + super.start(); + Thread t = new Thread("cdap cluster poller: " + o.getName()) { + @Override + public void run() { + while (true) { + try { + if (!controller.getServer().isSlave) { + for (VirtualMachineServiceInstance i : o.getInstances()) { + if (i.getStatus() == DeploymentStatus.DEPLOYED) { + CdapClusterServiceInstance i1 = (CdapClusterServiceInstance) i; + AbstractClient c = getClient(i); + DcaeVirtualMachineManagerConsole console = new DcaeVirtualMachineManagerConsole(c); + JSONObject json = (JSONObject) Utils.object2json(console.list("/cluster", 1000)); + CdapCluster h = (CdapCluster) controller.getServer().json2ecore( + CdapPackage.eINSTANCE.getCdapCluster(), json); + controller.getServer(); + h.setRemote(true); + ManagementServer.merge(i1.getCluster(), h, json, true, null); + } + } + } + Thread.sleep(30000); // sleep 30 seconds + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("docker host poller: " + e); + try { + Thread.sleep(30000); + } catch (InterruptedException e1) { + } + } + } + }; + }; + t.start(); + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server-gen/bin/controller-service-cdap-cluster-manager-controller b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server-gen/bin/controller-service-cdap-cluster-manager-controller new file mode 100644 index 0000000..2b9a3f3 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server-gen/bin/controller-service-cdap-cluster-manager-controller @@ -0,0 +1,138 @@ +#!/bin/bash + +# setup env if needed. java 6 required +## JAVA_HOME= + +############################## DO NOT EDIT BELOW ########################## + +SNAME="Dcae Controller" +PNAME=controller-service-cdap-cluster-manager-controller +CLASS=org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.DcaeCdapClusterManagerServer + +############################## COMMON BELOW ########################## + +check_status () +{ + if [ -f "${_PIDFILE}" ]; then + _PID=`cat "${_PIDFILE}"` + check_status_of_pid $_PID + else + _STATUS="$SNAME (no pidfile) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + +remove_pid_file () +{ + if [ -f "${_PIDFILE}" ]; then + rm "${_PIDFILE}" + fi +} + + +_DIR=`dirname "$0"` +_DIR=`dirname "$_DIR"` + +_PIDFILE=$_DIR/PID + +CMD=$1 +shift + +check_status + +CP=$(find $_DIR/lib/*/* -name \*.jar 2>/dev/null | xargs -I X printf ":%s" X) + +JVMARGS=$(grep 'server.jvmargs' $_DIR/config/manager.properties | sed -e 's/.*=//') + +case $CMD in + status) + echo $_STATUS + exit 0 + ;; + console) + $GROOVY_HOME/bin/groovysh -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP + ;; + run) + $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + groovy) + $GROOVY_HOME/bin/groovy -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + start) + if [ "$_RUNNING" = "1" ]; then + echo $_STATUS + exit 0 + fi + mkdir -p $_DIR/logs + if [ -e $_DIR/logs/$PNAME.out.1 ]; then mv $_DIR/logs/$PNAME.out.1 $_DIR/logs/$PNAME.out.2; fi + if [ -e $_DIR/logs/$PNAME.err.1 ]; then mv $_DIR/logs/$PNAME.err.1 $_DIR/logs/$PNAME.err.2; fi + if [ -e $_DIR/logs/$PNAME.out ]; then mv $_DIR/logs/$PNAME.out $_DIR/logs/$PNAME.out.1; fi + if [ -e $_DIR/logs/$PNAME.err ]; then mv $_DIR/logs/$PNAME.err $_DIR/logs/$PNAME.err.1; fi + + nohup $JAVA_HOME/bin/java $JVMARGS -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" $CLASS > $_DIR/logs/$PNAME.out 2> $_DIR/logs/$PNAME.err & + + _PID=$! + echo $_PID > $_PIDFILE + sleep 5 + check_status + echo $_STATUS + if [ "$_RUNNING" = "1" ]; then + exit 0 + else + echo "Failed to start - make sure the $SNAME is fully configured properly" + exit 1 + fi + ;; + stop) + if [ "$_RUNNING" = "0" ]; then + echo $_STATUS + remove_pid_file + exit 0 + fi + echo "Stopping $SNAME..." + _PID_TO_KILL=$_PID; + echo "$SNAME (pid=${_PID_TO_KILL}) is stopping..." + kill -TERM $_PID_TO_KILL + sleep 5 + check_status_of_pid $_PID_TO_KILL + if [ "$_RUNNING" = "1" ]; then + kill -TERM $_PID_TO_KILL + fi + while [ "$_RUNNING" = "1" ]; do + sleep 2 + check_status_of_pid $_PID_TO_KILL + done + remove_pid_file + echo "$SNAME has stopped." + exit 0 + ;; + *) + echo "$0 start|stop" + ;; +esac + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/cdap-cli.sh b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/cdap-cli.sh new file mode 100644 index 0000000..33fadd7 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/cdap-cli.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +echo $(date) /opt/cdap/cli/bin/cdap-cli.sh "$@" >> logs/cdap-cli.log + +sleep 5 + +echo y | /opt/cdap/cli/bin/cdap-cli.sh "$@" + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/manager.sh b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/manager.sh new file mode 100644 index 0000000..4bf41b1 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/manager.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +export JAVA_HOME=/opt/app/java/jdk/jdk170 +export GROOVY_HOME=/opt/app/groovy/246 + +PATH=$JAVA_HOME/bin:$GROOVY_HOME/bin:$PATH + +cd $(dirname $(dirname $0)) + +ROOT=$(pwd) +CMD=$ROOT/bin/controller-service-cdap-cluster-manager-controller + + +mkdir -p logs/ +echo $(date) bin/manager.sh "$@" >> logs/manager.sh.log + +CMD1=$1 +shift +VMTYPE=$(ls /tmp/vm-*manager.properties | sed s/-manager.properties// | sed sx/tmp/xx) + + +case $CMD1 in + start) + CLUSTER_FILE=data/resources/cluster.json + if [ ! -e $CLUSTER_FILE ]; then + mkdir -p $(dirname $CLUSTER_FILE) + echo '{ "baseUrl": "http://localhost:10000/v3", "pollingFrequency": "30000" }' > $CLUSTER_FILE + fi + JVMARGS=$(cat config/manager.properties | grep JVMARGS | sed 's/[^=]*=//') + $CMD $CMD1 $JVMARGS + ;; + stop|console) + $CMD $CMD1 + ;; + config) + CONFIGDIR=/var/config/DCAE/chef + if [ ! -e $CONFIGDIR/$VMTYPE-manager.properties ]; then CONFIGDIR=/tmp; fi + mkdir -p config + for FILE in $CONFIGDIR/$VMTYPE-*; do + FILE2=$(echo $FILE | sed s/.*$VMTYPE-//) + cp $FILE config/$FILE2 + done + /opt/app/dcae-controller-core-utils/bin/setup_https.sh config/manager.properties + ;; + restore|clean) + ;; + restart) + $0 stop + $0 start + ;; + restart2) + $CMD stop + JVMARGS=$(cat config/manager.properties | grep JVMARGS | sed 's/[^=]*=//') + $CMD start $JVMARGS + ;; + *) + echo unknown command: $CMD1 + ;; +esac + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/console.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/console.properties new file mode 100644 index 0000000..4b63607 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:PORT +localhost.user=console +localhost.password=CONSOLE_PW diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/gui.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/gui.properties new file mode 100644 index 0000000..e69de29 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/log4j.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/log4j.properties new file mode 100644 index 0000000..8b3b8f9 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/log4j.properties @@ -0,0 +1,24 @@ +#log4j.debug=0 +log4j.rootLogger=warn, file +log4j.logger.org.openecomp.ncomp=info, file +log4j.additivity.org.openecomp.ncomp=false +log4j.logger.org.openecomp.ncomp.datarouter=warn, file +log4j.additivity.org.openecomp.ncomp.datarouter=false +log4j.logger.org.apache.http.headers=debug, file +log4j.logger.org.apache.http.wire=debug, file + +## uploaded logger +log4j.logger.org.openecomp.ncomp.sirius.manager.uploaded=info, uploaded +log4j.additivity.org.openecomp.ncomp.sirius.manager.uploaded=false +## request logging +log4j.logger.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=info, requests +log4j.additivity.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=false + + +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=logs/BBBB.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n +log4j.appender.file.MaxFileSize=50MB +log4j.appender.file.MaxBackupIndex=5 + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/makefile b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/makefile new file mode 100644 index 0000000..717823e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/makefile @@ -0,0 +1,9 @@ + +restart: stop start + +start: + M2_HOME=/home/ncomp/.m2 bin/BBBB-controller start +stop: + bin/BBBB-controller stop +console: + bin/BBBB-controller console diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/manager.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/manager.properties new file mode 100644 index 0000000..4605389 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/manager.properties @@ -0,0 +1,7 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = PORT +server.user.console = CONSOLE_PW +server.user.gui = GUI_PW +server.user.client = CLIENT_PW diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/pw.sh.sh b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/pw.sh.sh new file mode 100644 index 0000000..cd022ae --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/pw.sh.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +### used to generate random passwords + + +echo '#!/bin/bash' +echo "" + +echo 'cat \' + +for i in CONSOLE GUI CLIENT +do + echo ' |' sed s/${i}_PW/$(echo $i:$(date +%s) | sha256sum | base64 | head -c 20 ; echo)/ \\ +done + \ No newline at end of file diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/scripts/console.groovy b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/scripts/console.groovy new file mode 100644 index 0000000..4c21c49 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/scripts/console.groovy @@ -0,0 +1,27 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.DcaeCdapClusterManagerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +manager = new DcaeCdapClusterManagerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/scripts/test.groovy b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/scripts/test.groovy new file mode 100644 index 0000000..2bcbe82 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/scripts/test.groovy @@ -0,0 +1,65 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.DcaeCdapClusterManagerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +manager = new DcaeCdapClusterManagerConsole("cdap-service-test.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + +def m = manager + +// Begin Standard Configuration +try { + m.create("/cluster", [baseUrl:"http://localhost:10000/v3"]) +} catch (Exception e) { + println e.getMessage() +} + +def ns = "ca55" +def appId = "WebAnalytics" +def flowId = "WebAnalyticsFlow" + +// Files are on the target machine at /opt/dcae-artifact-cache +def jarfile = "/opt/app-data-cache/WebAnalytics-3.3.0.jar" +def ver = "3.3.0" + +m.createNamespace(ns) +m.deployApp(ns, jarfile) // may be rename it to deployApp? + +// we need a createApp command -- artifact + config +// m.loadArtifact(ns, "", jarfile) // for now, always use the null or blank space for the name +// there is a m.createApp() missing + +m.startFlow(ns, appId, flowId, null) + +//we have sendEvent but not loadEvents! + +//m.stopFlow(ns, appId, flowId) + +//m.deleteApp(ns, appId) + +// there is a m.deleteArtifact() missing + +// one code issue is tab-indentation? Should we convert to spaces, or keep as tabs? + +// we need some additional items! diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterManager.yaml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterManager.yaml new file mode 100644 index 0000000..2bfc668 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterManager.yaml @@ -0,0 +1,597 @@ +operations: + test: {} + suspend: {} + resume: {} + publicKey: {} + configurationChanged: {} + updateStreams: {} + logs: {} + metrics: {} + properties: {} + uploadInfo: {} + getValues: {} + getValuesAll: {} + getMessages: {} + getRequestLogger: {} + evaluate: {} + update: {} + createNamespace: {} + deleteNamespace: {} + deployApp: {} + loadArtifact: {} + deleteArtifact: {} + startFlow: {} + startWorker: {} + startService: {} + startApp: {} + stopApp: {} + deleteApp: {} + loadPreferencesApp: {} + loadPreferencesFlow: {} + loadPreferencesNameSpace: {} + setPreferencesApp: {} + setPreferencesFlow: {} + setPreferencesWorker: {} + setPreferencesService: {} + setPreferencesNameSpace: {} + setFlowRunTimeArgs: {} + setFlowletInstances: {} + stopFlow: {} + stopWorker: {} + stopService: {} + truncateDataSet: {} + deleteDataset: {} + createStream: {} + deleteStream: {} + getStreamEvents: {} + getStreamStats: {} + sendEventToStream: {} + trucateStream: {} + setStreamProperties: {} + restartApp: {} + createApp: {} + createAppWithConfig: {} + setDatasetProperties: {} + setStreamTTL: {} + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_publicKey: + decription: Remote call publicKey + REMOTE_configurationChanged: + decription: Remote call configurationChanged + REMOTE_updateStreams: + decription: Remote call updateStreams + REMOTE_logs: + decription: Remote call logs + REMOTE_metrics: + decription: Remote call metrics + REMOTE_properties: + decription: Remote call properties + REMOTE_uploadInfo: + decription: Remote call uploadInfo + REMOTE_getValues: + decription: Remote call getValues + REMOTE_getValuesAll: + decription: Remote call getValuesAll + REMOTE_getMessages: + decription: Remote call getMessages + REMOTE_getRequestLogger: + decription: Remote call getRequestLogger + REMOTE_evaluate: + decription: Remote call evaluate + REMOTE_update: + decription: Remote call update + REMOTE_createNamespace: + decription: Remote call createNamespace + REMOTE_deleteNamespace: + decription: Remote call deleteNamespace + REMOTE_deployApp: + decription: Remote call deployApp + REMOTE_loadArtifact: + decription: Remote call loadArtifact + REMOTE_deleteArtifact: + decription: Remote call deleteArtifact + REMOTE_startFlow: + decription: Remote call startFlow + REMOTE_startWorker: + decription: Remote call startWorker + REMOTE_startService: + decription: Remote call startService + REMOTE_startApp: + decription: Remote call startApp + REMOTE_stopApp: + decription: Remote call stopApp + REMOTE_deleteApp: + decription: Remote call deleteApp + REMOTE_loadPreferencesApp: + decription: Remote call loadPreferencesApp + REMOTE_loadPreferencesFlow: + decription: Remote call loadPreferencesFlow + REMOTE_loadPreferencesNameSpace: + decription: Remote call loadPreferencesNameSpace + REMOTE_setPreferencesApp: + decription: Remote call setPreferencesApp + REMOTE_setPreferencesFlow: + decription: Remote call setPreferencesFlow + REMOTE_setPreferencesWorker: + decription: Remote call setPreferencesWorker + REMOTE_setPreferencesService: + decription: Remote call setPreferencesService + REMOTE_setPreferencesNameSpace: + decription: Remote call setPreferencesNameSpace + REMOTE_setFlowRunTimeArgs: + decription: Remote call setFlowRunTimeArgs + REMOTE_setFlowletInstances: + decription: Remote call setFlowletInstances + REMOTE_stopFlow: + decription: Remote call stopFlow + REMOTE_stopWorker: + decription: Remote call stopWorker + REMOTE_stopService: + decription: Remote call stopService + REMOTE_truncateDataSet: + decription: Remote call truncateDataSet + REMOTE_deleteDataset: + decription: Remote call deleteDataset + REMOTE_createStream: + decription: Remote call createStream + REMOTE_deleteStream: + decription: Remote call deleteStream + REMOTE_getStreamEvents: + decription: Remote call getStreamEvents + REMOTE_getStreamStats: + decription: Remote call getStreamStats + REMOTE_sendEventToStream: + decription: Remote call sendEventToStream + REMOTE_trucateStream: + decription: Remote call trucateStream + REMOTE_setStreamProperties: + decription: Remote call setStreamProperties + REMOTE_restartApp: + decription: Remote call restartApp + REMOTE_createApp: + decription: Remote call createApp + REMOTE_createAppWithConfig: + decription: Remote call createAppWithConfig + REMOTE_setDatasetProperties: + decription: Remote call setDatasetProperties + REMOTE_setStreamTTL: + decription: Remote call setStreamTTL +messages: + dummy: {} + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + publicKey: + errorCode: publicKey-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + configurationChanged: + errorCode: configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateStreams: + errorCode: updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + logs: + errorCode: logs-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + metrics: + errorCode: metrics-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + properties: + errorCode: properties-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + uploadInfo: + errorCode: uploadInfo-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getValues: + errorCode: getValues-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getValuesAll: + errorCode: getValuesAll-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getMessages: + errorCode: getMessages-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getRequestLogger: + errorCode: getRequestLogger-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + evaluate: + errorCode: evaluate-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + update: + errorCode: update-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + createNamespace: + errorCode: createNamespace-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + deleteNamespace: + errorCode: deleteNamespace-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + deployApp: + errorCode: deployApp-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + loadArtifact: + errorCode: loadArtifact-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + deleteArtifact: + errorCode: deleteArtifact-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + startFlow: + errorCode: startFlow-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + startWorker: + errorCode: startWorker-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + startService: + errorCode: startService-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + startApp: + errorCode: startApp-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + stopApp: + errorCode: stopApp-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + deleteApp: + errorCode: deleteApp-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + loadPreferencesApp: + errorCode: loadPreferencesApp-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + loadPreferencesFlow: + errorCode: loadPreferencesFlow-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + loadPreferencesNameSpace: + errorCode: loadPreferencesNameSpace-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setPreferencesApp: + errorCode: setPreferencesApp-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setPreferencesFlow: + errorCode: setPreferencesFlow-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setPreferencesWorker: + errorCode: setPreferencesWorker-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setPreferencesService: + errorCode: setPreferencesService-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setPreferencesNameSpace: + errorCode: setPreferencesNameSpace-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setFlowRunTimeArgs: + errorCode: setFlowRunTimeArgs-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setFlowletInstances: + errorCode: setFlowletInstances-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + stopFlow: + errorCode: stopFlow-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + stopWorker: + errorCode: stopWorker-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + stopService: + errorCode: stopService-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + truncateDataSet: + errorCode: truncateDataSet-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + deleteDataset: + errorCode: deleteDataset-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + createStream: + errorCode: createStream-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + deleteStream: + errorCode: deleteStream-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getStreamEvents: + errorCode: getStreamEvents-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getStreamStats: + errorCode: getStreamStats-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + sendEventToStream: + errorCode: sendEventToStream-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + trucateStream: + errorCode: trucateStream-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setStreamProperties: + errorCode: setStreamProperties-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + restartApp: + errorCode: restartApp-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + createApp: + errorCode: createApp-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + createAppWithConfig: + errorCode: createAppWithConfig-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setDatasetProperties: + errorCode: setDatasetProperties-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setStreamTTL: + errorCode: setStreamTTL-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_publicKey: + errorCode: REMOTE-publicKey-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_configurationChanged: + errorCode: REMOTE-configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateStreams: + errorCode: REMOTE-updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_logs: + errorCode: REMOTE-logs-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_metrics: + errorCode: REMOTE-metrics-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_properties: + errorCode: REMOTE-properties-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_uploadInfo: + errorCode: REMOTE-uploadInfo-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getValues: + errorCode: REMOTE-getValues-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getValuesAll: + errorCode: REMOTE-getValuesAll-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getMessages: + errorCode: REMOTE-getMessages-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getRequestLogger: + errorCode: REMOTE-getRequestLogger-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_evaluate: + errorCode: REMOTE-evaluate-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_update: + errorCode: REMOTE-update-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_createNamespace: + errorCode: REMOTE-createNamespace-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_deleteNamespace: + errorCode: REMOTE-deleteNamespace-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_deployApp: + errorCode: REMOTE-deployApp-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_loadArtifact: + errorCode: REMOTE-loadArtifact-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_deleteArtifact: + errorCode: REMOTE-deleteArtifact-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_startFlow: + errorCode: REMOTE-startFlow-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_startWorker: + errorCode: REMOTE-startWorker-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_startService: + errorCode: REMOTE-startService-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_startApp: + errorCode: REMOTE-startApp-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_stopApp: + errorCode: REMOTE-stopApp-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_deleteApp: + errorCode: REMOTE-deleteApp-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_loadPreferencesApp: + errorCode: REMOTE-loadPreferencesApp-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_loadPreferencesFlow: + errorCode: REMOTE-loadPreferencesFlow-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_loadPreferencesNameSpace: + errorCode: REMOTE-loadPreferencesNameSpace-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setPreferencesApp: + errorCode: REMOTE-setPreferencesApp-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setPreferencesFlow: + errorCode: REMOTE-setPreferencesFlow-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setPreferencesWorker: + errorCode: REMOTE-setPreferencesWorker-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setPreferencesService: + errorCode: REMOTE-setPreferencesService-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setPreferencesNameSpace: + errorCode: REMOTE-setPreferencesNameSpace-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setFlowRunTimeArgs: + errorCode: REMOTE-setFlowRunTimeArgs-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setFlowletInstances: + errorCode: REMOTE-setFlowletInstances-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_stopFlow: + errorCode: REMOTE-stopFlow-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_stopWorker: + errorCode: REMOTE-stopWorker-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_stopService: + errorCode: REMOTE-stopService-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_truncateDataSet: + errorCode: REMOTE-truncateDataSet-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_deleteDataset: + errorCode: REMOTE-deleteDataset-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_createStream: + errorCode: REMOTE-createStream-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_deleteStream: + errorCode: REMOTE-deleteStream-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getStreamEvents: + errorCode: REMOTE-getStreamEvents-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getStreamStats: + errorCode: REMOTE-getStreamStats-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_sendEventToStream: + errorCode: REMOTE-sendEventToStream-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_trucateStream: + errorCode: REMOTE-trucateStream-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setStreamProperties: + errorCode: REMOTE-setStreamProperties-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_restartApp: + errorCode: REMOTE-restartApp-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_createApp: + errorCode: REMOTE-createApp-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_createAppWithConfig: + errorCode: REMOTE-createAppWithConfig-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setDatasetProperties: + errorCode: REMOTE-setDatasetProperties-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setStreamTTL: + errorCode: REMOTE-setStreamTTL-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterService.yaml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterService.yaml new file mode 100644 index 0000000..6ac8c34 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterService.yaml @@ -0,0 +1,135 @@ +operations: + deploy: {} + undeploy: {} + test: {} + suspend: {} + resume: {} + pushManagerConfiguration: {} + pollManagerConfiguration: {} + managerConfiguration: {} + managerOperation: {} + updateConfigurationFromPolicy: {} + runHealthTests: {} + updateDeploymentStatus: {} + REMOTE_deploy: + decription: Remote call deploy + REMOTE_undeploy: + decription: Remote call undeploy + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_pushManagerConfiguration: + decription: Remote call pushManagerConfiguration + REMOTE_pollManagerConfiguration: + decription: Remote call pollManagerConfiguration + REMOTE_managerConfiguration: + decription: Remote call managerConfiguration + REMOTE_managerOperation: + decription: Remote call managerOperation + REMOTE_updateConfigurationFromPolicy: + decription: Remote call updateConfigurationFromPolicy + REMOTE_runHealthTests: + decription: Remote call runHealthTests + REMOTE_updateDeploymentStatus: + decription: Remote call updateDeploymentStatus +messages: + dummy: {} + deploy: + errorCode: deploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + undeploy: + errorCode: undeploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pushManagerConfiguration: + errorCode: pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pollManagerConfiguration: + errorCode: pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerConfiguration: + errorCode: managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerOperation: + errorCode: managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateConfigurationFromPolicy: + errorCode: updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + runHealthTests: + errorCode: runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateDeploymentStatus: + errorCode: updateDeploymentStatus-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_deploy: + errorCode: REMOTE-deploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_undeploy: + errorCode: REMOTE-undeploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pushManagerConfiguration: + errorCode: REMOTE-pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pollManagerConfiguration: + errorCode: REMOTE-pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerConfiguration: + errorCode: REMOTE-managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerOperation: + errorCode: REMOTE-managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateConfigurationFromPolicy: + errorCode: REMOTE-updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_runHealthTests: + errorCode: REMOTE-runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateDeploymentStatus: + errorCode: REMOTE-updateDeploymentStatus-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/GuiClientApi.yaml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/GuiClientApi.yaml new file mode 100644 index 0000000..bf3d69d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/GuiClientApi.yaml @@ -0,0 +1,69 @@ +operations: + getTree: {} + getObject: {} + getTimeSerie: {} + getTable: {} + getHtml: {} + getGraph: {} + REMOTE_getTree: + decription: Remote call getTree + REMOTE_getObject: + decription: Remote call getObject + REMOTE_getTimeSerie: + decription: Remote call getTimeSerie + REMOTE_getTable: + decription: Remote call getTable + REMOTE_getHtml: + decription: Remote call getHtml + REMOTE_getGraph: + decription: Remote call getGraph +messages: + dummy: {} + getTree: + errorCode: getTree-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getObject: + errorCode: getObject-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTimeSerie: + errorCode: getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTable: + errorCode: getTable-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getHtml: + errorCode: getHtml-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getGraph: + errorCode: getGraph-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_getTree: + errorCode: REMOTE-getTree-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getObject: + errorCode: REMOTE-getObject-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTimeSerie: + errorCode: REMOTE-getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTable: + errorCode: REMOTE-getTable-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getHtml: + errorCode: REMOTE-getHtml-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getGraph: + errorCode: REMOTE-getGraph-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManager.java new file mode 100644 index 0000000..4415331 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManager.java @@ -0,0 +1,1444 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.logging.CdapClusterManagerOperationEnum; + + + + + + + +import java.util.Date; + + + + + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; + + + + + +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl; + + + +public class DcaeCdapClusterManager extends CdapClusterManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeCdapClusterManager.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeCdapClusterManagerProvider controller; + ISiriusServer server; + + public DcaeCdapClusterManager(ISiriusServer server) { + this.server = server; + this.controller = new DcaeCdapClusterManagerProvider(server,this); + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.test); + try { + res = controller.test(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void suspend() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.suspend); + try { + controller.suspend(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_); + + } + + public void resume() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.resume); + try { + controller.resume(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_); + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.publicKey); + try { + res = controller.publicKey(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void configurationChanged() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.configurationChanged); + try { + controller.configurationChanged(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.OKAY, duration_); + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.START, duration_,inputStreams,outputStreams); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.updateStreams); + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.ERROR, duration_,inputStreams,outputStreams); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.OKAY, duration_,inputStreams,outputStreams); + + } + + public void logs(org.json.JSONObject cx, EList logs) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.START, duration_,cx,logs); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.logs); + try { + controller.logs(cx,logs); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.ERROR, duration_,cx,logs); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.OKAY, duration_,cx,logs); + + } + + public void metrics(org.json.JSONObject cx, EList metrics) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.START, duration_,cx,metrics); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.metrics); + try { + controller.metrics(cx,metrics); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.ERROR, duration_,cx,metrics); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.OKAY, duration_,cx,metrics); + + } + + public void properties(org.json.JSONObject cx, EList l) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.START, duration_,cx,l); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.properties); + try { + controller.properties(cx,l); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.ERROR, duration_,cx,l); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.OKAY, duration_,cx,l); + + } + + public void uploadInfo(org.json.JSONObject cx, EList info) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.START, duration_,cx,info); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.uploadInfo); + try { + controller.uploadInfo(cx,info); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.ERROR, duration_,cx,info); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.OKAY, duration_,cx,info); + + } + + public EList getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.START, duration_,cx,path,start,end,option,relativeInterval); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.getValues); + try { + res = controller.getValues(cx,path,start,end,option,relativeInterval); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.ERROR, duration_,cx,path,start,end,option,relativeInterval); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.OKAY, duration_,cx,path,start,end,option,relativeInterval); + return res; + } + + public EList getValuesAll(org.json.JSONObject cx, java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.START, duration_,cx,path,metrics,start,end,option,relativeInterval); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.getValuesAll); + try { + res = controller.getValuesAll(cx,path,metrics,start,end,option,relativeInterval); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.ERROR, duration_,cx,path,metrics,start,end,option,relativeInterval); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.OKAY, duration_,cx,path,metrics,start,end,option,relativeInterval); + return res; + } + + public EList getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.START, duration_,cx,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.getMessages); + try { + res = controller.getMessages(cx,path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.ERROR, duration_,cx,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.OKAY, duration_,cx,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.START, duration_,userName,action,resourcePath,context); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.getRequestLogger); + try { + res = controller.getRequestLogger(userName,action,resourcePath,context); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.ERROR, duration_,userName,action,resourcePath,context); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.OKAY, duration_,userName,action,resourcePath,context); + return res; + } + + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.START, duration_,path,function); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.evaluate); + try { + res = controller.evaluate(path,function); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.ERROR, duration_,path,function); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.OKAY, duration_,path,function); + return res; + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.START, duration_,path,function); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.update); + try { + controller.update(path,function); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.ERROR, duration_,path,function); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.OKAY, duration_,path,function); + + } + + public java.lang.String createNamespace(java.lang.String namespace) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "createNamespace", ApiRequestStatus.START, duration_,namespace); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.createNamespace); + try { + res = controller.createNamespace(namespace); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "createNamespace", ApiRequestStatus.ERROR, duration_,namespace); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "createNamespace", ApiRequestStatus.OKAY, duration_,namespace); + return res; + } + + public java.lang.String deleteNamespace(java.lang.String namespace) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deleteNamespace", ApiRequestStatus.START, duration_,namespace); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.deleteNamespace); + try { + res = controller.deleteNamespace(namespace); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteNamespace", ApiRequestStatus.ERROR, duration_,namespace); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteNamespace", ApiRequestStatus.OKAY, duration_,namespace); + return res; + } + + public java.lang.String deployApp(java.lang.String namespace, java.lang.String jarfile) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deployApp", ApiRequestStatus.START, duration_,namespace,jarfile); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.deployApp); + try { + res = controller.deployApp(namespace,jarfile); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deployApp", ApiRequestStatus.ERROR, duration_,namespace,jarfile); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deployApp", ApiRequestStatus.OKAY, duration_,namespace,jarfile); + return res; + } + + public java.lang.String loadArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "loadArtifact", ApiRequestStatus.START, duration_,namespace,artifactName,jarfile,version); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.loadArtifact); + try { + res = controller.loadArtifact(namespace,artifactName,jarfile,version); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadArtifact", ApiRequestStatus.ERROR, duration_,namespace,artifactName,jarfile,version); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadArtifact", ApiRequestStatus.OKAY, duration_,namespace,artifactName,jarfile,version); + return res; + } + + public java.lang.String deleteArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deleteArtifact", ApiRequestStatus.START, duration_,namespace,artifactName,artifactVersion); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.deleteArtifact); + try { + res = controller.deleteArtifact(namespace,artifactName,artifactVersion); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteArtifact", ApiRequestStatus.ERROR, duration_,namespace,artifactName,artifactVersion); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteArtifact", ApiRequestStatus.OKAY, duration_,namespace,artifactName,artifactVersion); + return res; + } + + public java.lang.String startFlow(java.lang.String namespace, java.lang.String appName, java.lang.String flowId, java.lang.String extraArgs) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "startFlow", ApiRequestStatus.START, duration_,namespace,appName,flowId,extraArgs); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.startFlow); + try { + res = controller.startFlow(namespace,appName,flowId,extraArgs); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "startFlow", ApiRequestStatus.ERROR, duration_,namespace,appName,flowId,extraArgs); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "startFlow", ApiRequestStatus.OKAY, duration_,namespace,appName,flowId,extraArgs); + return res; + } + + public java.lang.String startWorker(java.lang.String namespace, java.lang.String appName, java.lang.String workerId, java.lang.String extraArgs) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "startWorker", ApiRequestStatus.START, duration_,namespace,appName,workerId,extraArgs); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.startWorker); + try { + res = controller.startWorker(namespace,appName,workerId,extraArgs); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "startWorker", ApiRequestStatus.ERROR, duration_,namespace,appName,workerId,extraArgs); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "startWorker", ApiRequestStatus.OKAY, duration_,namespace,appName,workerId,extraArgs); + return res; + } + + public java.lang.String startService(java.lang.String namespace, java.lang.String appName, java.lang.String serviceId, java.lang.String extraArgs) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "startService", ApiRequestStatus.START, duration_,namespace,appName,serviceId,extraArgs); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.startService); + try { + res = controller.startService(namespace,appName,serviceId,extraArgs); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "startService", ApiRequestStatus.ERROR, duration_,namespace,appName,serviceId,extraArgs); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "startService", ApiRequestStatus.OKAY, duration_,namespace,appName,serviceId,extraArgs); + return res; + } + + public java.lang.String startApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "startApp", ApiRequestStatus.START, duration_,namespace,appName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.startApp); + try { + res = controller.startApp(namespace,appName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "startApp", ApiRequestStatus.ERROR, duration_,namespace,appName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "startApp", ApiRequestStatus.OKAY, duration_,namespace,appName); + return res; + } + + public java.lang.String stopApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.START, duration_,namespace,appName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.stopApp); + try { + res = controller.stopApp(namespace,appName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.ERROR, duration_,namespace,appName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.OKAY, duration_,namespace,appName); + return res; + } + + public java.lang.String deleteApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deleteApp", ApiRequestStatus.START, duration_,namespace,appName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.deleteApp); + try { + res = controller.deleteApp(namespace,appName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteApp", ApiRequestStatus.ERROR, duration_,namespace,appName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteApp", ApiRequestStatus.OKAY, duration_,namespace,appName); + return res; + } + + public java.lang.String loadPreferencesApp(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesApp", ApiRequestStatus.START, duration_,namespace,prefsFile,appId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.loadPreferencesApp); + try { + res = controller.loadPreferencesApp(namespace,prefsFile,appId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesApp", ApiRequestStatus.ERROR, duration_,namespace,prefsFile,appId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesApp", ApiRequestStatus.OKAY, duration_,namespace,prefsFile,appId); + return res; + } + + public java.lang.String loadPreferencesFlow(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesFlow", ApiRequestStatus.START, duration_,namespace,prefsFile,appId,flowId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.loadPreferencesFlow); + try { + res = controller.loadPreferencesFlow(namespace,prefsFile,appId,flowId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesFlow", ApiRequestStatus.ERROR, duration_,namespace,prefsFile,appId,flowId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesFlow", ApiRequestStatus.OKAY, duration_,namespace,prefsFile,appId,flowId); + return res; + } + + public java.lang.String loadPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsFile) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesNameSpace", ApiRequestStatus.START, duration_,namespace,prefsFile); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.loadPreferencesNameSpace); + try { + res = controller.loadPreferencesNameSpace(namespace,prefsFile); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesNameSpace", ApiRequestStatus.ERROR, duration_,namespace,prefsFile); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesNameSpace", ApiRequestStatus.OKAY, duration_,namespace,prefsFile); + return res; + } + + public java.lang.String setPreferencesApp(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesApp", ApiRequestStatus.START, duration_,namespace,prefsString,appId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.setPreferencesApp); + try { + res = controller.setPreferencesApp(namespace,prefsString,appId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesApp", ApiRequestStatus.ERROR, duration_,namespace,prefsString,appId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesApp", ApiRequestStatus.OKAY, duration_,namespace,prefsString,appId); + return res; + } + + public java.lang.String setPreferencesFlow(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesFlow", ApiRequestStatus.START, duration_,namespace,prefsString,appId,flowId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.setPreferencesFlow); + try { + res = controller.setPreferencesFlow(namespace,prefsString,appId,flowId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesFlow", ApiRequestStatus.ERROR, duration_,namespace,prefsString,appId,flowId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesFlow", ApiRequestStatus.OKAY, duration_,namespace,prefsString,appId,flowId); + return res; + } + + public java.lang.String setPreferencesWorker(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String workerId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesWorker", ApiRequestStatus.START, duration_,namespace,prefsString,appId,workerId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.setPreferencesWorker); + try { + res = controller.setPreferencesWorker(namespace,prefsString,appId,workerId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesWorker", ApiRequestStatus.ERROR, duration_,namespace,prefsString,appId,workerId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesWorker", ApiRequestStatus.OKAY, duration_,namespace,prefsString,appId,workerId); + return res; + } + + public java.lang.String setPreferencesService(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String serviceId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesService", ApiRequestStatus.START, duration_,namespace,prefsString,appId,serviceId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.setPreferencesService); + try { + res = controller.setPreferencesService(namespace,prefsString,appId,serviceId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesService", ApiRequestStatus.ERROR, duration_,namespace,prefsString,appId,serviceId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesService", ApiRequestStatus.OKAY, duration_,namespace,prefsString,appId,serviceId); + return res; + } + + public java.lang.String setPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsString) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesNameSpace", ApiRequestStatus.START, duration_,namespace,prefsString); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.setPreferencesNameSpace); + try { + res = controller.setPreferencesNameSpace(namespace,prefsString); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesNameSpace", ApiRequestStatus.ERROR, duration_,namespace,prefsString); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesNameSpace", ApiRequestStatus.OKAY, duration_,namespace,prefsString); + return res; + } + + public java.lang.String setFlowRunTimeArgs(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String args) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setFlowRunTimeArgs", ApiRequestStatus.START, duration_,namespace,appId,flowId,args); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.setFlowRunTimeArgs); + try { + res = controller.setFlowRunTimeArgs(namespace,appId,flowId,args); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setFlowRunTimeArgs", ApiRequestStatus.ERROR, duration_,namespace,appId,flowId,args); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setFlowRunTimeArgs", ApiRequestStatus.OKAY, duration_,namespace,appId,flowId,args); + return res; + } + + public java.lang.String setFlowletInstances(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String flowletId, int nInstances) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setFlowletInstances", ApiRequestStatus.START, duration_,namespace,appId,flowId,flowletId,nInstances); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.setFlowletInstances); + try { + res = controller.setFlowletInstances(namespace,appId,flowId,flowletId,nInstances); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setFlowletInstances", ApiRequestStatus.ERROR, duration_,namespace,appId,flowId,flowletId,nInstances); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setFlowletInstances", ApiRequestStatus.OKAY, duration_,namespace,appId,flowId,flowletId,nInstances); + return res; + } + + public java.lang.String stopFlow(java.lang.String namespace, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "stopFlow", ApiRequestStatus.START, duration_,namespace,appId,flowId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.stopFlow); + try { + res = controller.stopFlow(namespace,appId,flowId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "stopFlow", ApiRequestStatus.ERROR, duration_,namespace,appId,flowId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "stopFlow", ApiRequestStatus.OKAY, duration_,namespace,appId,flowId); + return res; + } + + public java.lang.String stopWorker(java.lang.String namespace, java.lang.String appId, java.lang.String workerId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "stopWorker", ApiRequestStatus.START, duration_,namespace,appId,workerId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.stopWorker); + try { + res = controller.stopWorker(namespace,appId,workerId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "stopWorker", ApiRequestStatus.ERROR, duration_,namespace,appId,workerId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "stopWorker", ApiRequestStatus.OKAY, duration_,namespace,appId,workerId); + return res; + } + + public java.lang.String stopService(java.lang.String namespace, java.lang.String appId, java.lang.String serviceId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "stopService", ApiRequestStatus.START, duration_,namespace,appId,serviceId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.stopService); + try { + res = controller.stopService(namespace,appId,serviceId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "stopService", ApiRequestStatus.ERROR, duration_,namespace,appId,serviceId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "stopService", ApiRequestStatus.OKAY, duration_,namespace,appId,serviceId); + return res; + } + + public java.lang.String truncateDataSet(java.lang.String namespace, java.lang.String datasetName) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "truncateDataSet", ApiRequestStatus.START, duration_,namespace,datasetName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.truncateDataSet); + try { + res = controller.truncateDataSet(namespace,datasetName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "truncateDataSet", ApiRequestStatus.ERROR, duration_,namespace,datasetName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "truncateDataSet", ApiRequestStatus.OKAY, duration_,namespace,datasetName); + return res; + } + + public java.lang.String deleteDataset(java.lang.String namespace, java.lang.String datasetName) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deleteDataset", ApiRequestStatus.START, duration_,namespace,datasetName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.deleteDataset); + try { + res = controller.deleteDataset(namespace,datasetName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteDataset", ApiRequestStatus.ERROR, duration_,namespace,datasetName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteDataset", ApiRequestStatus.OKAY, duration_,namespace,datasetName); + return res; + } + + public java.lang.String createStream(java.lang.String namespace, java.lang.String newStreamId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "createStream", ApiRequestStatus.START, duration_,namespace,newStreamId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.createStream); + try { + res = controller.createStream(namespace,newStreamId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "createStream", ApiRequestStatus.ERROR, duration_,namespace,newStreamId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "createStream", ApiRequestStatus.OKAY, duration_,namespace,newStreamId); + return res; + } + + public java.lang.String deleteStream(java.lang.String namespace, java.lang.String streamId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deleteStream", ApiRequestStatus.START, duration_,namespace,streamId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.deleteStream); + try { + res = controller.deleteStream(namespace,streamId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteStream", ApiRequestStatus.ERROR, duration_,namespace,streamId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteStream", ApiRequestStatus.OKAY, duration_,namespace,streamId); + return res; + } + + public EList getStreamEvents(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getStreamEvents", ApiRequestStatus.START, duration_,namespace,streamId,startTime,endTime,limit); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.getStreamEvents); + try { + res = controller.getStreamEvents(namespace,streamId,startTime,endTime,limit); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getStreamEvents", ApiRequestStatus.ERROR, duration_,namespace,streamId,startTime,endTime,limit); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getStreamEvents", ApiRequestStatus.OKAY, duration_,namespace,streamId,startTime,endTime,limit); + return res; + } + + public EList getStreamStats(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getStreamStats", ApiRequestStatus.START, duration_,namespace,streamId,startTime,endTime,limit); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.getStreamStats); + try { + res = controller.getStreamStats(namespace,streamId,startTime,endTime,limit); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getStreamStats", ApiRequestStatus.ERROR, duration_,namespace,streamId,startTime,endTime,limit); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getStreamStats", ApiRequestStatus.OKAY, duration_,namespace,streamId,startTime,endTime,limit); + return res; + } + + public java.lang.String sendEventToStream(java.lang.String namespace, java.lang.String streamId, java.lang.String event) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "sendEventToStream", ApiRequestStatus.START, duration_,namespace,streamId,event); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.sendEventToStream); + try { + res = controller.sendEventToStream(namespace,streamId,event); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "sendEventToStream", ApiRequestStatus.ERROR, duration_,namespace,streamId,event); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "sendEventToStream", ApiRequestStatus.OKAY, duration_,namespace,streamId,event); + return res; + } + + public java.lang.String trucateStream(java.lang.String namespace, java.lang.String streamId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "trucateStream", ApiRequestStatus.START, duration_,namespace,streamId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.trucateStream); + try { + res = controller.trucateStream(namespace,streamId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "trucateStream", ApiRequestStatus.ERROR, duration_,namespace,streamId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "trucateStream", ApiRequestStatus.OKAY, duration_,namespace,streamId); + return res; + } + + public java.lang.String setStreamProperties(java.lang.String namespace, java.lang.String streamId, java.lang.String propsFile) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setStreamProperties", ApiRequestStatus.START, duration_,namespace,streamId,propsFile); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.setStreamProperties); + try { + res = controller.setStreamProperties(namespace,streamId,propsFile); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setStreamProperties", ApiRequestStatus.ERROR, duration_,namespace,streamId,propsFile); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setStreamProperties", ApiRequestStatus.OKAY, duration_,namespace,streamId,propsFile); + return res; + } + + public java.lang.String restartApp(java.lang.String namespace, java.lang.String appId, java.lang.String progTypes) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "restartApp", ApiRequestStatus.START, duration_,namespace,appId,progTypes); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.restartApp); + try { + res = controller.restartApp(namespace,appId,progTypes); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "restartApp", ApiRequestStatus.ERROR, duration_,namespace,appId,progTypes); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "restartApp", ApiRequestStatus.OKAY, duration_,namespace,appId,progTypes); + return res; + } + + public java.lang.String createApp(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "createApp", ApiRequestStatus.START, duration_,namespace,appId,artifactName,artifactVersion,scope); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.createApp); + try { + res = controller.createApp(namespace,appId,artifactName,artifactVersion,scope); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "createApp", ApiRequestStatus.ERROR, duration_,namespace,appId,artifactName,artifactVersion,scope); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "createApp", ApiRequestStatus.OKAY, duration_,namespace,appId,artifactName,artifactVersion,scope); + return res; + } + + public java.lang.String createAppWithConfig(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope, java.lang.String appConfig) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "createAppWithConfig", ApiRequestStatus.START, duration_,namespace,appId,artifactName,artifactVersion,scope,appConfig); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.createAppWithConfig); + try { + res = controller.createAppWithConfig(namespace,appId,artifactName,artifactVersion,scope,appConfig); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "createAppWithConfig", ApiRequestStatus.ERROR, duration_,namespace,appId,artifactName,artifactVersion,scope,appConfig); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "createAppWithConfig", ApiRequestStatus.OKAY, duration_,namespace,appId,artifactName,artifactVersion,scope,appConfig); + return res; + } + + public java.lang.String setDatasetProperties(java.lang.String namespace, java.lang.String datasetName, java.lang.String datasetProperties) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setDatasetProperties", ApiRequestStatus.START, duration_,namespace,datasetName,datasetProperties); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.setDatasetProperties); + try { + res = controller.setDatasetProperties(namespace,datasetName,datasetProperties); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setDatasetProperties", ApiRequestStatus.ERROR, duration_,namespace,datasetName,datasetProperties); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setDatasetProperties", ApiRequestStatus.OKAY, duration_,namespace,datasetName,datasetProperties); + return res; + } + + public java.lang.String setStreamTTL(java.lang.String namespace, java.lang.String streamName, int ttlSeconds) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setStreamTTL", ApiRequestStatus.START, duration_,namespace,streamName,ttlSeconds); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.setStreamTTL); + try { + res = controller.setStreamTTL(namespace,streamName,ttlSeconds); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setStreamTTL", ApiRequestStatus.ERROR, duration_,namespace,streamName,ttlSeconds); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setStreamTTL", ApiRequestStatus.OKAY, duration_,namespace,streamName,ttlSeconds); + return res; + } + + + + + + + public static void ecoreSetup() { + DcaeCdapClusterManagerProvider.ecoreSetup(); + } + public DcaeCdapClusterManagerProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerClient.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerClient.java new file mode 100644 index 0000000..dc1cfcf --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerClient.java @@ -0,0 +1,990 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.logging.CdapClusterManagerOperationEnum; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.logging.CdapClusterManagerMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeCdapClusterManagerClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeCdapClusterManagerClient(String file, String name) { + DcaeCdapClusterManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeCdapClusterManagerClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeCdapClusterManagerClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: test", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend() { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: suspend", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume() { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: resume", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public java.lang.String publicKey() { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_publicKey); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "publicKey", null); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_publicKey, e.toString()); + throw new RuntimeException("remote call failed: publicKey", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void configurationChanged() { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_configurationChanged); + + try { + client.operationPath("/resources", c, "configurationChanged", null); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_configurationChanged, e.toString()); + throw new RuntimeException("remote call failed: configurationChanged", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void updateStreams(EList inputStreams, EList outputStreams) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_updateStreams); + + try { + client.operationPath("/resources", c, "updateStreams", null, inputStreams,outputStreams); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_updateStreams, e.toString()); + throw new RuntimeException("remote call failed: updateStreams", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void logs(org.json.JSONObject cx, EList logs) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_logs); + + try { + client.operationPath("/resources", c, "logs", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,logs); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_logs, e.toString()); + throw new RuntimeException("remote call failed: logs", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void metrics(org.json.JSONObject cx, EList metrics) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_metrics); + + try { + client.operationPath("/resources", c, "metrics", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,metrics); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_metrics, e.toString()); + throw new RuntimeException("remote call failed: metrics", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void properties(org.json.JSONObject cx, EList l) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_properties); + + try { + client.operationPath("/resources", c, "properties", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,l); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_properties, e.toString()); + throw new RuntimeException("remote call failed: properties", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void uploadInfo(org.json.JSONObject cx, EList info) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_uploadInfo); + + try { + client.operationPath("/resources", c, "uploadInfo", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,info); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_uploadInfo, e.toString()); + throw new RuntimeException("remote call failed: uploadInfo", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public EList getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getValues); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getValues", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end,option,relativeInterval); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getValues, e.toString()); + throw new RuntimeException("remote call failed: getValues", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList getValuesAll(org.json.JSONObject cx, java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getValuesAll); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getValuesAll", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,metrics,start,end,option,relativeInterval); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getValuesAll, e.toString()); + throw new RuntimeException("remote call failed: getValuesAll", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getMessages); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getMessages", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getMessages, e.toString()); + throw new RuntimeException("remote call failed: getMessages", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getRequestLogger); + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res; + try { + res = (org.openecomp.ncomp.sirius.manager.server.LoggerInfo) client.operationPath("/resources", c, "getRequestLogger", null, userName,action,resourcePath,context); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getRequestLogger, e.toString()); + throw new RuntimeException("remote call failed: getRequestLogger", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_evaluate); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "evaluate", null, path,function); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_evaluate, e.toString()); + throw new RuntimeException("remote call failed: evaluate", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_update); + + try { + client.operationPath("/resources", c, "update", null, path,function); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_update, e.toString()); + throw new RuntimeException("remote call failed: update", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public java.lang.String createNamespace(java.lang.String namespace) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_createNamespace); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "createNamespace", null, namespace); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_createNamespace, e.toString()); + throw new RuntimeException("remote call failed: createNamespace", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String deleteNamespace(java.lang.String namespace) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deleteNamespace); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "deleteNamespace", null, namespace); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deleteNamespace, e.toString()); + throw new RuntimeException("remote call failed: deleteNamespace", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String deployApp(java.lang.String namespace, java.lang.String jarfile) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deployApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "deployApp", null, namespace,jarfile); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deployApp, e.toString()); + throw new RuntimeException("remote call failed: deployApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String loadArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_loadArtifact); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "loadArtifact", null, namespace,artifactName,jarfile,version); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_loadArtifact, e.toString()); + throw new RuntimeException("remote call failed: loadArtifact", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String deleteArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deleteArtifact); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "deleteArtifact", null, namespace,artifactName,artifactVersion); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deleteArtifact, e.toString()); + throw new RuntimeException("remote call failed: deleteArtifact", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String startFlow(java.lang.String namespace, java.lang.String appName, java.lang.String flowId, java.lang.String extraArgs) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_startFlow); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "startFlow", null, namespace,appName,flowId,extraArgs); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_startFlow, e.toString()); + throw new RuntimeException("remote call failed: startFlow", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String startWorker(java.lang.String namespace, java.lang.String appName, java.lang.String workerId, java.lang.String extraArgs) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_startWorker); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "startWorker", null, namespace,appName,workerId,extraArgs); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_startWorker, e.toString()); + throw new RuntimeException("remote call failed: startWorker", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String startService(java.lang.String namespace, java.lang.String appName, java.lang.String serviceId, java.lang.String extraArgs) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_startService); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "startService", null, namespace,appName,serviceId,extraArgs); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_startService, e.toString()); + throw new RuntimeException("remote call failed: startService", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String startApp(java.lang.String namespace, java.lang.String appName) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_startApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "startApp", null, namespace,appName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_startApp, e.toString()); + throw new RuntimeException("remote call failed: startApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String stopApp(java.lang.String namespace, java.lang.String appName) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_stopApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "stopApp", null, namespace,appName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_stopApp, e.toString()); + throw new RuntimeException("remote call failed: stopApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String deleteApp(java.lang.String namespace, java.lang.String appName) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deleteApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "deleteApp", null, namespace,appName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deleteApp, e.toString()); + throw new RuntimeException("remote call failed: deleteApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String loadPreferencesApp(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_loadPreferencesApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "loadPreferencesApp", null, namespace,prefsFile,appId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_loadPreferencesApp, e.toString()); + throw new RuntimeException("remote call failed: loadPreferencesApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String loadPreferencesFlow(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId, java.lang.String flowId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_loadPreferencesFlow); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "loadPreferencesFlow", null, namespace,prefsFile,appId,flowId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_loadPreferencesFlow, e.toString()); + throw new RuntimeException("remote call failed: loadPreferencesFlow", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String loadPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsFile) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_loadPreferencesNameSpace); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "loadPreferencesNameSpace", null, namespace,prefsFile); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_loadPreferencesNameSpace, e.toString()); + throw new RuntimeException("remote call failed: loadPreferencesNameSpace", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setPreferencesApp(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setPreferencesApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setPreferencesApp", null, namespace,prefsString,appId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setPreferencesApp, e.toString()); + throw new RuntimeException("remote call failed: setPreferencesApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setPreferencesFlow(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String flowId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setPreferencesFlow); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setPreferencesFlow", null, namespace,prefsString,appId,flowId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setPreferencesFlow, e.toString()); + throw new RuntimeException("remote call failed: setPreferencesFlow", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setPreferencesWorker(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String workerId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setPreferencesWorker); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setPreferencesWorker", null, namespace,prefsString,appId,workerId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setPreferencesWorker, e.toString()); + throw new RuntimeException("remote call failed: setPreferencesWorker", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setPreferencesService(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String serviceId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setPreferencesService); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setPreferencesService", null, namespace,prefsString,appId,serviceId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setPreferencesService, e.toString()); + throw new RuntimeException("remote call failed: setPreferencesService", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsString) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setPreferencesNameSpace); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setPreferencesNameSpace", null, namespace,prefsString); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setPreferencesNameSpace, e.toString()); + throw new RuntimeException("remote call failed: setPreferencesNameSpace", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setFlowRunTimeArgs(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String args) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setFlowRunTimeArgs); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setFlowRunTimeArgs", null, namespace,appId,flowId,args); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setFlowRunTimeArgs, e.toString()); + throw new RuntimeException("remote call failed: setFlowRunTimeArgs", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setFlowletInstances(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String flowletId, int nInstances) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setFlowletInstances); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setFlowletInstances", null, namespace,appId,flowId,flowletId,nInstances); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setFlowletInstances, e.toString()); + throw new RuntimeException("remote call failed: setFlowletInstances", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String stopFlow(java.lang.String namespace, java.lang.String appId, java.lang.String flowId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_stopFlow); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "stopFlow", null, namespace,appId,flowId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_stopFlow, e.toString()); + throw new RuntimeException("remote call failed: stopFlow", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String stopWorker(java.lang.String namespace, java.lang.String appId, java.lang.String workerId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_stopWorker); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "stopWorker", null, namespace,appId,workerId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_stopWorker, e.toString()); + throw new RuntimeException("remote call failed: stopWorker", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String stopService(java.lang.String namespace, java.lang.String appId, java.lang.String serviceId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_stopService); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "stopService", null, namespace,appId,serviceId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_stopService, e.toString()); + throw new RuntimeException("remote call failed: stopService", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String truncateDataSet(java.lang.String namespace, java.lang.String datasetName) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_truncateDataSet); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "truncateDataSet", null, namespace,datasetName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_truncateDataSet, e.toString()); + throw new RuntimeException("remote call failed: truncateDataSet", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String deleteDataset(java.lang.String namespace, java.lang.String datasetName) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deleteDataset); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "deleteDataset", null, namespace,datasetName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deleteDataset, e.toString()); + throw new RuntimeException("remote call failed: deleteDataset", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String createStream(java.lang.String namespace, java.lang.String newStreamId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_createStream); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "createStream", null, namespace,newStreamId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_createStream, e.toString()); + throw new RuntimeException("remote call failed: createStream", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String deleteStream(java.lang.String namespace, java.lang.String streamId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deleteStream); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "deleteStream", null, namespace,streamId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deleteStream, e.toString()); + throw new RuntimeException("remote call failed: deleteStream", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList getStreamEvents(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getStreamEvents); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getStreamEvents", null, namespace,streamId,startTime,endTime,limit); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getStreamEvents, e.toString()); + throw new RuntimeException("remote call failed: getStreamEvents", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList getStreamStats(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getStreamStats); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getStreamStats", null, namespace,streamId,startTime,endTime,limit); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getStreamStats, e.toString()); + throw new RuntimeException("remote call failed: getStreamStats", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String sendEventToStream(java.lang.String namespace, java.lang.String streamId, java.lang.String event) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_sendEventToStream); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "sendEventToStream", null, namespace,streamId,event); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_sendEventToStream, e.toString()); + throw new RuntimeException("remote call failed: sendEventToStream", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String trucateStream(java.lang.String namespace, java.lang.String streamId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_trucateStream); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "trucateStream", null, namespace,streamId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_trucateStream, e.toString()); + throw new RuntimeException("remote call failed: trucateStream", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setStreamProperties(java.lang.String namespace, java.lang.String streamId, java.lang.String propsFile) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setStreamProperties); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setStreamProperties", null, namespace,streamId,propsFile); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setStreamProperties, e.toString()); + throw new RuntimeException("remote call failed: setStreamProperties", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String restartApp(java.lang.String namespace, java.lang.String appId, java.lang.String progTypes) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_restartApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "restartApp", null, namespace,appId,progTypes); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_restartApp, e.toString()); + throw new RuntimeException("remote call failed: restartApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String createApp(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_createApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "createApp", null, namespace,appId,artifactName,artifactVersion,scope); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_createApp, e.toString()); + throw new RuntimeException("remote call failed: createApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String createAppWithConfig(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope, java.lang.String appConfig) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_createAppWithConfig); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "createAppWithConfig", null, namespace,appId,artifactName,artifactVersion,scope,appConfig); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_createAppWithConfig, e.toString()); + throw new RuntimeException("remote call failed: createAppWithConfig", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setDatasetProperties(java.lang.String namespace, java.lang.String datasetName, java.lang.String datasetProperties) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setDatasetProperties); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setDatasetProperties", null, namespace,datasetName,datasetProperties); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setDatasetProperties, e.toString()); + throw new RuntimeException("remote call failed: setDatasetProperties", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setStreamTTL(java.lang.String namespace, java.lang.String streamName, int ttlSeconds) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setStreamTTL); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setStreamTTL", null, namespace,streamName,ttlSeconds); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setStreamTTL, e.toString()); + throw new RuntimeException("remote call failed: setStreamTTL", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerConsole.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerConsole.java new file mode 100644 index 0000000..08062a0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerConsole.java @@ -0,0 +1,655 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui.DcaeGuiClientApiConsole; + + +public class DcaeCdapClusterManagerConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeCdapClusterManagerConsole.class); + protected DcaeCdapClusterManagerClient controller; + + + DcaeGuiClientApiConsole gui; + + + public DcaeCdapClusterManagerConsole(String filename, String name) { + super(filename, name); + controller = new DcaeCdapClusterManagerClient(filename,name); + client = controller.client; + + gui = new DcaeGuiClientApiConsole(filename,name); + } + + public DcaeCdapClusterManagerConsole(AbstractClient c) { + controller = new DcaeCdapClusterManagerClient(c); + client = controller.client; + } + + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend() { + + try { + controller.suspend(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume() { + + try { + controller.resume(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + try { + res = controller.publicKey(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void configurationChanged() { + + try { + controller.configurationChanged(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void logs(EList logs) { + + try { + controller.logs(null,logs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void metrics(EList metrics) { + + try { + controller.metrics(null,metrics); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void properties(EList l) { + + try { + controller.properties(null,l); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void uploadInfo(EList info) { + + try { + controller.uploadInfo(null,info); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public EList getValues(java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + try { + res = controller.getValues(null,path,start,end,option,relativeInterval); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getValuesAll(java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + try { + res = controller.getValuesAll(null,path,metrics,start,end,option,relativeInterval); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getMessages(java.lang.String path, java.lang.Long start, java.lang.Long end) { + EList res = null; + try { + res = controller.getMessages(null,path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res = null; + try { + res = controller.getRequestLogger(userName,action,resourcePath,context); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EList res = null; + try { + res = controller.evaluate(path,function); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + + try { + controller.update(path,function); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public java.lang.String createNamespace(java.lang.String namespace) { + java.lang.String res = null; + try { + res = controller.createNamespace(namespace); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deleteNamespace(java.lang.String namespace) { + java.lang.String res = null; + try { + res = controller.deleteNamespace(namespace); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deployApp(java.lang.String namespace, java.lang.String jarfile) { + java.lang.String res = null; + try { + res = controller.deployApp(namespace,jarfile); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String loadArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version) { + java.lang.String res = null; + try { + res = controller.loadArtifact(namespace,artifactName,jarfile,version); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deleteArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) { + java.lang.String res = null; + try { + res = controller.deleteArtifact(namespace,artifactName,artifactVersion); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String startFlow(java.lang.String namespace, java.lang.String appName, java.lang.String flowId, java.lang.String extraArgs) { + java.lang.String res = null; + try { + res = controller.startFlow(namespace,appName,flowId,extraArgs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String startWorker(java.lang.String namespace, java.lang.String appName, java.lang.String workerId, java.lang.String extraArgs) { + java.lang.String res = null; + try { + res = controller.startWorker(namespace,appName,workerId,extraArgs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String startService(java.lang.String namespace, java.lang.String appName, java.lang.String serviceId, java.lang.String extraArgs) { + java.lang.String res = null; + try { + res = controller.startService(namespace,appName,serviceId,extraArgs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String startApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + try { + res = controller.startApp(namespace,appName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String stopApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + try { + res = controller.stopApp(namespace,appName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deleteApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + try { + res = controller.deleteApp(namespace,appName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String loadPreferencesApp(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId) { + java.lang.String res = null; + try { + res = controller.loadPreferencesApp(namespace,prefsFile,appId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String loadPreferencesFlow(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + try { + res = controller.loadPreferencesFlow(namespace,prefsFile,appId,flowId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String loadPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsFile) { + java.lang.String res = null; + try { + res = controller.loadPreferencesNameSpace(namespace,prefsFile); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setPreferencesApp(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId) { + java.lang.String res = null; + try { + res = controller.setPreferencesApp(namespace,prefsString,appId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setPreferencesFlow(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + try { + res = controller.setPreferencesFlow(namespace,prefsString,appId,flowId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setPreferencesWorker(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String workerId) { + java.lang.String res = null; + try { + res = controller.setPreferencesWorker(namespace,prefsString,appId,workerId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setPreferencesService(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String serviceId) { + java.lang.String res = null; + try { + res = controller.setPreferencesService(namespace,prefsString,appId,serviceId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsString) { + java.lang.String res = null; + try { + res = controller.setPreferencesNameSpace(namespace,prefsString); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setFlowRunTimeArgs(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String args) { + java.lang.String res = null; + try { + res = controller.setFlowRunTimeArgs(namespace,appId,flowId,args); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setFlowletInstances(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String flowletId, int nInstances) { + java.lang.String res = null; + try { + res = controller.setFlowletInstances(namespace,appId,flowId,flowletId,nInstances); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String stopFlow(java.lang.String namespace, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + try { + res = controller.stopFlow(namespace,appId,flowId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String stopWorker(java.lang.String namespace, java.lang.String appId, java.lang.String workerId) { + java.lang.String res = null; + try { + res = controller.stopWorker(namespace,appId,workerId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String stopService(java.lang.String namespace, java.lang.String appId, java.lang.String serviceId) { + java.lang.String res = null; + try { + res = controller.stopService(namespace,appId,serviceId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String truncateDataSet(java.lang.String namespace, java.lang.String datasetName) { + java.lang.String res = null; + try { + res = controller.truncateDataSet(namespace,datasetName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deleteDataset(java.lang.String namespace, java.lang.String datasetName) { + java.lang.String res = null; + try { + res = controller.deleteDataset(namespace,datasetName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String createStream(java.lang.String namespace, java.lang.String newStreamId) { + java.lang.String res = null; + try { + res = controller.createStream(namespace,newStreamId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deleteStream(java.lang.String namespace, java.lang.String streamId) { + java.lang.String res = null; + try { + res = controller.deleteStream(namespace,streamId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getStreamEvents(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EList res = null; + try { + res = controller.getStreamEvents(namespace,streamId,startTime,endTime,limit); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getStreamStats(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EList res = null; + try { + res = controller.getStreamStats(namespace,streamId,startTime,endTime,limit); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String sendEventToStream(java.lang.String namespace, java.lang.String streamId, java.lang.String event) { + java.lang.String res = null; + try { + res = controller.sendEventToStream(namespace,streamId,event); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String trucateStream(java.lang.String namespace, java.lang.String streamId) { + java.lang.String res = null; + try { + res = controller.trucateStream(namespace,streamId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setStreamProperties(java.lang.String namespace, java.lang.String streamId, java.lang.String propsFile) { + java.lang.String res = null; + try { + res = controller.setStreamProperties(namespace,streamId,propsFile); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String restartApp(java.lang.String namespace, java.lang.String appId, java.lang.String progTypes) { + java.lang.String res = null; + try { + res = controller.restartApp(namespace,appId,progTypes); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String createApp(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope) { + java.lang.String res = null; + try { + res = controller.createApp(namespace,appId,artifactName,artifactVersion,scope); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String createAppWithConfig(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope, java.lang.String appConfig) { + java.lang.String res = null; + try { + res = controller.createAppWithConfig(namespace,appId,artifactName,artifactVersion,scope,appConfig); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setDatasetProperties(java.lang.String namespace, java.lang.String datasetName, java.lang.String datasetProperties) { + java.lang.String res = null; + try { + res = controller.setDatasetProperties(namespace,datasetName,datasetProperties); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setStreamTTL(java.lang.String namespace, java.lang.String streamName, int ttlSeconds) { + java.lang.String res = null; + try { + res = controller.setStreamTTL(namespace,streamName,ttlSeconds); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProviderTemplate.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProviderTemplate.java new file mode 100644 index 0000000..f683359 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProviderTemplate.java @@ -0,0 +1,300 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import java.util.Date; + + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; + + +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + + +import org.openecomp.dcae.controller.service.servers.vmmanager.DcaeVirtualMachineManagerProvider; + + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; + + +public class DcaeCdapClusterManagerProviderTemplate extends DcaeVirtualMachineManagerProvider { + private static final Logger logger = Logger.getLogger(DcaeCdapClusterManagerProviderTemplate.class); + CdapClusterManager o; + + public DcaeCdapClusterManagerProviderTemplate(ISiriusServer controller, CdapClusterManager o) { + super(controller, o); + this.o = o; + } + + public java.lang.String createNamespace(java.lang.String namespace) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String deleteNamespace(java.lang.String namespace) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String deployApp(java.lang.String namespace, java.lang.String jarfile) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String loadArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String deleteArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String startFlow(java.lang.String namespace, java.lang.String appName, java.lang.String flowId, java.lang.String extraArgs) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String startWorker(java.lang.String namespace, java.lang.String appName, java.lang.String workerId, java.lang.String extraArgs) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String startService(java.lang.String namespace, java.lang.String appName, java.lang.String serviceId, java.lang.String extraArgs) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String startApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String stopApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String deleteApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String loadPreferencesApp(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String loadPreferencesFlow(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String loadPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsFile) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setPreferencesApp(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setPreferencesFlow(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setPreferencesWorker(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String workerId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setPreferencesService(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String serviceId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsString) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setFlowRunTimeArgs(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String args) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setFlowletInstances(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String flowletId, int nInstances) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String stopFlow(java.lang.String namespace, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String stopWorker(java.lang.String namespace, java.lang.String appId, java.lang.String workerId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String stopService(java.lang.String namespace, java.lang.String appId, java.lang.String serviceId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String truncateDataSet(java.lang.String namespace, java.lang.String datasetName) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String deleteDataset(java.lang.String namespace, java.lang.String datasetName) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String createStream(java.lang.String namespace, java.lang.String newStreamId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String deleteStream(java.lang.String namespace, java.lang.String streamId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public EList getStreamEvents(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EList res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public EList getStreamStats(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EList res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String sendEventToStream(java.lang.String namespace, java.lang.String streamId, java.lang.String event) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String trucateStream(java.lang.String namespace, java.lang.String streamId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setStreamProperties(java.lang.String namespace, java.lang.String streamId, java.lang.String propsFile) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String restartApp(java.lang.String namespace, java.lang.String appId, java.lang.String progTypes) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String createApp(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String createAppWithConfig(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope, java.lang.String appConfig) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setDatasetProperties(java.lang.String namespace, java.lang.String datasetName, java.lang.String datasetProperties) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setStreamTTL(java.lang.String namespace, java.lang.String streamName, int ttlSeconds) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + + + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerServer.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerServer.java new file mode 100644 index 0000000..93dac4b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerServer.java @@ -0,0 +1,115 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; + + +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui.DcaeModelFactory; + + + + + +public class DcaeCdapClusterManagerServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeCdapClusterManagerServer.class); + String serverPath; + ManagementServer server; + DcaeCdapClusterManager controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeManagerFactory f = new DcaeManagerFactory(this); + + + String guiPath; + ManagementServer guiServer; + + + public DcaeCdapClusterManagerServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeCdapClusterManager.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "CdapClusterManager", serverPath, filename); + server.addFactory(f); + + server.addFactory(new org.openecomp.ncomp.servers.cdap.CdapCdapFactory(this)); + + + server.addFactory(org.openecomp.dcae.controller.service.cdap.cluster.service.ServiceFactory.eINSTANCE); + + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeCdapClusterManager) server.find("/").o; + webServer = new Jetty8Server("manager.properties"); + webServer.add("/resources",server); + + + + EFactory guiFactory = new DcaeModelFactory(this); + guiPath = serverPath + "/gui"; + guiServer = new ManagementServer(guiFactory, "GuiClientApi", guiPath, "gui.properties"); + guiServer.start(); + webServer.add("/gui",guiServer); + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeCdapClusterManagerServer s = new DcaeCdapClusterManagerServer("manager.properties"); + s.runWebserver(); + } + public CdapClusterManager getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeManagerFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeManagerFactory.java new file mode 100644 index 0000000..def52bf --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeManagerFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.ManagerFactoryImpl; + + + + + +public class DcaeManagerFactory extends ManagerFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeManagerFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ManagerPackage.eINSTANCE; } + public DcaeManagerFactory(ISiriusServer server) { + this.server = server; + } + @Override + public CdapClusterManager createCdapClusterManager() { + return new DcaeCdapClusterManager(server); + } + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApi.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApi.java new file mode 100644 index 0000000..8c4d9e0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApi.java @@ -0,0 +1,256 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui.logging.GuiClientApiOperationEnum; + + + + + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + + + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + + + + +import org.openecomp.ncomp.sirius.manager.Subject; + + + + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + + + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; + + + +public class DcaeGuiClientApi extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApi.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeGuiClientApiProvider controller; + ISiriusServer server; + + public DcaeGuiClientApi(ISiriusServer server) { + this.server = server; + this.controller = new DcaeGuiClientApiProvider(server,this); + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTree); + try { + res = controller.getTree(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.OKAY, duration_); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.START, duration_,path); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getObject); + try { + res = controller.getObject(path); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.ERROR, duration_,path); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.OKAY, duration_,path); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.START, duration_,path,start,end,duration); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTimeSerie); + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.ERROR, duration_,path,start,end,duration); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.OKAY, duration_,path,start,end,duration); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTable); + try { + res = controller.getTable(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getHtml); + try { + res = controller.getHtml(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getGraph); + try { + res = controller.getGraph(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + + + + + + public static void ecoreSetup() { + DcaeGuiClientApiProvider.ecoreSetup(); + } + public DcaeGuiClientApiProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiClient.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiClient.java new file mode 100644 index 0000000..b7197f8 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiClient.java @@ -0,0 +1,175 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui.logging.GuiClientApiMessageEnum; + + +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.DcaeCdapClusterManager; + + + + +@SuppressWarnings("unchecked") +public class DcaeGuiClientApiClient extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeGuiClientApiClient(String file, String name) { + DcaeCdapClusterManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTree); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTree) client.operationPath("/gui", c, "getTree", null); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTree, e.toString()); + throw new RuntimeException("remote call failed: getTree", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getObject); + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiObject) client.operationPath("/gui", c, "getObject", null, path); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getObject, e.toString()); + throw new RuntimeException("remote call failed: getObject", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTimeSerie); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie) client.operationPath("/gui", c, "getTimeSerie", null, path,start,end,duration); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTimeSerie, e.toString()); + throw new RuntimeException("remote call failed: getTimeSerie", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTable); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTable) client.operationPath("/gui", c, "getTable", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTable, e.toString()); + throw new RuntimeException("remote call failed: getTable", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getHtml); + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml) client.operationPath("/gui", c, "getHtml", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getHtml, e.toString()); + throw new RuntimeException("remote call failed: getHtml", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getGraph); + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res; + try { + res = (org.openecomp.ncomp.sirius.manager.graph.GuiGraph) client.operationPath("/gui", c, "getGraph", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getGraph, e.toString()); + throw new RuntimeException("remote call failed: getGraph", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiConsole.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiConsole.java new file mode 100644 index 0000000..0ea2c50 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiConsole.java @@ -0,0 +1,123 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeGuiClientApiConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiConsole.class); + protected DcaeGuiClientApiClient controller; + + + + + public DcaeGuiClientApiConsole(String filename, String name) { + super(filename, name); + controller = new DcaeGuiClientApiClient(filename,name); + client = controller.client; + + } + + public DcaeGuiClientApiConsole(AbstractClient c) { + controller = new DcaeGuiClientApiClient(c); + client = controller.client; + } + + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + try { + res = controller.getTree(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + try { + res = controller.getObject(path); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + try { + res = controller.getTable(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + try { + res = controller.getHtml(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + try { + res = controller.getGraph(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java new file mode 100644 index 0000000..d4e992d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProviderTemplate extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProviderTemplate.class); + GuiClientApi o; + + public DcaeGuiClientApiProviderTemplate(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeModelFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeModelFactory.java new file mode 100644 index 0000000..2777e62 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeModelFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelFactoryImpl; + +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.DcaeCdapClusterManagerServer; + + + +public class DcaeModelFactory extends ModelFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeModelFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ModelPackage.eINSTANCE; } + public DcaeModelFactory(ISiriusServer server) { + this.server = server; + } + @Override + public GuiClientApi createGuiClientApi() { + return new DcaeGuiClientApi(server); + } + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApi.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApi.properties new file mode 100644 index 0000000..8705ab8 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApi.properties @@ -0,0 +1,78 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +getTree=\ + getTree-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getObject=\ + getObject-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTimeSerie=\ + getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTable=\ + getTable-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getHtml=\ + getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getGraph=\ + getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_getTree=\ + REMOTE-getTree-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getObject=\ + REMOTE-getObject-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTimeSerie=\ + REMOTE-getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTable=\ + REMOTE-getTable-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getHtml=\ + REMOTE-getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getGraph=\ + REMOTE-getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiMessageEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiMessageEnum.java new file mode 100644 index 0000000..29983b0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiMessageEnum.java @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum GuiClientApiMessageEnum implements EcompMessageEnum { + + dummy, + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui.logging.GuiClientApi"); + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiOperationEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiOperationEnum.java new file mode 100644 index 0000000..7ae8593 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiOperationEnum.java @@ -0,0 +1,41 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum GuiClientApiOperationEnum implements EcompOperationEnum { + + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManager.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManager.properties new file mode 100644 index 0000000..4f94eae --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManager.properties @@ -0,0 +1,654 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +publicKey=\ + publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +configurationChanged=\ + configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateStreams=\ + updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +logs=\ + logs-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +metrics=\ + metrics-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +properties=\ + properties-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +uploadInfo=\ + uploadInfo-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getValues=\ + getValues-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getValuesAll=\ + getValuesAll-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getMessages=\ + getMessages-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getRequestLogger=\ + getRequestLogger-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +evaluate=\ + evaluate-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +update=\ + update-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +createNamespace=\ + createNamespace-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +deleteNamespace=\ + deleteNamespace-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +deployApp=\ + deployApp-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +loadArtifact=\ + loadArtifact-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +deleteArtifact=\ + deleteArtifact-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +startFlow=\ + startFlow-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +startWorker=\ + startWorker-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +startService=\ + startService-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +startApp=\ + startApp-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +stopApp=\ + stopApp-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +deleteApp=\ + deleteApp-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +loadPreferencesApp=\ + loadPreferencesApp-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +loadPreferencesFlow=\ + loadPreferencesFlow-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +loadPreferencesNameSpace=\ + loadPreferencesNameSpace-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setPreferencesApp=\ + setPreferencesApp-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setPreferencesFlow=\ + setPreferencesFlow-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setPreferencesWorker=\ + setPreferencesWorker-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setPreferencesService=\ + setPreferencesService-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setPreferencesNameSpace=\ + setPreferencesNameSpace-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setFlowRunTimeArgs=\ + setFlowRunTimeArgs-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setFlowletInstances=\ + setFlowletInstances-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +stopFlow=\ + stopFlow-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +stopWorker=\ + stopWorker-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +stopService=\ + stopService-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +truncateDataSet=\ + truncateDataSet-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +deleteDataset=\ + deleteDataset-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +createStream=\ + createStream-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +deleteStream=\ + deleteStream-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getStreamEvents=\ + getStreamEvents-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getStreamStats=\ + getStreamStats-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +sendEventToStream=\ + sendEventToStream-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +trucateStream=\ + trucateStream-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setStreamProperties=\ + setStreamProperties-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +restartApp=\ + restartApp-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +createApp=\ + createApp-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +createAppWithConfig=\ + createAppWithConfig-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setDatasetProperties=\ + setDatasetProperties-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setStreamTTL=\ + setStreamTTL-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_publicKey=\ + REMOTE-publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_configurationChanged=\ + REMOTE-configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateStreams=\ + REMOTE-updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_logs=\ + REMOTE-logs-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_metrics=\ + REMOTE-metrics-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_properties=\ + REMOTE-properties-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_uploadInfo=\ + REMOTE-uploadInfo-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getValues=\ + REMOTE-getValues-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getValuesAll=\ + REMOTE-getValuesAll-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getMessages=\ + REMOTE-getMessages-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getRequestLogger=\ + REMOTE-getRequestLogger-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_evaluate=\ + REMOTE-evaluate-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_update=\ + REMOTE-update-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_createNamespace=\ + REMOTE-createNamespace-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_deleteNamespace=\ + REMOTE-deleteNamespace-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_deployApp=\ + REMOTE-deployApp-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_loadArtifact=\ + REMOTE-loadArtifact-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_deleteArtifact=\ + REMOTE-deleteArtifact-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_startFlow=\ + REMOTE-startFlow-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_startWorker=\ + REMOTE-startWorker-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_startService=\ + REMOTE-startService-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_startApp=\ + REMOTE-startApp-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_stopApp=\ + REMOTE-stopApp-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_deleteApp=\ + REMOTE-deleteApp-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_loadPreferencesApp=\ + REMOTE-loadPreferencesApp-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_loadPreferencesFlow=\ + REMOTE-loadPreferencesFlow-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_loadPreferencesNameSpace=\ + REMOTE-loadPreferencesNameSpace-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setPreferencesApp=\ + REMOTE-setPreferencesApp-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setPreferencesFlow=\ + REMOTE-setPreferencesFlow-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setPreferencesWorker=\ + REMOTE-setPreferencesWorker-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setPreferencesService=\ + REMOTE-setPreferencesService-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setPreferencesNameSpace=\ + REMOTE-setPreferencesNameSpace-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setFlowRunTimeArgs=\ + REMOTE-setFlowRunTimeArgs-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setFlowletInstances=\ + REMOTE-setFlowletInstances-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_stopFlow=\ + REMOTE-stopFlow-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_stopWorker=\ + REMOTE-stopWorker-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_stopService=\ + REMOTE-stopService-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_truncateDataSet=\ + REMOTE-truncateDataSet-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_deleteDataset=\ + REMOTE-deleteDataset-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_createStream=\ + REMOTE-createStream-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_deleteStream=\ + REMOTE-deleteStream-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getStreamEvents=\ + REMOTE-getStreamEvents-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getStreamStats=\ + REMOTE-getStreamStats-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_sendEventToStream=\ + REMOTE-sendEventToStream-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_trucateStream=\ + REMOTE-trucateStream-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setStreamProperties=\ + REMOTE-setStreamProperties-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_restartApp=\ + REMOTE-restartApp-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_createApp=\ + REMOTE-createApp-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_createAppWithConfig=\ + REMOTE-createAppWithConfig-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setDatasetProperties=\ + REMOTE-setDatasetProperties-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setStreamTTL=\ + REMOTE-setStreamTTL-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerMessageEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerMessageEnum.java new file mode 100644 index 0000000..d632aa7 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerMessageEnum.java @@ -0,0 +1,143 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum CdapClusterManagerMessageEnum implements EcompMessageEnum { + + dummy, + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + createNamespace, + deleteNamespace, + deployApp, + loadArtifact, + deleteArtifact, + startFlow, + startWorker, + startService, + startApp, + stopApp, + deleteApp, + loadPreferencesApp, + loadPreferencesFlow, + loadPreferencesNameSpace, + setPreferencesApp, + setPreferencesFlow, + setPreferencesWorker, + setPreferencesService, + setPreferencesNameSpace, + setFlowRunTimeArgs, + setFlowletInstances, + stopFlow, + stopWorker, + stopService, + truncateDataSet, + deleteDataset, + createStream, + deleteStream, + getStreamEvents, + getStreamStats, + sendEventToStream, + trucateStream, + setStreamProperties, + restartApp, + createApp, + createAppWithConfig, + setDatasetProperties, + setStreamTTL, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams, + REMOTE_logs, + REMOTE_metrics, + REMOTE_properties, + REMOTE_uploadInfo, + REMOTE_getValues, + REMOTE_getValuesAll, + REMOTE_getMessages, + REMOTE_getRequestLogger, + REMOTE_evaluate, + REMOTE_update, + REMOTE_createNamespace, + REMOTE_deleteNamespace, + REMOTE_deployApp, + REMOTE_loadArtifact, + REMOTE_deleteArtifact, + REMOTE_startFlow, + REMOTE_startWorker, + REMOTE_startService, + REMOTE_startApp, + REMOTE_stopApp, + REMOTE_deleteApp, + REMOTE_loadPreferencesApp, + REMOTE_loadPreferencesFlow, + REMOTE_loadPreferencesNameSpace, + REMOTE_setPreferencesApp, + REMOTE_setPreferencesFlow, + REMOTE_setPreferencesWorker, + REMOTE_setPreferencesService, + REMOTE_setPreferencesNameSpace, + REMOTE_setFlowRunTimeArgs, + REMOTE_setFlowletInstances, + REMOTE_stopFlow, + REMOTE_stopWorker, + REMOTE_stopService, + REMOTE_truncateDataSet, + REMOTE_deleteDataset, + REMOTE_createStream, + REMOTE_deleteStream, + REMOTE_getStreamEvents, + REMOTE_getStreamStats, + REMOTE_sendEventToStream, + REMOTE_trucateStream, + REMOTE_setStreamProperties, + REMOTE_restartApp, + REMOTE_createApp, + REMOTE_createAppWithConfig, + REMOTE_setDatasetProperties, + REMOTE_setStreamTTL; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.logging.CdapClusterManager"); + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerOperationEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerOperationEnum.java new file mode 100644 index 0000000..64bca0c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerOperationEnum.java @@ -0,0 +1,137 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum CdapClusterManagerOperationEnum implements EcompOperationEnum { + + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + createNamespace, + deleteNamespace, + deployApp, + loadArtifact, + deleteArtifact, + startFlow, + startWorker, + startService, + startApp, + stopApp, + deleteApp, + loadPreferencesApp, + loadPreferencesFlow, + loadPreferencesNameSpace, + setPreferencesApp, + setPreferencesFlow, + setPreferencesWorker, + setPreferencesService, + setPreferencesNameSpace, + setFlowRunTimeArgs, + setFlowletInstances, + stopFlow, + stopWorker, + stopService, + truncateDataSet, + deleteDataset, + createStream, + deleteStream, + getStreamEvents, + getStreamStats, + sendEventToStream, + trucateStream, + setStreamProperties, + restartApp, + createApp, + createAppWithConfig, + setDatasetProperties, + setStreamTTL, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams, + REMOTE_logs, + REMOTE_metrics, + REMOTE_properties, + REMOTE_uploadInfo, + REMOTE_getValues, + REMOTE_getValuesAll, + REMOTE_getMessages, + REMOTE_getRequestLogger, + REMOTE_evaluate, + REMOTE_update, + REMOTE_createNamespace, + REMOTE_deleteNamespace, + REMOTE_deployApp, + REMOTE_loadArtifact, + REMOTE_deleteArtifact, + REMOTE_startFlow, + REMOTE_startWorker, + REMOTE_startService, + REMOTE_startApp, + REMOTE_stopApp, + REMOTE_deleteApp, + REMOTE_loadPreferencesApp, + REMOTE_loadPreferencesFlow, + REMOTE_loadPreferencesNameSpace, + REMOTE_setPreferencesApp, + REMOTE_setPreferencesFlow, + REMOTE_setPreferencesWorker, + REMOTE_setPreferencesService, + REMOTE_setPreferencesNameSpace, + REMOTE_setFlowRunTimeArgs, + REMOTE_setFlowletInstances, + REMOTE_stopFlow, + REMOTE_stopWorker, + REMOTE_stopService, + REMOTE_truncateDataSet, + REMOTE_deleteDataset, + REMOTE_createStream, + REMOTE_deleteStream, + REMOTE_getStreamEvents, + REMOTE_getStreamStats, + REMOTE_sendEventToStream, + REMOTE_trucateStream, + REMOTE_setStreamProperties, + REMOTE_restartApp, + REMOTE_createApp, + REMOTE_createAppWithConfig, + REMOTE_setDatasetProperties, + REMOTE_setStreamTTL; +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterService.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterService.java new file mode 100644 index 0000000..e805e70 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterService.java @@ -0,0 +1,381 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.cdap.cluster.servers.service; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.cdap.cluster.servers.service.logging.CdapClusterServiceOperationEnum; + + + + +import org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl; + + + +public class DcaeCdapClusterService extends CdapClusterServiceImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeCdapClusterService.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeCdapClusterServiceProvider controller; + ISiriusServer server; + + public DcaeCdapClusterService(ISiriusServer server) { + this.server = server; + this.controller = new DcaeCdapClusterServiceProvider(server,this); + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.START, duration_,instanceName,containerPath); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.deploy); + try { + controller.deploy(instanceName,containerPath); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.ERROR, duration_,instanceName,containerPath); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.OKAY, duration_,instanceName,containerPath); + + } + + public void undeploy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.undeploy); + try { + controller.undeploy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.test); + try { + res = controller.test(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public void suspend(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.suspend); + try { + controller.suspend(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void resume(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.resume); + try { + controller.resume(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.pushManagerConfiguration); + try { + controller.pushManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.pollManagerConfiguration); + try { + controller.pollManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.managerConfiguration); + try { + res = controller.managerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.START, duration_,instanceName,operation,parameters); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.managerOperation); + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.ERROR, duration_,instanceName,operation,parameters); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.OKAY, duration_,instanceName,operation,parameters); + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.updateConfigurationFromPolicy); + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void runHealthTests() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.runHealthTests); + try { + controller.runHealthTests(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.OKAY, duration_); + + } + + public void updateDeploymentStatus() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.updateDeploymentStatus); + try { + controller.updateDeploymentStatus(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.OKAY, duration_); + + } + + + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + DcaeCdapClusterServiceProvider.ecoreSetup(); + } + public DcaeCdapClusterServiceProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceClient.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceClient.java new file mode 100644 index 0000000..102cacd --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceClient.java @@ -0,0 +1,276 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.cdap.cluster.servers.service; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.service.logging.CdapClusterServiceOperationEnum; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.service.logging.CdapClusterServiceMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeCdapClusterServiceClient extends CdapClusterServiceImpl { + public static final Logger logger = Logger.getLogger(DcaeCdapClusterServiceClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeCdapClusterServiceClient(String file, String name) { + DcaeCdapClusterService.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeCdapClusterServiceClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeCdapClusterServiceClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_deploy); + + try { + client.operationPath("/resources", c, "deploy", null, instanceName,containerPath); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_deploy, e.toString()); + throw new RuntimeException("remote call failed: deploy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void undeploy(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_undeploy); + + try { + client.operationPath("/resources", c, "undeploy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_undeploy, e.toString()); + throw new RuntimeException("remote call failed: undeploy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: test", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: suspend", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: resume", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pushManagerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_pushManagerConfiguration); + + try { + client.operationPath("/resources", c, "pushManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_pushManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: pushManagerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pollManagerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_pollManagerConfiguration); + + try { + client.operationPath("/resources", c, "pollManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_pollManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: pollManagerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_managerConfiguration); + org.eclipse.emf.ecore.EObject res; + try { + res = (org.eclipse.emf.ecore.EObject) client.operationPath("/resources", c, "managerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_managerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: managerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_managerOperation); + org.json.JSONObject res; + try { + res = (org.json.JSONObject) client.operationPath("/resources", c, "managerOperation", null, instanceName,operation,parameters); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_managerOperation, e.toString()); + throw new RuntimeException("remote call failed: managerOperation", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_updateConfigurationFromPolicy); + + try { + client.operationPath("/resources", c, "updateConfigurationFromPolicy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString()); + throw new RuntimeException("remote call failed: updateConfigurationFromPolicy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void runHealthTests() { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_runHealthTests); + + try { + client.operationPath("/resources", c, "runHealthTests", null); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_runHealthTests, e.toString()); + throw new RuntimeException("remote call failed: runHealthTests", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void updateDeploymentStatus() { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_updateDeploymentStatus); + + try { + client.operationPath("/resources", c, "updateDeploymentStatus", null); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_updateDeploymentStatus, e.toString()); + throw new RuntimeException("remote call failed: updateDeploymentStatus", e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceConsole.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceConsole.java new file mode 100644 index 0000000..0e96795 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceConsole.java @@ -0,0 +1,189 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.cdap.cluster.servers.service; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeCdapClusterServiceConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeCdapClusterServiceConsole.class); + protected DcaeCdapClusterServiceClient controller; + + + + + public DcaeCdapClusterServiceConsole(String filename, String name) { + super(filename, name); + controller = new DcaeCdapClusterServiceClient(filename,name); + client = controller.client; + + } + + public DcaeCdapClusterServiceConsole(AbstractClient c) { + controller = new DcaeCdapClusterServiceClient(c); + client = controller.client; + } + + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + try { + controller.deploy(instanceName,containerPath); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void undeploy(java.lang.String instanceName) { + + try { + controller.undeploy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend(java.lang.String instanceName) { + + try { + controller.suspend(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume(java.lang.String instanceName) { + + try { + controller.resume(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pushManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pollManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + try { + res = controller.managerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void runHealthTests() { + + try { + controller.runHealthTests(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void updateDeploymentStatus() { + + try { + controller.updateDeploymentStatus(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceProviderTemplate.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceProviderTemplate.java new file mode 100644 index 0000000..9f9c8a4 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceProviderTemplate.java @@ -0,0 +1,65 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.cdap.cluster.servers.service; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.dcae.controller.service.servers.vm.DcaeVirtualMachineServiceProvider; + + +import org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService; + + +public class DcaeCdapClusterServiceProviderTemplate extends DcaeVirtualMachineServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeCdapClusterServiceProviderTemplate.class); + CdapClusterService o; + + public DcaeCdapClusterServiceProviderTemplate(ISiriusServer controller, CdapClusterService o) { + super(controller, o); + this.o = o; + } + + + + + + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceServer.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceServer.java new file mode 100644 index 0000000..69ba3f6 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceServer.java @@ -0,0 +1,98 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.cdap.cluster.servers.service; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService; + + + + + + +public class DcaeCdapClusterServiceServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeCdapClusterServiceServer.class); + String serverPath; + ManagementServer server; + DcaeCdapClusterService controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeServiceFactory f = new DcaeServiceFactory(this); + + + + public DcaeCdapClusterServiceServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeCdapClusterService.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "CdapClusterService", serverPath, filename); + server.addFactory(f); + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeCdapClusterService) server.find("/").o; + webServer = new Jetty8Server("service.properties"); + webServer.add("/resources",server); + + + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeCdapClusterServiceServer s = new DcaeCdapClusterServiceServer("service.properties"); + s.runWebserver(); + } + public CdapClusterService getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeServiceFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeServiceFactory.java new file mode 100644 index 0000000..9d3fd2a --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeServiceFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.cdap.cluster.servers.service; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; +import org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServiceFactoryImpl; + + + + + +public class DcaeServiceFactory extends ServiceFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeServiceFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ServicePackage.eINSTANCE; } + public DcaeServiceFactory(ISiriusServer server) { + this.server = server; + } + @Override + public CdapClusterService createCdapClusterService() { + return new DcaeCdapClusterService(server); + } + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterService.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterService.properties new file mode 100644 index 0000000..d32cf07 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterService.properties @@ -0,0 +1,150 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +deploy=\ + deploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +undeploy=\ + undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pushManagerConfiguration=\ + pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pollManagerConfiguration=\ + pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerConfiguration=\ + managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerOperation=\ + managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateConfigurationFromPolicy=\ + updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +runHealthTests=\ + runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateDeploymentStatus=\ + updateDeploymentStatus-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_deploy=\ + REMOTE-deploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_undeploy=\ + REMOTE-undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pushManagerConfiguration=\ + REMOTE-pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pollManagerConfiguration=\ + REMOTE-pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerConfiguration=\ + REMOTE-managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerOperation=\ + REMOTE-managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateConfigurationFromPolicy=\ + REMOTE-updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_runHealthTests=\ + REMOTE-runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateDeploymentStatus=\ + REMOTE-updateDeploymentStatus-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceMessageEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceMessageEnum.java new file mode 100644 index 0000000..9ed14d2 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceMessageEnum.java @@ -0,0 +1,59 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.cdap.cluster.servers.service.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum CdapClusterServiceMessageEnum implements EcompMessageEnum { + + dummy, + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateDeploymentStatus, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateDeploymentStatus; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.cdap.cluster.servers.service.logging.CdapClusterService"); + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceOperationEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceOperationEnum.java new file mode 100644 index 0000000..b105151 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceOperationEnum.java @@ -0,0 +1,53 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.cdap.cluster.servers.service.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum CdapClusterServiceOperationEnum implements EcompOperationEnum { + + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateDeploymentStatus, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateDeploymentStatus; +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.classpath b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.gitignore b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.project b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.project new file mode 100644 index 0000000..8a12b36 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.project @@ -0,0 +1,34 @@ + + + dcae-controller-service-cdap-cluster-model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/LICENSE.txt b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/META-INF/MANIFEST.MF b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..b51eaa7 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/META-INF/MANIFEST.MF @@ -0,0 +1,30 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: dcae-controller-service-cdap-cluster-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.openecomp.dcae.controller.service.cdap.cluster.manager, + org.openecomp.dcae.controller.service.cdap.cluster.manager.impl, + org.openecomp.dcae.controller.service.cdap.cluster.manager.util, + org.openecomp.dcae.controller.service.cdap.cluster.service, + org.openecomp.dcae.controller.service.cdap.cluster.service.impl, + org.openecomp.dcae.controller.service.cdap.cluster.service.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + dcae-controller-core-model;visibility:=reexport, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-openstack-model;visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + dcae-controller-service-vm-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-agent-model;visibility:=reexport, + dcae-controller-service-cdap-cluster-model;visibility:=reexport, + ncomp-cdap-model;bundle-version="0.1.0";visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/build.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/build.properties @@ -0,0 +1,11 @@ +# + +bin.includes = .,\ + src/main/xcore/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/xcore-gen/,\ + src/main/xcore/ +output.. = target/classes/ diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/plugin.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/plugin.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/plugin.xml new file mode 100644 index 0000000..f22fe64 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/plugin.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/pom.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/pom.xml new file mode 100644 index 0000000..38eec3e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/pom.xml @@ -0,0 +1,29 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-cdap-cluster-model + + org.openecomp.ncomp.maven + ncomp-maven-xcore + 0.1.0-SNAPSHOT + ../../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore + + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-vm-model + ${project.version} + + + org.openecomp.ncomp.cdap + ncomp-cdap-model + ${project.version} + + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/CdapClusterManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/CdapClusterManager.java new file mode 100644 index 0000000..a9f4d9b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/CdapClusterManager.java @@ -0,0 +1,41 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.manager; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.ncomp.cdap.CdapApi; + +/** + * + * A representation of the model object 'Cdap Cluster Manager'. + * + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage#getCdapClusterManager() + * @model + * @generated + */ +public interface CdapClusterManager extends VirtualMachineManager, CdapClusterConfiguration, CdapApi { +} // CdapClusterManager diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerFactory.java new file mode 100644 index 0000000..38851c4 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerFactory.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.manager; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage + * @generated + */ +public interface ManagerFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ManagerFactory eINSTANCE = org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.ManagerFactoryImpl.init(); + + /** + * Returns a new object of class 'Cdap Cluster Manager'. + * + * + * @return a new object of class 'Cdap Cluster Manager'. + * @generated + */ + CdapClusterManager createCdapClusterManager(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ManagerPackage getManagerPackage(); + +} //ManagerFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerPackage.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerPackage.java new file mode 100644 index 0000000..8523dea --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerPackage.java @@ -0,0 +1,685 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.manager; + +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.cdap.cluster'" + * @generated + */ +public interface ManagerPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "manager"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.cdap.cluster.manager"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "manager"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ManagerPackage eINSTANCE = org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.ManagerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl Cdap Cluster Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.ManagerPackageImpl#getCdapClusterManager() + * @generated + */ + int CDAP_CLUSTER_MANAGER = 0; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER__INPUT_STREAMS = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER__OUTPUT_STREAMS = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__OUTPUT_STREAMS; + + /** + * The feature id for the 'Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER__CONFIGURATION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION; + + /** + * The feature id for the 'Component' containment reference. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER__COMPONENT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT; + + /** + * The feature id for the 'Cluster' containment reference. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER__CLUSTER = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Cdap Cluster Manager' class. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER_FEATURE_COUNT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 1; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___TEST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___TEST; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SUSPEND = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___SUSPEND; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___RESUME = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___RESUME; + + /** + * The operation id for the 'Public Key' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___PUBLIC_KEY = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___PUBLIC_KEY; + + /** + * The operation id for the 'Configuration Changed' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___CONFIGURATION_CHANGED = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___CONFIGURATION_CHANGED; + + /** + * The operation id for the 'Update Streams' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___UPDATE_STREAMS__ELIST_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE_STREAMS__ELIST_ELIST; + + /** + * The operation id for the 'Logs' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___LOGS__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___LOGS__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Metrics' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___METRICS__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___METRICS__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Properties' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___PROPERTIES__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___PROPERTIES__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Upload Info' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Get Values' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + + /** + * The operation id for the 'Get Values All' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + + /** + * The operation id for the 'Get Messages' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG; + + /** + * The operation id for the 'Get Request Logger' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT; + + /** + * The operation id for the 'Evaluate' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___EVALUATE__STRING_FUNCTION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___EVALUATE__STRING_FUNCTION; + + /** + * The operation id for the 'Update' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___UPDATE__STRING_FUNCTION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE__STRING_FUNCTION; + + /** + * The operation id for the 'Create Namespace' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___CREATE_NAMESPACE__STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 0; + + /** + * The operation id for the 'Delete Namespace' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DELETE_NAMESPACE__STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 1; + + /** + * The operation id for the 'Deploy App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DEPLOY_APP__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 2; + + /** + * The operation id for the 'Load Artifact' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___LOAD_ARTIFACT__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 3; + + /** + * The operation id for the 'Delete Artifact' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DELETE_ARTIFACT__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 4; + + /** + * The operation id for the 'Start Flow' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___START_FLOW__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 5; + + /** + * The operation id for the 'Start Worker' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___START_WORKER__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 6; + + /** + * The operation id for the 'Start Service' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___START_SERVICE__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 7; + + /** + * The operation id for the 'Start App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___START_APP__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 8; + + /** + * The operation id for the 'Stop App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___STOP_APP__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 9; + + /** + * The operation id for the 'Delete App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DELETE_APP__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 10; + + /** + * The operation id for the 'Load Preferences App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_APP__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 11; + + /** + * The operation id for the 'Load Preferences Flow' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 12; + + /** + * The operation id for the 'Load Preferences Name Space' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 13; + + /** + * The operation id for the 'Set Preferences App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_PREFERENCES_APP__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 14; + + /** + * The operation id for the 'Set Preferences Flow' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 15; + + /** + * The operation id for the 'Set Preferences Worker' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 16; + + /** + * The operation id for the 'Set Preferences Service' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 17; + + /** + * The operation id for the 'Set Preferences Name Space' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_PREFERENCES_NAME_SPACE__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 18; + + /** + * The operation id for the 'Set Flow Run Time Args' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 19; + + /** + * The operation id for the 'Set Flowlet Instances' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 20; + + /** + * The operation id for the 'Stop Flow' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___STOP_FLOW__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 21; + + /** + * The operation id for the 'Stop Worker' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___STOP_WORKER__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 22; + + /** + * The operation id for the 'Stop Service' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___STOP_SERVICE__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 23; + + /** + * The operation id for the 'Truncate Data Set' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___TRUNCATE_DATA_SET__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 24; + + /** + * The operation id for the 'Delete Dataset' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DELETE_DATASET__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 25; + + /** + * The operation id for the 'Create Stream' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___CREATE_STREAM__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 26; + + /** + * The operation id for the 'Delete Stream' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DELETE_STREAM__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 27; + + /** + * The operation id for the 'Get Stream Events' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 28; + + /** + * The operation id for the 'Get Stream Stats' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 29; + + /** + * The operation id for the 'Send Event To Stream' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SEND_EVENT_TO_STREAM__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 30; + + /** + * The operation id for the 'Trucate Stream' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___TRUCATE_STREAM__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 31; + + /** + * The operation id for the 'Set Stream Properties' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_STREAM_PROPERTIES__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 32; + + /** + * The operation id for the 'Restart App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___RESTART_APP__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 33; + + /** + * The operation id for the 'Create App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___CREATE_APP__STRING_STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 34; + + /** + * The operation id for the 'Create App With Config' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 35; + + /** + * The operation id for the 'Set Dataset Properties' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_DATASET_PROPERTIES__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 36; + + /** + * The operation id for the 'Set Stream TTL' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_STREAM_TTL__STRING_STRING_INT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 37; + + /** + * The number of operations of the 'Cdap Cluster Manager' class. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER_OPERATION_COUNT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 38; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager Cdap Cluster Manager}'. + * + * + * @return the meta object for class 'Cdap Cluster Manager'. + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager + * @generated + */ + EClass getCdapClusterManager(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ManagerFactory getManagerFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl Cdap Cluster Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.ManagerPackageImpl#getCdapClusterManager() + * @generated + */ + EClass CDAP_CLUSTER_MANAGER = eINSTANCE.getCdapClusterManager(); + + } + +} //ManagerPackage diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/CdapClusterManagerImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/CdapClusterManagerImpl.java new file mode 100644 index 0000000..1ff134b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/CdapClusterManagerImpl.java @@ -0,0 +1,806 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.manager.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; +import org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl; +import org.openecomp.ncomp.cdap.CdapApi; +import org.openecomp.ncomp.cdap.CdapCluster; +import org.openecomp.ncomp.cdap.CdapPackage; +import java.lang.reflect.InvocationTargetException; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Cdap Cluster Manager'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl#getCluster Cluster}
  • + *
+ *

+ * + * @generated + */ +public class CdapClusterManagerImpl extends VirtualMachineManagerImpl implements CdapClusterManager { + /** + * The cached value of the '{@link #getCluster() Cluster}' containment reference. + * + * + * @see #getCluster() + * @generated + * @ordered + */ + protected CdapCluster cluster; + + /** + * + * + * @generated + */ + protected CdapClusterManagerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ManagerPackage.Literals.CDAP_CLUSTER_MANAGER; + } + + /** + * + * + * @generated + */ + public CdapCluster getCluster() { + return cluster; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetCluster(CdapCluster newCluster, NotificationChain msgs) { + CdapCluster oldCluster = cluster; + cluster = newCluster; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER, oldCluster, newCluster); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setCluster(CdapCluster newCluster) { + if (newCluster != cluster) { + NotificationChain msgs = null; + if (cluster != null) + msgs = ((InternalEObject)cluster).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER, null, msgs); + if (newCluster != null) + msgs = ((InternalEObject)newCluster).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER, null, msgs); + msgs = basicSetCluster(newCluster, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER, newCluster, newCluster)); + } + + /** + * + * + * @generated + */ + public String createNamespace(String namespace) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String deleteNamespace(String namespace) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String deployApp(String namespace, String jarfile) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String loadArtifact(String namespace, String artifactName, String jarfile, String version) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String deleteArtifact(String namespace, String artifactName, String artifactVersion) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String startFlow(String namespace, String appName, String flowId, String extraArgs) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String startWorker(String namespace, String appName, String workerId, String extraArgs) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String startService(String namespace, String appName, String serviceId, String extraArgs) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String startApp(String namespace, String appName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String stopApp(String namespace, String appName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String deleteApp(String namespace, String appName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String loadPreferencesApp(String namespace, String prefsFile, String appId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String loadPreferencesFlow(String namespace, String prefsFile, String appId, String flowId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String loadPreferencesNameSpace(String namespace, String prefsFile) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String setPreferencesApp(String namespace, String prefsString, String appId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String setPreferencesFlow(String namespace, String prefsString, String appId, String flowId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String setPreferencesWorker(String namespace, String prefsString, String appId, String workerId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String setPreferencesService(String namespace, String prefsString, String appId, String serviceId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String setPreferencesNameSpace(String namespace, String prefsString) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String setFlowRunTimeArgs(String namespace, String appId, String flowId, String args) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String setFlowletInstances(String namespace, String appId, String flowId, String flowletId, int nInstances) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String stopFlow(String namespace, String appId, String flowId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String stopWorker(String namespace, String appId, String workerId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String stopService(String namespace, String appId, String serviceId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String truncateDataSet(String namespace, String datasetName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String deleteDataset(String namespace, String datasetName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String createStream(String namespace, String newStreamId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String deleteStream(String namespace, String streamId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EList getStreamEvents(String namespace, String streamId, String startTime, String endTime, int limit) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EList getStreamStats(String namespace, String streamId, String startTime, String endTime, int limit) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String sendEventToStream(String namespace, String streamId, String event) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String trucateStream(String namespace, String streamId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String setStreamProperties(String namespace, String streamId, String propsFile) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String restartApp(String namespace, String appId, String progTypes) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String createApp(String namespace, String appId, String artifactName, String artifactVersion, String scope) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String createAppWithConfig(String namespace, String appId, String artifactName, String artifactVersion, String scope, String appConfig) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String setDatasetProperties(String namespace, String datasetName, String datasetProperties) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String setStreamTTL(String namespace, String streamName, int ttlSeconds) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: + return basicSetCluster(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: + return getCluster(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: + setCluster((CdapCluster)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: + setCluster((CdapCluster)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: + return cluster != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == CdapClusterConfiguration.class) { + switch (derivedFeatureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: return ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER; + default: return -1; + } + } + if (baseClass == CdapApi.class) { + switch (derivedFeatureID) { + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == CdapClusterConfiguration.class) { + switch (baseFeatureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: return ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER; + default: return -1; + } + } + if (baseClass == CdapApi.class) { + switch (baseFeatureID) { + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedOperationID(int baseOperationID, Class baseClass) { + if (baseClass == CdapClusterConfiguration.class) { + switch (baseOperationID) { + default: return -1; + } + } + if (baseClass == CdapApi.class) { + switch (baseOperationID) { + case CdapPackage.CDAP_API___CREATE_NAMESPACE__STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_NAMESPACE__STRING; + case CdapPackage.CDAP_API___DELETE_NAMESPACE__STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_NAMESPACE__STRING; + case CdapPackage.CDAP_API___DEPLOY_APP__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DEPLOY_APP__STRING_STRING; + case CdapPackage.CDAP_API___LOAD_ARTIFACT__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_ARTIFACT__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___DELETE_ARTIFACT__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_ARTIFACT__STRING_STRING_STRING; + case CdapPackage.CDAP_API___START_FLOW__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___START_FLOW__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___START_WORKER__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___START_WORKER__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___START_SERVICE__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___START_SERVICE__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___START_APP__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___START_APP__STRING_STRING; + case CdapPackage.CDAP_API___STOP_APP__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_APP__STRING_STRING; + case CdapPackage.CDAP_API___DELETE_APP__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_APP__STRING_STRING; + case CdapPackage.CDAP_API___LOAD_PREFERENCES_APP__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_APP__STRING_STRING_STRING; + case CdapPackage.CDAP_API___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_APP__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_APP__STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_NAME_SPACE__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_NAME_SPACE__STRING_STRING; + case CdapPackage.CDAP_API___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT; + case CdapPackage.CDAP_API___STOP_FLOW__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_FLOW__STRING_STRING_STRING; + case CdapPackage.CDAP_API___STOP_WORKER__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_WORKER__STRING_STRING_STRING; + case CdapPackage.CDAP_API___STOP_SERVICE__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_SERVICE__STRING_STRING_STRING; + case CdapPackage.CDAP_API___TRUNCATE_DATA_SET__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___TRUNCATE_DATA_SET__STRING_STRING; + case CdapPackage.CDAP_API___DELETE_DATASET__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_DATASET__STRING_STRING; + case CdapPackage.CDAP_API___CREATE_STREAM__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_STREAM__STRING_STRING; + case CdapPackage.CDAP_API___DELETE_STREAM__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_STREAM__STRING_STRING; + case CdapPackage.CDAP_API___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT: return ManagerPackage.CDAP_CLUSTER_MANAGER___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT; + case CdapPackage.CDAP_API___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT: return ManagerPackage.CDAP_CLUSTER_MANAGER___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT; + case CdapPackage.CDAP_API___SEND_EVENT_TO_STREAM__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SEND_EVENT_TO_STREAM__STRING_STRING_STRING; + case CdapPackage.CDAP_API___TRUCATE_STREAM__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___TRUCATE_STREAM__STRING_STRING; + case CdapPackage.CDAP_API___SET_STREAM_PROPERTIES__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_STREAM_PROPERTIES__STRING_STRING_STRING; + case CdapPackage.CDAP_API___RESTART_APP__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___RESTART_APP__STRING_STRING_STRING; + case CdapPackage.CDAP_API___CREATE_APP__STRING_STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_APP__STRING_STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_DATASET_PROPERTIES__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_DATASET_PROPERTIES__STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_STREAM_TTL__STRING_STRING_INT: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_STREAM_TTL__STRING_STRING_INT; + default: return -1; + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_NAMESPACE__STRING: + return createNamespace((String)arguments.get(0)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_NAMESPACE__STRING: + return deleteNamespace((String)arguments.get(0)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DEPLOY_APP__STRING_STRING: + return deployApp((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_ARTIFACT__STRING_STRING_STRING_STRING: + return loadArtifact((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_ARTIFACT__STRING_STRING_STRING: + return deleteArtifact((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___START_FLOW__STRING_STRING_STRING_STRING: + return startFlow((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___START_WORKER__STRING_STRING_STRING_STRING: + return startWorker((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___START_SERVICE__STRING_STRING_STRING_STRING: + return startService((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___START_APP__STRING_STRING: + return startApp((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_APP__STRING_STRING: + return stopApp((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_APP__STRING_STRING: + return deleteApp((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_APP__STRING_STRING_STRING: + return loadPreferencesApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING: + return loadPreferencesFlow((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING: + return loadPreferencesNameSpace((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_APP__STRING_STRING_STRING: + return setPreferencesApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING: + return setPreferencesFlow((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING: + return setPreferencesWorker((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING: + return setPreferencesService((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_NAME_SPACE__STRING_STRING: + return setPreferencesNameSpace((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING: + return setFlowRunTimeArgs((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT: + return setFlowletInstances((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3), (Integer)arguments.get(4)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_FLOW__STRING_STRING_STRING: + return stopFlow((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_WORKER__STRING_STRING_STRING: + return stopWorker((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_SERVICE__STRING_STRING_STRING: + return stopService((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___TRUNCATE_DATA_SET__STRING_STRING: + return truncateDataSet((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_DATASET__STRING_STRING: + return deleteDataset((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_STREAM__STRING_STRING: + return createStream((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_STREAM__STRING_STRING: + return deleteStream((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT: + return getStreamEvents((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3), (Integer)arguments.get(4)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT: + return getStreamStats((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3), (Integer)arguments.get(4)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SEND_EVENT_TO_STREAM__STRING_STRING_STRING: + return sendEventToStream((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___TRUCATE_STREAM__STRING_STRING: + return trucateStream((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_STREAM_PROPERTIES__STRING_STRING_STRING: + return setStreamProperties((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___RESTART_APP__STRING_STRING_STRING: + return restartApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_APP__STRING_STRING_STRING_STRING_STRING: + return createApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3), (String)arguments.get(4)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING: + return createAppWithConfig((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3), (String)arguments.get(4), (String)arguments.get(5)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_DATASET_PROPERTIES__STRING_STRING_STRING: + return setDatasetProperties((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_STREAM_TTL__STRING_STRING_INT: + return setStreamTTL((String)arguments.get(0), (String)arguments.get(1), (Integer)arguments.get(2)); + } + return super.eInvoke(operationID, arguments); + } + +} //CdapClusterManagerImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerFactoryImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerFactoryImpl.java new file mode 100644 index 0000000..82a0dc7 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerFactoryImpl.java @@ -0,0 +1,116 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.manager.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ManagerFactoryImpl extends EFactoryImpl implements ManagerFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ManagerFactory init() { + try { + ManagerFactory theManagerFactory = (ManagerFactory)EPackage.Registry.INSTANCE.getEFactory(ManagerPackage.eNS_URI); + if (theManagerFactory != null) { + return theManagerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ManagerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ManagerFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ManagerPackage.CDAP_CLUSTER_MANAGER: return createCdapClusterManager(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public CdapClusterManager createCdapClusterManager() { + CdapClusterManagerImpl cdapClusterManager = new CdapClusterManagerImpl(); + return cdapClusterManager; + } + + /** + * + * + * @generated + */ + public ManagerPackage getManagerPackage() { + return (ManagerPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ManagerPackage getPackage() { + return ManagerPackage.eINSTANCE; + } + +} //ManagerFactoryImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerPackageImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerPackageImpl.java new file mode 100644 index 0000000..73e9d68 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerPackageImpl.java @@ -0,0 +1,199 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.manager.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; +import org.openecomp.ncomp.cdap.CdapPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ManagerPackageImpl extends EPackageImpl implements ManagerPackage { + /** + * + * + * @generated + */ + private EClass cdapClusterManagerEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage#eNS_URI + * @see #init() + * @generated + */ + private ManagerPackageImpl() { + super(eNS_URI, ManagerFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ManagerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ManagerPackage init() { + if (isInited) return (ManagerPackage)EPackage.Registry.INSTANCE.getEPackage(ManagerPackage.eNS_URI); + + // Obtain or create and register package + ManagerPackageImpl theManagerPackage = (ManagerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ManagerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ManagerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + VmmanagerPackage.eINSTANCE.eClass(); + ServicePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theManagerPackage.createPackageContents(); + + // Initialize created meta-data + theManagerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theManagerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ManagerPackage.eNS_URI, theManagerPackage); + return theManagerPackage; + } + + /** + * + * + * @generated + */ + public EClass getCdapClusterManager() { + return cdapClusterManagerEClass; + } + + /** + * + * + * @generated + */ + public ManagerFactory getManagerFactory() { + return (ManagerFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + cdapClusterManagerEClass = createEClass(CDAP_CLUSTER_MANAGER); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + VmmanagerPackage theVmmanagerPackage = (VmmanagerPackage)EPackage.Registry.INSTANCE.getEPackage(VmmanagerPackage.eNS_URI); + ServicePackage theServicePackage = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + CdapPackage theCdapPackage = (CdapPackage)EPackage.Registry.INSTANCE.getEPackage(CdapPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + cdapClusterManagerEClass.getESuperTypes().add(theVmmanagerPackage.getVirtualMachineManager()); + cdapClusterManagerEClass.getESuperTypes().add(theServicePackage.getCdapClusterConfiguration()); + cdapClusterManagerEClass.getESuperTypes().add(theCdapPackage.getCdapApi()); + + // Initialize classes, features, and operations; add parameters + initEClass(cdapClusterManagerEClass, CdapClusterManager.class, "CdapClusterManager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //ManagerPackageImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerAdapterFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerAdapterFactory.java new file mode 100644 index 0000000..2cbf36c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerAdapterFactory.java @@ -0,0 +1,277 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.*; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.ncomp.cdap.CdapApi; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage + * @generated + */ +public class ManagerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ManagerAdapterFactory() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ManagerSwitch modelSwitch = + new ManagerSwitch() { + @Override + public Adapter caseCdapClusterManager(CdapClusterManager object) { + return createCdapClusterManagerAdapter(); + } + @Override + public Adapter caseDcaeManager(DcaeManager object) { + return createDcaeManagerAdapter(); + } + @Override + public Adapter caseSouthBoundApi(SouthBoundApi object) { + return createSouthBoundApiAdapter(); + } + @Override + public Adapter caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return createSouthBoundApiWithProxyAdapter(); + } + @Override + public Adapter caseAbstractManagementServer(AbstractManagementServer object) { + return createAbstractManagementServerAdapter(); + } + @Override + public Adapter caseVirtualMachineManager(VirtualMachineManager object) { + return createVirtualMachineManagerAdapter(); + } + @Override + public Adapter caseCdapClusterConfiguration(CdapClusterConfiguration object) { + return createCdapClusterConfigurationAdapter(); + } + @Override + public Adapter caseCdapApi(CdapApi object) { + return createCdapApiAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager Cdap Cluster Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager + * @generated + */ + public Adapter createCdapClusterManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.manager.DcaeManager Dcae Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager + * @generated + */ + public Adapter createDcaeManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApi South Bound Api}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApi + * @generated + */ + public Adapter createSouthBoundApiAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy South Bound Api With Proxy}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy + * @generated + */ + public Adapter createSouthBoundApiWithProxyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer Abstract Management Server}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer + * @generated + */ + public Adapter createAbstractManagementServerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager Virtual Machine Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager + * @generated + */ + public Adapter createVirtualMachineManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration Cdap Cluster Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration + * @generated + */ + public Adapter createCdapClusterConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.cdap.CdapApi Api}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.cdap.CdapApi + * @generated + */ + public Adapter createCdapApiAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ManagerAdapterFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerSwitch.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerSwitch.java new file mode 100644 index 0000000..72c1903 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerSwitch.java @@ -0,0 +1,253 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.*; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.ncomp.cdap.CdapApi; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage + * @generated + */ +public class ManagerSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ManagerSwitch() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER: { + CdapClusterManager cdapClusterManager = (CdapClusterManager)theEObject; + T result = caseCdapClusterManager(cdapClusterManager); + if (result == null) result = caseVirtualMachineManager(cdapClusterManager); + if (result == null) result = caseCdapClusterConfiguration(cdapClusterManager); + if (result == null) result = caseCdapApi(cdapClusterManager); + if (result == null) result = caseDcaeManager(cdapClusterManager); + if (result == null) result = caseAbstractManagementServer(cdapClusterManager); + if (result == null) result = caseSouthBoundApiWithProxy(cdapClusterManager); + if (result == null) result = caseSouthBoundApi(cdapClusterManager); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Cdap Cluster Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Cdap Cluster Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapClusterManager(CdapClusterManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeManager(DcaeManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'South Bound Api'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'South Bound Api'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApi(SouthBoundApi object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'South Bound Api With Proxy'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'South Bound Api With Proxy'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Abstract Management Server'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Abstract Management Server'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAbstractManagementServer(AbstractManagementServer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineManager(VirtualMachineManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Cdap Cluster Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Cdap Cluster Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapClusterConfiguration(CdapClusterConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Api'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Api'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapApi(CdapApi object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ManagerSwitch diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterConfiguration.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterConfiguration.java new file mode 100644 index 0000000..41d52c0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterConfiguration.java @@ -0,0 +1,74 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.service; + +import org.openecomp.ncomp.cdap.CdapCluster; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Cdap Cluster Configuration'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration#getCluster Cluster}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage#getCdapClusterConfiguration() + * @model + * @generated + */ +public interface CdapClusterConfiguration extends EObject { + /** + * Returns the value of the 'Cluster' containment reference. + * + *

+ * If the meaning of the 'Cluster' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Cluster' containment reference. + * @see #setCluster(CdapCluster) + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage#getCdapClusterConfiguration_Cluster() + * @model containment="true" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + CdapCluster getCluster(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration#getCluster Cluster}' containment reference. + * + * + * @param value the new value of the 'Cluster' containment reference. + * @see #getCluster() + * @generated + */ + void setCluster(CdapCluster value); + +} // CdapClusterConfiguration diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterService.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterService.java new file mode 100644 index 0000000..d167a7b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterService.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; + +/** + * + * A representation of the model object 'Cdap Cluster Service'. + * + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage#getCdapClusterService() + * @model + * @generated + */ +public interface CdapClusterService extends VirtualMachineService { +} // CdapClusterService diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterServiceInstance.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterServiceInstance.java new file mode 100644 index 0000000..f1f15a6 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterServiceInstance.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +/** + * + * A representation of the model object 'Cdap Cluster Service Instance'. + * + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage#getCdapClusterServiceInstance() + * @model + * @generated + */ +public interface CdapClusterServiceInstance extends VirtualMachineServiceInstance, CdapClusterConfiguration { +} // CdapClusterServiceInstance diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServiceFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServiceFactory.java new file mode 100644 index 0000000..7799fae --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServiceFactory.java @@ -0,0 +1,81 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.service; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage + * @generated + */ +public interface ServiceFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ServiceFactory eINSTANCE = org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServiceFactoryImpl.init(); + + /** + * Returns a new object of class 'Cdap Cluster Service'. + * + * + * @return a new object of class 'Cdap Cluster Service'. + * @generated + */ + CdapClusterService createCdapClusterService(); + + /** + * Returns a new object of class 'Cdap Cluster Service Instance'. + * + * + * @return a new object of class 'Cdap Cluster Service Instance'. + * @generated + */ + CdapClusterServiceInstance createCdapClusterServiceInstance(); + + /** + * Returns a new object of class 'Cdap Cluster Configuration'. + * + * + * @return a new object of class 'Cdap Cluster Configuration'. + * @generated + */ + CdapClusterConfiguration createCdapClusterConfiguration(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ServicePackage getServicePackage(); + +} //ServiceFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServicePackage.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServicePackage.java new file mode 100644 index 0000000..fe0d0dc --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServicePackage.java @@ -0,0 +1,740 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.service; + +import org.openecomp.dcae.controller.service.vm.VmPackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServiceFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.cdap.cluster'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org'" + * @generated + */ +public interface ServicePackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "service"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.cdap.cluster.service"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "service"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ServicePackage eINSTANCE = org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl Cdap Cluster Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterService() + * @generated + */ + int CDAP_CLUSTER_SERVICE = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__NAME = VmPackage.VIRTUAL_MACHINE_SERVICE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__LAST_POLLED = VmPackage.VIRTUAL_MACHINE_SERVICE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__LAST_CHANGED = VmPackage.VIRTUAL_MACHINE_SERVICE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__CREATED = VmPackage.VIRTUAL_MACHINE_SERVICE__CREATED; + + /** + * The feature id for the 'Instances' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__INSTANCES = VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__MANAGER_PORT_NUMBER = VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER; + + /** + * The number of structural features of the 'Cdap Cluster Service' class. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_FEATURE_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_FEATURE_COUNT + 0; + + /** + * The operation id for the 'Deploy' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___DEPLOY__STRING_STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___DEPLOY__STRING_STRING; + + /** + * The operation id for the 'Undeploy' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___UNDEPLOY__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___UNDEPLOY__STRING; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___TEST__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___TEST__STRING; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___SUSPEND__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___SUSPEND__STRING; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___RESUME__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___RESUME__STRING; + + /** + * The operation id for the 'Push Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Poll Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___POLL_MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___POLL_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Operation' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT = VmPackage.VIRTUAL_MACHINE_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT; + + /** + * The operation id for the 'Update Configuration From Policy' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING; + + /** + * The operation id for the 'Run Health Tests' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___RUN_HEALTH_TESTS = VmPackage.VIRTUAL_MACHINE_SERVICE___RUN_HEALTH_TESTS; + + /** + * The operation id for the 'Update Deployment Status' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___UPDATE_DEPLOYMENT_STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS; + + /** + * The number of operations of the 'Cdap Cluster Service' class. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_OPERATION_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceInstanceImpl Cdap Cluster Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterServiceInstance() + * @generated + */ + int CDAP_CLUSTER_SERVICE_INSTANCE = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__NAME = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__LAST_POLLED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__LAST_CHANGED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CREATED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CREATED; + + /** + * The feature id for the 'Service Container' reference. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__SERVICE_CONTAINER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_CONTAINER; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STATUS; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__INPUT_STREAMS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__OUTPUT_STREAMS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OUTPUT_STREAMS; + + /** + * The feature id for the 'Last Health Test' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__LAST_HEALTH_TEST = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_HEALTH_TEST; + + /** + * The feature id for the 'Health Test Status' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__HEALTH_TEST_STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__HEALTH_TEST_STATUS; + + /** + * The feature id for the 'Health Test Message Code' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE; + + /** + * The feature id for the 'Configuration' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CONFIGURATION = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION; + + /** + * The feature id for the 'Location' reference. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__LOCATION = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION; + + /** + * The feature id for the 'Vm Type' reference. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__VM_TYPE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE; + + /** + * The feature id for the 'Users' reference list. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__USERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS; + + /** + * The feature id for the 'Admin Users' reference list. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__ADMIN_USERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS; + + /** + * The feature id for the 'Application Ids' attribute list. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__APPLICATION_IDS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS; + + /** + * The feature id for the 'Admin Id' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__ADMIN_ID = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID; + + /** + * The feature id for the 'Number Of Servers' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__NUMBER_OF_SERVERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS; + + /** + * The feature id for the 'Availability Zone' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__AVAILABILITY_ZONE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__MANAGER_PORT_NUMBER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER; + + /** + * The feature id for the 'Servers' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__SERVERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS; + + /** + * The feature id for the 'Leader Server' reference. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__LEADER_SERVER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER; + + /** + * The feature id for the 'Service' container reference. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__SERVICE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE; + + /** + * The feature id for the 'Ieds Admin' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__IEDS_ADMIN = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN; + + /** + * The feature id for the 'Chef User' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CHEF_USER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER; + + /** + * The feature id for the 'Chef Org' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CHEF_ORG = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG; + + /** + * The feature id for the 'Chef Topology' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CHEF_TOPOLOGY = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY; + + /** + * The feature id for the 'Openstack Flavor' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__OPENSTACK_FLAVOR = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR; + + /** + * The feature id for the 'Service Fqdn' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__SERVICE_FQDN = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN; + + /** + * The feature id for the 'Deployment Timeout Minutes' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES; + + /** + * The feature id for the 'Steps' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__STEPS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS; + + /** + * The feature id for the 'Cluster' containment reference. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Cdap Cluster Service Instance' class. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE_FEATURE_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Cdap Cluster Service Instance' class. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE_OPERATION_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterConfigurationImpl Cdap Cluster Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterConfigurationImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterConfiguration() + * @generated + */ + int CDAP_CLUSTER_CONFIGURATION = 2; + + /** + * The feature id for the 'Cluster' containment reference. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_CONFIGURATION__CLUSTER = 0; + + /** + * The number of structural features of the 'Cdap Cluster Configuration' class. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_CONFIGURATION_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Cdap Cluster Configuration' class. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_CONFIGURATION_OPERATION_COUNT = 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService Cdap Cluster Service}'. + * + * + * @return the meta object for class 'Cdap Cluster Service'. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService + * @generated + */ + EClass getCdapClusterService(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance Cdap Cluster Service Instance}'. + * + * + * @return the meta object for class 'Cdap Cluster Service Instance'. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance + * @generated + */ + EClass getCdapClusterServiceInstance(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration Cdap Cluster Configuration}'. + * + * + * @return the meta object for class 'Cdap Cluster Configuration'. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration + * @generated + */ + EClass getCdapClusterConfiguration(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration#getCluster Cluster}'. + * + * + * @return the meta object for the containment reference 'Cluster'. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration#getCluster() + * @see #getCdapClusterConfiguration() + * @generated + */ + EReference getCdapClusterConfiguration_Cluster(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ServiceFactory getServiceFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl Cdap Cluster Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterService() + * @generated + */ + EClass CDAP_CLUSTER_SERVICE = eINSTANCE.getCdapClusterService(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceInstanceImpl Cdap Cluster Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterServiceInstance() + * @generated + */ + EClass CDAP_CLUSTER_SERVICE_INSTANCE = eINSTANCE.getCdapClusterServiceInstance(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterConfigurationImpl Cdap Cluster Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterConfigurationImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterConfiguration() + * @generated + */ + EClass CDAP_CLUSTER_CONFIGURATION = eINSTANCE.getCdapClusterConfiguration(); + + /** + * The meta object literal for the 'Cluster' containment reference feature. + * + * + * @generated + */ + EReference CDAP_CLUSTER_CONFIGURATION__CLUSTER = eINSTANCE.getCdapClusterConfiguration_Cluster(); + + } + +} //ServicePackage diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterConfigurationImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterConfigurationImpl.java new file mode 100644 index 0000000..53ae6de --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterConfigurationImpl.java @@ -0,0 +1,198 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.service.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; + +import org.openecomp.ncomp.cdap.CdapCluster; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Cdap Cluster Configuration'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterConfigurationImpl#getCluster Cluster}
  • + *
+ *

+ * + * @generated + */ +public class CdapClusterConfigurationImpl extends MinimalEObjectImpl.Container implements CdapClusterConfiguration { + /** + * The cached value of the '{@link #getCluster() Cluster}' containment reference. + * + * + * @see #getCluster() + * @generated + * @ordered + */ + protected CdapCluster cluster; + + /** + * + * + * @generated + */ + protected CdapClusterConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.CDAP_CLUSTER_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public CdapCluster getCluster() { + return cluster; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetCluster(CdapCluster newCluster, NotificationChain msgs) { + CdapCluster oldCluster = cluster; + cluster = newCluster; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER, oldCluster, newCluster); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setCluster(CdapCluster newCluster) { + if (newCluster != cluster) { + NotificationChain msgs = null; + if (cluster != null) + msgs = ((InternalEObject)cluster).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER, null, msgs); + if (newCluster != null) + msgs = ((InternalEObject)newCluster).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER, null, msgs); + msgs = basicSetCluster(newCluster, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER, newCluster, newCluster)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: + return basicSetCluster(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: + return getCluster(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: + setCluster((CdapCluster)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: + setCluster((CdapCluster)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: + return cluster != null; + } + return super.eIsSet(featureID); + } + +} //CdapClusterConfigurationImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceImpl.java new file mode 100644 index 0000000..2021586 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.service.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; + +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Cdap Cluster Service'. + * + *

+ *

+ * + * @generated + */ +public class CdapClusterServiceImpl extends VirtualMachineServiceImpl implements CdapClusterService { + /** + * + * + * @generated + */ + protected CdapClusterServiceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.CDAP_CLUSTER_SERVICE; + } + +} //CdapClusterServiceImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceInstanceImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceInstanceImpl.java new file mode 100644 index 0000000..7e31876 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceInstanceImpl.java @@ -0,0 +1,232 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.service.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; + +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl; + +import org.openecomp.ncomp.cdap.CdapCluster; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Cdap Cluster Service Instance'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceInstanceImpl#getCluster Cluster}
  • + *
+ *

+ * + * @generated + */ +public class CdapClusterServiceInstanceImpl extends VirtualMachineServiceInstanceImpl implements CdapClusterServiceInstance { + /** + * The cached value of the '{@link #getCluster() Cluster}' containment reference. + * + * + * @see #getCluster() + * @generated + * @ordered + */ + protected CdapCluster cluster; + + /** + * + * + * @generated + */ + protected CdapClusterServiceInstanceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.CDAP_CLUSTER_SERVICE_INSTANCE; + } + + /** + * + * + * @generated + */ + public CdapCluster getCluster() { + return cluster; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetCluster(CdapCluster newCluster, NotificationChain msgs) { + CdapCluster oldCluster = cluster; + cluster = newCluster; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER, oldCluster, newCluster); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setCluster(CdapCluster newCluster) { + if (newCluster != cluster) { + NotificationChain msgs = null; + if (cluster != null) + msgs = ((InternalEObject)cluster).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER, null, msgs); + if (newCluster != null) + msgs = ((InternalEObject)newCluster).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER, null, msgs); + msgs = basicSetCluster(newCluster, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER, newCluster, newCluster)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: + return basicSetCluster(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: + return getCluster(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: + setCluster((CdapCluster)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: + setCluster((CdapCluster)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: + return cluster != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == CdapClusterConfiguration.class) { + switch (derivedFeatureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: return ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == CdapClusterConfiguration.class) { + switch (baseFeatureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: return ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} //CdapClusterServiceInstanceImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServiceFactoryImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServiceFactoryImpl.java new file mode 100644 index 0000000..fee555f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServiceFactoryImpl.java @@ -0,0 +1,138 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.service.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ServiceFactoryImpl extends EFactoryImpl implements ServiceFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ServiceFactory init() { + try { + ServiceFactory theServiceFactory = (ServiceFactory)EPackage.Registry.INSTANCE.getEFactory(ServicePackage.eNS_URI); + if (theServiceFactory != null) { + return theServiceFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ServiceFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ServiceFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ServicePackage.CDAP_CLUSTER_SERVICE: return createCdapClusterService(); + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE: return createCdapClusterServiceInstance(); + case ServicePackage.CDAP_CLUSTER_CONFIGURATION: return createCdapClusterConfiguration(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public CdapClusterService createCdapClusterService() { + CdapClusterServiceImpl cdapClusterService = new CdapClusterServiceImpl(); + return cdapClusterService; + } + + /** + * + * + * @generated + */ + public CdapClusterServiceInstance createCdapClusterServiceInstance() { + CdapClusterServiceInstanceImpl cdapClusterServiceInstance = new CdapClusterServiceInstanceImpl(); + return cdapClusterServiceInstance; + } + + /** + * + * + * @generated + */ + public CdapClusterConfiguration createCdapClusterConfiguration() { + CdapClusterConfigurationImpl cdapClusterConfiguration = new CdapClusterConfigurationImpl(); + return cdapClusterConfiguration; + } + + /** + * + * + * @generated + */ + public ServicePackage getServicePackage() { + return (ServicePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ServicePackage getPackage() { + return ServicePackage.eINSTANCE; + } + +} //ServiceFactoryImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServicePackageImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServicePackageImpl.java new file mode 100644 index 0000000..f39f5c0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServicePackageImpl.java @@ -0,0 +1,289 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.service.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServiceFactory; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.openecomp.ncomp.cdap.CdapPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ServicePackageImpl extends EPackageImpl implements ServicePackage { + /** + * + * + * @generated + */ + private EClass cdapClusterServiceEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapClusterServiceInstanceEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapClusterConfigurationEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage#eNS_URI + * @see #init() + * @generated + */ + private ServicePackageImpl() { + super(eNS_URI, ServiceFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ServicePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ServicePackage init() { + if (isInited) return (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + + // Obtain or create and register package + ServicePackageImpl theServicePackage = (ServicePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ServicePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ServicePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + CdapPackage.eINSTANCE.eClass(); + VmPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theServicePackage.createPackageContents(); + + // Initialize created meta-data + theServicePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theServicePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ServicePackage.eNS_URI, theServicePackage); + return theServicePackage; + } + + /** + * + * + * @generated + */ + public EClass getCdapClusterService() { + return cdapClusterServiceEClass; + } + + /** + * + * + * @generated + */ + public EClass getCdapClusterServiceInstance() { + return cdapClusterServiceInstanceEClass; + } + + /** + * + * + * @generated + */ + public EClass getCdapClusterConfiguration() { + return cdapClusterConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EReference getCdapClusterConfiguration_Cluster() { + return (EReference)cdapClusterConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public ServiceFactory getServiceFactory() { + return (ServiceFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + cdapClusterServiceEClass = createEClass(CDAP_CLUSTER_SERVICE); + + cdapClusterServiceInstanceEClass = createEClass(CDAP_CLUSTER_SERVICE_INSTANCE); + + cdapClusterConfigurationEClass = createEClass(CDAP_CLUSTER_CONFIGURATION); + createEReference(cdapClusterConfigurationEClass, CDAP_CLUSTER_CONFIGURATION__CLUSTER); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + VmPackage theVmPackage = (VmPackage)EPackage.Registry.INSTANCE.getEPackage(VmPackage.eNS_URI); + CdapPackage theCdapPackage = (CdapPackage)EPackage.Registry.INSTANCE.getEPackage(CdapPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + cdapClusterServiceEClass.getESuperTypes().add(theVmPackage.getVirtualMachineService()); + cdapClusterServiceInstanceEClass.getESuperTypes().add(theVmPackage.getVirtualMachineServiceInstance()); + cdapClusterServiceInstanceEClass.getESuperTypes().add(this.getCdapClusterConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(cdapClusterServiceEClass, CdapClusterService.class, "CdapClusterService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(cdapClusterServiceInstanceEClass, CdapClusterServiceInstance.class, "CdapClusterServiceInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(cdapClusterConfigurationEClass, CdapClusterConfiguration.class, "CdapClusterConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCdapClusterConfiguration_Cluster(), theCdapPackage.getCdapCluster(), null, "cluster", null, 0, 1, CdapClusterConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + // http://openecomp.org + createEcompAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "ecomp", "http://openecomp.org" + }); + } + + /** + * Initializes the annotations for http://openecomp.org. + * + * + * @generated + */ + protected void createEcompAnnotations() { + String source = "http://openecomp.org"; + addAnnotation + (getCdapClusterConfiguration_Cluster(), + source, + new String[] { + "type", "configuration" + }); + } + +} //ServicePackageImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceAdapterFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceAdapterFactory.java new file mode 100644 index 0000000..1e8146a --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceAdapterFactory.java @@ -0,0 +1,294 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.*; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage + * @generated + */ +public class ServiceAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ServiceAdapterFactory() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ServiceSwitch modelSwitch = + new ServiceSwitch() { + @Override + public Adapter caseCdapClusterService(CdapClusterService object) { + return createCdapClusterServiceAdapter(); + } + @Override + public Adapter caseCdapClusterServiceInstance(CdapClusterServiceInstance object) { + return createCdapClusterServiceInstanceAdapter(); + } + @Override + public Adapter caseCdapClusterConfiguration(CdapClusterConfiguration object) { + return createCdapClusterConfigurationAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseDcaeService(DcaeService object) { + return createDcaeServiceAdapter(); + } + @Override + public Adapter caseVirtualMachineService(VirtualMachineService object) { + return createVirtualMachineServiceAdapter(); + } + @Override + public Adapter caseDcaeServiceInstance(DcaeServiceInstance object) { + return createDcaeServiceInstanceAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceConfiguration(VirtualMachineServiceConfiguration object) { + return createVirtualMachineServiceConfigurationAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceInstance(VirtualMachineServiceInstance object) { + return createVirtualMachineServiceInstanceAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService Cdap Cluster Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService + * @generated + */ + public Adapter createCdapClusterServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance Cdap Cluster Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance + * @generated + */ + public Adapter createCdapClusterServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration Cdap Cluster Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration + * @generated + */ + public Adapter createCdapClusterConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeService Dcae Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeService + * @generated + */ + public Adapter createDcaeServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService Virtual Machine Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService + * @generated + */ + public Adapter createVirtualMachineServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance Dcae Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance + * @generated + */ + public Adapter createDcaeServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration Virtual Machine Service Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration + * @generated + */ + public Adapter createVirtualMachineServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance Virtual Machine Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance + * @generated + */ + public Adapter createVirtualMachineServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ServiceAdapterFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceSwitch.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceSwitch.java new file mode 100644 index 0000000..3d25b7c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceSwitch.java @@ -0,0 +1,280 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.cluster.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.*; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage + * @generated + */ +public class ServiceSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ServiceSwitch() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ServicePackage.CDAP_CLUSTER_SERVICE: { + CdapClusterService cdapClusterService = (CdapClusterService)theEObject; + T result = caseCdapClusterService(cdapClusterService); + if (result == null) result = caseVirtualMachineService(cdapClusterService); + if (result == null) result = caseDcaeService(cdapClusterService); + if (result == null) result = caseNamedEntity(cdapClusterService); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE: { + CdapClusterServiceInstance cdapClusterServiceInstance = (CdapClusterServiceInstance)theEObject; + T result = caseCdapClusterServiceInstance(cdapClusterServiceInstance); + if (result == null) result = caseVirtualMachineServiceInstance(cdapClusterServiceInstance); + if (result == null) result = caseCdapClusterConfiguration(cdapClusterServiceInstance); + if (result == null) result = caseDcaeServiceInstance(cdapClusterServiceInstance); + if (result == null) result = caseVirtualMachineServiceConfiguration(cdapClusterServiceInstance); + if (result == null) result = caseNamedEntity(cdapClusterServiceInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.CDAP_CLUSTER_CONFIGURATION: { + CdapClusterConfiguration cdapClusterConfiguration = (CdapClusterConfiguration)theEObject; + T result = caseCdapClusterConfiguration(cdapClusterConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Cdap Cluster Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Cdap Cluster Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapClusterService(CdapClusterService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Cdap Cluster Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Cdap Cluster Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapClusterServiceInstance(CdapClusterServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Cdap Cluster Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Cdap Cluster Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapClusterConfiguration(CdapClusterConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeService(DcaeService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineService(VirtualMachineService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceInstance(DcaeServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineServiceConfiguration(VirtualMachineServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineServiceInstance(VirtualMachineServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ServiceSwitch diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/manager.xcore b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/manager.xcore new file mode 100644 index 0000000..0ab71f6 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/manager.xcore @@ -0,0 +1,33 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen") + + +package org.openecomp.dcae.controller.service.cdap.cluster.manager + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager +import org.openecomp.ncomp.cdap.CdapApi + +// state of manager +class CdapClusterManager extends VirtualMachineManager, CdapClusterConfiguration, CdapApi { +} \ No newline at end of file diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/service.xcore b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/service.xcore new file mode 100644 index 0000000..0b3c18c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/service.xcore @@ -0,0 +1,46 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen") + +package org.openecomp.dcae.controller.service.cdap.cluster.service + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance +import org.openecomp.ncomp.cdap.CdapCluster + +annotation "http://openecomp.org" as ecomp + +class CdapClusterService extends VirtualMachineService { +} + +// state in the controller +class CdapClusterServiceInstance extends VirtualMachineServiceInstance, CdapClusterConfiguration { +} + +// state in both controller and manager +class CdapClusterConfiguration { + @ecomp(^type = "configuration") + contains CdapCluster cluster +} + + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/pom.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/pom.xml new file mode 100644 index 0000000..a368d1e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/pom.xml @@ -0,0 +1,82 @@ + + 4.0.0 + + org.openecomp.dcae.controller + dcae-controller-service-cdap-cluster + 0.1.0-SNAPSHOT + pom + dcae-controller-service-cdap-cluster + + + UTF-8 + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + + dcae-controller-service-cdap-cluster-manager + dcae-controller-service-cdap-cluster-model + + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.classpath b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.gitignore b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.project b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.project new file mode 100644 index 0000000..cca7c12 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.project @@ -0,0 +1,34 @@ + + + dcae-controller-service-cdap-model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/LICENSE.txt b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/META-INF/MANIFEST.MF b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..067dcd0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/META-INF/MANIFEST.MF @@ -0,0 +1,30 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: dcae-controller-service-cdap-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.openecomp.dcae.controller.service.cdap, + org.openecomp.dcae.controller.service.cdap.impl, + org.openecomp.dcae.controller.service.cdap.util, + org.openecomp.dcae.controller.service.cdapmanager, + org.openecomp.dcae.controller.service.cdapmanager.impl, + org.openecomp.dcae.controller.service.cdapmanager.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + ncomp-openstack-model;visibility:=reexport, + ncomp-sirius-manager-agent-model;visibility:=reexport, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + dcae-controller-core-model;bundle-version="0.1.0";visibility:=reexport, + dcae-controller-service-vm-model;visibility:=reexport, + ncomp-cdap-model;bundle-version="0.1.0";visibility:=reexport, + dcae-controller-service-cdap-cluster-model;bundle-version="0.1.0";visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/build.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/build.properties @@ -0,0 +1,11 @@ +# + +bin.includes = .,\ + src/main/xcore/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/xcore-gen/,\ + src/main/xcore/ +output.. = target/classes/ diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/plugin.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/plugin.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/plugin.xml new file mode 100644 index 0000000..ec82db2 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/plugin.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/pom.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/pom.xml new file mode 100644 index 0000000..25be890 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/pom.xml @@ -0,0 +1,35 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-cdap-model + + org.openecomp.ncomp.maven + ncomp-maven-xcore + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore + + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + ${project.version} + + + org.openecomp.ncomp.cdap + ncomp-cdap-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-core-model + ${project.version} + + + org.openecomp.dcae.controller + + dcae-controller-service-cdap-cluster-model + + ${project.version} + + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapApplication.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapApplication.java new file mode 100644 index 0000000..8ba630c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapApplication.java @@ -0,0 +1,152 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Application'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getJarFile Jar File}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getArtifactName Artifact Name}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getVersion Version}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getAppConfigFileContent App Config File Content}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapApplication() + * @model + * @generated + */ +public interface CdapApplication extends NamedEntity { + + /** + * Returns the value of the 'Jar File' attribute. + * + *

+ * If the meaning of the 'Jar File' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Jar File' attribute. + * @see #setJarFile(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapApplication_JarFile() + * @model unique="false" + * @generated + */ + String getJarFile(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getJarFile Jar File}' attribute. + * + * + * @param value the new value of the 'Jar File' attribute. + * @see #getJarFile() + * @generated + */ + void setJarFile(String value); + + /** + * Returns the value of the 'Artifact Name' attribute. + * + *

+ * If the meaning of the 'Artifact Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Artifact Name' attribute. + * @see #setArtifactName(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapApplication_ArtifactName() + * @model unique="false" + * @generated + */ + String getArtifactName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getArtifactName Artifact Name}' attribute. + * + * + * @param value the new value of the 'Artifact Name' attribute. + * @see #getArtifactName() + * @generated + */ + void setArtifactName(String value); + + /** + * Returns the value of the 'Version' attribute. + * + *

+ * If the meaning of the 'Version' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Version' attribute. + * @see #setVersion(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapApplication_Version() + * @model unique="false" + * @generated + */ + String getVersion(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getVersion Version}' attribute. + * + * + * @param value the new value of the 'Version' attribute. + * @see #getVersion() + * @generated + */ + void setVersion(String value); + + /** + * Returns the value of the 'App Config File Content' attribute. + * + *

+ * If the meaning of the 'App Config File Content' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'App Config File Content' attribute. + * @see #setAppConfigFileContent(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapApplication_AppConfigFileContent() + * @model unique="false" + * @generated + */ + String getAppConfigFileContent(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getAppConfigFileContent App Config File Content}' attribute. + * + * + * @param value the new value of the 'App Config File Content' attribute. + * @see #getAppConfigFileContent() + * @generated + */ + void setAppConfigFileContent(String value); +} // CdapApplication diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapArtifact.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapArtifact.java new file mode 100644 index 0000000..f7a72e4 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapArtifact.java @@ -0,0 +1,98 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Artifact'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapArtifact#getJarFile Jar File}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapArtifact#getVersion Version}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapArtifact() + * @model + * @generated + */ +public interface CdapArtifact extends NamedEntity { + /** + * Returns the value of the 'Jar File' attribute. + * + *

+ * If the meaning of the 'Jar File' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Jar File' attribute. + * @see #setJarFile(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapArtifact_JarFile() + * @model unique="false" + * @generated + */ + String getJarFile(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapArtifact#getJarFile Jar File}' attribute. + * + * + * @param value the new value of the 'Jar File' attribute. + * @see #getJarFile() + * @generated + */ + void setJarFile(String value); + + /** + * Returns the value of the 'Version' attribute. + * + *

+ * If the meaning of the 'Version' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Version' attribute. + * @see #setVersion(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapArtifact_Version() + * @model unique="false" + * @generated + */ + String getVersion(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapArtifact#getVersion Version}' attribute. + * + * + * @param value the new value of the 'Version' attribute. + * @see #getVersion() + * @generated + */ + void setVersion(String value); + +} // CdapArtifact diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapArtifacts.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapArtifacts.java new file mode 100644 index 0000000..ff35cc8 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapArtifacts.java @@ -0,0 +1,98 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Artifacts'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapArtifacts#getJarFile Jar File}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapArtifacts#getVersion Version}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapArtifacts() + * @model + * @generated + */ +public interface CdapArtifacts extends NamedEntity { + + /** + * Returns the value of the 'Jar File' attribute. + * + *

+ * If the meaning of the 'Jar File' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Jar File' attribute. + * @see #setJarFile(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapArtifacts_JarFile() + * @model unique="false" + * @generated + */ + String getJarFile(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapArtifacts#getJarFile Jar File}' attribute. + * + * + * @param value the new value of the 'Jar File' attribute. + * @see #getJarFile() + * @generated + */ + void setJarFile(String value); + + /** + * Returns the value of the 'Version' attribute. + * + *

+ * If the meaning of the 'Version' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Version' attribute. + * @see #setVersion(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapArtifacts_Version() + * @model unique="false" + * @generated + */ + String getVersion(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapArtifacts#getVersion Version}' attribute. + * + * + * @param value the new value of the 'Version' attribute. + * @see #getVersion() + * @generated + */ + void setVersion(String value); +} // CdapArtifacts diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapFactory.java new file mode 100644 index 0000000..b15b7d5 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapFactory.java @@ -0,0 +1,117 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage + * @generated + */ +public interface CdapFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + CdapFactory eINSTANCE = org.openecomp.dcae.controller.service.cdap.impl.CdapFactoryImpl.init(); + + /** + * Returns a new object of class 'Service'. + * + * + * @return a new object of class 'Service'. + * @generated + */ + CdapService createCdapService(); + + /** + * Returns a new object of class 'Service Instance'. + * + * + * @return a new object of class 'Service Instance'. + * @generated + */ + CdapServiceInstance createCdapServiceInstance(); + + /** + * Returns a new object of class 'Application'. + * + * + * @return a new object of class 'Application'. + * @generated + */ + CdapApplication createCdapApplication(); + + /** + * Returns a new object of class 'Artifact'. + * + * + * @return a new object of class 'Artifact'. + * @generated + */ + CdapArtifact createCdapArtifact(); + + /** + * Returns a new object of class 'Service Instance Configuration'. + * + * + * @return a new object of class 'Service Instance Configuration'. + * @generated + */ + CdapServiceInstanceConfiguration createCdapServiceInstanceConfiguration(); + + /** + * Returns a new object of class 'Internal Application Configuration'. + * + * + * @return a new object of class 'Internal Application Configuration'. + * @generated + */ + CdapInternalApplicationConfiguration createCdapInternalApplicationConfiguration(); + + /** + * Returns a new object of class 'Service Descriptor'. + * + * + * @return a new object of class 'Service Descriptor'. + * @generated + */ + CdapServiceDescriptor createCdapServiceDescriptor(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + CdapPackage getCdapPackage(); + +} //CdapFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapInternalApplicationConfiguration.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapInternalApplicationConfiguration.java new file mode 100644 index 0000000..51b9b5c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapInternalApplicationConfiguration.java @@ -0,0 +1,151 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap; + +import org.openecomp.ncomp.cdap.CdapEntityWithPreferences; +import org.openecomp.ncomp.cdap.CdapKeyPair; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Internal Application Configuration'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getConfig Config}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getPreferences Preferences}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getApps Apps}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getWorkers Workers}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getFlows Flows}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getServices Services}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapInternalApplicationConfiguration() + * @model + * @generated + */ +public interface CdapInternalApplicationConfiguration extends EObject { + /** + * Returns the value of the 'Config' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapKeyPair}. + * + *

+ * If the meaning of the 'Config' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Config' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapInternalApplicationConfiguration_Config() + * @model containment="true" ordered="false" + * @generated + */ + EList getConfig(); + + /** + * Returns the value of the 'Preferences' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapKeyPair}. + * + *

+ * If the meaning of the 'Preferences' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Preferences' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapInternalApplicationConfiguration_Preferences() + * @model containment="true" ordered="false" + * @generated + */ + EList getPreferences(); + + /** + * Returns the value of the 'Apps' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapEntityWithPreferences}. + * + *

+ * If the meaning of the 'Apps' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Apps' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapInternalApplicationConfiguration_Apps() + * @model containment="true" ordered="false" + * @generated + */ + EList getApps(); + + /** + * Returns the value of the 'Workers' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapEntityWithPreferences}. + * + *

+ * If the meaning of the 'Workers' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Workers' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapInternalApplicationConfiguration_Workers() + * @model containment="true" ordered="false" + * @generated + */ + EList getWorkers(); + + /** + * Returns the value of the 'Flows' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapEntityWithPreferences}. + * + *

+ * If the meaning of the 'Flows' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Flows' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapInternalApplicationConfiguration_Flows() + * @model containment="true" ordered="false" + * @generated + */ + EList getFlows(); + + /** + * Returns the value of the 'Services' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapEntityWithPreferences}. + * + *

+ * If the meaning of the 'Services' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Services' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapInternalApplicationConfiguration_Services() + * @model containment="true" ordered="false" + * @generated + */ + EList getServices(); + +} // CdapInternalApplicationConfiguration diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapPackage.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapPackage.java new file mode 100644 index 0000000..afcb67b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapPackage.java @@ -0,0 +1,1702 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap; + +import org.openecomp.dcae.controller.core.service.ServicePackage; +import org.openecomp.ncomp.core.CorePackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.cdap.CdapFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-cdap-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org' cdap='http://openecomp.org/cdap'" + * @generated + */ +public interface CdapPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "cdap"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.cdap"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "cdap"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + CdapPackage eINSTANCE = org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceImpl Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapServiceImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapService() + * @generated + */ + int CDAP_SERVICE = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE__NAME = ServicePackage.DCAE_SERVICE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE__LAST_POLLED = ServicePackage.DCAE_SERVICE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE__LAST_CHANGED = ServicePackage.DCAE_SERVICE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE__CREATED = ServicePackage.DCAE_SERVICE__CREATED; + + /** + * The feature id for the 'Instances' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE__INSTANCES = ServicePackage.DCAE_SERVICE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Service' class. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_FEATURE_COUNT = ServicePackage.DCAE_SERVICE_FEATURE_COUNT + 1; + + /** + * The operation id for the 'Deploy' operation. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE___DEPLOY__STRING_STRING = ServicePackage.DCAE_SERVICE___DEPLOY__STRING_STRING; + + /** + * The operation id for the 'Undeploy' operation. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE___UNDEPLOY__STRING = ServicePackage.DCAE_SERVICE___UNDEPLOY__STRING; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE___TEST__STRING = ServicePackage.DCAE_SERVICE___TEST__STRING; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE___SUSPEND__STRING = ServicePackage.DCAE_SERVICE___SUSPEND__STRING; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE___RESUME__STRING = ServicePackage.DCAE_SERVICE___RESUME__STRING; + + /** + * The operation id for the 'Push Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING = ServicePackage.DCAE_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Poll Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE___POLL_MANAGER_CONFIGURATION__STRING = ServicePackage.DCAE_SERVICE___POLL_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE___MANAGER_CONFIGURATION__STRING = ServicePackage.DCAE_SERVICE___MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Operation' operation. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT = ServicePackage.DCAE_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT; + + /** + * The operation id for the 'Update Configuration From Policy' operation. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING = ServicePackage.DCAE_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING; + + /** + * The operation id for the 'Run Health Tests' operation. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE___RUN_HEALTH_TESTS = ServicePackage.DCAE_SERVICE___RUN_HEALTH_TESTS; + + /** + * The operation id for the 'Update Instance Configuration' operation. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE___UPDATE_INSTANCE_CONFIGURATION__STRING = ServicePackage.DCAE_SERVICE_OPERATION_COUNT + 0; + + /** + * The number of operations of the 'Service' class. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_OPERATION_COUNT = ServicePackage.DCAE_SERVICE_OPERATION_COUNT + 1; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapServiceInstance() + * @generated + */ + int CDAP_SERVICE_INSTANCE = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__NAME = ServicePackage.DCAE_SERVICE_INSTANCE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__LAST_POLLED = ServicePackage.DCAE_SERVICE_INSTANCE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__LAST_CHANGED = ServicePackage.DCAE_SERVICE_INSTANCE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__CREATED = ServicePackage.DCAE_SERVICE_INSTANCE__CREATED; + + /** + * The feature id for the 'Service Container' reference. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__SERVICE_CONTAINER = ServicePackage.DCAE_SERVICE_INSTANCE__SERVICE_CONTAINER; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__STATUS = ServicePackage.DCAE_SERVICE_INSTANCE__STATUS; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__INPUT_STREAMS = ServicePackage.DCAE_SERVICE_INSTANCE__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__OUTPUT_STREAMS = ServicePackage.DCAE_SERVICE_INSTANCE__OUTPUT_STREAMS; + + /** + * The feature id for the 'Last Health Test' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__LAST_HEALTH_TEST = ServicePackage.DCAE_SERVICE_INSTANCE__LAST_HEALTH_TEST; + + /** + * The feature id for the 'Health Test Status' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__HEALTH_TEST_STATUS = ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_STATUS; + + /** + * The feature id for the 'Health Test Message Code' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE = ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE; + + /** + * The feature id for the 'Cdap Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__CDAP_NAME = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Namespace' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__NAMESPACE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 1; + + /** + * The feature id for the 'App Jar' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__APP_JAR = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 2; + + /** + * The feature id for the 'App Config File' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__APP_CONFIG_FILE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Artifacts' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__ARTIFACTS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Apps' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__APPS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 5; + + /** + * The feature id for the 'App Names' attribute list. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__APP_NAMES = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Worker Names' attribute list. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__WORKER_NAMES = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Flow Names' attribute list. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__FLOW_NAMES = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 8; + + /** + * The feature id for the 'Service Names' attribute list. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__SERVICE_NAMES = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 9; + + /** + * The feature id for the 'Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__CONFIGURATION = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 10; + + /** + * The feature id for the 'Cdap Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 11; + + /** + * The feature id for the 'Cluster Service' reference. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 12; + + /** + * The feature id for the 'Cdap Namespace' reference. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 13; + + /** + * The feature id for the 'Service' container reference. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__SERVICE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 14; + + /** + * The number of structural features of the 'Service Instance' class. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE_FEATURE_COUNT = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 15; + + /** + * The number of operations of the 'Service Instance' class. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE_OPERATION_COUNT = ServicePackage.DCAE_SERVICE_INSTANCE_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapApplicationImpl Application}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapApplicationImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapApplication() + * @generated + */ + int CDAP_APPLICATION = 2; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Jar File' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__JAR_FILE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Artifact Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__ARTIFACT_NAME = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Version' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__VERSION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'App Config File Content' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__APP_CONFIG_FILE_CONTENT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The number of structural features of the 'Application' class. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of operations of the 'Application' class. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapArtifactImpl Artifact}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapArtifactImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapArtifact() + * @generated + */ + int CDAP_ARTIFACT = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_ARTIFACT__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_ARTIFACT__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_ARTIFACT__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_ARTIFACT__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Jar File' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_ARTIFACT__JAR_FILE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Version' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_ARTIFACT__VERSION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Artifact' class. + * + * + * @generated + * @ordered + */ + int CDAP_ARTIFACT_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Artifact' class. + * + * + * @generated + * @ordered + */ + int CDAP_ARTIFACT_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceConfigurationImpl Service Instance Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceConfigurationImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapServiceInstanceConfiguration() + * @generated + */ + int CDAP_SERVICE_INSTANCE_CONFIGURATION = 4; + + /** + * The number of structural features of the 'Service Instance Configuration' class. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE_CONFIGURATION_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Service Instance Configuration' class. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE_CONFIGURATION_OPERATION_COUNT = 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl Internal Application Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapInternalApplicationConfiguration() + * @generated + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION = 5; + + /** + * The feature id for the 'Config' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG = 0; + + /** + * The feature id for the 'Preferences' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES = 1; + + /** + * The feature id for the 'Apps' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS = 2; + + /** + * The feature id for the 'Workers' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS = 3; + + /** + * The feature id for the 'Flows' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS = 4; + + /** + * The feature id for the 'Services' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES = 5; + + /** + * The number of structural features of the 'Internal Application Configuration' class. + * + * + * @generated + * @ordered + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION_FEATURE_COUNT = 6; + + /** + * The number of operations of the 'Internal Application Configuration' class. + * + * + * @generated + * @ordered + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceDescriptorImpl Service Descriptor}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapServiceDescriptorImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapServiceDescriptor() + * @generated + */ + int CDAP_SERVICE_DESCRIPTOR = 6; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__NAME = ServicePackage.DCAE_SERVICE_DESCRIPTOR__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__LAST_POLLED = ServicePackage.DCAE_SERVICE_DESCRIPTOR__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__LAST_CHANGED = ServicePackage.DCAE_SERVICE_DESCRIPTOR__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__CREATED = ServicePackage.DCAE_SERVICE_DESCRIPTOR__CREATED; + + /** + * The feature id for the 'Group Id' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__GROUP_ID = ServicePackage.DCAE_SERVICE_DESCRIPTOR__GROUP_ID; + + /** + * The feature id for the 'Artifact' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__ARTIFACT = ServicePackage.DCAE_SERVICE_DESCRIPTOR__ARTIFACT; + + /** + * The feature id for the 'Version' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__VERSION = ServicePackage.DCAE_SERVICE_DESCRIPTOR__VERSION; + + /** + * The feature id for the 'Service Package' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__SERVICE_PACKAGE = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Service Class' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__SERVICE_CLASS = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Service Instance Class' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Jar File' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__JAR_FILE = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 3; + + /** + * The number of structural features of the 'Service Descriptor' class. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR_FEATURE_COUNT = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 4; + + /** + * The number of operations of the 'Service Descriptor' class. + * + * + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR_OPERATION_COUNT = ServicePackage.DCAE_SERVICE_DESCRIPTOR_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.CdapService Service}'. + * + * + * @return the meta object for class 'Service'. + * @see org.openecomp.dcae.controller.service.cdap.CdapService + * @generated + */ + EClass getCdapService(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapService#getInstances Instances}'. + * + * + * @return the meta object for the containment reference list 'Instances'. + * @see org.openecomp.dcae.controller.service.cdap.CdapService#getInstances() + * @see #getCdapService() + * @generated + */ + EReference getCdapService_Instances(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.service.cdap.CdapService#updateInstanceConfiguration(java.lang.String) Update Instance Configuration}' operation. + * + * + * @return the meta object for the 'Update Instance Configuration' operation. + * @see org.openecomp.dcae.controller.service.cdap.CdapService#updateInstanceConfiguration(java.lang.String) + * @generated + */ + EOperation getCdapService__UpdateInstanceConfiguration__String(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance Service Instance}'. + * + * + * @return the meta object for class 'Service Instance'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance + * @generated + */ + EClass getCdapServiceInstance(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapName Cdap Name}'. + * + * + * @return the meta object for the attribute 'Cdap Name'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapName() + * @see #getCdapServiceInstance() + * @generated + */ + EAttribute getCdapServiceInstance_CdapName(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapNamespace Cdap Namespace}'. + * + * + * @return the meta object for the reference 'Cdap Namespace'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapNamespace() + * @see #getCdapServiceInstance() + * @generated + */ + EReference getCdapServiceInstance_CdapNamespace(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getNamespace Namespace}'. + * + * + * @return the meta object for the attribute 'Namespace'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getNamespace() + * @see #getCdapServiceInstance() + * @generated + */ + EAttribute getCdapServiceInstance_Namespace(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppJar App Jar}'. + * + * + * @return the meta object for the attribute 'App Jar'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppJar() + * @see #getCdapServiceInstance() + * @generated + */ + EAttribute getCdapServiceInstance_AppJar(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppConfigFile App Config File}'. + * + * + * @return the meta object for the attribute 'App Config File'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppConfigFile() + * @see #getCdapServiceInstance() + * @generated + */ + EAttribute getCdapServiceInstance_AppConfigFile(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getArtifacts Artifacts}'. + * + * + * @return the meta object for the containment reference list 'Artifacts'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getArtifacts() + * @see #getCdapServiceInstance() + * @generated + */ + EReference getCdapServiceInstance_Artifacts(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getApps Apps}'. + * + * + * @return the meta object for the containment reference list 'Apps'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getApps() + * @see #getCdapServiceInstance() + * @generated + */ + EReference getCdapServiceInstance_Apps(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppNames App Names}'. + * + * + * @return the meta object for the attribute list 'App Names'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppNames() + * @see #getCdapServiceInstance() + * @generated + */ + EAttribute getCdapServiceInstance_AppNames(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getWorkerNames Worker Names}'. + * + * + * @return the meta object for the attribute list 'Worker Names'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getWorkerNames() + * @see #getCdapServiceInstance() + * @generated + */ + EAttribute getCdapServiceInstance_WorkerNames(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getFlowNames Flow Names}'. + * + * + * @return the meta object for the attribute list 'Flow Names'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getFlowNames() + * @see #getCdapServiceInstance() + * @generated + */ + EAttribute getCdapServiceInstance_FlowNames(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getServiceNames Service Names}'. + * + * + * @return the meta object for the attribute list 'Service Names'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getServiceNames() + * @see #getCdapServiceInstance() + * @generated + */ + EAttribute getCdapServiceInstance_ServiceNames(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getConfiguration Configuration}'. + * + * + * @return the meta object for the containment reference 'Configuration'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getConfiguration() + * @see #getCdapServiceInstance() + * @generated + */ + EReference getCdapServiceInstance_Configuration(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapConfiguration Cdap Configuration}'. + * + * + * @return the meta object for the containment reference 'Cdap Configuration'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapConfiguration() + * @see #getCdapServiceInstance() + * @generated + */ + EReference getCdapServiceInstance_CdapConfiguration(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getClusterService Cluster Service}'. + * + * + * @return the meta object for the reference 'Cluster Service'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getClusterService() + * @see #getCdapServiceInstance() + * @generated + */ + EReference getCdapServiceInstance_ClusterService(); + + /** + * Returns the meta object for the container reference '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getService Service}'. + * + * + * @return the meta object for the container reference 'Service'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getService() + * @see #getCdapServiceInstance() + * @generated + */ + EReference getCdapServiceInstance_Service(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication Application}'. + * + * + * @return the meta object for class 'Application'. + * @see org.openecomp.dcae.controller.service.cdap.CdapApplication + * @generated + */ + EClass getCdapApplication(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getJarFile Jar File}'. + * + * + * @return the meta object for the attribute 'Jar File'. + * @see org.openecomp.dcae.controller.service.cdap.CdapApplication#getJarFile() + * @see #getCdapApplication() + * @generated + */ + EAttribute getCdapApplication_JarFile(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getArtifactName Artifact Name}'. + * + * + * @return the meta object for the attribute 'Artifact Name'. + * @see org.openecomp.dcae.controller.service.cdap.CdapApplication#getArtifactName() + * @see #getCdapApplication() + * @generated + */ + EAttribute getCdapApplication_ArtifactName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getVersion Version}'. + * + * + * @return the meta object for the attribute 'Version'. + * @see org.openecomp.dcae.controller.service.cdap.CdapApplication#getVersion() + * @see #getCdapApplication() + * @generated + */ + EAttribute getCdapApplication_Version(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getAppConfigFileContent App Config File Content}'. + * + * + * @return the meta object for the attribute 'App Config File Content'. + * @see org.openecomp.dcae.controller.service.cdap.CdapApplication#getAppConfigFileContent() + * @see #getCdapApplication() + * @generated + */ + EAttribute getCdapApplication_AppConfigFileContent(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.CdapArtifact Artifact}'. + * + * + * @return the meta object for class 'Artifact'. + * @see org.openecomp.dcae.controller.service.cdap.CdapArtifact + * @generated + */ + EClass getCdapArtifact(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapArtifact#getJarFile Jar File}'. + * + * + * @return the meta object for the attribute 'Jar File'. + * @see org.openecomp.dcae.controller.service.cdap.CdapArtifact#getJarFile() + * @see #getCdapArtifact() + * @generated + */ + EAttribute getCdapArtifact_JarFile(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapArtifact#getVersion Version}'. + * + * + * @return the meta object for the attribute 'Version'. + * @see org.openecomp.dcae.controller.service.cdap.CdapArtifact#getVersion() + * @see #getCdapArtifact() + * @generated + */ + EAttribute getCdapArtifact_Version(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstanceConfiguration Service Instance Configuration}'. + * + * + * @return the meta object for class 'Service Instance Configuration'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstanceConfiguration + * @generated + */ + EClass getCdapServiceInstanceConfiguration(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration Internal Application Configuration}'. + * + * + * @return the meta object for class 'Internal Application Configuration'. + * @see org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration + * @generated + */ + EClass getCdapInternalApplicationConfiguration(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getConfig Config}'. + * + * + * @return the meta object for the containment reference list 'Config'. + * @see org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getConfig() + * @see #getCdapInternalApplicationConfiguration() + * @generated + */ + EReference getCdapInternalApplicationConfiguration_Config(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getPreferences Preferences}'. + * + * + * @return the meta object for the containment reference list 'Preferences'. + * @see org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getPreferences() + * @see #getCdapInternalApplicationConfiguration() + * @generated + */ + EReference getCdapInternalApplicationConfiguration_Preferences(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getApps Apps}'. + * + * + * @return the meta object for the containment reference list 'Apps'. + * @see org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getApps() + * @see #getCdapInternalApplicationConfiguration() + * @generated + */ + EReference getCdapInternalApplicationConfiguration_Apps(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getWorkers Workers}'. + * + * + * @return the meta object for the containment reference list 'Workers'. + * @see org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getWorkers() + * @see #getCdapInternalApplicationConfiguration() + * @generated + */ + EReference getCdapInternalApplicationConfiguration_Workers(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getFlows Flows}'. + * + * + * @return the meta object for the containment reference list 'Flows'. + * @see org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getFlows() + * @see #getCdapInternalApplicationConfiguration() + * @generated + */ + EReference getCdapInternalApplicationConfiguration_Flows(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getServices Services}'. + * + * + * @return the meta object for the containment reference list 'Services'. + * @see org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getServices() + * @see #getCdapInternalApplicationConfiguration() + * @generated + */ + EReference getCdapInternalApplicationConfiguration_Services(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor Service Descriptor}'. + * + * + * @return the meta object for class 'Service Descriptor'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor + * @generated + */ + EClass getCdapServiceDescriptor(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServicePackage Service Package}'. + * + * + * @return the meta object for the attribute 'Service Package'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServicePackage() + * @see #getCdapServiceDescriptor() + * @generated + */ + EAttribute getCdapServiceDescriptor_ServicePackage(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServiceClass Service Class}'. + * + * + * @return the meta object for the attribute 'Service Class'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServiceClass() + * @see #getCdapServiceDescriptor() + * @generated + */ + EAttribute getCdapServiceDescriptor_ServiceClass(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServiceInstanceClass Service Instance Class}'. + * + * + * @return the meta object for the attribute 'Service Instance Class'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServiceInstanceClass() + * @see #getCdapServiceDescriptor() + * @generated + */ + EAttribute getCdapServiceDescriptor_ServiceInstanceClass(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getJarFile Jar File}'. + * + * + * @return the meta object for the attribute 'Jar File'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getJarFile() + * @see #getCdapServiceDescriptor() + * @generated + */ + EAttribute getCdapServiceDescriptor_JarFile(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + CdapFactory getCdapFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceImpl Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapServiceImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapService() + * @generated + */ + EClass CDAP_SERVICE = eINSTANCE.getCdapService(); + /** + * The meta object literal for the 'Instances' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_SERVICE__INSTANCES = eINSTANCE.getCdapService_Instances(); + /** + * The meta object literal for the 'Update Instance Configuration' operation. + * + * + * @generated + */ + EOperation CDAP_SERVICE___UPDATE_INSTANCE_CONFIGURATION__STRING = eINSTANCE.getCdapService__UpdateInstanceConfiguration__String(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapServiceInstance() + * @generated + */ + EClass CDAP_SERVICE_INSTANCE = eINSTANCE.getCdapServiceInstance(); + /** + * The meta object literal for the 'Cdap Name' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_SERVICE_INSTANCE__CDAP_NAME = eINSTANCE.getCdapServiceInstance_CdapName(); + /** + * The meta object literal for the 'Cdap Namespace' reference feature. + * + * + * @generated + */ + EReference CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE = eINSTANCE.getCdapServiceInstance_CdapNamespace(); + /** + * The meta object literal for the 'Namespace' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_SERVICE_INSTANCE__NAMESPACE = eINSTANCE.getCdapServiceInstance_Namespace(); + /** + * The meta object literal for the 'App Jar' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_SERVICE_INSTANCE__APP_JAR = eINSTANCE.getCdapServiceInstance_AppJar(); + /** + * The meta object literal for the 'App Config File' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_SERVICE_INSTANCE__APP_CONFIG_FILE = eINSTANCE.getCdapServiceInstance_AppConfigFile(); + /** + * The meta object literal for the 'Artifacts' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_SERVICE_INSTANCE__ARTIFACTS = eINSTANCE.getCdapServiceInstance_Artifacts(); + /** + * The meta object literal for the 'Apps' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_SERVICE_INSTANCE__APPS = eINSTANCE.getCdapServiceInstance_Apps(); + /** + * The meta object literal for the 'App Names' attribute list feature. + * + * + * @generated + */ + EAttribute CDAP_SERVICE_INSTANCE__APP_NAMES = eINSTANCE.getCdapServiceInstance_AppNames(); + /** + * The meta object literal for the 'Worker Names' attribute list feature. + * + * + * @generated + */ + EAttribute CDAP_SERVICE_INSTANCE__WORKER_NAMES = eINSTANCE.getCdapServiceInstance_WorkerNames(); + /** + * The meta object literal for the 'Flow Names' attribute list feature. + * + * + * @generated + */ + EAttribute CDAP_SERVICE_INSTANCE__FLOW_NAMES = eINSTANCE.getCdapServiceInstance_FlowNames(); + /** + * The meta object literal for the 'Service Names' attribute list feature. + * + * + * @generated + */ + EAttribute CDAP_SERVICE_INSTANCE__SERVICE_NAMES = eINSTANCE.getCdapServiceInstance_ServiceNames(); + /** + * The meta object literal for the 'Configuration' containment reference feature. + * + * + * @generated + */ + EReference CDAP_SERVICE_INSTANCE__CONFIGURATION = eINSTANCE.getCdapServiceInstance_Configuration(); + /** + * The meta object literal for the 'Cdap Configuration' containment reference feature. + * + * + * @generated + */ + EReference CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION = eINSTANCE.getCdapServiceInstance_CdapConfiguration(); + /** + * The meta object literal for the 'Cluster Service' reference feature. + * + * + * @generated + */ + EReference CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE = eINSTANCE.getCdapServiceInstance_ClusterService(); + /** + * The meta object literal for the 'Service' container reference feature. + * + * + * @generated + */ + EReference CDAP_SERVICE_INSTANCE__SERVICE = eINSTANCE.getCdapServiceInstance_Service(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapApplicationImpl Application}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapApplicationImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapApplication() + * @generated + */ + EClass CDAP_APPLICATION = eINSTANCE.getCdapApplication(); + /** + * The meta object literal for the 'Jar File' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_APPLICATION__JAR_FILE = eINSTANCE.getCdapApplication_JarFile(); + /** + * The meta object literal for the 'Artifact Name' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_APPLICATION__ARTIFACT_NAME = eINSTANCE.getCdapApplication_ArtifactName(); + /** + * The meta object literal for the 'Version' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_APPLICATION__VERSION = eINSTANCE.getCdapApplication_Version(); + /** + * The meta object literal for the 'App Config File Content' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_APPLICATION__APP_CONFIG_FILE_CONTENT = eINSTANCE.getCdapApplication_AppConfigFileContent(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapArtifactImpl Artifact}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapArtifactImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapArtifact() + * @generated + */ + EClass CDAP_ARTIFACT = eINSTANCE.getCdapArtifact(); + /** + * The meta object literal for the 'Jar File' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_ARTIFACT__JAR_FILE = eINSTANCE.getCdapArtifact_JarFile(); + /** + * The meta object literal for the 'Version' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_ARTIFACT__VERSION = eINSTANCE.getCdapArtifact_Version(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceConfigurationImpl Service Instance Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceConfigurationImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapServiceInstanceConfiguration() + * @generated + */ + EClass CDAP_SERVICE_INSTANCE_CONFIGURATION = eINSTANCE.getCdapServiceInstanceConfiguration(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl Internal Application Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapInternalApplicationConfiguration() + * @generated + */ + EClass CDAP_INTERNAL_APPLICATION_CONFIGURATION = eINSTANCE.getCdapInternalApplicationConfiguration(); + /** + * The meta object literal for the 'Config' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG = eINSTANCE.getCdapInternalApplicationConfiguration_Config(); + /** + * The meta object literal for the 'Preferences' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES = eINSTANCE.getCdapInternalApplicationConfiguration_Preferences(); + /** + * The meta object literal for the 'Apps' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS = eINSTANCE.getCdapInternalApplicationConfiguration_Apps(); + /** + * The meta object literal for the 'Workers' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS = eINSTANCE.getCdapInternalApplicationConfiguration_Workers(); + /** + * The meta object literal for the 'Flows' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS = eINSTANCE.getCdapInternalApplicationConfiguration_Flows(); + /** + * The meta object literal for the 'Services' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES = eINSTANCE.getCdapInternalApplicationConfiguration_Services(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceDescriptorImpl Service Descriptor}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapServiceDescriptorImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapServiceDescriptor() + * @generated + */ + EClass CDAP_SERVICE_DESCRIPTOR = eINSTANCE.getCdapServiceDescriptor(); + /** + * The meta object literal for the 'Service Package' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_SERVICE_DESCRIPTOR__SERVICE_PACKAGE = eINSTANCE.getCdapServiceDescriptor_ServicePackage(); + /** + * The meta object literal for the 'Service Class' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_SERVICE_DESCRIPTOR__SERVICE_CLASS = eINSTANCE.getCdapServiceDescriptor_ServiceClass(); + /** + * The meta object literal for the 'Service Instance Class' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS = eINSTANCE.getCdapServiceDescriptor_ServiceInstanceClass(); + /** + * The meta object literal for the 'Jar File' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_SERVICE_DESCRIPTOR__JAR_FILE = eINSTANCE.getCdapServiceDescriptor_JarFile(); + + } + +} //CdapPackage diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapService.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapService.java new file mode 100644 index 0000000..ff9c57f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapService.java @@ -0,0 +1,72 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Service'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapService#getInstances Instances}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapService() + * @model + * @generated + */ +public interface CdapService extends DcaeService { + + /** + * Returns the value of the 'Instances' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance}. + * It is bidirectional and its opposite is '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getService Service}'. + * + *

+ * If the meaning of the 'Instances' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Instances' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapService_Instances() + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getService + * @model opposite="service" containment="true" + * @generated + */ + EList getInstances(); + + /** + * + * + * @model instanceNameUnique="false" + * @generated + */ + void updateInstanceConfiguration(String instanceName); +} // CdapService diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceDescriptor.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceDescriptor.java new file mode 100644 index 0000000..62a853e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceDescriptor.java @@ -0,0 +1,152 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap; + +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; + +/** + * + * A representation of the model object 'Service Descriptor'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServicePackage Service Package}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServiceClass Service Class}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServiceInstanceClass Service Instance Class}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getJarFile Jar File}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceDescriptor() + * @model + * @generated + */ +public interface CdapServiceDescriptor extends DcaeServiceDescriptor { + /** + * Returns the value of the 'Service Package' attribute. + * + *

+ * If the meaning of the 'Service Package' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Service Package' attribute. + * @see #setServicePackage(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceDescriptor_ServicePackage() + * @model unique="false" + * @generated + */ + String getServicePackage(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServicePackage Service Package}' attribute. + * + * + * @param value the new value of the 'Service Package' attribute. + * @see #getServicePackage() + * @generated + */ + void setServicePackage(String value); + + /** + * Returns the value of the 'Service Class' attribute. + * + *

+ * If the meaning of the 'Service Class' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Service Class' attribute. + * @see #setServiceClass(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceDescriptor_ServiceClass() + * @model unique="false" + * @generated + */ + String getServiceClass(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServiceClass Service Class}' attribute. + * + * + * @param value the new value of the 'Service Class' attribute. + * @see #getServiceClass() + * @generated + */ + void setServiceClass(String value); + + /** + * Returns the value of the 'Service Instance Class' attribute. + * + *

+ * If the meaning of the 'Service Instance Class' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Service Instance Class' attribute. + * @see #setServiceInstanceClass(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceDescriptor_ServiceInstanceClass() + * @model unique="false" + * @generated + */ + String getServiceInstanceClass(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServiceInstanceClass Service Instance Class}' attribute. + * + * + * @param value the new value of the 'Service Instance Class' attribute. + * @see #getServiceInstanceClass() + * @generated + */ + void setServiceInstanceClass(String value); + + /** + * Returns the value of the 'Jar File' attribute. + * + *

+ * If the meaning of the 'Jar File' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Jar File' attribute. + * @see #setJarFile(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceDescriptor_JarFile() + * @model unique="false" + * @generated + */ + String getJarFile(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getJarFile Jar File}' attribute. + * + * + * @param value the new value of the 'Jar File' attribute. + * @see #getJarFile() + * @generated + */ + void setJarFile(String value); + +} // CdapServiceDescriptor diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceInstance.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceInstance.java new file mode 100644 index 0000000..7d695d8 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceInstance.java @@ -0,0 +1,398 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap; + +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.ncomp.cdap.CdapNamespace; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Service Instance'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapName Cdap Name}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getNamespace Namespace}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppJar App Jar}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppConfigFile App Config File}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getArtifacts Artifacts}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getApps Apps}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppNames App Names}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getWorkerNames Worker Names}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getFlowNames Flow Names}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getServiceNames Service Names}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getConfiguration Configuration}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapConfiguration Cdap Configuration}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getClusterService Cluster Service}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapNamespace Cdap Namespace}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getService Service}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance() + * @model + * @generated + */ +public interface CdapServiceInstance extends DcaeServiceInstance { + /** + * Returns the value of the 'Cdap Name' attribute. + * + *

+ * If the meaning of the 'Cdap Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Cdap Name' attribute. + * @see #setCdapName(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_CdapName() + * @model unique="false" + * @generated + */ + String getCdapName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapName Cdap Name}' attribute. + * + * + * @param value the new value of the 'Cdap Name' attribute. + * @see #getCdapName() + * @generated + */ + void setCdapName(String value); + + /** + * Returns the value of the 'Cdap Namespace' reference. + * + *

+ * If the meaning of the 'Cdap Namespace' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Cdap Namespace' reference. + * @see #setCdapNamespace(CdapNamespace) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_CdapNamespace() + * @model annotation="http://openecomp.org type='operational'" + * @generated + */ + CdapNamespace getCdapNamespace(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapNamespace Cdap Namespace}' reference. + * + * + * @param value the new value of the 'Cdap Namespace' reference. + * @see #getCdapNamespace() + * @generated + */ + void setCdapNamespace(CdapNamespace value); + + /** + * Returns the value of the 'Namespace' attribute. + * + *

+ * If the meaning of the 'Namespace' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Namespace' attribute. + * @see #setNamespace(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_Namespace() + * @model unique="false" + * @generated + */ + String getNamespace(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getNamespace Namespace}' attribute. + * + * + * @param value the new value of the 'Namespace' attribute. + * @see #getNamespace() + * @generated + */ + void setNamespace(String value); + + /** + * Returns the value of the 'App Jar' attribute. + * + *

+ * If the meaning of the 'App Jar' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'App Jar' attribute. + * @see #setAppJar(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_AppJar() + * @model unique="false" + * @generated + */ + String getAppJar(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppJar App Jar}' attribute. + * + * + * @param value the new value of the 'App Jar' attribute. + * @see #getAppJar() + * @generated + */ + void setAppJar(String value); + + /** + * Returns the value of the 'App Config File' attribute. + * + *

+ * If the meaning of the 'App Config File' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'App Config File' attribute. + * @see #setAppConfigFile(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_AppConfigFile() + * @model unique="false" + * @generated + */ + String getAppConfigFile(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppConfigFile App Config File}' attribute. + * + * + * @param value the new value of the 'App Config File' attribute. + * @see #getAppConfigFile() + * @generated + */ + void setAppConfigFile(String value); + + /** + * Returns the value of the 'Artifacts' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.service.cdap.CdapArtifact}. + * + *

+ * If the meaning of the 'Artifacts' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Artifacts' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_Artifacts() + * @model containment="true" + * @generated + */ + EList getArtifacts(); + + /** + * Returns the value of the 'Apps' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.service.cdap.CdapApplication}. + * + *

+ * If the meaning of the 'Apps' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Apps' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_Apps() + * @model containment="true" + * @generated + */ + EList getApps(); + + /** + * Returns the value of the 'App Names' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

+ * If the meaning of the 'App Names' attribute list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'App Names' attribute list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_AppNames() + * @model unique="false" + * @generated + */ + EList getAppNames(); + + /** + * Returns the value of the 'Worker Names' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

+ * If the meaning of the 'Worker Names' attribute list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Worker Names' attribute list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_WorkerNames() + * @model unique="false" + * @generated + */ + EList getWorkerNames(); + + /** + * Returns the value of the 'Flow Names' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

+ * If the meaning of the 'Flow Names' attribute list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Flow Names' attribute list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_FlowNames() + * @model unique="false" + * @generated + */ + EList getFlowNames(); + + /** + * Returns the value of the 'Service Names' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

+ * If the meaning of the 'Service Names' attribute list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Service Names' attribute list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_ServiceNames() + * @model unique="false" + * @generated + */ + EList getServiceNames(); + + /** + * Returns the value of the 'Configuration' containment reference. + * + *

+ * If the meaning of the 'Configuration' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Configuration' containment reference. + * @see #setConfiguration(CdapServiceInstanceConfiguration) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_Configuration() + * @model containment="true" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + CdapServiceInstanceConfiguration getConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getConfiguration Configuration}' containment reference. + * + * + * @param value the new value of the 'Configuration' containment reference. + * @see #getConfiguration() + * @generated + */ + void setConfiguration(CdapServiceInstanceConfiguration value); + + /** + * Returns the value of the 'Cdap Configuration' containment reference. + * + *

+ * If the meaning of the 'Cdap Configuration' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Cdap Configuration' containment reference. + * @see #setCdapConfiguration(CdapInternalApplicationConfiguration) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_CdapConfiguration() + * @model containment="true" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + CdapInternalApplicationConfiguration getCdapConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapConfiguration Cdap Configuration}' containment reference. + * + * + * @param value the new value of the 'Cdap Configuration' containment reference. + * @see #getCdapConfiguration() + * @generated + */ + void setCdapConfiguration(CdapInternalApplicationConfiguration value); + + /** + * Returns the value of the 'Cluster Service' reference. + * + *

+ * If the meaning of the 'Cluster Service' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Cluster Service' reference. + * @see #setClusterService(CdapClusterServiceInstance) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_ClusterService() + * @model annotation="http://openecomp.org type='operational'" + * @generated + */ + CdapClusterServiceInstance getClusterService(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getClusterService Cluster Service}' reference. + * + * + * @param value the new value of the 'Cluster Service' reference. + * @see #getClusterService() + * @generated + */ + void setClusterService(CdapClusterServiceInstance value); + + /** + * Returns the value of the 'Service' container reference. + * It is bidirectional and its opposite is '{@link org.openecomp.dcae.controller.service.cdap.CdapService#getInstances Instances}'. + * + *

+ * If the meaning of the 'Service' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Service' container reference. + * @see #setService(CdapService) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_Service() + * @see org.openecomp.dcae.controller.service.cdap.CdapService#getInstances + * @model opposite="instances" transient="false" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + CdapService getService(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getService Service}' container reference. + * + * + * @param value the new value of the 'Service' container reference. + * @see #getService() + * @generated + */ + void setService(CdapService value); + +} // CdapServiceInstance diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceInstanceConfiguration.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceInstanceConfiguration.java new file mode 100644 index 0000000..508eb63 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceInstanceConfiguration.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Service Instance Configuration'. + * + * + * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstanceConfiguration() + * @model + * @generated + */ +public interface CdapServiceInstanceConfiguration extends EObject { +} // CdapServiceInstanceConfiguration diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/ControllerServiceCdapAdaptor.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/ControllerServiceCdapAdaptor.java new file mode 100644 index 0000000..dd5f9bd --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/ControllerServiceCdapAdaptor.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Controller Service Cdap Adaptor'. + * + * + * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getControllerServiceCdapAdaptor() + * @model + * @generated + */ +public interface ControllerServiceCdapAdaptor extends EObject { +} // ControllerServiceCdapAdaptor diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapApplicationImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapApplicationImpl.java new file mode 100644 index 0000000..416472f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapApplicationImpl.java @@ -0,0 +1,338 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.impl; + +import org.openecomp.dcae.controller.service.cdap.CdapApplication; +import org.openecomp.dcae.controller.service.cdap.CdapPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Application'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapApplicationImpl#getJarFile Jar File}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapApplicationImpl#getArtifactName Artifact Name}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapApplicationImpl#getVersion Version}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapApplicationImpl#getAppConfigFileContent App Config File Content}
  • + *
+ *

+ * + * @generated + */ +public class CdapApplicationImpl extends NamedEntityImpl implements CdapApplication { + /** + * The default value of the '{@link #getJarFile() Jar File}' attribute. + * + * + * @see #getJarFile() + * @generated + * @ordered + */ + protected static final String JAR_FILE_EDEFAULT = null; + /** + * The cached value of the '{@link #getJarFile() Jar File}' attribute. + * + * + * @see #getJarFile() + * @generated + * @ordered + */ + protected String jarFile = JAR_FILE_EDEFAULT; + /** + * The default value of the '{@link #getArtifactName() Artifact Name}' attribute. + * + * + * @see #getArtifactName() + * @generated + * @ordered + */ + protected static final String ARTIFACT_NAME_EDEFAULT = null; + /** + * The cached value of the '{@link #getArtifactName() Artifact Name}' attribute. + * + * + * @see #getArtifactName() + * @generated + * @ordered + */ + protected String artifactName = ARTIFACT_NAME_EDEFAULT; + /** + * The default value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + /** + * The cached value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + /** + * The default value of the '{@link #getAppConfigFileContent() App Config File Content}' attribute. + * + * + * @see #getAppConfigFileContent() + * @generated + * @ordered + */ + protected static final String APP_CONFIG_FILE_CONTENT_EDEFAULT = null; + /** + * The cached value of the '{@link #getAppConfigFileContent() App Config File Content}' attribute. + * + * + * @see #getAppConfigFileContent() + * @generated + * @ordered + */ + protected String appConfigFileContent = APP_CONFIG_FILE_CONTENT_EDEFAULT; + + /** + * + * + * @generated + */ + protected CdapApplicationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_APPLICATION; + } + + /** + * + * + * @generated + */ + public String getJarFile() { + return jarFile; + } + + /** + * + * + * @generated + */ + public void setJarFile(String newJarFile) { + String oldJarFile = jarFile; + jarFile = newJarFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_APPLICATION__JAR_FILE, oldJarFile, jarFile)); + } + + /** + * + * + * @generated + */ + public String getArtifactName() { + return artifactName; + } + + /** + * + * + * @generated + */ + public void setArtifactName(String newArtifactName) { + String oldArtifactName = artifactName; + artifactName = newArtifactName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_APPLICATION__ARTIFACT_NAME, oldArtifactName, artifactName)); + } + + /** + * + * + * @generated + */ + public String getVersion() { + return version; + } + + /** + * + * + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_APPLICATION__VERSION, oldVersion, version)); + } + + /** + * + * + * @generated + */ + public String getAppConfigFileContent() { + return appConfigFileContent; + } + + /** + * + * + * @generated + */ + public void setAppConfigFileContent(String newAppConfigFileContent) { + String oldAppConfigFileContent = appConfigFileContent; + appConfigFileContent = newAppConfigFileContent; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_APPLICATION__APP_CONFIG_FILE_CONTENT, oldAppConfigFileContent, appConfigFileContent)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_APPLICATION__JAR_FILE: + return getJarFile(); + case CdapPackage.CDAP_APPLICATION__ARTIFACT_NAME: + return getArtifactName(); + case CdapPackage.CDAP_APPLICATION__VERSION: + return getVersion(); + case CdapPackage.CDAP_APPLICATION__APP_CONFIG_FILE_CONTENT: + return getAppConfigFileContent(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_APPLICATION__JAR_FILE: + setJarFile((String)newValue); + return; + case CdapPackage.CDAP_APPLICATION__ARTIFACT_NAME: + setArtifactName((String)newValue); + return; + case CdapPackage.CDAP_APPLICATION__VERSION: + setVersion((String)newValue); + return; + case CdapPackage.CDAP_APPLICATION__APP_CONFIG_FILE_CONTENT: + setAppConfigFileContent((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_APPLICATION__JAR_FILE: + setJarFile(JAR_FILE_EDEFAULT); + return; + case CdapPackage.CDAP_APPLICATION__ARTIFACT_NAME: + setArtifactName(ARTIFACT_NAME_EDEFAULT); + return; + case CdapPackage.CDAP_APPLICATION__VERSION: + setVersion(VERSION_EDEFAULT); + return; + case CdapPackage.CDAP_APPLICATION__APP_CONFIG_FILE_CONTENT: + setAppConfigFileContent(APP_CONFIG_FILE_CONTENT_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_APPLICATION__JAR_FILE: + return JAR_FILE_EDEFAULT == null ? jarFile != null : !JAR_FILE_EDEFAULT.equals(jarFile); + case CdapPackage.CDAP_APPLICATION__ARTIFACT_NAME: + return ARTIFACT_NAME_EDEFAULT == null ? artifactName != null : !ARTIFACT_NAME_EDEFAULT.equals(artifactName); + case CdapPackage.CDAP_APPLICATION__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + case CdapPackage.CDAP_APPLICATION__APP_CONFIG_FILE_CONTENT: + return APP_CONFIG_FILE_CONTENT_EDEFAULT == null ? appConfigFileContent != null : !APP_CONFIG_FILE_CONTENT_EDEFAULT.equals(appConfigFileContent); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (jarFile: "); + result.append(jarFile); + result.append(", artifactName: "); + result.append(artifactName); + result.append(", version: "); + result.append(version); + result.append(", appConfigFileContent: "); + result.append(appConfigFileContent); + result.append(')'); + return result.toString(); + } + +} //CdapApplicationImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapArtifactImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapArtifactImpl.java new file mode 100644 index 0000000..318204e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapArtifactImpl.java @@ -0,0 +1,239 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.impl; + +import org.openecomp.dcae.controller.service.cdap.CdapArtifact; +import org.openecomp.dcae.controller.service.cdap.CdapPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Artifact'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapArtifactImpl#getJarFile Jar File}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapArtifactImpl#getVersion Version}
  • + *
+ *

+ * + * @generated + */ +public class CdapArtifactImpl extends NamedEntityImpl implements CdapArtifact { + /** + * The default value of the '{@link #getJarFile() Jar File}' attribute. + * + * + * @see #getJarFile() + * @generated + * @ordered + */ + protected static final String JAR_FILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getJarFile() Jar File}' attribute. + * + * + * @see #getJarFile() + * @generated + * @ordered + */ + protected String jarFile = JAR_FILE_EDEFAULT; + + /** + * The default value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + + /** + * + * + * @generated + */ + protected CdapArtifactImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_ARTIFACT; + } + + /** + * + * + * @generated + */ + public String getJarFile() { + return jarFile; + } + + /** + * + * + * @generated + */ + public void setJarFile(String newJarFile) { + String oldJarFile = jarFile; + jarFile = newJarFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_ARTIFACT__JAR_FILE, oldJarFile, jarFile)); + } + + /** + * + * + * @generated + */ + public String getVersion() { + return version; + } + + /** + * + * + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_ARTIFACT__VERSION, oldVersion, version)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_ARTIFACT__JAR_FILE: + return getJarFile(); + case CdapPackage.CDAP_ARTIFACT__VERSION: + return getVersion(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_ARTIFACT__JAR_FILE: + setJarFile((String)newValue); + return; + case CdapPackage.CDAP_ARTIFACT__VERSION: + setVersion((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_ARTIFACT__JAR_FILE: + setJarFile(JAR_FILE_EDEFAULT); + return; + case CdapPackage.CDAP_ARTIFACT__VERSION: + setVersion(VERSION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_ARTIFACT__JAR_FILE: + return JAR_FILE_EDEFAULT == null ? jarFile != null : !JAR_FILE_EDEFAULT.equals(jarFile); + case CdapPackage.CDAP_ARTIFACT__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (jarFile: "); + result.append(jarFile); + result.append(", version: "); + result.append(version); + result.append(')'); + return result.toString(); + } + +} //CdapArtifactImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapFactoryImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapFactoryImpl.java new file mode 100644 index 0000000..d0d0018 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapFactoryImpl.java @@ -0,0 +1,182 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.impl; + +import org.openecomp.dcae.controller.service.cdap.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class CdapFactoryImpl extends EFactoryImpl implements CdapFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static CdapFactory init() { + try { + CdapFactory theCdapFactory = (CdapFactory)EPackage.Registry.INSTANCE.getEFactory(CdapPackage.eNS_URI); + if (theCdapFactory != null) { + return theCdapFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new CdapFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public CdapFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case CdapPackage.CDAP_SERVICE: return createCdapService(); + case CdapPackage.CDAP_SERVICE_INSTANCE: return createCdapServiceInstance(); + case CdapPackage.CDAP_APPLICATION: return createCdapApplication(); + case CdapPackage.CDAP_ARTIFACT: return createCdapArtifact(); + case CdapPackage.CDAP_SERVICE_INSTANCE_CONFIGURATION: return createCdapServiceInstanceConfiguration(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION: return createCdapInternalApplicationConfiguration(); + case CdapPackage.CDAP_SERVICE_DESCRIPTOR: return createCdapServiceDescriptor(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public CdapService createCdapService() { + CdapServiceImpl cdapService = new CdapServiceImpl(); + return cdapService; + } + + /** + * + * + * @generated + */ + public CdapServiceInstance createCdapServiceInstance() { + CdapServiceInstanceImpl cdapServiceInstance = new CdapServiceInstanceImpl(); + return cdapServiceInstance; + } + + /** + * + * + * @generated + */ + public CdapApplication createCdapApplication() { + CdapApplicationImpl cdapApplication = new CdapApplicationImpl(); + return cdapApplication; + } + + /** + * + * + * @generated + */ + public CdapArtifact createCdapArtifact() { + CdapArtifactImpl cdapArtifact = new CdapArtifactImpl(); + return cdapArtifact; + } + + /** + * + * + * @generated + */ + public CdapServiceInstanceConfiguration createCdapServiceInstanceConfiguration() { + CdapServiceInstanceConfigurationImpl cdapServiceInstanceConfiguration = new CdapServiceInstanceConfigurationImpl(); + return cdapServiceInstanceConfiguration; + } + + /** + * + * + * @generated + */ + public CdapInternalApplicationConfiguration createCdapInternalApplicationConfiguration() { + CdapInternalApplicationConfigurationImpl cdapInternalApplicationConfiguration = new CdapInternalApplicationConfigurationImpl(); + return cdapInternalApplicationConfiguration; + } + + /** + * + * + * @generated + */ + public CdapServiceDescriptor createCdapServiceDescriptor() { + CdapServiceDescriptorImpl cdapServiceDescriptor = new CdapServiceDescriptorImpl(); + return cdapServiceDescriptor; + } + + /** + * + * + * @generated + */ + public CdapPackage getCdapPackage() { + return (CdapPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static CdapPackage getPackage() { + return CdapPackage.eINSTANCE; + } + +} //CdapFactoryImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapInternalApplicationConfigurationImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapInternalApplicationConfigurationImpl.java new file mode 100644 index 0000000..03941cd --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapInternalApplicationConfigurationImpl.java @@ -0,0 +1,355 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.impl; + +import org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration; +import org.openecomp.dcae.controller.service.cdap.CdapPackage; + +import org.openecomp.ncomp.cdap.CdapEntityWithPreferences; +import org.openecomp.ncomp.cdap.CdapKeyPair; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Internal Application Configuration'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl#getConfig Config}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl#getPreferences Preferences}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl#getApps Apps}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl#getWorkers Workers}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl#getFlows Flows}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl#getServices Services}
  • + *
+ *

+ * + * @generated + */ +public class CdapInternalApplicationConfigurationImpl extends MinimalEObjectImpl.Container implements CdapInternalApplicationConfiguration { + /** + * The cached value of the '{@link #getConfig() Config}' containment reference list. + * + * + * @see #getConfig() + * @generated + * @ordered + */ + protected EList config; + + /** + * The cached value of the '{@link #getPreferences() Preferences}' containment reference list. + * + * + * @see #getPreferences() + * @generated + * @ordered + */ + protected EList preferences; + + /** + * The cached value of the '{@link #getApps() Apps}' containment reference list. + * + * + * @see #getApps() + * @generated + * @ordered + */ + protected EList apps; + + /** + * The cached value of the '{@link #getWorkers() Workers}' containment reference list. + * + * + * @see #getWorkers() + * @generated + * @ordered + */ + protected EList workers; + + /** + * The cached value of the '{@link #getFlows() Flows}' containment reference list. + * + * + * @see #getFlows() + * @generated + * @ordered + */ + protected EList flows; + + /** + * The cached value of the '{@link #getServices() Services}' containment reference list. + * + * + * @see #getServices() + * @generated + * @ordered + */ + protected EList services; + + /** + * + * + * @generated + */ + protected CdapInternalApplicationConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_INTERNAL_APPLICATION_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public EList getConfig() { + if (config == null) { + config = new EObjectContainmentEList(CdapKeyPair.class, this, CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG); + } + return config; + } + + /** + * + * + * @generated + */ + public EList getPreferences() { + if (preferences == null) { + preferences = new EObjectContainmentEList(CdapKeyPair.class, this, CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES); + } + return preferences; + } + + /** + * + * + * @generated + */ + public EList getApps() { + if (apps == null) { + apps = new EObjectContainmentEList(CdapEntityWithPreferences.class, this, CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS); + } + return apps; + } + + /** + * + * + * @generated + */ + public EList getWorkers() { + if (workers == null) { + workers = new EObjectContainmentEList(CdapEntityWithPreferences.class, this, CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS); + } + return workers; + } + + /** + * + * + * @generated + */ + public EList getFlows() { + if (flows == null) { + flows = new EObjectContainmentEList(CdapEntityWithPreferences.class, this, CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS); + } + return flows; + } + + /** + * + * + * @generated + */ + public EList getServices() { + if (services == null) { + services = new EObjectContainmentEList(CdapEntityWithPreferences.class, this, CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES); + } + return services; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG: + return ((InternalEList)getConfig()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES: + return ((InternalEList)getPreferences()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS: + return ((InternalEList)getApps()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS: + return ((InternalEList)getWorkers()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS: + return ((InternalEList)getFlows()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES: + return ((InternalEList)getServices()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG: + return getConfig(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES: + return getPreferences(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS: + return getApps(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS: + return getWorkers(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS: + return getFlows(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES: + return getServices(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG: + getConfig().clear(); + getConfig().addAll((Collection)newValue); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES: + getPreferences().clear(); + getPreferences().addAll((Collection)newValue); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS: + getApps().clear(); + getApps().addAll((Collection)newValue); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS: + getWorkers().clear(); + getWorkers().addAll((Collection)newValue); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS: + getFlows().clear(); + getFlows().addAll((Collection)newValue); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES: + getServices().clear(); + getServices().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG: + getConfig().clear(); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES: + getPreferences().clear(); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS: + getApps().clear(); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS: + getWorkers().clear(); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS: + getFlows().clear(); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES: + getServices().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG: + return config != null && !config.isEmpty(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES: + return preferences != null && !preferences.isEmpty(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS: + return apps != null && !apps.isEmpty(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS: + return workers != null && !workers.isEmpty(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS: + return flows != null && !flows.isEmpty(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES: + return services != null && !services.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //CdapInternalApplicationConfigurationImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapPackageImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapPackageImpl.java new file mode 100644 index 0000000..e6e6f7c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapPackageImpl.java @@ -0,0 +1,759 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.impl; + +import org.openecomp.dcae.controller.core.service.ServicePackage; +import org.openecomp.dcae.controller.service.cdap.CdapApplication; +import org.openecomp.dcae.controller.service.cdap.CdapArtifact; +import org.openecomp.dcae.controller.service.cdap.CdapFactory; +import org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration; +import org.openecomp.dcae.controller.service.cdap.CdapPackage; +import org.openecomp.dcae.controller.service.cdap.CdapService; +import org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor; +import org.openecomp.dcae.controller.service.cdap.CdapServiceInstance; +import org.openecomp.dcae.controller.service.cdap.CdapServiceInstanceConfiguration; +import org.openecomp.ncomp.core.CorePackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class CdapPackageImpl extends EPackageImpl implements CdapPackage { + /** + * + * + * @generated + */ + private EClass cdapServiceEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapServiceInstanceEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapApplicationEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapArtifactEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapServiceInstanceConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapInternalApplicationConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapServiceDescriptorEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#eNS_URI + * @see #init() + * @generated + */ + private CdapPackageImpl() { + super(eNS_URI, CdapFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link CdapPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static CdapPackage init() { + if (isInited) return (CdapPackage)EPackage.Registry.INSTANCE.getEPackage(CdapPackage.eNS_URI); + + // Obtain or create and register package + CdapPackageImpl theCdapPackage = (CdapPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CdapPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CdapPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theCdapPackage.createPackageContents(); + + // Initialize created meta-data + theCdapPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theCdapPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(CdapPackage.eNS_URI, theCdapPackage); + return theCdapPackage; + } + + /** + * + * + * @generated + */ + public EClass getCdapService() { + return cdapServiceEClass; + } + + /** + * + * + * @generated + */ + public EReference getCdapService_Instances() { + return (EReference)cdapServiceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EOperation getCdapService__UpdateInstanceConfiguration__String() { + return cdapServiceEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EClass getCdapServiceInstance() { + return cdapServiceInstanceEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCdapServiceInstance_CdapName() { + return (EAttribute)cdapServiceInstanceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getCdapServiceInstance_CdapNamespace() { + return (EReference)cdapServiceInstanceEClass.getEStructuralFeatures().get(13); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapServiceInstance_Namespace() { + return (EAttribute)cdapServiceInstanceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapServiceInstance_AppJar() { + return (EAttribute)cdapServiceInstanceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapServiceInstance_AppConfigFile() { + return (EAttribute)cdapServiceInstanceEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getCdapServiceInstance_Artifacts() { + return (EReference)cdapServiceInstanceEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getCdapServiceInstance_Apps() { + return (EReference)cdapServiceInstanceEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapServiceInstance_AppNames() { + return (EAttribute)cdapServiceInstanceEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapServiceInstance_WorkerNames() { + return (EAttribute)cdapServiceInstanceEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapServiceInstance_FlowNames() { + return (EAttribute)cdapServiceInstanceEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapServiceInstance_ServiceNames() { + return (EAttribute)cdapServiceInstanceEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EReference getCdapServiceInstance_Configuration() { + return (EReference)cdapServiceInstanceEClass.getEStructuralFeatures().get(10); + } + + /** + * + * + * @generated + */ + public EReference getCdapServiceInstance_CdapConfiguration() { + return (EReference)cdapServiceInstanceEClass.getEStructuralFeatures().get(11); + } + + /** + * + * + * @generated + */ + public EReference getCdapServiceInstance_ClusterService() { + return (EReference)cdapServiceInstanceEClass.getEStructuralFeatures().get(12); + } + + /** + * + * + * @generated + */ + public EReference getCdapServiceInstance_Service() { + return (EReference)cdapServiceInstanceEClass.getEStructuralFeatures().get(14); + } + + /** + * + * + * @generated + */ + public EClass getCdapApplication() { + return cdapApplicationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCdapApplication_JarFile() { + return (EAttribute)cdapApplicationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapApplication_ArtifactName() { + return (EAttribute)cdapApplicationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapApplication_Version() { + return (EAttribute)cdapApplicationEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapApplication_AppConfigFileContent() { + return (EAttribute)cdapApplicationEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getCdapArtifact() { + return cdapArtifactEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCdapArtifact_JarFile() { + return (EAttribute)cdapArtifactEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapArtifact_Version() { + return (EAttribute)cdapArtifactEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getCdapServiceInstanceConfiguration() { + return cdapServiceInstanceConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EClass getCdapInternalApplicationConfiguration() { + return cdapInternalApplicationConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EReference getCdapInternalApplicationConfiguration_Config() { + return (EReference)cdapInternalApplicationConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getCdapInternalApplicationConfiguration_Preferences() { + return (EReference)cdapInternalApplicationConfigurationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getCdapInternalApplicationConfiguration_Apps() { + return (EReference)cdapInternalApplicationConfigurationEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getCdapInternalApplicationConfiguration_Workers() { + return (EReference)cdapInternalApplicationConfigurationEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getCdapInternalApplicationConfiguration_Flows() { + return (EReference)cdapInternalApplicationConfigurationEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getCdapInternalApplicationConfiguration_Services() { + return (EReference)cdapInternalApplicationConfigurationEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EClass getCdapServiceDescriptor() { + return cdapServiceDescriptorEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCdapServiceDescriptor_ServicePackage() { + return (EAttribute)cdapServiceDescriptorEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapServiceDescriptor_ServiceClass() { + return (EAttribute)cdapServiceDescriptorEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapServiceDescriptor_ServiceInstanceClass() { + return (EAttribute)cdapServiceDescriptorEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapServiceDescriptor_JarFile() { + return (EAttribute)cdapServiceDescriptorEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public CdapFactory getCdapFactory() { + return (CdapFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + cdapServiceEClass = createEClass(CDAP_SERVICE); + createEReference(cdapServiceEClass, CDAP_SERVICE__INSTANCES); + createEOperation(cdapServiceEClass, CDAP_SERVICE___UPDATE_INSTANCE_CONFIGURATION__STRING); + + cdapServiceInstanceEClass = createEClass(CDAP_SERVICE_INSTANCE); + createEAttribute(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__CDAP_NAME); + createEAttribute(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__NAMESPACE); + createEAttribute(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__APP_JAR); + createEAttribute(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__APP_CONFIG_FILE); + createEReference(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__ARTIFACTS); + createEReference(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__APPS); + createEAttribute(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__APP_NAMES); + createEAttribute(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__WORKER_NAMES); + createEAttribute(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__FLOW_NAMES); + createEAttribute(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__SERVICE_NAMES); + createEReference(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__CONFIGURATION); + createEReference(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION); + createEReference(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE); + createEReference(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE); + createEReference(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__SERVICE); + + cdapApplicationEClass = createEClass(CDAP_APPLICATION); + createEAttribute(cdapApplicationEClass, CDAP_APPLICATION__JAR_FILE); + createEAttribute(cdapApplicationEClass, CDAP_APPLICATION__ARTIFACT_NAME); + createEAttribute(cdapApplicationEClass, CDAP_APPLICATION__VERSION); + createEAttribute(cdapApplicationEClass, CDAP_APPLICATION__APP_CONFIG_FILE_CONTENT); + + cdapArtifactEClass = createEClass(CDAP_ARTIFACT); + createEAttribute(cdapArtifactEClass, CDAP_ARTIFACT__JAR_FILE); + createEAttribute(cdapArtifactEClass, CDAP_ARTIFACT__VERSION); + + cdapServiceInstanceConfigurationEClass = createEClass(CDAP_SERVICE_INSTANCE_CONFIGURATION); + + cdapInternalApplicationConfigurationEClass = createEClass(CDAP_INTERNAL_APPLICATION_CONFIGURATION); + createEReference(cdapInternalApplicationConfigurationEClass, CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG); + createEReference(cdapInternalApplicationConfigurationEClass, CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES); + createEReference(cdapInternalApplicationConfigurationEClass, CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS); + createEReference(cdapInternalApplicationConfigurationEClass, CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS); + createEReference(cdapInternalApplicationConfigurationEClass, CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS); + createEReference(cdapInternalApplicationConfigurationEClass, CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES); + + cdapServiceDescriptorEClass = createEClass(CDAP_SERVICE_DESCRIPTOR); + createEAttribute(cdapServiceDescriptorEClass, CDAP_SERVICE_DESCRIPTOR__SERVICE_PACKAGE); + createEAttribute(cdapServiceDescriptorEClass, CDAP_SERVICE_DESCRIPTOR__SERVICE_CLASS); + createEAttribute(cdapServiceDescriptorEClass, CDAP_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS); + createEAttribute(cdapServiceDescriptorEClass, CDAP_SERVICE_DESCRIPTOR__JAR_FILE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + ServicePackage theServicePackage_1 = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage theServicePackage = (org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage)EPackage.Registry.INSTANCE.getEPackage(org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage.eNS_URI); + org.openecomp.ncomp.cdap.CdapPackage theCdapPackage_1 = (org.openecomp.ncomp.cdap.CdapPackage)EPackage.Registry.INSTANCE.getEPackage(org.openecomp.ncomp.cdap.CdapPackage.eNS_URI); + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + cdapServiceEClass.getESuperTypes().add(theServicePackage_1.getDcaeService()); + cdapServiceInstanceEClass.getESuperTypes().add(theServicePackage_1.getDcaeServiceInstance()); + cdapApplicationEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + cdapArtifactEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + cdapServiceDescriptorEClass.getESuperTypes().add(theServicePackage_1.getDcaeServiceDescriptor()); + + // Initialize classes, features, and operations; add parameters + initEClass(cdapServiceEClass, CdapService.class, "CdapService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCdapService_Instances(), this.getCdapServiceInstance(), this.getCdapServiceInstance_Service(), "instances", null, 0, -1, CdapService.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + EOperation op = initEOperation(getCdapService__UpdateInstanceConfiguration__String(), null, "updateInstanceConfiguration", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "instanceName", 0, 1, !IS_UNIQUE, IS_ORDERED); + + initEClass(cdapServiceInstanceEClass, CdapServiceInstance.class, "CdapServiceInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapServiceInstance_CdapName(), theEcorePackage.getEString(), "cdapName", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceInstance_Namespace(), theEcorePackage.getEString(), "namespace", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceInstance_AppJar(), theEcorePackage.getEString(), "appJar", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceInstance_AppConfigFile(), theEcorePackage.getEString(), "appConfigFile", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapServiceInstance_Artifacts(), this.getCdapArtifact(), null, "artifacts", null, 0, -1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapServiceInstance_Apps(), this.getCdapApplication(), null, "apps", null, 0, -1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceInstance_AppNames(), theEcorePackage.getEString(), "appNames", null, 0, -1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceInstance_WorkerNames(), theEcorePackage.getEString(), "workerNames", null, 0, -1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceInstance_FlowNames(), theEcorePackage.getEString(), "flowNames", null, 0, -1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceInstance_ServiceNames(), theEcorePackage.getEString(), "serviceNames", null, 0, -1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapServiceInstance_Configuration(), this.getCdapServiceInstanceConfiguration(), null, "configuration", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapServiceInstance_CdapConfiguration(), this.getCdapInternalApplicationConfiguration(), null, "cdapConfiguration", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapServiceInstance_ClusterService(), theServicePackage.getCdapClusterServiceInstance(), null, "clusterService", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapServiceInstance_CdapNamespace(), theCdapPackage_1.getCdapNamespace(), null, "cdapNamespace", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapServiceInstance_Service(), this.getCdapService(), this.getCdapService_Instances(), "service", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(cdapApplicationEClass, CdapApplication.class, "CdapApplication", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapApplication_JarFile(), theEcorePackage.getEString(), "jarFile", null, 0, 1, CdapApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapApplication_ArtifactName(), theEcorePackage.getEString(), "artifactName", null, 0, 1, CdapApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapApplication_Version(), theEcorePackage.getEString(), "version", null, 0, 1, CdapApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapApplication_AppConfigFileContent(), theEcorePackage.getEString(), "appConfigFileContent", null, 0, 1, CdapApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(cdapArtifactEClass, CdapArtifact.class, "CdapArtifact", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapArtifact_JarFile(), theEcorePackage.getEString(), "jarFile", null, 0, 1, CdapArtifact.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapArtifact_Version(), theEcorePackage.getEString(), "version", null, 0, 1, CdapArtifact.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(cdapServiceInstanceConfigurationEClass, CdapServiceInstanceConfiguration.class, "CdapServiceInstanceConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(cdapInternalApplicationConfigurationEClass, CdapInternalApplicationConfiguration.class, "CdapInternalApplicationConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCdapInternalApplicationConfiguration_Config(), theCdapPackage_1.getCdapKeyPair(), null, "config", null, 0, -1, CdapInternalApplicationConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getCdapInternalApplicationConfiguration_Preferences(), theCdapPackage_1.getCdapKeyPair(), null, "preferences", null, 0, -1, CdapInternalApplicationConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getCdapInternalApplicationConfiguration_Apps(), theCdapPackage_1.getCdapEntityWithPreferences(), null, "apps", null, 0, -1, CdapInternalApplicationConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getCdapInternalApplicationConfiguration_Workers(), theCdapPackage_1.getCdapEntityWithPreferences(), null, "workers", null, 0, -1, CdapInternalApplicationConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getCdapInternalApplicationConfiguration_Flows(), theCdapPackage_1.getCdapEntityWithPreferences(), null, "flows", null, 0, -1, CdapInternalApplicationConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getCdapInternalApplicationConfiguration_Services(), theCdapPackage_1.getCdapEntityWithPreferences(), null, "services", null, 0, -1, CdapInternalApplicationConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(cdapServiceDescriptorEClass, CdapServiceDescriptor.class, "CdapServiceDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapServiceDescriptor_ServicePackage(), theEcorePackage.getEString(), "servicePackage", null, 0, 1, CdapServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceDescriptor_ServiceClass(), theEcorePackage.getEString(), "serviceClass", null, 0, 1, CdapServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceDescriptor_ServiceInstanceClass(), theEcorePackage.getEString(), "serviceInstanceClass", null, 0, 1, CdapServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceDescriptor_JarFile(), theEcorePackage.getEString(), "jarFile", null, 0, 1, CdapServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + // http://openecomp.org + createEcompAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "ecomp", "http://openecomp.org", + "cdap", "http://openecomp.org/cdap" + }); + } + + /** + * Initializes the annotations for http://openecomp.org. + * + * + * @generated + */ + protected void createEcompAnnotations() { + String source = "http://openecomp.org"; + addAnnotation + (getCdapServiceInstance_Configuration(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getCdapServiceInstance_CdapConfiguration(), + source, + new String[] { + "type", "operational" + }); + addAnnotation + (getCdapServiceInstance_ClusterService(), + source, + new String[] { + "type", "operational" + }); + addAnnotation + (getCdapServiceInstance_CdapNamespace(), + source, + new String[] { + "type", "operational" + }); + addAnnotation + (getCdapServiceInstance_Service(), + source, + new String[] { + "type", "operational" + }); + } + +} //CdapPackageImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceDescriptorImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceDescriptorImpl.java new file mode 100644 index 0000000..7855124 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceDescriptorImpl.java @@ -0,0 +1,347 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.impl; + +import org.openecomp.dcae.controller.core.service.impl.DcaeServiceDescriptorImpl; + +import org.openecomp.dcae.controller.service.cdap.CdapPackage; +import org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Service Descriptor'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceDescriptorImpl#getServicePackage Service Package}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceDescriptorImpl#getServiceClass Service Class}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceDescriptorImpl#getServiceInstanceClass Service Instance Class}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceDescriptorImpl#getJarFile Jar File}
  • + *
+ *

+ * + * @generated + */ +public class CdapServiceDescriptorImpl extends DcaeServiceDescriptorImpl implements CdapServiceDescriptor { + /** + * The default value of the '{@link #getServicePackage() Service Package}' attribute. + * + * + * @see #getServicePackage() + * @generated + * @ordered + */ + protected static final String SERVICE_PACKAGE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServicePackage() Service Package}' attribute. + * + * + * @see #getServicePackage() + * @generated + * @ordered + */ + protected String servicePackage = SERVICE_PACKAGE_EDEFAULT; + + /** + * The default value of the '{@link #getServiceClass() Service Class}' attribute. + * + * + * @see #getServiceClass() + * @generated + * @ordered + */ + protected static final String SERVICE_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServiceClass() Service Class}' attribute. + * + * + * @see #getServiceClass() + * @generated + * @ordered + */ + protected String serviceClass = SERVICE_CLASS_EDEFAULT; + + /** + * The default value of the '{@link #getServiceInstanceClass() Service Instance Class}' attribute. + * + * + * @see #getServiceInstanceClass() + * @generated + * @ordered + */ + protected static final String SERVICE_INSTANCE_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServiceInstanceClass() Service Instance Class}' attribute. + * + * + * @see #getServiceInstanceClass() + * @generated + * @ordered + */ + protected String serviceInstanceClass = SERVICE_INSTANCE_CLASS_EDEFAULT; + + /** + * The default value of the '{@link #getJarFile() Jar File}' attribute. + * + * + * @see #getJarFile() + * @generated + * @ordered + */ + protected static final String JAR_FILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getJarFile() Jar File}' attribute. + * + * + * @see #getJarFile() + * @generated + * @ordered + */ + protected String jarFile = JAR_FILE_EDEFAULT; + + /** + * + * + * @generated + */ + protected CdapServiceDescriptorImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_SERVICE_DESCRIPTOR; + } + + /** + * + * + * @generated + */ + public String getServicePackage() { + return servicePackage; + } + + /** + * + * + * @generated + */ + public void setServicePackage(String newServicePackage) { + String oldServicePackage = servicePackage; + servicePackage = newServicePackage; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_PACKAGE, oldServicePackage, servicePackage)); + } + + /** + * + * + * @generated + */ + public String getServiceClass() { + return serviceClass; + } + + /** + * + * + * @generated + */ + public void setServiceClass(String newServiceClass) { + String oldServiceClass = serviceClass; + serviceClass = newServiceClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_CLASS, oldServiceClass, serviceClass)); + } + + /** + * + * + * @generated + */ + public String getServiceInstanceClass() { + return serviceInstanceClass; + } + + /** + * + * + * @generated + */ + public void setServiceInstanceClass(String newServiceInstanceClass) { + String oldServiceInstanceClass = serviceInstanceClass; + serviceInstanceClass = newServiceInstanceClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS, oldServiceInstanceClass, serviceInstanceClass)); + } + + /** + * + * + * @generated + */ + public String getJarFile() { + return jarFile; + } + + /** + * + * + * @generated + */ + public void setJarFile(String newJarFile) { + String oldJarFile = jarFile; + jarFile = newJarFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_DESCRIPTOR__JAR_FILE, oldJarFile, jarFile)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + return getServicePackage(); + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_CLASS: + return getServiceClass(); + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + return getServiceInstanceClass(); + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__JAR_FILE: + return getJarFile(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + setServicePackage((String)newValue); + return; + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_CLASS: + setServiceClass((String)newValue); + return; + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + setServiceInstanceClass((String)newValue); + return; + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__JAR_FILE: + setJarFile((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + setServicePackage(SERVICE_PACKAGE_EDEFAULT); + return; + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_CLASS: + setServiceClass(SERVICE_CLASS_EDEFAULT); + return; + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + setServiceInstanceClass(SERVICE_INSTANCE_CLASS_EDEFAULT); + return; + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__JAR_FILE: + setJarFile(JAR_FILE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + return SERVICE_PACKAGE_EDEFAULT == null ? servicePackage != null : !SERVICE_PACKAGE_EDEFAULT.equals(servicePackage); + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_CLASS: + return SERVICE_CLASS_EDEFAULT == null ? serviceClass != null : !SERVICE_CLASS_EDEFAULT.equals(serviceClass); + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + return SERVICE_INSTANCE_CLASS_EDEFAULT == null ? serviceInstanceClass != null : !SERVICE_INSTANCE_CLASS_EDEFAULT.equals(serviceInstanceClass); + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__JAR_FILE: + return JAR_FILE_EDEFAULT == null ? jarFile != null : !JAR_FILE_EDEFAULT.equals(jarFile); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (servicePackage: "); + result.append(servicePackage); + result.append(", serviceClass: "); + result.append(serviceClass); + result.append(", serviceInstanceClass: "); + result.append(serviceInstanceClass); + result.append(", jarFile: "); + result.append(jarFile); + result.append(')'); + return result.toString(); + } + +} //CdapServiceDescriptorImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceImpl.java new file mode 100644 index 0000000..a219229 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceImpl.java @@ -0,0 +1,209 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.impl; + +import org.openecomp.dcae.controller.core.service.impl.DcaeServiceImpl; +import org.openecomp.dcae.controller.service.cdap.CdapPackage; +import org.openecomp.dcae.controller.service.cdap.CdapService; +import org.openecomp.dcae.controller.service.cdap.CdapServiceInstance; +import java.lang.reflect.InvocationTargetException; +import java.util.Collection; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Service'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceImpl#getInstances Instances}
  • + *
+ *

+ * + * @generated + */ +public class CdapServiceImpl extends DcaeServiceImpl implements CdapService { + /** + * The cached value of the '{@link #getInstances() Instances}' containment reference list. + * + * + * @see #getInstances() + * @generated + * @ordered + */ + protected EList instances; + + /** + * + * + * @generated + */ + protected CdapServiceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_SERVICE; + } + + /** + * + * + * @generated + */ + public EList getInstances() { + if (instances == null) { + instances = new EObjectContainmentWithInverseEList(CdapServiceInstance.class, this, CdapPackage.CDAP_SERVICE__INSTANCES, CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE); + } + return instances; + } + + /** + * + * + * @generated + */ + public void updateInstanceConfiguration(String instanceName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE__INSTANCES: + return ((InternalEList)(InternalEList)getInstances()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE__INSTANCES: + return ((InternalEList)getInstances()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE__INSTANCES: + return getInstances(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE__INSTANCES: + getInstances().clear(); + getInstances().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE__INSTANCES: + getInstances().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE__INSTANCES: + return instances != null && !instances.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case CdapPackage.CDAP_SERVICE___UPDATE_INSTANCE_CONFIGURATION__STRING: + updateInstanceConfiguration((String)arguments.get(0)); + return null; + } + return super.eInvoke(operationID, arguments); + } + +} //CdapServiceImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceInstanceConfigurationImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceInstanceConfigurationImpl.java new file mode 100644 index 0000000..b4fbc69 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceInstanceConfigurationImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.impl; + +import org.openecomp.dcae.controller.service.cdap.CdapPackage; +import org.openecomp.dcae.controller.service.cdap.CdapServiceInstanceConfiguration; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Service Instance Configuration'. + * + *

+ *

+ * + * @generated + */ +public class CdapServiceInstanceConfigurationImpl extends MinimalEObjectImpl.Container implements CdapServiceInstanceConfiguration { + /** + * + * + * @generated + */ + protected CdapServiceInstanceConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_SERVICE_INSTANCE_CONFIGURATION; + } + +} //CdapServiceInstanceConfigurationImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceInstanceImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceInstanceImpl.java new file mode 100644 index 0000000..07ebb3e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceInstanceImpl.java @@ -0,0 +1,939 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.impl; + +import org.openecomp.dcae.controller.core.service.impl.DcaeServiceInstanceImpl; + +import org.openecomp.dcae.controller.service.cdap.CdapApplication; +import org.openecomp.dcae.controller.service.cdap.CdapArtifact; +import org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration; +import org.openecomp.dcae.controller.service.cdap.CdapPackage; +import org.openecomp.dcae.controller.service.cdap.CdapService; +import org.openecomp.dcae.controller.service.cdap.CdapServiceInstance; + +import org.openecomp.dcae.controller.service.cdap.CdapServiceInstanceConfiguration; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.ncomp.cdap.CdapNamespace; + +import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EDataTypeEList; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Service Instance'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getCdapName Cdap Name}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getNamespace Namespace}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getAppJar App Jar}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getAppConfigFile App Config File}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getArtifacts Artifacts}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getApps Apps}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getAppNames App Names}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getWorkerNames Worker Names}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getFlowNames Flow Names}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getServiceNames Service Names}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getConfiguration Configuration}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getCdapConfiguration Cdap Configuration}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getClusterService Cluster Service}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getCdapNamespace Cdap Namespace}
  • + *
  • {@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getService Service}
  • + *
+ *

+ * + * @generated + */ +public class CdapServiceInstanceImpl extends DcaeServiceInstanceImpl implements CdapServiceInstance { + /** + * The default value of the '{@link #getCdapName() Cdap Name}' attribute. + * + * + * @see #getCdapName() + * @generated + * @ordered + */ + protected static final String CDAP_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCdapName() Cdap Name}' attribute. + * + * + * @see #getCdapName() + * @generated + * @ordered + */ + protected String cdapName = CDAP_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getNamespace() Namespace}' attribute. + * + * + * @see #getNamespace() + * @generated + * @ordered + */ + protected static final String NAMESPACE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNamespace() Namespace}' attribute. + * + * + * @see #getNamespace() + * @generated + * @ordered + */ + protected String namespace = NAMESPACE_EDEFAULT; + + /** + * The default value of the '{@link #getAppJar() App Jar}' attribute. + * + * + * @see #getAppJar() + * @generated + * @ordered + */ + protected static final String APP_JAR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAppJar() App Jar}' attribute. + * + * + * @see #getAppJar() + * @generated + * @ordered + */ + protected String appJar = APP_JAR_EDEFAULT; + + /** + * The default value of the '{@link #getAppConfigFile() App Config File}' attribute. + * + * + * @see #getAppConfigFile() + * @generated + * @ordered + */ + protected static final String APP_CONFIG_FILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAppConfigFile() App Config File}' attribute. + * + * + * @see #getAppConfigFile() + * @generated + * @ordered + */ + protected String appConfigFile = APP_CONFIG_FILE_EDEFAULT; + + /** + * The cached value of the '{@link #getArtifacts() Artifacts}' containment reference list. + * + * + * @see #getArtifacts() + * @generated + * @ordered + */ + protected EList artifacts; + + /** + * The cached value of the '{@link #getApps() Apps}' containment reference list. + * + * + * @see #getApps() + * @generated + * @ordered + */ + protected EList apps; + + /** + * The cached value of the '{@link #getAppNames() App Names}' attribute list. + * + * + * @see #getAppNames() + * @generated + * @ordered + */ + protected EList appNames; + + /** + * The cached value of the '{@link #getWorkerNames() Worker Names}' attribute list. + * + * + * @see #getWorkerNames() + * @generated + * @ordered + */ + protected EList workerNames; + + /** + * The cached value of the '{@link #getFlowNames() Flow Names}' attribute list. + * + * + * @see #getFlowNames() + * @generated + * @ordered + */ + protected EList flowNames; + + /** + * The cached value of the '{@link #getServiceNames() Service Names}' attribute list. + * + * + * @see #getServiceNames() + * @generated + * @ordered + */ + protected EList serviceNames; + + /** + * The cached value of the '{@link #getConfiguration() Configuration}' containment reference. + * + * + * @see #getConfiguration() + * @generated + * @ordered + */ + protected CdapServiceInstanceConfiguration configuration; + + /** + * The cached value of the '{@link #getCdapConfiguration() Cdap Configuration}' containment reference. + * + * + * @see #getCdapConfiguration() + * @generated + * @ordered + */ + protected CdapInternalApplicationConfiguration cdapConfiguration; + + /** + * The cached value of the '{@link #getClusterService() Cluster Service}' reference. + * + * + * @see #getClusterService() + * @generated + * @ordered + */ + protected CdapClusterServiceInstance clusterService; + + /** + * The cached value of the '{@link #getCdapNamespace() Cdap Namespace}' reference. + * + * + * @see #getCdapNamespace() + * @generated + * @ordered + */ + protected CdapNamespace cdapNamespace; + + /** + * + * + * @generated + */ + protected CdapServiceInstanceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_SERVICE_INSTANCE; + } + + /** + * + * + * @generated + */ + public String getCdapName() { + return cdapName; + } + + /** + * + * + * @generated + */ + public void setCdapName(String newCdapName) { + String oldCdapName = cdapName; + cdapName = newCdapName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAME, oldCdapName, cdapName)); + } + + /** + * + * + * @generated + */ + public CdapNamespace getCdapNamespace() { + if (cdapNamespace != null && cdapNamespace.eIsProxy()) { + InternalEObject oldCdapNamespace = (InternalEObject)cdapNamespace; + cdapNamespace = (CdapNamespace)eResolveProxy(oldCdapNamespace); + if (cdapNamespace != oldCdapNamespace) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE, oldCdapNamespace, cdapNamespace)); + } + } + return cdapNamespace; + } + + /** + * + * + * @generated + */ + public CdapNamespace basicGetCdapNamespace() { + return cdapNamespace; + } + + /** + * + * + * @generated + */ + public void setCdapNamespace(CdapNamespace newCdapNamespace) { + CdapNamespace oldCdapNamespace = cdapNamespace; + cdapNamespace = newCdapNamespace; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE, oldCdapNamespace, cdapNamespace)); + } + + /** + * + * + * @generated + */ + public String getNamespace() { + return namespace; + } + + /** + * + * + * @generated + */ + public void setNamespace(String newNamespace) { + String oldNamespace = namespace; + namespace = newNamespace; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__NAMESPACE, oldNamespace, namespace)); + } + + /** + * + * + * @generated + */ + public String getAppJar() { + return appJar; + } + + /** + * + * + * @generated + */ + public void setAppJar(String newAppJar) { + String oldAppJar = appJar; + appJar = newAppJar; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__APP_JAR, oldAppJar, appJar)); + } + + /** + * + * + * @generated + */ + public String getAppConfigFile() { + return appConfigFile; + } + + /** + * + * + * @generated + */ + public void setAppConfigFile(String newAppConfigFile) { + String oldAppConfigFile = appConfigFile; + appConfigFile = newAppConfigFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__APP_CONFIG_FILE, oldAppConfigFile, appConfigFile)); + } + + /** + * + * + * @generated + */ + public EList getArtifacts() { + if (artifacts == null) { + artifacts = new EObjectContainmentEList(CdapArtifact.class, this, CdapPackage.CDAP_SERVICE_INSTANCE__ARTIFACTS); + } + return artifacts; + } + + /** + * + * + * @generated + */ + public EList getApps() { + if (apps == null) { + apps = new EObjectContainmentEList(CdapApplication.class, this, CdapPackage.CDAP_SERVICE_INSTANCE__APPS); + } + return apps; + } + + /** + * + * + * @generated + */ + public EList getAppNames() { + if (appNames == null) { + appNames = new EDataTypeEList(String.class, this, CdapPackage.CDAP_SERVICE_INSTANCE__APP_NAMES); + } + return appNames; + } + + /** + * + * + * @generated + */ + public EList getWorkerNames() { + if (workerNames == null) { + workerNames = new EDataTypeEList(String.class, this, CdapPackage.CDAP_SERVICE_INSTANCE__WORKER_NAMES); + } + return workerNames; + } + + /** + * + * + * @generated + */ + public EList getFlowNames() { + if (flowNames == null) { + flowNames = new EDataTypeEList(String.class, this, CdapPackage.CDAP_SERVICE_INSTANCE__FLOW_NAMES); + } + return flowNames; + } + + /** + * + * + * @generated + */ + public EList getServiceNames() { + if (serviceNames == null) { + serviceNames = new EDataTypeEList(String.class, this, CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE_NAMES); + } + return serviceNames; + } + + /** + * + * + * @generated + */ + public CdapServiceInstanceConfiguration getConfiguration() { + return configuration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetConfiguration(CdapServiceInstanceConfiguration newConfiguration, NotificationChain msgs) { + CdapServiceInstanceConfiguration oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION, oldConfiguration, newConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setConfiguration(CdapServiceInstanceConfiguration newConfiguration) { + if (newConfiguration != configuration) { + NotificationChain msgs = null; + if (configuration != null) + msgs = ((InternalEObject)configuration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION, null, msgs); + if (newConfiguration != null) + msgs = ((InternalEObject)newConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION, null, msgs); + msgs = basicSetConfiguration(newConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION, newConfiguration, newConfiguration)); + } + + /** + * + * + * @generated + */ + public CdapInternalApplicationConfiguration getCdapConfiguration() { + return cdapConfiguration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetCdapConfiguration(CdapInternalApplicationConfiguration newCdapConfiguration, NotificationChain msgs) { + CdapInternalApplicationConfiguration oldCdapConfiguration = cdapConfiguration; + cdapConfiguration = newCdapConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION, oldCdapConfiguration, newCdapConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setCdapConfiguration(CdapInternalApplicationConfiguration newCdapConfiguration) { + if (newCdapConfiguration != cdapConfiguration) { + NotificationChain msgs = null; + if (cdapConfiguration != null) + msgs = ((InternalEObject)cdapConfiguration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION, null, msgs); + if (newCdapConfiguration != null) + msgs = ((InternalEObject)newCdapConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION, null, msgs); + msgs = basicSetCdapConfiguration(newCdapConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION, newCdapConfiguration, newCdapConfiguration)); + } + + /** + * + * + * @generated + */ + public CdapClusterServiceInstance getClusterService() { + if (clusterService != null && clusterService.eIsProxy()) { + InternalEObject oldClusterService = (InternalEObject)clusterService; + clusterService = (CdapClusterServiceInstance)eResolveProxy(oldClusterService); + if (clusterService != oldClusterService) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CdapPackage.CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE, oldClusterService, clusterService)); + } + } + return clusterService; + } + + /** + * + * + * @generated + */ + public CdapClusterServiceInstance basicGetClusterService() { + return clusterService; + } + + /** + * + * + * @generated + */ + public void setClusterService(CdapClusterServiceInstance newClusterService) { + CdapClusterServiceInstance oldClusterService = clusterService; + clusterService = newClusterService; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE, oldClusterService, clusterService)); + } + + /** + * + * + * @generated + */ + public CdapService getService() { + if (eContainerFeatureID() != CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE) return null; + return (CdapService)eContainer(); + } + + /** + * + * + * @generated + */ + public CdapService basicGetService() { + if (eContainerFeatureID() != CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE) return null; + return (CdapService)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetService(CdapService newService, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newService, CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setService(CdapService newService) { + if (newService != eInternalContainer() || (eContainerFeatureID() != CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE && newService != null)) { + if (EcoreUtil.isAncestor(this, newService)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newService != null) + msgs = ((InternalEObject)newService).eInverseAdd(this, CdapPackage.CDAP_SERVICE__INSTANCES, CdapService.class, msgs); + msgs = basicSetService(newService, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE, newService, newService)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetService((CdapService)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_INSTANCE__ARTIFACTS: + return ((InternalEList)getArtifacts()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_SERVICE_INSTANCE__APPS: + return ((InternalEList)getApps()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION: + return basicSetConfiguration(null, msgs); + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION: + return basicSetCdapConfiguration(null, msgs); + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE: + return basicSetService(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE: + return eInternalContainer().eInverseRemove(this, CdapPackage.CDAP_SERVICE__INSTANCES, CdapService.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAME: + return getCdapName(); + case CdapPackage.CDAP_SERVICE_INSTANCE__NAMESPACE: + return getNamespace(); + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_JAR: + return getAppJar(); + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_CONFIG_FILE: + return getAppConfigFile(); + case CdapPackage.CDAP_SERVICE_INSTANCE__ARTIFACTS: + return getArtifacts(); + case CdapPackage.CDAP_SERVICE_INSTANCE__APPS: + return getApps(); + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_NAMES: + return getAppNames(); + case CdapPackage.CDAP_SERVICE_INSTANCE__WORKER_NAMES: + return getWorkerNames(); + case CdapPackage.CDAP_SERVICE_INSTANCE__FLOW_NAMES: + return getFlowNames(); + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE_NAMES: + return getServiceNames(); + case CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION: + return getConfiguration(); + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION: + return getCdapConfiguration(); + case CdapPackage.CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE: + if (resolve) return getClusterService(); + return basicGetClusterService(); + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE: + if (resolve) return getCdapNamespace(); + return basicGetCdapNamespace(); + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE: + if (resolve) return getService(); + return basicGetService(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAME: + setCdapName((String)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__NAMESPACE: + setNamespace((String)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_JAR: + setAppJar((String)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_CONFIG_FILE: + setAppConfigFile((String)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__ARTIFACTS: + getArtifacts().clear(); + getArtifacts().addAll((Collection)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__APPS: + getApps().clear(); + getApps().addAll((Collection)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_NAMES: + getAppNames().clear(); + getAppNames().addAll((Collection)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__WORKER_NAMES: + getWorkerNames().clear(); + getWorkerNames().addAll((Collection)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__FLOW_NAMES: + getFlowNames().clear(); + getFlowNames().addAll((Collection)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE_NAMES: + getServiceNames().clear(); + getServiceNames().addAll((Collection)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION: + setConfiguration((CdapServiceInstanceConfiguration)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION: + setCdapConfiguration((CdapInternalApplicationConfiguration)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE: + setClusterService((CdapClusterServiceInstance)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE: + setCdapNamespace((CdapNamespace)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE: + setService((CdapService)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAME: + setCdapName(CDAP_NAME_EDEFAULT); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__NAMESPACE: + setNamespace(NAMESPACE_EDEFAULT); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_JAR: + setAppJar(APP_JAR_EDEFAULT); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_CONFIG_FILE: + setAppConfigFile(APP_CONFIG_FILE_EDEFAULT); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__ARTIFACTS: + getArtifacts().clear(); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__APPS: + getApps().clear(); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_NAMES: + getAppNames().clear(); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__WORKER_NAMES: + getWorkerNames().clear(); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__FLOW_NAMES: + getFlowNames().clear(); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE_NAMES: + getServiceNames().clear(); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION: + setConfiguration((CdapServiceInstanceConfiguration)null); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION: + setCdapConfiguration((CdapInternalApplicationConfiguration)null); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE: + setClusterService((CdapClusterServiceInstance)null); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE: + setCdapNamespace((CdapNamespace)null); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE: + setService((CdapService)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAME: + return CDAP_NAME_EDEFAULT == null ? cdapName != null : !CDAP_NAME_EDEFAULT.equals(cdapName); + case CdapPackage.CDAP_SERVICE_INSTANCE__NAMESPACE: + return NAMESPACE_EDEFAULT == null ? namespace != null : !NAMESPACE_EDEFAULT.equals(namespace); + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_JAR: + return APP_JAR_EDEFAULT == null ? appJar != null : !APP_JAR_EDEFAULT.equals(appJar); + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_CONFIG_FILE: + return APP_CONFIG_FILE_EDEFAULT == null ? appConfigFile != null : !APP_CONFIG_FILE_EDEFAULT.equals(appConfigFile); + case CdapPackage.CDAP_SERVICE_INSTANCE__ARTIFACTS: + return artifacts != null && !artifacts.isEmpty(); + case CdapPackage.CDAP_SERVICE_INSTANCE__APPS: + return apps != null && !apps.isEmpty(); + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_NAMES: + return appNames != null && !appNames.isEmpty(); + case CdapPackage.CDAP_SERVICE_INSTANCE__WORKER_NAMES: + return workerNames != null && !workerNames.isEmpty(); + case CdapPackage.CDAP_SERVICE_INSTANCE__FLOW_NAMES: + return flowNames != null && !flowNames.isEmpty(); + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE_NAMES: + return serviceNames != null && !serviceNames.isEmpty(); + case CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION: + return configuration != null; + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION: + return cdapConfiguration != null; + case CdapPackage.CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE: + return clusterService != null; + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE: + return cdapNamespace != null; + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE: + return basicGetService() != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (cdapName: "); + result.append(cdapName); + result.append(", namespace: "); + result.append(namespace); + result.append(", appJar: "); + result.append(appJar); + result.append(", appConfigFile: "); + result.append(appConfigFile); + result.append(", appNames: "); + result.append(appNames); + result.append(", workerNames: "); + result.append(workerNames); + result.append(", flowNames: "); + result.append(flowNames); + result.append(", serviceNames: "); + result.append(serviceNames); + result.append(')'); + return result.toString(); + } + +} //CdapServiceInstanceImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/util/CdapAdapterFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/util/CdapAdapterFactory.java new file mode 100644 index 0000000..6df62fb --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/util/CdapAdapterFactory.java @@ -0,0 +1,325 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; +import org.openecomp.dcae.controller.service.cdap.*; + +import org.openecomp.ncomp.core.NamedEntity; +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage + * @generated + */ +public class CdapAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static CdapPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public CdapAdapterFactory() { + if (modelPackage == null) { + modelPackage = CdapPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected CdapSwitch modelSwitch = + new CdapSwitch() { + @Override + public Adapter caseCdapService(CdapService object) { + return createCdapServiceAdapter(); + } + @Override + public Adapter caseCdapServiceInstance(CdapServiceInstance object) { + return createCdapServiceInstanceAdapter(); + } + @Override + public Adapter caseCdapApplication(CdapApplication object) { + return createCdapApplicationAdapter(); + } + @Override + public Adapter caseCdapArtifact(CdapArtifact object) { + return createCdapArtifactAdapter(); + } + @Override + public Adapter caseCdapServiceInstanceConfiguration(CdapServiceInstanceConfiguration object) { + return createCdapServiceInstanceConfigurationAdapter(); + } + @Override + public Adapter caseCdapInternalApplicationConfiguration(CdapInternalApplicationConfiguration object) { + return createCdapInternalApplicationConfigurationAdapter(); + } + @Override + public Adapter caseCdapServiceDescriptor(CdapServiceDescriptor object) { + return createCdapServiceDescriptorAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseDcaeService(DcaeService object) { + return createDcaeServiceAdapter(); + } + @Override + public Adapter caseDcaeServiceInstance(DcaeServiceInstance object) { + return createDcaeServiceInstanceAdapter(); + } + @Override + public Adapter caseDcaeServiceDescriptor(DcaeServiceDescriptor object) { + return createDcaeServiceDescriptorAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.CdapService Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.CdapService + * @generated + */ + public Adapter createCdapServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance + * @generated + */ + public Adapter createCdapServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication Application}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.CdapApplication + * @generated + */ + public Adapter createCdapApplicationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.CdapArtifact Artifact}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.CdapArtifact + * @generated + */ + public Adapter createCdapArtifactAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstanceConfiguration Service Instance Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstanceConfiguration + * @generated + */ + public Adapter createCdapServiceInstanceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration Internal Application Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration + * @generated + */ + public Adapter createCdapInternalApplicationConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor Service Descriptor}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor + * @generated + */ + public Adapter createCdapServiceDescriptorAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeService Dcae Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeService + * @generated + */ + public Adapter createDcaeServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance Dcae Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance + * @generated + */ + public Adapter createDcaeServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor Dcae Service Descriptor}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor + * @generated + */ + public Adapter createDcaeServiceDescriptorAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //CdapAdapterFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/util/CdapSwitch.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/util/CdapSwitch.java new file mode 100644 index 0000000..ae39c7b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/util/CdapSwitch.java @@ -0,0 +1,329 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; +import org.openecomp.dcae.controller.service.cdap.*; + +import org.openecomp.ncomp.core.NamedEntity; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage + * @generated + */ +public class CdapSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static CdapPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public CdapSwitch() { + if (modelPackage == null) { + modelPackage = CdapPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case CdapPackage.CDAP_SERVICE: { + CdapService cdapService = (CdapService)theEObject; + T result = caseCdapService(cdapService); + if (result == null) result = caseDcaeService(cdapService); + if (result == null) result = caseNamedEntity(cdapService); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_SERVICE_INSTANCE: { + CdapServiceInstance cdapServiceInstance = (CdapServiceInstance)theEObject; + T result = caseCdapServiceInstance(cdapServiceInstance); + if (result == null) result = caseDcaeServiceInstance(cdapServiceInstance); + if (result == null) result = caseNamedEntity(cdapServiceInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_APPLICATION: { + CdapApplication cdapApplication = (CdapApplication)theEObject; + T result = caseCdapApplication(cdapApplication); + if (result == null) result = caseNamedEntity(cdapApplication); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_ARTIFACT: { + CdapArtifact cdapArtifact = (CdapArtifact)theEObject; + T result = caseCdapArtifact(cdapArtifact); + if (result == null) result = caseNamedEntity(cdapArtifact); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_SERVICE_INSTANCE_CONFIGURATION: { + CdapServiceInstanceConfiguration cdapServiceInstanceConfiguration = (CdapServiceInstanceConfiguration)theEObject; + T result = caseCdapServiceInstanceConfiguration(cdapServiceInstanceConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION: { + CdapInternalApplicationConfiguration cdapInternalApplicationConfiguration = (CdapInternalApplicationConfiguration)theEObject; + T result = caseCdapInternalApplicationConfiguration(cdapInternalApplicationConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_SERVICE_DESCRIPTOR: { + CdapServiceDescriptor cdapServiceDescriptor = (CdapServiceDescriptor)theEObject; + T result = caseCdapServiceDescriptor(cdapServiceDescriptor); + if (result == null) result = caseDcaeServiceDescriptor(cdapServiceDescriptor); + if (result == null) result = caseNamedEntity(cdapServiceDescriptor); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapService(CdapService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapServiceInstance(CdapServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Application'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Application'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapApplication(CdapApplication object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Artifact'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Artifact'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapArtifact(CdapArtifact object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Service Instance Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Service Instance Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapServiceInstanceConfiguration(CdapServiceInstanceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Internal Application Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Internal Application Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapInternalApplicationConfiguration(CdapInternalApplicationConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Service Descriptor'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Service Descriptor'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapServiceDescriptor(CdapServiceDescriptor object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeService(DcaeService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceInstance(DcaeServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service Descriptor'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service Descriptor'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceDescriptor(DcaeServiceDescriptor object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //CdapSwitch diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapManager.java new file mode 100644 index 0000000..f20e1fa --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapManager.java @@ -0,0 +1,73 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdapmanager; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.ncomp.cdap.CdapConfiguration; + +/** + * + * A representation of the model object 'Cdap Manager'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdapmanager.CdapManager#getConfiguration Configuration}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage#getCdapManager() + * @model + * @generated + */ +public interface CdapManager extends DcaeManager { + /** + * Returns the value of the 'Configuration' containment reference. + * + *

+ * If the meaning of the 'Configuration' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Configuration' containment reference. + * @see #setConfiguration(CdapConfiguration) + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage#getCdapManager_Configuration() + * @model containment="true" + * @generated + */ + CdapConfiguration getConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdapmanager.CdapManager#getConfiguration Configuration}' containment reference. + * + * + * @param value the new value of the 'Configuration' containment reference. + * @see #getConfiguration() + * @generated + */ + void setConfiguration(CdapConfiguration value); + +} // CdapManager diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapmanagerFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapmanagerFactory.java new file mode 100644 index 0000000..ed6da7a --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapmanagerFactory.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdapmanager; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage + * @generated + */ +public interface CdapmanagerFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + CdapmanagerFactory eINSTANCE = org.openecomp.dcae.controller.service.cdapmanager.impl.CdapmanagerFactoryImpl.init(); + + /** + * Returns a new object of class 'Cdap Manager'. + * + * + * @return a new object of class 'Cdap Manager'. + * @generated + */ + CdapManager createCdapManager(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + CdapmanagerPackage getCdapmanagerPackage(); + +} //CdapmanagerFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapmanagerPackage.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapmanagerPackage.java new file mode 100644 index 0000000..edc40a8 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapmanagerPackage.java @@ -0,0 +1,256 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdapmanager; + +import org.openecomp.dcae.controller.core.manager.ManagerPackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-cdap-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service'" + * @generated + */ +public interface CdapmanagerPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "cdapmanager"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.cdapmanager"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "cdapmanager"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + CdapmanagerPackage eINSTANCE = org.openecomp.dcae.controller.service.cdapmanager.impl.CdapmanagerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdapmanager.impl.CdapManagerImpl Cdap Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdapmanager.impl.CdapManagerImpl + * @see org.openecomp.dcae.controller.service.cdapmanager.impl.CdapmanagerPackageImpl#getCdapManager() + * @generated + */ + int CDAP_MANAGER = 0; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_MANAGER__INPUT_STREAMS = ManagerPackage.DCAE_MANAGER__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_MANAGER__OUTPUT_STREAMS = ManagerPackage.DCAE_MANAGER__OUTPUT_STREAMS; + + /** + * The feature id for the 'Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int CDAP_MANAGER__CONFIGURATION = ManagerPackage.DCAE_MANAGER_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Cdap Manager' class. + * + * + * @generated + * @ordered + */ + int CDAP_MANAGER_FEATURE_COUNT = ManagerPackage.DCAE_MANAGER_FEATURE_COUNT + 1; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int CDAP_MANAGER___TEST = ManagerPackage.DCAE_MANAGER___TEST; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int CDAP_MANAGER___SUSPEND = ManagerPackage.DCAE_MANAGER___SUSPEND; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int CDAP_MANAGER___RESUME = ManagerPackage.DCAE_MANAGER___RESUME; + + /** + * The operation id for the 'Public Key' operation. + * + * + * @generated + * @ordered + */ + int CDAP_MANAGER___PUBLIC_KEY = ManagerPackage.DCAE_MANAGER___PUBLIC_KEY; + + /** + * The operation id for the 'Configuration Changed' operation. + * + * + * @generated + * @ordered + */ + int CDAP_MANAGER___CONFIGURATION_CHANGED = ManagerPackage.DCAE_MANAGER___CONFIGURATION_CHANGED; + + /** + * The operation id for the 'Update Streams' operation. + * + * + * @generated + * @ordered + */ + int CDAP_MANAGER___UPDATE_STREAMS__ELIST_ELIST = ManagerPackage.DCAE_MANAGER___UPDATE_STREAMS__ELIST_ELIST; + + /** + * The number of operations of the 'Cdap Manager' class. + * + * + * @generated + * @ordered + */ + int CDAP_MANAGER_OPERATION_COUNT = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdapmanager.CdapManager Cdap Manager}'. + * + * + * @return the meta object for class 'Cdap Manager'. + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapManager + * @generated + */ + EClass getCdapManager(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.cdapmanager.CdapManager#getConfiguration Configuration}'. + * + * + * @return the meta object for the containment reference 'Configuration'. + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapManager#getConfiguration() + * @see #getCdapManager() + * @generated + */ + EReference getCdapManager_Configuration(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + CdapmanagerFactory getCdapmanagerFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdapmanager.impl.CdapManagerImpl Cdap Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.cdapmanager.impl.CdapManagerImpl + * @see org.openecomp.dcae.controller.service.cdapmanager.impl.CdapmanagerPackageImpl#getCdapManager() + * @generated + */ + EClass CDAP_MANAGER = eINSTANCE.getCdapManager(); + + /** + * The meta object literal for the 'Configuration' containment reference feature. + * + * + * @generated + */ + EReference CDAP_MANAGER__CONFIGURATION = eINSTANCE.getCdapManager_Configuration(); + + } + +} //CdapmanagerPackage diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/DockerManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/DockerManager.java new file mode 100644 index 0000000..43ba34d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/DockerManager.java @@ -0,0 +1,73 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdapmanager; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.ncomp.cdap.CdapConfiguration; + +/** + * + * A representation of the model object 'Docker Manager'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdapmanager.DockerManager#getConfiguration Configuration}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage#getDockerManager() + * @model + * @generated + */ +public interface DockerManager extends DcaeManager { + /** + * Returns the value of the 'Configuration' containment reference. + * + *

+ * If the meaning of the 'Configuration' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Configuration' containment reference. + * @see #setConfiguration(CdapConfiguration) + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage#getDockerManager_Configuration() + * @model containment="true" + * @generated + */ + CdapConfiguration getConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdapmanager.DockerManager#getConfiguration Configuration}' containment reference. + * + * + * @param value the new value of the 'Configuration' containment reference. + * @see #getConfiguration() + * @generated + */ + void setConfiguration(CdapConfiguration value); + +} // DockerManager diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapManagerImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapManagerImpl.java new file mode 100644 index 0000000..2a0e857 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapManagerImpl.java @@ -0,0 +1,199 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdapmanager.impl; + +import org.openecomp.dcae.controller.core.manager.impl.DcaeManagerImpl; + +import org.openecomp.dcae.controller.service.cdapmanager.CdapManager; +import org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage; + +import org.openecomp.ncomp.cdap.CdapConfiguration; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Cdap Manager'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.cdapmanager.impl.CdapManagerImpl#getConfiguration Configuration}
  • + *
+ *

+ * + * @generated + */ +public class CdapManagerImpl extends DcaeManagerImpl implements CdapManager { + /** + * The cached value of the '{@link #getConfiguration() Configuration}' containment reference. + * + * + * @see #getConfiguration() + * @generated + * @ordered + */ + protected CdapConfiguration configuration; + + /** + * + * + * @generated + */ + protected CdapManagerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapmanagerPackage.Literals.CDAP_MANAGER; + } + + /** + * + * + * @generated + */ + public CdapConfiguration getConfiguration() { + return configuration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetConfiguration(CdapConfiguration newConfiguration, NotificationChain msgs) { + CdapConfiguration oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION, oldConfiguration, newConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setConfiguration(CdapConfiguration newConfiguration) { + if (newConfiguration != configuration) { + NotificationChain msgs = null; + if (configuration != null) + msgs = ((InternalEObject)configuration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION, null, msgs); + if (newConfiguration != null) + msgs = ((InternalEObject)newConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION, null, msgs); + msgs = basicSetConfiguration(newConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION, newConfiguration, newConfiguration)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION: + return basicSetConfiguration(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION: + return getConfiguration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION: + setConfiguration((CdapConfiguration)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION: + setConfiguration((CdapConfiguration)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION: + return configuration != null; + } + return super.eIsSet(featureID); + } + +} //CdapManagerImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapmanagerFactoryImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapmanagerFactoryImpl.java new file mode 100644 index 0000000..b477796 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapmanagerFactoryImpl.java @@ -0,0 +1,116 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdapmanager.impl; + +import org.openecomp.dcae.controller.service.cdapmanager.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class CdapmanagerFactoryImpl extends EFactoryImpl implements CdapmanagerFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static CdapmanagerFactory init() { + try { + CdapmanagerFactory theCdapmanagerFactory = (CdapmanagerFactory)EPackage.Registry.INSTANCE.getEFactory(CdapmanagerPackage.eNS_URI); + if (theCdapmanagerFactory != null) { + return theCdapmanagerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new CdapmanagerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public CdapmanagerFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case CdapmanagerPackage.CDAP_MANAGER: return createCdapManager(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public CdapManager createCdapManager() { + CdapManagerImpl cdapManager = new CdapManagerImpl(); + return cdapManager; + } + + /** + * + * + * @generated + */ + public CdapmanagerPackage getCdapmanagerPackage() { + return (CdapmanagerPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static CdapmanagerPackage getPackage() { + return CdapmanagerPackage.eINSTANCE; + } + +} //CdapmanagerFactoryImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapmanagerPackageImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapmanagerPackageImpl.java new file mode 100644 index 0000000..85c21a4 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapmanagerPackageImpl.java @@ -0,0 +1,206 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdapmanager.impl; + +import org.openecomp.dcae.controller.core.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.cdapmanager.CdapManager; +import org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerFactory; +import org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage; +import org.openecomp.ncomp.cdap.CdapPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class CdapmanagerPackageImpl extends EPackageImpl implements CdapmanagerPackage { + /** + * + * + * @generated + */ + private EClass cdapManagerEClass = null; + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage#eNS_URI + * @see #init() + * @generated + */ + private CdapmanagerPackageImpl() { + super(eNS_URI, CdapmanagerFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link CdapmanagerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static CdapmanagerPackage init() { + if (isInited) return (CdapmanagerPackage)EPackage.Registry.INSTANCE.getEPackage(CdapmanagerPackage.eNS_URI); + + // Obtain or create and register package + CdapmanagerPackageImpl theCdapmanagerPackage = (CdapmanagerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CdapmanagerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CdapmanagerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + ManagerPackage.eINSTANCE.eClass(); + CdapPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theCdapmanagerPackage.createPackageContents(); + + // Initialize created meta-data + theCdapmanagerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theCdapmanagerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(CdapmanagerPackage.eNS_URI, theCdapmanagerPackage); + return theCdapmanagerPackage; + } + + /** + * + * + * @generated + */ + public EClass getCdapManager() { + return cdapManagerEClass; + } + + /** + * + * + * @generated + */ + public EReference getCdapManager_Configuration() { + return (EReference)cdapManagerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public CdapmanagerFactory getCdapmanagerFactory() { + return (CdapmanagerFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + cdapManagerEClass = createEClass(CDAP_MANAGER); + createEReference(cdapManagerEClass, CDAP_MANAGER__CONFIGURATION); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + ManagerPackage theManagerPackage = (ManagerPackage)EPackage.Registry.INSTANCE.getEPackage(ManagerPackage.eNS_URI); + CdapPackage theCdapPackage = (CdapPackage)EPackage.Registry.INSTANCE.getEPackage(CdapPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + cdapManagerEClass.getESuperTypes().add(theManagerPackage.getDcaeManager()); + + // Initialize classes, features, and operations; add parameters + initEClass(cdapManagerEClass, CdapManager.class, "CdapManager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCdapManager_Configuration(), theCdapPackage.getCdapConfiguration(), null, "configuration", null, 0, 1, CdapManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //CdapmanagerPackageImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/util/CdapmanagerAdapterFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/util/CdapmanagerAdapterFactory.java new file mode 100644 index 0000000..31d68c9 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/util/CdapmanagerAdapterFactory.java @@ -0,0 +1,161 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdapmanager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.cdapmanager.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage + * @generated + */ +public class CdapmanagerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static CdapmanagerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public CdapmanagerAdapterFactory() { + if (modelPackage == null) { + modelPackage = CdapmanagerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected CdapmanagerSwitch modelSwitch = + new CdapmanagerSwitch() { + @Override + public Adapter caseCdapManager(CdapManager object) { + return createCdapManagerAdapter(); + } + @Override + public Adapter caseDcaeManager(DcaeManager object) { + return createDcaeManagerAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdapmanager.CdapManager Cdap Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapManager + * @generated + */ + public Adapter createCdapManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.manager.DcaeManager Dcae Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager + * @generated + */ + public Adapter createDcaeManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //CdapmanagerAdapterFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/util/CdapmanagerSwitch.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/util/CdapmanagerSwitch.java new file mode 100644 index 0000000..a423091 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/util/CdapmanagerSwitch.java @@ -0,0 +1,149 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdapmanager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.cdapmanager.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage + * @generated + */ +public class CdapmanagerSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static CdapmanagerPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public CdapmanagerSwitch() { + if (modelPackage == null) { + modelPackage = CdapmanagerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case CdapmanagerPackage.CDAP_MANAGER: { + CdapManager cdapManager = (CdapManager)theEObject; + T result = caseCdapManager(cdapManager); + if (result == null) result = caseDcaeManager(cdapManager); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Cdap Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Cdap Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapManager(CdapManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeManager(DcaeManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //CdapmanagerSwitch diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore/manager.xcore b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore/manager.xcore new file mode 100644 index 0000000..eed0293 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore/manager.xcore @@ -0,0 +1,34 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-cdap-model/src/main/xcore-gen") + + +package org.openecomp.dcae.controller.service.cdapmanager + +import org.openecomp.dcae.controller.core.manager.DcaeManager +import org.openecomp.ncomp.cdap.CdapConfiguration + +// state of manager +class CdapManager extends DcaeManager { + contains CdapConfiguration configuration +} + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore/service.xcore b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore/service.xcore new file mode 100644 index 0000000..5a26378 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore/service.xcore @@ -0,0 +1,101 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-cdap-model/src/main/xcore-gen") + + +package org.openecomp.dcae.controller.service.cdap + + +import org.openecomp.dcae.controller.core.service.DcaeService +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance +import org.openecomp.ncomp.cdap.CdapNamespace +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor +import org.openecomp.ncomp.cdap.CdapKeyPair +import org.openecomp.ncomp.cdap.CdapEntityWithPreferences +import org.openecomp.ncomp.core.NamedEntity + +annotation "http://openecomp.org" as ecomp +annotation "http://openecomp.org/cdap" as cdap + +class CdapService extends DcaeService { + contains CdapServiceInstance[] instances opposite service + op void updateInstanceConfiguration(String instanceName) +} + +class CdapServiceInstance extends DcaeServiceInstance { + String cdapName + String namespace + String appJar // + String appConfigFile + contains CdapArtifact[] artifacts + contains CdapApplication[] apps + String[] appNames + String[] workerNames + String[] flowNames + String[] serviceNames + @ecomp(^type="configuration") + contains CdapServiceInstanceConfiguration configuration + @ecomp(^type="operational") + contains CdapInternalApplicationConfiguration cdapConfiguration + @ecomp(^type="operational") + refers CdapClusterServiceInstance clusterService + @ecomp(^type="operational") + refers CdapNamespace cdapNamespace + @ecomp(^type="operational") + refers CdapService service opposite instances +} + +class CdapApplication extends NamedEntity { + String jarFile + String artifactName + String version + String appConfigFileContent + +} + +class CdapArtifact extends NamedEntity { + String jarFile + String version + +} + +class CdapServiceInstanceConfiguration { + +} + +class CdapInternalApplicationConfiguration { + contains unordered CdapKeyPair[] config + contains unordered CdapKeyPair[] preferences + contains unordered CdapEntityWithPreferences[] apps + contains unordered CdapEntityWithPreferences[] workers + contains unordered CdapEntityWithPreferences[] flows + contains unordered CdapEntityWithPreferences[] services +} + +class CdapServiceDescriptor extends DcaeServiceDescriptor { + String servicePackage + String serviceClass + String serviceInstanceClass + String jarFile +} + diff --git a/dcae-controller-service-cdap/pom.xml b/dcae-controller-service-cdap/pom.xml new file mode 100644 index 0000000..05eb2ea --- /dev/null +++ b/dcae-controller-service-cdap/pom.xml @@ -0,0 +1,85 @@ + + 4.0.0 + + org.openecomp.dcae.controller + dcae-controller-service-cdap + 0.1.0-SNAPSHOT + pom + dcae-controller-service-cdap + + + UTF-8 + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + + dcae-controller-service-cdap-adaptor + dcae-controller-service-cdap-cluster + + + dcae-controller-service-cdap-model + + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + diff --git a/dcae-controller-service-docker/.gitignore b/dcae-controller-service-docker/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-docker/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-docker/LICENSE.txt b/dcae-controller-service-docker/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-docker/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/.gitignore b/dcae-controller-service-docker/dcae-controller-service-common-docker/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/LICENSE.txt b/dcae-controller-service-docker/dcae-controller-service-common-docker/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.classpath b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.classpath new file mode 100644 index 0000000..d2d34b3 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.gitignore b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.gitignore new file mode 100644 index 0000000..5fb0f33 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.gitignore @@ -0,0 +1,3 @@ +/target/ +/data/ +/log/ diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.project b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.project new file mode 100644 index 0000000..c936ecb --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.project @@ -0,0 +1,35 @@ + + + dcae-controller-service-common-docker-manager + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.core.resources.prefs b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.jdt.groovy.core.prefs b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.ltk.core.refactoring.prefs b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.ltk.core.refactoring.prefs new file mode 100644 index 0000000..b196c64 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.ltk.core.refactoring.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/LICENSE.txt b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/META-INF/MANIFEST.MF b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/META-INF/MANIFEST.MF new file mode 100644 index 0000000..1fca900 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/META-INF/MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: dcae-controller-service-common-docker-manager +Bundle-SymbolicName: dcae-controller-service-common-docker-manager +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.dcae.controller.service.common.docker.manager.tools, + org.openecomp.dcae.controller.service.common.docker.servers.manager +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + dcae-controller-service-common-docker-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/build.properties b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/build.properties new file mode 100644 index 0000000..80bc250 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/build.properties @@ -0,0 +1,6 @@ +source.. = src/main/java/,\ + src/main/resources/,\ + src/test/java/,\ + src/test/resources/ +bin.includes = META-INF/,\ + . diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/config/console.properties b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/config/console.properties new file mode 100644 index 0000000..3a2eb59 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:9801 +localhost.user=console +localhost.password=ZDJmYjUwZTgxZGIyNDBm diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/config/gui.properties b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/config/gui.properties new file mode 100644 index 0000000..e69de29 diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/config/manager.properties b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/config/manager.properties new file mode 100644 index 0000000..bb590b3 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/config/manager.properties @@ -0,0 +1,7 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = 9802 +server.user.console = ZDJmYjUwZTgxZGIyNDBm +server.user.gui = ZmJiMWUxYjFiN2NjODE0 +server.user.client = ZTVmNjA2OTA1YTU0ZGZk diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/config/managers.properties b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/config/managers.properties new file mode 100644 index 0000000..ce32463 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/config/managers.properties @@ -0,0 +1,3 @@ +org.openecomp.dcae.controller.service.common.docker.service.CommonVmServiceInstance.endpoint=http://IP:PORT +org.openecomp.dcae.controller.service.common.docker.service.CommonVmServiceInstance.user=console +org.openecomp.dcae.controller.service.common.docker.service.CommonVmServiceInstance.password=ZDJmYjUwZTgxZGIyNDBm \ No newline at end of file diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/pom.xml b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/pom.xml new file mode 100644 index 0000000..262affe --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/pom.xml @@ -0,0 +1,193 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-common-docker-manager + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-base + 0.1.0-SNAPSHOT + ../../../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-base + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-assembly-plugin + 2.6 + + + zipfile + + single + + package + + false + ${project.artifactId}-${project.version} + + src/assembly/assemble_zip.xml + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/lib + false + true + true + false + false + false + org.opendaylight,com.brocade.odl,ch.qos.logback + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/versions + + + src/main/resources/versions + + version.properties + + true + + + + + + copy-resources + + copy-resources + + validate + + ${basedir}/target/etc/bvc-extensions + + + src/main/resources/etc/bvc-extensions + + feature_config_template.cfg + feature_custom.install + + true + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + attach-artifacts + package + + attach-artifact + + + + + target/${project.artifactId}-${project.version}-runtime.zip + zip + runtime + + + + + + + + + + + + org.openecomp.dcae.controller + dcae-controller-service-common-docker-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-docker-adaptor + ${project.version} + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/assembly/assemble_zip.xml b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..af936c4 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/assembly/assemble_zip.xml @@ -0,0 +1,61 @@ + + + + runtime + + zip + + + + false + + + + target + lib + + dcae-controller-service-common-docker-manager-${project.version}.jar + + + + target/assembly/ + . + + + + + . + lib + + *.jar + + + + src/main/server-gen/bin + bin + 0744 + + + + + src/main/server/bin + bin + 0744 + + + + + src/main/server-gen/scripts + scripts + + + src/main/server/scripts + scripts + + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/java/org/openecomp/dcae/controller/service/common/docker/manager/tools/Generator.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/java/org/openecomp/dcae/controller/service/common/docker/manager/tools/Generator.java new file mode 100644 index 0000000..1245eee --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/java/org/openecomp/dcae/controller/service/common/docker/manager/tools/Generator.java @@ -0,0 +1,99 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.common.docker.manager.tools; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.openecomp.dcae.controller.service.docker.DockerFactory; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelFactory; +import org.openecomp.ncomp.sirius.manager.generator.ControllerGenerator; +import org.openecomp.ncomp.gwt.siriusportal.model.*; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import org.openecomp.dcae.controller.service.dockermanager.DockermanagerFactory; +import org.openecomp.dcae.controller.service.common.docker.service.ServiceFactory; +import org.openecomp.dcae.controller.service.common.docker.manager.ManagerFactory; +import org.openecomp.utils.YamlToJava; + +public class Generator { + + /** + * @param args + */ + public static void main(String[] args) { + @SuppressWarnings("unused") + ServerPackage f = ServerPackage.eINSTANCE; + genManager(); + genService(); + } + + public static void genManager() { + EObject o = ManagerFactory.eINSTANCE.createCommonDockerManager(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix(); + dir = "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceCommonDockerManager"); + m.setTitle("ControllerServiceCommonDockerManager"); + ControllerGenerator g = new ControllerGenerator(o, m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(false); + g.addFactory(ServiceFactory.eINSTANCE); + EObject gui = ModelFactory.eINSTANCE.createGuiClientApi(); + g.addObject("gui", gui, m); + g.setProvider(DockermanagerFactory.eINSTANCE.createDockerManager(), "Dcae"); + g.generate(dir); + g.generateScripts("src/main/server-gen/bin", "controller-service-common-docker-manager"); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; +// YamlToJava.convert("src/main/resources/DcaeServiceDockerHost.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/CommonDockerManager.yaml", dir + "/logging", pName); + String pName1 = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".gui.logging"; + YamlToJava.convert("src/main/sirius-gen/GuiClientApi.yaml", dir + "/gui/logging", pName1); + } + + public static void genService() { + EObject o = ServiceFactory.eINSTANCE.createCommonDockerService(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+"$", "") + "servers." + p.getNsPrefix(); + dir = "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceCommonDockerService"); + m.setTitle("ControllerServiceCommonDockerService"); + ControllerGenerator g = new ControllerGenerator(o, m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(true); + g.addFactory(ServiceFactory.eINSTANCE); + g.setProvider(DockerFactory.eINSTANCE.createDockerService(), "Dcae"); + g.generate(dir); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; +// YamlToJava.convert("src/main/resources/DcaeServiceDockerHost.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/CommonDockerService.yaml", dir + "/logging", pName); + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/java/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerProvider.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/java/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerProvider.java new file mode 100644 index 0000000..4d1df00 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/java/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerProvider.java @@ -0,0 +1,112 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.docker.servers.manager; + +import java.io.OutputStreamWriter; +import java.util.Date; + +import org.apache.log4j.Logger; +import org.json.JSONObject; + +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.service.HealthTestStatus; +import org.openecomp.dcae.controller.core.service.ServiceFactory; +import org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager; +import org.openecomp.dcae.controller.service.servers.dockermanager.DcaeDockerManagerProvider; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; +import org.openecomp.ncomp.utils.ShellCmd; +import org.openecomp.ncomp.webservice.utils.FileUtils; + +public class DcaeCommonDockerManagerProvider extends DcaeDockerManagerProvider { + private static final Logger logger = Logger.getLogger(DcaeCommonDockerManagerProvider.class); + CommonDockerManager o; + + public DcaeCommonDockerManagerProvider(ISiriusServer controller, CommonDockerManager o) { + super(controller, o); + this.o = o; + } + + @Override + public void configurationChanged() { + super.configurationChanged(); + try { + Date now = new Date(); + controller.getServer(); + JSONObject json = ManagementServer.ecore2json(o, 1000, null, true); + String filename = "/tmp/"+ now.getTime() + "json"; + OutputStreamWriter w = FileUtils.filename2writer(filename); + w.append(json.toString(2)); + w.close(); + run(o.getScript() + " configurationChanged " + filename,60000); + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("configurationChanged" + e); + throw new RuntimeException(e); + } + } + @Override + public HealthTestResponse test() { + String s = run(o.getScript() + " test", o.getTestTimeout()); + String a[] = s.split(":"); + int index = s.indexOf(":"); + String msg = index < 0 ? null : s.substring(index); + HealthTestResponse res = ServiceFactory.eINSTANCE.createHealthTestResponse(); + if ("GREEN".equalsIgnoreCase(a[0])) { + res.setStatus(HealthTestStatus.GREEN); + res.setMessageCode(msg); + } else if ("YELLOW".equalsIgnoreCase(a[0])) { + res.setStatus(HealthTestStatus.YELLOW); + res.setMessageCode(msg); + } else if ("RED".equalsIgnoreCase(a[0])) { + res.setStatus(HealthTestStatus.RED); + res.setMessageCode(msg); + } else { + res.setStatus(HealthTestStatus.RED); + res.setMessageCode("Bad return string: " + s); + } + return res; + } + + @Override + public void suspend() { + run(o.getScript() + " suspend", o.getSuspendTimeout()); + } + + @Override + public void resume() { + run(o.getScript() + " resume", o.getResumeTimeout()); + } + + private String run(String cmd, long wait) { + try { + ShellCmd worker = new ShellCmd(cmd); + return worker.result(wait); + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.warn("Unable to run cmd: " + cmd + " " + e); + throw new RuntimeException("Unable to run cmd: " + cmd + " " + e,e); + } + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/java/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApiProvider.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/java/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApiProvider.java new file mode 100644 index 0000000..1c3e2e5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/java/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApiProvider.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.docker.servers.manager.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProvider extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProvider.class); + GuiClientApi o; + + public DcaeGuiClientApiProvider(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/java/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceProvider.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/java/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceProvider.java new file mode 100644 index 0000000..37771f6 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/java/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceProvider.java @@ -0,0 +1,85 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.docker.servers.service; + + + + + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; + +import org.openecomp.dcae.controller.service.servers.docker.DcaeDockerServiceProvider; +import org.openecomp.dcae.controller.service.docker.DockerServiceInstance; +import org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager; +import org.openecomp.dcae.controller.service.common.docker.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.common.docker.service.CommonDockerService; +import org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance; +import org.openecomp.dcae.controller.service.common.docker.service.ServiceFactory; + + +public class DcaeCommonDockerServiceProvider extends DcaeDockerServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeCommonDockerServiceProvider.class); + CommonDockerService o; + + public DcaeCommonDockerServiceProvider(ISiriusServer controller, CommonDockerService o) { + super(controller, o); + this.o = o; + } + + @Override + protected EObject convertToManagerConfiguration(DockerServiceInstance i) { + CommonDockerServiceInstance i1 = (CommonDockerServiceInstance) i; + CommonDockerServiceInstance c = ServiceFactory.eINSTANCE.createCommonDockerServiceInstance(); + c.setScript(i1.getScript()); + c.setConfigureTimeout(i1.getConfigureTimeout()); + c.setTestTimeout(i1.getTestTimeout()); + c.setSuspendTimeout(i1.getSuspendTimeout()); + c.setResumeTimeout(i1.getResumeTimeout()); + c.setDockerConfiguration(EcoreUtil.copy(i1.getDockerConfiguration())); + ManagementServer.decryptPasswords(c.getDockerConfiguration()); + return c; + } + + @Override + public EObject managerConfiguration(String instanceName) { + CommonDockerServiceInstance i1 = (CommonDockerServiceInstance) findInstance(instanceName); + CommonDockerManager c = ManagerFactory.eINSTANCE.createCommonDockerManager(); + c.setScript(i1.getScript()); + c.setConfigureTimeout(i1.getConfigureTimeout()); + c.setTestTimeout(i1.getTestTimeout()); + c.setSuspendTimeout(i1.getSuspendTimeout()); + c.setResumeTimeout(i1.getResumeTimeout()); + c.setDockerConfiguration(EcoreUtil.copy(i1.getDockerConfiguration())); + return c; + } + + + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server-gen/bin/controller-service-common-docker-manager-controller b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server-gen/bin/controller-service-common-docker-manager-controller new file mode 100644 index 0000000..936326e --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server-gen/bin/controller-service-common-docker-manager-controller @@ -0,0 +1,138 @@ +#!/bin/bash + +# setup env if needed. java 6 required +## JAVA_HOME= + +############################## DO NOT EDIT BELOW ########################## + +SNAME="Dcae Controller" +PNAME=controller-service-common-docker-manager-controller +CLASS=org.openecomp.dcae.controller.service.common.docker.servers.manager.DcaeCommonDockerManagerServer + +############################## COMMON BELOW ########################## + +check_status () +{ + if [ -f "${_PIDFILE}" ]; then + _PID=`cat "${_PIDFILE}"` + check_status_of_pid $_PID + else + _STATUS="$SNAME (no pidfile) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + +remove_pid_file () +{ + if [ -f "${_PIDFILE}" ]; then + rm "${_PIDFILE}" + fi +} + + +_DIR=`dirname "$0"` +_DIR=`dirname "$_DIR"` + +_PIDFILE=$_DIR/PID + +CMD=$1 +shift + +check_status + +CP=$(find $_DIR/lib/*/* -name \*.jar 2>/dev/null | xargs -I X printf ":%s" X) + +JVMARGS=$(grep 'server.jvmargs' $_DIR/config/manager.properties | sed -e 's/.*=//') + +case $CMD in + status) + echo $_STATUS + exit 0 + ;; + console) + $GROOVY_HOME/bin/groovysh -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP + ;; + run) + $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + groovy) + $GROOVY_HOME/bin/groovy -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + start) + if [ "$_RUNNING" = "1" ]; then + echo $_STATUS + exit 0 + fi + mkdir -p $_DIR/logs + if [ -e $_DIR/logs/$PNAME.out.1 ]; then mv $_DIR/logs/$PNAME.out.1 $_DIR/logs/$PNAME.out.2; fi + if [ -e $_DIR/logs/$PNAME.err.1 ]; then mv $_DIR/logs/$PNAME.err.1 $_DIR/logs/$PNAME.err.2; fi + if [ -e $_DIR/logs/$PNAME.out ]; then mv $_DIR/logs/$PNAME.out $_DIR/logs/$PNAME.out.1; fi + if [ -e $_DIR/logs/$PNAME.err ]; then mv $_DIR/logs/$PNAME.err $_DIR/logs/$PNAME.err.1; fi + + nohup $JAVA_HOME/bin/java $JVMARGS -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" $CLASS > $_DIR/logs/$PNAME.out 2> $_DIR/logs/$PNAME.err & + + _PID=$! + echo $_PID > $_PIDFILE + sleep 5 + check_status + echo $_STATUS + if [ "$_RUNNING" = "1" ]; then + exit 0 + else + echo "Failed to start - make sure the $SNAME is fully configured properly" + exit 1 + fi + ;; + stop) + if [ "$_RUNNING" = "0" ]; then + echo $_STATUS + remove_pid_file + exit 0 + fi + echo "Stopping $SNAME..." + _PID_TO_KILL=$_PID; + echo "$SNAME (pid=${_PID_TO_KILL}) is stopping..." + kill -TERM $_PID_TO_KILL + sleep 5 + check_status_of_pid $_PID_TO_KILL + if [ "$_RUNNING" = "1" ]; then + kill -TERM $_PID_TO_KILL + fi + while [ "$_RUNNING" = "1" ]; do + sleep 2 + check_status_of_pid $_PID_TO_KILL + done + remove_pid_file + echo "$SNAME has stopped." + exit 0 + ;; + *) + echo "$0 start|stop" + ;; +esac + + diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server-gen/bin/controller-service-common-vm-manager-controller b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server-gen/bin/controller-service-common-vm-manager-controller new file mode 100644 index 0000000..aa54186 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server-gen/bin/controller-service-common-vm-manager-controller @@ -0,0 +1,138 @@ +#!/bin/bash + +# setup env if needed. java 6 required +## JAVA_HOME= + +############################## DO NOT EDIT BELOW ########################## + +SNAME="Dcae Controller" +PNAME=controller-service-common-docker-manager-controller +CLASS=org.openecomp.dcae.controller.service.common.docker.servers.manager.DcaeCommonVmManagerServer + +############################## COMMON BELOW ########################## + +check_status () +{ + if [ -f "${_PIDFILE}" ]; then + _PID=`cat "${_PIDFILE}"` + check_status_of_pid $_PID + else + _STATUS="$SNAME (no pidfile) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + +remove_pid_file () +{ + if [ -f "${_PIDFILE}" ]; then + rm "${_PIDFILE}" + fi +} + + +_DIR=`dirname "$0"` +_DIR=`dirname "$_DIR"` + +_PIDFILE=$_DIR/PID + +CMD=$1 +shift + +check_status + +CP=$(find $_DIR/lib/*/* -name \*.jar 2>/dev/null | xargs -I X printf ":%s" X) + +JVMARGS=$(grep 'server.jdockerargs' $_DIR/config/manager.properties | sed -e 's/.*=//') + +case $CMD in + status) + echo $_STATUS + exit 0 + ;; + console) + $GROOVY_HOME/bin/groovysh -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP + ;; + run) + $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + groovy) + $GROOVY_HOME/bin/groovy -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + start) + if [ "$_RUNNING" = "1" ]; then + echo $_STATUS + exit 0 + fi + mkdir -p $_DIR/logs + if [ -e $_DIR/logs/$PNAME.out.1 ]; then mv $_DIR/logs/$PNAME.out.1 $_DIR/logs/$PNAME.out.2; fi + if [ -e $_DIR/logs/$PNAME.err.1 ]; then mv $_DIR/logs/$PNAME.err.1 $_DIR/logs/$PNAME.err.2; fi + if [ -e $_DIR/logs/$PNAME.out ]; then mv $_DIR/logs/$PNAME.out $_DIR/logs/$PNAME.out.1; fi + if [ -e $_DIR/logs/$PNAME.err ]; then mv $_DIR/logs/$PNAME.err $_DIR/logs/$PNAME.err.1; fi + + nohup $JAVA_HOME/bin/java $JVMARGS -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" $CLASS > $_DIR/logs/$PNAME.out 2> $_DIR/logs/$PNAME.err & + + _PID=$! + echo $_PID > $_PIDFILE + sleep 5 + check_status + echo $_STATUS + if [ "$_RUNNING" = "1" ]; then + exit 0 + else + echo "Failed to start - make sure the $SNAME is fully configured properly" + exit 1 + fi + ;; + stop) + if [ "$_RUNNING" = "0" ]; then + echo $_STATUS + remove_pid_file + exit 0 + fi + echo "Stopping $SNAME..." + _PID_TO_KILL=$_PID; + echo "$SNAME (pid=${_PID_TO_KILL}) is stopping..." + kill -TERM $_PID_TO_KILL + sleep 5 + check_status_of_pid $_PID_TO_KILL + if [ "$_RUNNING" = "1" ]; then + kill -TERM $_PID_TO_KILL + fi + while [ "$_RUNNING" = "1" ]; do + sleep 2 + check_status_of_pid $_PID_TO_KILL + done + remove_pid_file + echo "$SNAME has stopped." + exit 0 + ;; + *) + echo "$0 start|stop" + ;; +esac + + diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/bin/manager.sh b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/bin/manager.sh new file mode 100644 index 0000000..b691aa5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/bin/manager.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +export JAVA_HOME=/opt/app/java/jdk/jdk170 +export GROOVY_HOME=/opt/app/groovy/246 + +PATH=$JAVA_HOME/bin:$GROOVY_HOME/bin:$PATH + +cd $(dirname $(dirname $0)) + +ROOT=$(pwd) +CMD=$ROOT/bin/$(echo $(basename $(pwd)) | sed s/dcae-//)-controller + + +mkdir -p logs/ +echo $(date) bin/manager.sh "$@" >> logs/manager.sh.log + +CMD1=$1 +shift + +case $CMD1 in + start|stop|restart|console) + if [ -e makefile ]; then + make $CMD1 + exit + fi + case $CMD1 in + start|stop|console) + $CMD $CMD1 + ;; + *) + $CMD stop + $CMD start -Djavax.net.ssl.trustStore=config/docker-mra-certs.jks + ;; + esac + exit + ;; +esac diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/console.properties b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/console.properties new file mode 100644 index 0000000..4b63607 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:PORT +localhost.user=console +localhost.password=CONSOLE_PW diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/gui.properties b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/gui.properties new file mode 100644 index 0000000..e69de29 diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/log4j.properties b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/log4j.properties new file mode 100644 index 0000000..8b3b8f9 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/log4j.properties @@ -0,0 +1,24 @@ +#log4j.debug=0 +log4j.rootLogger=warn, file +log4j.logger.org.openecomp.ncomp=info, file +log4j.additivity.org.openecomp.ncomp=false +log4j.logger.org.openecomp.ncomp.datarouter=warn, file +log4j.additivity.org.openecomp.ncomp.datarouter=false +log4j.logger.org.apache.http.headers=debug, file +log4j.logger.org.apache.http.wire=debug, file + +## uploaded logger +log4j.logger.org.openecomp.ncomp.sirius.manager.uploaded=info, uploaded +log4j.additivity.org.openecomp.ncomp.sirius.manager.uploaded=false +## request logging +log4j.logger.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=info, requests +log4j.additivity.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=false + + +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=logs/BBBB.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n +log4j.appender.file.MaxFileSize=50MB +log4j.appender.file.MaxBackupIndex=5 + diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/makefile b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/makefile new file mode 100644 index 0000000..e272181 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/makefile @@ -0,0 +1,9 @@ + +restart: stop start + +start: + M2_HOME=$(HOME)/.m2 bin/BBBB-controller start +stop: + bin/BBBB-controller stop +console: + bin/BBBB-controller console diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/manager.properties b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/manager.properties new file mode 100644 index 0000000..4605389 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/manager.properties @@ -0,0 +1,7 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = PORT +server.user.console = CONSOLE_PW +server.user.gui = GUI_PW +server.user.client = CLIENT_PW diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/pw.sh.sh b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/pw.sh.sh new file mode 100644 index 0000000..cd022ae --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/config/pw.sh.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +### used to generate random passwords + + +echo '#!/bin/bash' +echo "" + +echo 'cat \' + +for i in CONSOLE GUI CLIENT +do + echo ' |' sed s/${i}_PW/$(echo $i:$(date +%s) | sha256sum | base64 | head -c 20 ; echo)/ \\ +done + \ No newline at end of file diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/scripts/console.groovy b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/scripts/console.groovy new file mode 100644 index 0000000..a5446d2 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/server/scripts/console.groovy @@ -0,0 +1,27 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.openecomp.dcae.controller.service.common.docker.servers.manager.DcaeCommonDockerManagerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +manager = new DcaeCommonDockerManagerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/CommonDockerManager.yaml b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/CommonDockerManager.yaml new file mode 100644 index 0000000..6ab6771 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/CommonDockerManager.yaml @@ -0,0 +1,69 @@ +operations: + test: {} + suspend: {} + resume: {} + publicKey: {} + configurationChanged: {} + updateStreams: {} + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_publicKey: + decription: Remote call publicKey + REMOTE_configurationChanged: + decription: Remote call configurationChanged + REMOTE_updateStreams: + decription: Remote call updateStreams +messages: + dummy: {} + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + publicKey: + errorCode: publicKey-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + configurationChanged: + errorCode: configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateStreams: + errorCode: updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_publicKey: + errorCode: REMOTE-publicKey-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_configurationChanged: + errorCode: REMOTE-configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateStreams: + errorCode: REMOTE-updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/CommonDockerService.yaml b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/CommonDockerService.yaml new file mode 100644 index 0000000..c449feb --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/CommonDockerService.yaml @@ -0,0 +1,124 @@ +operations: + deploy: {} + undeploy: {} + test: {} + suspend: {} + resume: {} + pushManagerConfiguration: {} + pollManagerConfiguration: {} + managerConfiguration: {} + managerOperation: {} + updateConfigurationFromPolicy: {} + runHealthTests: {} + REMOTE_deploy: + decription: Remote call deploy + REMOTE_undeploy: + decription: Remote call undeploy + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_pushManagerConfiguration: + decription: Remote call pushManagerConfiguration + REMOTE_pollManagerConfiguration: + decription: Remote call pollManagerConfiguration + REMOTE_managerConfiguration: + decription: Remote call managerConfiguration + REMOTE_managerOperation: + decription: Remote call managerOperation + REMOTE_updateConfigurationFromPolicy: + decription: Remote call updateConfigurationFromPolicy + REMOTE_runHealthTests: + decription: Remote call runHealthTests +messages: + dummy: {} + deploy: + errorCode: deploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + undeploy: + errorCode: undeploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pushManagerConfiguration: + errorCode: pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pollManagerConfiguration: + errorCode: pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerConfiguration: + errorCode: managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerOperation: + errorCode: managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateConfigurationFromPolicy: + errorCode: updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + runHealthTests: + errorCode: runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_deploy: + errorCode: REMOTE-deploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_undeploy: + errorCode: REMOTE-undeploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pushManagerConfiguration: + errorCode: REMOTE-pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pollManagerConfiguration: + errorCode: REMOTE-pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerConfiguration: + errorCode: REMOTE-managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerOperation: + errorCode: REMOTE-managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateConfigurationFromPolicy: + errorCode: REMOTE-updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_runHealthTests: + errorCode: REMOTE-runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/GuiClientApi.yaml b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/GuiClientApi.yaml new file mode 100644 index 0000000..bf3d69d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/GuiClientApi.yaml @@ -0,0 +1,69 @@ +operations: + getTree: {} + getObject: {} + getTimeSerie: {} + getTable: {} + getHtml: {} + getGraph: {} + REMOTE_getTree: + decription: Remote call getTree + REMOTE_getObject: + decription: Remote call getObject + REMOTE_getTimeSerie: + decription: Remote call getTimeSerie + REMOTE_getTable: + decription: Remote call getTable + REMOTE_getHtml: + decription: Remote call getHtml + REMOTE_getGraph: + decription: Remote call getGraph +messages: + dummy: {} + getTree: + errorCode: getTree-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getObject: + errorCode: getObject-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTimeSerie: + errorCode: getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTable: + errorCode: getTable-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getHtml: + errorCode: getHtml-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getGraph: + errorCode: getGraph-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_getTree: + errorCode: REMOTE-getTree-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getObject: + errorCode: REMOTE-getObject-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTimeSerie: + errorCode: REMOTE-getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTable: + errorCode: REMOTE-getTable-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getHtml: + errorCode: REMOTE-getHtml-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getGraph: + errorCode: REMOTE-getGraph-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManager.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManager.java new file mode 100644 index 0000000..06abb03 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManager.java @@ -0,0 +1,226 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.docker.servers.manager; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.common.docker.servers.manager.logging.CommonDockerManagerOperationEnum; + + + + +import org.openecomp.dcae.controller.service.common.docker.manager.impl.CommonDockerManagerImpl; + + + +public class DcaeCommonDockerManager extends CommonDockerManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeCommonDockerManager.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeCommonDockerManagerProvider controller; + ISiriusServer server; + + public DcaeCommonDockerManager(ISiriusServer server) { + this.server = server; + this.controller = new DcaeCommonDockerManagerProvider(server,this); + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerManagerOperationEnum.test); + try { + res = controller.test(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void suspend() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerManagerOperationEnum.suspend); + try { + controller.suspend(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_); + + } + + public void resume() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerManagerOperationEnum.resume); + try { + controller.resume(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_); + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerManagerOperationEnum.publicKey); + try { + res = controller.publicKey(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void configurationChanged() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerManagerOperationEnum.configurationChanged); + try { + controller.configurationChanged(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.OKAY, duration_); + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.START, duration_,inputStreams,outputStreams); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerManagerOperationEnum.updateStreams); + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.ERROR, duration_,inputStreams,outputStreams); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.OKAY, duration_,inputStreams,outputStreams); + + } + + + + + + + public static void ecoreSetup() { + DcaeCommonDockerManagerProvider.ecoreSetup(); + } + public DcaeCommonDockerManagerProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerClient.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerClient.java new file mode 100644 index 0000000..669bad8 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerClient.java @@ -0,0 +1,174 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.docker.servers.manager; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.common.docker.manager.impl.CommonDockerManagerImpl; +import org.openecomp.dcae.controller.service.common.docker.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.common.docker.servers.manager.logging.CommonDockerManagerOperationEnum; +import org.openecomp.dcae.controller.service.common.docker.servers.manager.logging.CommonDockerManagerMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeCommonDockerManagerClient extends CommonDockerManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeCommonDockerManagerClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeCommonDockerManagerClient(String file, String name) { + DcaeCommonDockerManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeCommonDockerManagerClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeCommonDockerManagerClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + EClass c = ManagerPackage.eINSTANCE.getCommonDockerManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerManagerOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerManagerMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: test", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend() { + EClass c = ManagerPackage.eINSTANCE.getCommonDockerManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerManagerOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerManagerMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: suspend", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume() { + EClass c = ManagerPackage.eINSTANCE.getCommonDockerManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerManagerOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerManagerMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: resume", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public java.lang.String publicKey() { + EClass c = ManagerPackage.eINSTANCE.getCommonDockerManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerManagerOperationEnum.REMOTE_publicKey); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "publicKey", null); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerManagerMessageEnum.REMOTE_publicKey, e.toString()); + throw new RuntimeException("remote call failed: publicKey", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void configurationChanged() { + EClass c = ManagerPackage.eINSTANCE.getCommonDockerManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerManagerOperationEnum.REMOTE_configurationChanged); + + try { + client.operationPath("/resources", c, "configurationChanged", null); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerManagerMessageEnum.REMOTE_configurationChanged, e.toString()); + throw new RuntimeException("remote call failed: configurationChanged", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void updateStreams(EList inputStreams, EList outputStreams) { + EClass c = ManagerPackage.eINSTANCE.getCommonDockerManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerManagerOperationEnum.REMOTE_updateStreams); + + try { + client.operationPath("/resources", c, "updateStreams", null, inputStreams,outputStreams); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerManagerMessageEnum.REMOTE_updateStreams, e.toString()); + throw new RuntimeException("remote call failed: updateStreams", e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerConsole.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerConsole.java new file mode 100644 index 0000000..8d27657 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerConsole.java @@ -0,0 +1,127 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.common.docker.servers.manager; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + +import org.openecomp.dcae.controller.service.common.docker.servers.manager.gui.DcaeGuiClientApiConsole; + + +public class DcaeCommonDockerManagerConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeCommonDockerManagerConsole.class); + protected DcaeCommonDockerManagerClient controller; + + + DcaeGuiClientApiConsole gui; + + + public DcaeCommonDockerManagerConsole(String filename, String name) { + super(filename, name); + controller = new DcaeCommonDockerManagerClient(filename,name); + client = controller.client; + + gui = new DcaeGuiClientApiConsole(filename,name); + } + + public DcaeCommonDockerManagerConsole(AbstractClient c) { + controller = new DcaeCommonDockerManagerClient(c); + client = controller.client; + } + + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend() { + + try { + controller.suspend(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume() { + + try { + controller.resume(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + try { + res = controller.publicKey(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void configurationChanged() { + + try { + controller.configurationChanged(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerProviderTemplate.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerProviderTemplate.java new file mode 100644 index 0000000..fd23969 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerProviderTemplate.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.docker.servers.manager; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.dcae.controller.service.servers.dockermanager.DcaeDockerManagerProvider; + + +import org.openecomp.dcae.controller.service.common.docker.manager.impl.CommonDockerManagerImpl; +import org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager; + + +public class DcaeCommonDockerManagerProviderTemplate extends DcaeDockerManagerProvider { + private static final Logger logger = Logger.getLogger(DcaeCommonDockerManagerProviderTemplate.class); + CommonDockerManager o; + + public DcaeCommonDockerManagerProviderTemplate(ISiriusServer controller, CommonDockerManager o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerServer.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerServer.java new file mode 100644 index 0000000..1bbc232 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeCommonDockerManagerServer.java @@ -0,0 +1,112 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.common.docker.servers.manager; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager; + + +import org.openecomp.dcae.controller.service.common.docker.servers.manager.gui.DcaeModelFactory; + + + + + +public class DcaeCommonDockerManagerServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeCommonDockerManagerServer.class); + String serverPath; + ManagementServer server; + DcaeCommonDockerManager controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeManagerFactory f = new DcaeManagerFactory(this); + + + String guiPath; + ManagementServer guiServer; + + + public DcaeCommonDockerManagerServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeCommonDockerManager.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "CommonDockerManager", serverPath, filename); + server.addFactory(f); + + server.addFactory(org.openecomp.dcae.controller.service.common.docker.service.ServiceFactory.eINSTANCE); + + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeCommonDockerManager) server.find("/").o; + webServer = new Jetty8Server("manager.properties"); + webServer.add("/resources",server); + + + + EFactory guiFactory = new DcaeModelFactory(this); + guiPath = serverPath + "/gui"; + guiServer = new ManagementServer(guiFactory, "GuiClientApi", guiPath, "gui.properties"); + guiServer.start(); + webServer.add("/gui",guiServer); + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeCommonDockerManagerServer s = new DcaeCommonDockerManagerServer("manager.properties"); + s.runWebserver(); + } + public CommonDockerManager getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeManagerFactory.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeManagerFactory.java new file mode 100644 index 0000000..37f3e3b --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/DcaeManagerFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.docker.servers.manager; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager; +import org.openecomp.dcae.controller.service.common.docker.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.common.docker.manager.impl.ManagerFactoryImpl; + + + + + +public class DcaeManagerFactory extends ManagerFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeManagerFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ManagerPackage.eINSTANCE; } + public DcaeManagerFactory(ISiriusServer server) { + this.server = server; + } + @Override + public CommonDockerManager createCommonDockerManager() { + return new DcaeCommonDockerManager(server); + } + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApi.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApi.java new file mode 100644 index 0000000..0573e74 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApi.java @@ -0,0 +1,256 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.docker.servers.manager.gui; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.common.docker.servers.manager.gui.logging.GuiClientApiOperationEnum; + + + + + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + + + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + + + + +import org.openecomp.ncomp.sirius.manager.Subject; + + + + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + + + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; + + + +public class DcaeGuiClientApi extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApi.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeGuiClientApiProvider controller; + ISiriusServer server; + + public DcaeGuiClientApi(ISiriusServer server) { + this.server = server; + this.controller = new DcaeGuiClientApiProvider(server,this); + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTree); + try { + res = controller.getTree(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.OKAY, duration_); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.START, duration_,path); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getObject); + try { + res = controller.getObject(path); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.ERROR, duration_,path); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.OKAY, duration_,path); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.START, duration_,path,start,end,duration); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTimeSerie); + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.ERROR, duration_,path,start,end,duration); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.OKAY, duration_,path,start,end,duration); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTable); + try { + res = controller.getTable(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getHtml); + try { + res = controller.getHtml(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getGraph); + try { + res = controller.getGraph(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + + + + + + public static void ecoreSetup() { + DcaeGuiClientApiProvider.ecoreSetup(); + } + public DcaeGuiClientApiProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApiClient.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApiClient.java new file mode 100644 index 0000000..3d09fd0 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApiClient.java @@ -0,0 +1,175 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.docker.servers.manager.gui; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.dcae.controller.service.common.docker.servers.manager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.common.docker.servers.manager.gui.logging.GuiClientApiMessageEnum; + + +import org.openecomp.dcae.controller.service.common.docker.servers.manager.DcaeCommonDockerManager; + + + + +@SuppressWarnings("unchecked") +public class DcaeGuiClientApiClient extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeGuiClientApiClient(String file, String name) { + DcaeCommonDockerManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTree); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTree) client.operationPath("/gui", c, "getTree", null); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTree, e.toString()); + throw new RuntimeException("remote call failed: getTree", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getObject); + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiObject) client.operationPath("/gui", c, "getObject", null, path); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getObject, e.toString()); + throw new RuntimeException("remote call failed: getObject", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTimeSerie); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie) client.operationPath("/gui", c, "getTimeSerie", null, path,start,end,duration); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTimeSerie, e.toString()); + throw new RuntimeException("remote call failed: getTimeSerie", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTable); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTable) client.operationPath("/gui", c, "getTable", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTable, e.toString()); + throw new RuntimeException("remote call failed: getTable", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getHtml); + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml) client.operationPath("/gui", c, "getHtml", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getHtml, e.toString()); + throw new RuntimeException("remote call failed: getHtml", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getGraph); + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res; + try { + res = (org.openecomp.ncomp.sirius.manager.graph.GuiGraph) client.operationPath("/gui", c, "getGraph", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getGraph, e.toString()); + throw new RuntimeException("remote call failed: getGraph", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApiConsole.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApiConsole.java new file mode 100644 index 0000000..30d1e77 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApiConsole.java @@ -0,0 +1,123 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.common.docker.servers.manager.gui; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeGuiClientApiConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiConsole.class); + protected DcaeGuiClientApiClient controller; + + + + + public DcaeGuiClientApiConsole(String filename, String name) { + super(filename, name); + controller = new DcaeGuiClientApiClient(filename,name); + client = controller.client; + + } + + public DcaeGuiClientApiConsole(AbstractClient c) { + controller = new DcaeGuiClientApiClient(c); + client = controller.client; + } + + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + try { + res = controller.getTree(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + try { + res = controller.getObject(path); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + try { + res = controller.getTable(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + try { + res = controller.getHtml(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + try { + res = controller.getGraph(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java new file mode 100644 index 0000000..94c1dbd --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.docker.servers.manager.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProviderTemplate extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProviderTemplate.class); + GuiClientApi o; + + public DcaeGuiClientApiProviderTemplate(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeModelFactory.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeModelFactory.java new file mode 100644 index 0000000..c7986e7 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/DcaeModelFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.docker.servers.manager.gui; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelFactoryImpl; + +import org.openecomp.dcae.controller.service.common.docker.servers.manager.DcaeCommonDockerManagerServer; + + + +public class DcaeModelFactory extends ModelFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeModelFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ModelPackage.eINSTANCE; } + public DcaeModelFactory(ISiriusServer server) { + this.server = server; + } + @Override + public GuiClientApi createGuiClientApi() { + return new DcaeGuiClientApi(server); + } + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/logging/GuiClientApi.properties b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/logging/GuiClientApi.properties new file mode 100644 index 0000000..8705ab8 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/logging/GuiClientApi.properties @@ -0,0 +1,78 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +getTree=\ + getTree-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getObject=\ + getObject-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTimeSerie=\ + getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTable=\ + getTable-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getHtml=\ + getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getGraph=\ + getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_getTree=\ + REMOTE-getTree-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getObject=\ + REMOTE-getObject-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTimeSerie=\ + REMOTE-getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTable=\ + REMOTE-getTable-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getHtml=\ + REMOTE-getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getGraph=\ + REMOTE-getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/logging/GuiClientApiMessageEnum.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/logging/GuiClientApiMessageEnum.java new file mode 100644 index 0000000..2e524ab --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/logging/GuiClientApiMessageEnum.java @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.docker.servers.manager.gui.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum GuiClientApiMessageEnum implements EcompMessageEnum { + + dummy, + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.common.docker.servers.manager.gui.logging.GuiClientApi"); + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/logging/GuiClientApiOperationEnum.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/logging/GuiClientApiOperationEnum.java new file mode 100644 index 0000000..45c9703 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/gui/logging/GuiClientApiOperationEnum.java @@ -0,0 +1,41 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.docker.servers.manager.gui.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum GuiClientApiOperationEnum implements EcompOperationEnum { + + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/logging/CommonDockerManager.properties b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/logging/CommonDockerManager.properties new file mode 100644 index 0000000..ef19f9b --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/logging/CommonDockerManager.properties @@ -0,0 +1,78 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +publicKey=\ + publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +configurationChanged=\ + configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateStreams=\ + updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_publicKey=\ + REMOTE-publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_configurationChanged=\ + REMOTE-configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateStreams=\ + REMOTE-updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/logging/CommonDockerManagerMessageEnum.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/logging/CommonDockerManagerMessageEnum.java new file mode 100644 index 0000000..4ae696f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/logging/CommonDockerManagerMessageEnum.java @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.docker.servers.manager.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum CommonDockerManagerMessageEnum implements EcompMessageEnum { + + dummy, + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.common.docker.servers.manager.logging.CommonDockerManager"); + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/logging/CommonDockerManagerOperationEnum.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/logging/CommonDockerManagerOperationEnum.java new file mode 100644 index 0000000..30478f6 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/manager/logging/CommonDockerManagerOperationEnum.java @@ -0,0 +1,41 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.docker.servers.manager.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum CommonDockerManagerOperationEnum implements EcompOperationEnum { + + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams; +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerService.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerService.java new file mode 100644 index 0000000..6b6f7bc --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerService.java @@ -0,0 +1,356 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.docker.servers.service; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.common.docker.servers.service.logging.CommonDockerServiceOperationEnum; + + + + +import org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceImpl; + + + +public class DcaeCommonDockerService extends CommonDockerServiceImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeCommonDockerService.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeCommonDockerServiceProvider controller; + ISiriusServer server; + + public DcaeCommonDockerService(ISiriusServer server) { + this.server = server; + this.controller = new DcaeCommonDockerServiceProvider(server,this); + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.START, duration_,instanceName,containerPath); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.deploy); + try { + controller.deploy(instanceName,containerPath); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.ERROR, duration_,instanceName,containerPath); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.OKAY, duration_,instanceName,containerPath); + + } + + public void undeploy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.undeploy); + try { + controller.undeploy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.test); + try { + res = controller.test(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public void suspend(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.suspend); + try { + controller.suspend(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void resume(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.resume); + try { + controller.resume(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.pushManagerConfiguration); + try { + controller.pushManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.pollManagerConfiguration); + try { + controller.pollManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.managerConfiguration); + try { + res = controller.managerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.START, duration_,instanceName,operation,parameters); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.managerOperation); + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.ERROR, duration_,instanceName,operation,parameters); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.OKAY, duration_,instanceName,operation,parameters); + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.updateConfigurationFromPolicy); + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void runHealthTests() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.runHealthTests); + try { + controller.runHealthTests(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.OKAY, duration_); + + } + + + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + DcaeCommonDockerServiceProvider.ecoreSetup(); + } + public DcaeCommonDockerServiceProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceClient.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceClient.java new file mode 100644 index 0000000..876ed4f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceClient.java @@ -0,0 +1,259 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.docker.servers.service; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceImpl; +import org.openecomp.dcae.controller.service.common.docker.service.ServicePackage; +import org.openecomp.dcae.controller.service.common.docker.servers.service.logging.CommonDockerServiceOperationEnum; +import org.openecomp.dcae.controller.service.common.docker.servers.service.logging.CommonDockerServiceMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeCommonDockerServiceClient extends CommonDockerServiceImpl { + public static final Logger logger = Logger.getLogger(DcaeCommonDockerServiceClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeCommonDockerServiceClient(String file, String name) { + DcaeCommonDockerService.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeCommonDockerServiceClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeCommonDockerServiceClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + EClass c = ServicePackage.eINSTANCE.getCommonDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.REMOTE_deploy); + + try { + client.operationPath("/resources", c, "deploy", null, instanceName,containerPath); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerServiceMessageEnum.REMOTE_deploy, e.toString()); + throw new RuntimeException("remote call failed: deploy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void undeploy(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCommonDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.REMOTE_undeploy); + + try { + client.operationPath("/resources", c, "undeploy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerServiceMessageEnum.REMOTE_undeploy, e.toString()); + throw new RuntimeException("remote call failed: undeploy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCommonDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerServiceMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: test", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCommonDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerServiceMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: suspend", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCommonDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerServiceMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: resume", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pushManagerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCommonDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.REMOTE_pushManagerConfiguration); + + try { + client.operationPath("/resources", c, "pushManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerServiceMessageEnum.REMOTE_pushManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: pushManagerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pollManagerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCommonDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.REMOTE_pollManagerConfiguration); + + try { + client.operationPath("/resources", c, "pollManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerServiceMessageEnum.REMOTE_pollManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: pollManagerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCommonDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.REMOTE_managerConfiguration); + org.eclipse.emf.ecore.EObject res; + try { + res = (org.eclipse.emf.ecore.EObject) client.operationPath("/resources", c, "managerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerServiceMessageEnum.REMOTE_managerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: managerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + EClass c = ServicePackage.eINSTANCE.getCommonDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.REMOTE_managerOperation); + org.json.JSONObject res; + try { + res = (org.json.JSONObject) client.operationPath("/resources", c, "managerOperation", null, instanceName,operation,parameters); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerServiceMessageEnum.REMOTE_managerOperation, e.toString()); + throw new RuntimeException("remote call failed: managerOperation", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCommonDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.REMOTE_updateConfigurationFromPolicy); + + try { + client.operationPath("/resources", c, "updateConfigurationFromPolicy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString()); + throw new RuntimeException("remote call failed: updateConfigurationFromPolicy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void runHealthTests() { + EClass c = ServicePackage.eINSTANCE.getCommonDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonDockerServiceOperationEnum.REMOTE_runHealthTests); + + try { + client.operationPath("/resources", c, "runHealthTests", null); + } + catch (Exception e) { + ecomplogger.warn(CommonDockerServiceMessageEnum.REMOTE_runHealthTests, e.toString()); + throw new RuntimeException("remote call failed: runHealthTests", e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceConsole.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceConsole.java new file mode 100644 index 0000000..11ed107 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceConsole.java @@ -0,0 +1,178 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.common.docker.servers.service; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeCommonDockerServiceConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeCommonDockerServiceConsole.class); + protected DcaeCommonDockerServiceClient controller; + + + + + public DcaeCommonDockerServiceConsole(String filename, String name) { + super(filename, name); + controller = new DcaeCommonDockerServiceClient(filename,name); + client = controller.client; + + } + + public DcaeCommonDockerServiceConsole(AbstractClient c) { + controller = new DcaeCommonDockerServiceClient(c); + client = controller.client; + } + + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + try { + controller.deploy(instanceName,containerPath); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void undeploy(java.lang.String instanceName) { + + try { + controller.undeploy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend(java.lang.String instanceName) { + + try { + controller.suspend(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume(java.lang.String instanceName) { + + try { + controller.resume(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pushManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pollManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + try { + res = controller.managerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void runHealthTests() { + + try { + controller.runHealthTests(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceProviderTemplate.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceProviderTemplate.java new file mode 100644 index 0000000..229bfaa --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceProviderTemplate.java @@ -0,0 +1,65 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.docker.servers.service; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.dcae.controller.service.servers.docker.DcaeDockerServiceProvider; + + +import org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceImpl; +import org.openecomp.dcae.controller.service.common.docker.service.CommonDockerService; + + +public class DcaeCommonDockerServiceProviderTemplate extends DcaeDockerServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeCommonDockerServiceProviderTemplate.class); + CommonDockerService o; + + public DcaeCommonDockerServiceProviderTemplate(ISiriusServer controller, CommonDockerService o) { + super(controller, o); + this.o = o; + } + + + + + + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceServer.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceServer.java new file mode 100644 index 0000000..6be777d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeCommonDockerServiceServer.java @@ -0,0 +1,101 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.common.docker.servers.service; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.common.docker.service.CommonDockerService; + + + + + + +public class DcaeCommonDockerServiceServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeCommonDockerServiceServer.class); + String serverPath; + ManagementServer server; + DcaeCommonDockerService controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeServiceFactory f = new DcaeServiceFactory(this); + + + + public DcaeCommonDockerServiceServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeCommonDockerService.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "CommonDockerService", serverPath, filename); + server.addFactory(f); + + server.addFactory(org.openecomp.dcae.controller.service.common.docker.service.ServiceFactory.eINSTANCE); + + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeCommonDockerService) server.find("/").o; + webServer = new Jetty8Server("service.properties"); + webServer.add("/resources",server); + + + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeCommonDockerServiceServer s = new DcaeCommonDockerServiceServer("service.properties"); + s.runWebserver(); + } + public CommonDockerService getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeServiceFactory.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeServiceFactory.java new file mode 100644 index 0000000..af787ba --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/DcaeServiceFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.docker.servers.service; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.common.docker.service.CommonDockerService; +import org.openecomp.dcae.controller.service.common.docker.service.ServicePackage; +import org.openecomp.dcae.controller.service.common.docker.service.impl.ServiceFactoryImpl; + + + + + +public class DcaeServiceFactory extends ServiceFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeServiceFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ServicePackage.eINSTANCE; } + public DcaeServiceFactory(ISiriusServer server) { + this.server = server; + } + @Override + public CommonDockerService createCommonDockerService() { + return new DcaeCommonDockerService(server); + } + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/logging/CommonDockerService.properties b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/logging/CommonDockerService.properties new file mode 100644 index 0000000..13a57d6 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/logging/CommonDockerService.properties @@ -0,0 +1,138 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +deploy=\ + deploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +undeploy=\ + undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pushManagerConfiguration=\ + pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pollManagerConfiguration=\ + pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerConfiguration=\ + managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerOperation=\ + managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateConfigurationFromPolicy=\ + updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +runHealthTests=\ + runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_deploy=\ + REMOTE-deploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_undeploy=\ + REMOTE-undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pushManagerConfiguration=\ + REMOTE-pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pollManagerConfiguration=\ + REMOTE-pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerConfiguration=\ + REMOTE-managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerOperation=\ + REMOTE-managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateConfigurationFromPolicy=\ + REMOTE-updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_runHealthTests=\ + REMOTE-runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/logging/CommonDockerServiceMessageEnum.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/logging/CommonDockerServiceMessageEnum.java new file mode 100644 index 0000000..4680af8 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/logging/CommonDockerServiceMessageEnum.java @@ -0,0 +1,57 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.docker.servers.service.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum CommonDockerServiceMessageEnum implements EcompMessageEnum { + + dummy, + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.common.docker.servers.service.logging.CommonDockerService"); + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/logging/CommonDockerServiceOperationEnum.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/logging/CommonDockerServiceOperationEnum.java new file mode 100644 index 0000000..a614511 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/docker/servers/service/logging/CommonDockerServiceOperationEnum.java @@ -0,0 +1,51 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.docker.servers.service.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum CommonDockerServiceOperationEnum implements EcompOperationEnum { + + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests; +} diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.classpath b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.gitignore b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.project b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.project new file mode 100644 index 0000000..d5dc9d5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.project @@ -0,0 +1,34 @@ + + + dcae-controller-service-common-docker-model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/LICENSE.txt b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/META-INF/MANIFEST.MF b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..7570ca5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/META-INF/MANIFEST.MF @@ -0,0 +1,32 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: dcae-controller-service-common-docker-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.openecomp.dcae.controller.service.common.docker.manager, + org.openecomp.dcae.controller.service.common.docker.manager.impl, + org.openecomp.dcae.controller.service.common.docker.manager.util, + org.openecomp.dcae.controller.service.common.docker.service, + org.openecomp.dcae.controller.service.common.docker.service.impl, + org.openecomp.dcae.controller.service.common.docker.service.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + dcae-controller-core-model;visibility:=reexport, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + dcae-controller-service-vm-model;visibility:=reexport, + ncomp-openstack-model;visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + dcae-controller-service-common-docker-model;visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + dcae-controller-service-docker-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-docker-model;visibility:=reexport, + dcae-controller-service-docker-host-model;visibility:=reexport, + ncomp-sirius-manager-agent-model;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/build.properties b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/build.properties @@ -0,0 +1,11 @@ +# + +bin.includes = .,\ + src/main/xcore/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/xcore-gen/,\ + src/main/xcore/ +output.. = target/classes/ diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/plugin.properties b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/plugin.xml b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/plugin.xml new file mode 100644 index 0000000..246196e --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/plugin.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/pom.xml b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/pom.xml new file mode 100644 index 0000000..5181bbb --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/pom.xml @@ -0,0 +1,24 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-common-docker-model + + org.openecomp.ncomp.maven + ncomp-maven-xcore + 0.1.0-SNAPSHOT + ../../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore + + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-docker-model + ${project.version} + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/CommonDockerManager.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/CommonDockerManager.java new file mode 100644 index 0000000..84985d4 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/CommonDockerManager.java @@ -0,0 +1,212 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.manager; + +import org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceConfiguration; + +import org.openecomp.dcae.controller.service.dockermanager.DockerManager; + +/** + * + * A representation of the model object 'Common Docker Manager'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getScript Script}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getConfigureTimeout Configure Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getTestTimeout Test Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getSuspendTimeout Suspend Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getResumeTimeout Resume Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getDockerConfiguration Docker Configuration}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.common.docker.manager.ManagerPackage#getCommonDockerManager() + * @model + * @generated + */ +public interface CommonDockerManager extends DockerManager { + /** + * Returns the value of the 'Script' attribute. + * + *

+ * If the meaning of the 'Script' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Script' attribute. + * @see #setScript(String) + * @see org.openecomp.dcae.controller.service.common.docker.manager.ManagerPackage#getCommonDockerManager_Script() + * @model unique="false" + * @generated + */ + String getScript(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getScript Script}' attribute. + * + * + * @param value the new value of the 'Script' attribute. + * @see #getScript() + * @generated + */ + void setScript(String value); + + /** + * Returns the value of the 'Configure Timeout' attribute. + * The default value is "60000". + * + *

+ * If the meaning of the 'Configure Timeout' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Configure Timeout' attribute. + * @see #setConfigureTimeout(int) + * @see org.openecomp.dcae.controller.service.common.docker.manager.ManagerPackage#getCommonDockerManager_ConfigureTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getConfigureTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getConfigureTimeout Configure Timeout}' attribute. + * + * + * @param value the new value of the 'Configure Timeout' attribute. + * @see #getConfigureTimeout() + * @generated + */ + void setConfigureTimeout(int value); + + /** + * Returns the value of the 'Test Timeout' attribute. + * The default value is "60000". + * + *

+ * If the meaning of the 'Test Timeout' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Test Timeout' attribute. + * @see #setTestTimeout(int) + * @see org.openecomp.dcae.controller.service.common.docker.manager.ManagerPackage#getCommonDockerManager_TestTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getTestTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getTestTimeout Test Timeout}' attribute. + * + * + * @param value the new value of the 'Test Timeout' attribute. + * @see #getTestTimeout() + * @generated + */ + void setTestTimeout(int value); + + /** + * Returns the value of the 'Suspend Timeout' attribute. + * The default value is "60000". + * + *

+ * If the meaning of the 'Suspend Timeout' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Suspend Timeout' attribute. + * @see #setSuspendTimeout(int) + * @see org.openecomp.dcae.controller.service.common.docker.manager.ManagerPackage#getCommonDockerManager_SuspendTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getSuspendTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getSuspendTimeout Suspend Timeout}' attribute. + * + * + * @param value the new value of the 'Suspend Timeout' attribute. + * @see #getSuspendTimeout() + * @generated + */ + void setSuspendTimeout(int value); + + /** + * Returns the value of the 'Resume Timeout' attribute. + * The default value is "60000". + * + *

+ * If the meaning of the 'Resume Timeout' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Resume Timeout' attribute. + * @see #setResumeTimeout(int) + * @see org.openecomp.dcae.controller.service.common.docker.manager.ManagerPackage#getCommonDockerManager_ResumeTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getResumeTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getResumeTimeout Resume Timeout}' attribute. + * + * + * @param value the new value of the 'Resume Timeout' attribute. + * @see #getResumeTimeout() + * @generated + */ + void setResumeTimeout(int value); + + /** + * Returns the value of the 'Docker Configuration' containment reference. + * + *

+ * If the meaning of the 'Docker Configuration' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Docker Configuration' containment reference. + * @see #setDockerConfiguration(CommonDockerServiceConfiguration) + * @see org.openecomp.dcae.controller.service.common.docker.manager.ManagerPackage#getCommonDockerManager_DockerConfiguration() + * @model containment="true" + * @generated + */ + CommonDockerServiceConfiguration getDockerConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getDockerConfiguration Docker Configuration}' containment reference. + * + * + * @param value the new value of the 'Docker Configuration' containment reference. + * @see #getDockerConfiguration() + * @generated + */ + void setDockerConfiguration(CommonDockerServiceConfiguration value); + +} // CommonDockerManager diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/ManagerFactory.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/ManagerFactory.java new file mode 100644 index 0000000..af13e5e --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/ManagerFactory.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.manager; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.common.docker.manager.ManagerPackage + * @generated + */ +public interface ManagerFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ManagerFactory eINSTANCE = org.openecomp.dcae.controller.service.common.docker.manager.impl.ManagerFactoryImpl.init(); + + /** + * Returns a new object of class 'Common Docker Manager'. + * + * + * @return a new object of class 'Common Docker Manager'. + * @generated + */ + CommonDockerManager createCommonDockerManager(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ManagerPackage getManagerPackage(); + +} //ManagerFactory diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/ManagerPackage.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/ManagerPackage.java new file mode 100644 index 0000000..c8a2eb4 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/ManagerPackage.java @@ -0,0 +1,406 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.manager; + +import org.openecomp.dcae.controller.service.dockermanager.DockermanagerPackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.common.docker.manager.ManagerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-common-docker-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.common.docker'" + * @generated + */ +public interface ManagerPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "manager"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.common.docker.manager"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "manager"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ManagerPackage eINSTANCE = org.openecomp.dcae.controller.service.common.docker.manager.impl.ManagerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.common.docker.manager.impl.CommonDockerManagerImpl Common Docker Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.docker.manager.impl.CommonDockerManagerImpl + * @see org.openecomp.dcae.controller.service.common.docker.manager.impl.ManagerPackageImpl#getCommonDockerManager() + * @generated + */ + int COMMON_DOCKER_MANAGER = 0; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER__INPUT_STREAMS = DockermanagerPackage.DOCKER_MANAGER__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER__OUTPUT_STREAMS = DockermanagerPackage.DOCKER_MANAGER__OUTPUT_STREAMS; + + /** + * The feature id for the 'Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER__CONFIGURATION = DockermanagerPackage.DOCKER_MANAGER__CONFIGURATION; + + /** + * The feature id for the 'Script' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER__SCRIPT = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Configure Timeout' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER__CONFIGURE_TIMEOUT = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Test Timeout' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER__TEST_TIMEOUT = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Suspend Timeout' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER__SUSPEND_TIMEOUT = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Resume Timeout' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER__RESUME_TIMEOUT = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Docker Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER__DOCKER_CONFIGURATION = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 5; + + /** + * The number of structural features of the 'Common Docker Manager' class. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER_FEATURE_COUNT = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 6; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER___TEST = DockermanagerPackage.DOCKER_MANAGER___TEST; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER___SUSPEND = DockermanagerPackage.DOCKER_MANAGER___SUSPEND; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER___RESUME = DockermanagerPackage.DOCKER_MANAGER___RESUME; + + /** + * The operation id for the 'Public Key' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER___PUBLIC_KEY = DockermanagerPackage.DOCKER_MANAGER___PUBLIC_KEY; + + /** + * The operation id for the 'Configuration Changed' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER___CONFIGURATION_CHANGED = DockermanagerPackage.DOCKER_MANAGER___CONFIGURATION_CHANGED; + + /** + * The operation id for the 'Update Streams' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER___UPDATE_STREAMS__ELIST_ELIST = DockermanagerPackage.DOCKER_MANAGER___UPDATE_STREAMS__ELIST_ELIST; + + /** + * The number of operations of the 'Common Docker Manager' class. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_MANAGER_OPERATION_COUNT = DockermanagerPackage.DOCKER_MANAGER_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager Common Docker Manager}'. + * + * + * @return the meta object for class 'Common Docker Manager'. + * @see org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager + * @generated + */ + EClass getCommonDockerManager(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getScript Script}'. + * + * + * @return the meta object for the attribute 'Script'. + * @see org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getScript() + * @see #getCommonDockerManager() + * @generated + */ + EAttribute getCommonDockerManager_Script(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getConfigureTimeout Configure Timeout}'. + * + * + * @return the meta object for the attribute 'Configure Timeout'. + * @see org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getConfigureTimeout() + * @see #getCommonDockerManager() + * @generated + */ + EAttribute getCommonDockerManager_ConfigureTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getTestTimeout Test Timeout}'. + * + * + * @return the meta object for the attribute 'Test Timeout'. + * @see org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getTestTimeout() + * @see #getCommonDockerManager() + * @generated + */ + EAttribute getCommonDockerManager_TestTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getSuspendTimeout Suspend Timeout}'. + * + * + * @return the meta object for the attribute 'Suspend Timeout'. + * @see org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getSuspendTimeout() + * @see #getCommonDockerManager() + * @generated + */ + EAttribute getCommonDockerManager_SuspendTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getResumeTimeout Resume Timeout}'. + * + * + * @return the meta object for the attribute 'Resume Timeout'. + * @see org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getResumeTimeout() + * @see #getCommonDockerManager() + * @generated + */ + EAttribute getCommonDockerManager_ResumeTimeout(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getDockerConfiguration Docker Configuration}'. + * + * + * @return the meta object for the containment reference 'Docker Configuration'. + * @see org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager#getDockerConfiguration() + * @see #getCommonDockerManager() + * @generated + */ + EReference getCommonDockerManager_DockerConfiguration(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ManagerFactory getManagerFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.common.docker.manager.impl.CommonDockerManagerImpl Common Docker Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.docker.manager.impl.CommonDockerManagerImpl + * @see org.openecomp.dcae.controller.service.common.docker.manager.impl.ManagerPackageImpl#getCommonDockerManager() + * @generated + */ + EClass COMMON_DOCKER_MANAGER = eINSTANCE.getCommonDockerManager(); + + /** + * The meta object literal for the 'Script' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_DOCKER_MANAGER__SCRIPT = eINSTANCE.getCommonDockerManager_Script(); + + /** + * The meta object literal for the 'Configure Timeout' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_DOCKER_MANAGER__CONFIGURE_TIMEOUT = eINSTANCE.getCommonDockerManager_ConfigureTimeout(); + + /** + * The meta object literal for the 'Test Timeout' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_DOCKER_MANAGER__TEST_TIMEOUT = eINSTANCE.getCommonDockerManager_TestTimeout(); + + /** + * The meta object literal for the 'Suspend Timeout' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_DOCKER_MANAGER__SUSPEND_TIMEOUT = eINSTANCE.getCommonDockerManager_SuspendTimeout(); + + /** + * The meta object literal for the 'Resume Timeout' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_DOCKER_MANAGER__RESUME_TIMEOUT = eINSTANCE.getCommonDockerManager_ResumeTimeout(); + + /** + * The meta object literal for the 'Docker Configuration' containment reference feature. + * + * + * @generated + */ + EReference COMMON_DOCKER_MANAGER__DOCKER_CONFIGURATION = eINSTANCE.getCommonDockerManager_DockerConfiguration(); + + } + +} //ManagerPackage diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/impl/CommonDockerManagerImpl.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/impl/CommonDockerManagerImpl.java new file mode 100644 index 0000000..99ac592 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/impl/CommonDockerManagerImpl.java @@ -0,0 +1,483 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.manager.impl; + +import org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager; +import org.openecomp.dcae.controller.service.common.docker.manager.ManagerPackage; + +import org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceConfiguration; + +import org.openecomp.dcae.controller.service.dockermanager.impl.DockerManagerImpl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Common Docker Manager'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.common.docker.manager.impl.CommonDockerManagerImpl#getScript Script}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.manager.impl.CommonDockerManagerImpl#getConfigureTimeout Configure Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.manager.impl.CommonDockerManagerImpl#getTestTimeout Test Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.manager.impl.CommonDockerManagerImpl#getSuspendTimeout Suspend Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.manager.impl.CommonDockerManagerImpl#getResumeTimeout Resume Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.manager.impl.CommonDockerManagerImpl#getDockerConfiguration Docker Configuration}
  • + *
+ *

+ * + * @generated + */ +public class CommonDockerManagerImpl extends DockerManagerImpl implements CommonDockerManager { + /** + * The default value of the '{@link #getScript() Script}' attribute. + * + * + * @see #getScript() + * @generated + * @ordered + */ + protected static final String SCRIPT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getScript() Script}' attribute. + * + * + * @see #getScript() + * @generated + * @ordered + */ + protected String script = SCRIPT_EDEFAULT; + + /** + * The default value of the '{@link #getConfigureTimeout() Configure Timeout}' attribute. + * + * + * @see #getConfigureTimeout() + * @generated + * @ordered + */ + protected static final int CONFIGURE_TIMEOUT_EDEFAULT = 60000; + + /** + * The cached value of the '{@link #getConfigureTimeout() Configure Timeout}' attribute. + * + * + * @see #getConfigureTimeout() + * @generated + * @ordered + */ + protected int configureTimeout = CONFIGURE_TIMEOUT_EDEFAULT; + + /** + * The default value of the '{@link #getTestTimeout() Test Timeout}' attribute. + * + * + * @see #getTestTimeout() + * @generated + * @ordered + */ + protected static final int TEST_TIMEOUT_EDEFAULT = 60000; + + /** + * The cached value of the '{@link #getTestTimeout() Test Timeout}' attribute. + * + * + * @see #getTestTimeout() + * @generated + * @ordered + */ + protected int testTimeout = TEST_TIMEOUT_EDEFAULT; + + /** + * The default value of the '{@link #getSuspendTimeout() Suspend Timeout}' attribute. + * + * + * @see #getSuspendTimeout() + * @generated + * @ordered + */ + protected static final int SUSPEND_TIMEOUT_EDEFAULT = 60000; + + /** + * The cached value of the '{@link #getSuspendTimeout() Suspend Timeout}' attribute. + * + * + * @see #getSuspendTimeout() + * @generated + * @ordered + */ + protected int suspendTimeout = SUSPEND_TIMEOUT_EDEFAULT; + + /** + * The default value of the '{@link #getResumeTimeout() Resume Timeout}' attribute. + * + * + * @see #getResumeTimeout() + * @generated + * @ordered + */ + protected static final int RESUME_TIMEOUT_EDEFAULT = 60000; + + /** + * The cached value of the '{@link #getResumeTimeout() Resume Timeout}' attribute. + * + * + * @see #getResumeTimeout() + * @generated + * @ordered + */ + protected int resumeTimeout = RESUME_TIMEOUT_EDEFAULT; + + /** + * The cached value of the '{@link #getDockerConfiguration() Docker Configuration}' containment reference. + * + * + * @see #getDockerConfiguration() + * @generated + * @ordered + */ + protected CommonDockerServiceConfiguration dockerConfiguration; + + /** + * + * + * @generated + */ + protected CommonDockerManagerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ManagerPackage.Literals.COMMON_DOCKER_MANAGER; + } + + /** + * + * + * @generated + */ + public String getScript() { + return script; + } + + /** + * + * + * @generated + */ + public void setScript(String newScript) { + String oldScript = script; + script = newScript; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_DOCKER_MANAGER__SCRIPT, oldScript, script)); + } + + /** + * + * + * @generated + */ + public int getConfigureTimeout() { + return configureTimeout; + } + + /** + * + * + * @generated + */ + public void setConfigureTimeout(int newConfigureTimeout) { + int oldConfigureTimeout = configureTimeout; + configureTimeout = newConfigureTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_DOCKER_MANAGER__CONFIGURE_TIMEOUT, oldConfigureTimeout, configureTimeout)); + } + + /** + * + * + * @generated + */ + public int getTestTimeout() { + return testTimeout; + } + + /** + * + * + * @generated + */ + public void setTestTimeout(int newTestTimeout) { + int oldTestTimeout = testTimeout; + testTimeout = newTestTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_DOCKER_MANAGER__TEST_TIMEOUT, oldTestTimeout, testTimeout)); + } + + /** + * + * + * @generated + */ + public int getSuspendTimeout() { + return suspendTimeout; + } + + /** + * + * + * @generated + */ + public void setSuspendTimeout(int newSuspendTimeout) { + int oldSuspendTimeout = suspendTimeout; + suspendTimeout = newSuspendTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_DOCKER_MANAGER__SUSPEND_TIMEOUT, oldSuspendTimeout, suspendTimeout)); + } + + /** + * + * + * @generated + */ + public int getResumeTimeout() { + return resumeTimeout; + } + + /** + * + * + * @generated + */ + public void setResumeTimeout(int newResumeTimeout) { + int oldResumeTimeout = resumeTimeout; + resumeTimeout = newResumeTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_DOCKER_MANAGER__RESUME_TIMEOUT, oldResumeTimeout, resumeTimeout)); + } + + /** + * + * + * @generated + */ + public CommonDockerServiceConfiguration getDockerConfiguration() { + return dockerConfiguration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetDockerConfiguration(CommonDockerServiceConfiguration newDockerConfiguration, NotificationChain msgs) { + CommonDockerServiceConfiguration oldDockerConfiguration = dockerConfiguration; + dockerConfiguration = newDockerConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_DOCKER_MANAGER__DOCKER_CONFIGURATION, oldDockerConfiguration, newDockerConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setDockerConfiguration(CommonDockerServiceConfiguration newDockerConfiguration) { + if (newDockerConfiguration != dockerConfiguration) { + NotificationChain msgs = null; + if (dockerConfiguration != null) + msgs = ((InternalEObject)dockerConfiguration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ManagerPackage.COMMON_DOCKER_MANAGER__DOCKER_CONFIGURATION, null, msgs); + if (newDockerConfiguration != null) + msgs = ((InternalEObject)newDockerConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ManagerPackage.COMMON_DOCKER_MANAGER__DOCKER_CONFIGURATION, null, msgs); + msgs = basicSetDockerConfiguration(newDockerConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_DOCKER_MANAGER__DOCKER_CONFIGURATION, newDockerConfiguration, newDockerConfiguration)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ManagerPackage.COMMON_DOCKER_MANAGER__DOCKER_CONFIGURATION: + return basicSetDockerConfiguration(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ManagerPackage.COMMON_DOCKER_MANAGER__SCRIPT: + return getScript(); + case ManagerPackage.COMMON_DOCKER_MANAGER__CONFIGURE_TIMEOUT: + return getConfigureTimeout(); + case ManagerPackage.COMMON_DOCKER_MANAGER__TEST_TIMEOUT: + return getTestTimeout(); + case ManagerPackage.COMMON_DOCKER_MANAGER__SUSPEND_TIMEOUT: + return getSuspendTimeout(); + case ManagerPackage.COMMON_DOCKER_MANAGER__RESUME_TIMEOUT: + return getResumeTimeout(); + case ManagerPackage.COMMON_DOCKER_MANAGER__DOCKER_CONFIGURATION: + return getDockerConfiguration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ManagerPackage.COMMON_DOCKER_MANAGER__SCRIPT: + setScript((String)newValue); + return; + case ManagerPackage.COMMON_DOCKER_MANAGER__CONFIGURE_TIMEOUT: + setConfigureTimeout((Integer)newValue); + return; + case ManagerPackage.COMMON_DOCKER_MANAGER__TEST_TIMEOUT: + setTestTimeout((Integer)newValue); + return; + case ManagerPackage.COMMON_DOCKER_MANAGER__SUSPEND_TIMEOUT: + setSuspendTimeout((Integer)newValue); + return; + case ManagerPackage.COMMON_DOCKER_MANAGER__RESUME_TIMEOUT: + setResumeTimeout((Integer)newValue); + return; + case ManagerPackage.COMMON_DOCKER_MANAGER__DOCKER_CONFIGURATION: + setDockerConfiguration((CommonDockerServiceConfiguration)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ManagerPackage.COMMON_DOCKER_MANAGER__SCRIPT: + setScript(SCRIPT_EDEFAULT); + return; + case ManagerPackage.COMMON_DOCKER_MANAGER__CONFIGURE_TIMEOUT: + setConfigureTimeout(CONFIGURE_TIMEOUT_EDEFAULT); + return; + case ManagerPackage.COMMON_DOCKER_MANAGER__TEST_TIMEOUT: + setTestTimeout(TEST_TIMEOUT_EDEFAULT); + return; + case ManagerPackage.COMMON_DOCKER_MANAGER__SUSPEND_TIMEOUT: + setSuspendTimeout(SUSPEND_TIMEOUT_EDEFAULT); + return; + case ManagerPackage.COMMON_DOCKER_MANAGER__RESUME_TIMEOUT: + setResumeTimeout(RESUME_TIMEOUT_EDEFAULT); + return; + case ManagerPackage.COMMON_DOCKER_MANAGER__DOCKER_CONFIGURATION: + setDockerConfiguration((CommonDockerServiceConfiguration)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ManagerPackage.COMMON_DOCKER_MANAGER__SCRIPT: + return SCRIPT_EDEFAULT == null ? script != null : !SCRIPT_EDEFAULT.equals(script); + case ManagerPackage.COMMON_DOCKER_MANAGER__CONFIGURE_TIMEOUT: + return configureTimeout != CONFIGURE_TIMEOUT_EDEFAULT; + case ManagerPackage.COMMON_DOCKER_MANAGER__TEST_TIMEOUT: + return testTimeout != TEST_TIMEOUT_EDEFAULT; + case ManagerPackage.COMMON_DOCKER_MANAGER__SUSPEND_TIMEOUT: + return suspendTimeout != SUSPEND_TIMEOUT_EDEFAULT; + case ManagerPackage.COMMON_DOCKER_MANAGER__RESUME_TIMEOUT: + return resumeTimeout != RESUME_TIMEOUT_EDEFAULT; + case ManagerPackage.COMMON_DOCKER_MANAGER__DOCKER_CONFIGURATION: + return dockerConfiguration != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (script: "); + result.append(script); + result.append(", configureTimeout: "); + result.append(configureTimeout); + result.append(", testTimeout: "); + result.append(testTimeout); + result.append(", suspendTimeout: "); + result.append(suspendTimeout); + result.append(", resumeTimeout: "); + result.append(resumeTimeout); + result.append(')'); + return result.toString(); + } + +} //CommonDockerManagerImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/impl/ManagerFactoryImpl.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/impl/ManagerFactoryImpl.java new file mode 100644 index 0000000..cfbbcd5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/impl/ManagerFactoryImpl.java @@ -0,0 +1,116 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.manager.impl; + +import org.openecomp.dcae.controller.service.common.docker.manager.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ManagerFactoryImpl extends EFactoryImpl implements ManagerFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ManagerFactory init() { + try { + ManagerFactory theManagerFactory = (ManagerFactory)EPackage.Registry.INSTANCE.getEFactory(ManagerPackage.eNS_URI); + if (theManagerFactory != null) { + return theManagerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ManagerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ManagerFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ManagerPackage.COMMON_DOCKER_MANAGER: return createCommonDockerManager(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public CommonDockerManager createCommonDockerManager() { + CommonDockerManagerImpl commonDockerManager = new CommonDockerManagerImpl(); + return commonDockerManager; + } + + /** + * + * + * @generated + */ + public ManagerPackage getManagerPackage() { + return (ManagerPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ManagerPackage getPackage() { + return ManagerPackage.eINSTANCE; + } + +} //ManagerFactoryImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/impl/ManagerPackageImpl.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/impl/ManagerPackageImpl.java new file mode 100644 index 0000000..c17888e --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/impl/ManagerPackageImpl.java @@ -0,0 +1,269 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.manager.impl; + +import org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager; +import org.openecomp.dcae.controller.service.common.docker.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.common.docker.manager.ManagerPackage; + +import org.openecomp.dcae.controller.service.common.docker.service.ServicePackage; + +import org.openecomp.dcae.controller.service.dockermanager.DockermanagerPackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ManagerPackageImpl extends EPackageImpl implements ManagerPackage { + /** + * + * + * @generated + */ + private EClass commonDockerManagerEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.common.docker.manager.ManagerPackage#eNS_URI + * @see #init() + * @generated + */ + private ManagerPackageImpl() { + super(eNS_URI, ManagerFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ManagerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ManagerPackage init() { + if (isInited) return (ManagerPackage)EPackage.Registry.INSTANCE.getEPackage(ManagerPackage.eNS_URI); + + // Obtain or create and register package + ManagerPackageImpl theManagerPackage = (ManagerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ManagerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ManagerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + ServicePackage.eINSTANCE.eClass(); + DockermanagerPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theManagerPackage.createPackageContents(); + + // Initialize created meta-data + theManagerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theManagerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ManagerPackage.eNS_URI, theManagerPackage); + return theManagerPackage; + } + + /** + * + * + * @generated + */ + public EClass getCommonDockerManager() { + return commonDockerManagerEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCommonDockerManager_Script() { + return (EAttribute)commonDockerManagerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCommonDockerManager_ConfigureTimeout() { + return (EAttribute)commonDockerManagerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCommonDockerManager_TestTimeout() { + return (EAttribute)commonDockerManagerEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCommonDockerManager_SuspendTimeout() { + return (EAttribute)commonDockerManagerEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getCommonDockerManager_ResumeTimeout() { + return (EAttribute)commonDockerManagerEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getCommonDockerManager_DockerConfiguration() { + return (EReference)commonDockerManagerEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public ManagerFactory getManagerFactory() { + return (ManagerFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + commonDockerManagerEClass = createEClass(COMMON_DOCKER_MANAGER); + createEAttribute(commonDockerManagerEClass, COMMON_DOCKER_MANAGER__SCRIPT); + createEAttribute(commonDockerManagerEClass, COMMON_DOCKER_MANAGER__CONFIGURE_TIMEOUT); + createEAttribute(commonDockerManagerEClass, COMMON_DOCKER_MANAGER__TEST_TIMEOUT); + createEAttribute(commonDockerManagerEClass, COMMON_DOCKER_MANAGER__SUSPEND_TIMEOUT); + createEAttribute(commonDockerManagerEClass, COMMON_DOCKER_MANAGER__RESUME_TIMEOUT); + createEReference(commonDockerManagerEClass, COMMON_DOCKER_MANAGER__DOCKER_CONFIGURATION); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + DockermanagerPackage theDockermanagerPackage = (DockermanagerPackage)EPackage.Registry.INSTANCE.getEPackage(DockermanagerPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + ServicePackage theServicePackage = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + commonDockerManagerEClass.getESuperTypes().add(theDockermanagerPackage.getDockerManager()); + + // Initialize classes, features, and operations; add parameters + initEClass(commonDockerManagerEClass, CommonDockerManager.class, "CommonDockerManager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCommonDockerManager_Script(), theEcorePackage.getEString(), "script", null, 0, 1, CommonDockerManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonDockerManager_ConfigureTimeout(), theEcorePackage.getEInt(), "configureTimeout", "60000", 0, 1, CommonDockerManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonDockerManager_TestTimeout(), theEcorePackage.getEInt(), "testTimeout", "60000", 0, 1, CommonDockerManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonDockerManager_SuspendTimeout(), theEcorePackage.getEInt(), "suspendTimeout", "60000", 0, 1, CommonDockerManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonDockerManager_ResumeTimeout(), theEcorePackage.getEInt(), "resumeTimeout", "60000", 0, 1, CommonDockerManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCommonDockerManager_DockerConfiguration(), theServicePackage.getCommonDockerServiceConfiguration(), null, "dockerConfiguration", null, 0, 1, CommonDockerManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //ManagerPackageImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/util/ManagerAdapterFactory.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/util/ManagerAdapterFactory.java new file mode 100644 index 0000000..6bddd2d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/util/ManagerAdapterFactory.java @@ -0,0 +1,181 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.common.docker.manager.*; + +import org.openecomp.dcae.controller.service.dockermanager.DockerManager; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.common.docker.manager.ManagerPackage + * @generated + */ +public class ManagerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ManagerAdapterFactory() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ManagerSwitch modelSwitch = + new ManagerSwitch() { + @Override + public Adapter caseCommonDockerManager(CommonDockerManager object) { + return createCommonDockerManagerAdapter(); + } + @Override + public Adapter caseDcaeManager(DcaeManager object) { + return createDcaeManagerAdapter(); + } + @Override + public Adapter caseDockerManager(DockerManager object) { + return createDockerManagerAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager Common Docker Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.common.docker.manager.CommonDockerManager + * @generated + */ + public Adapter createCommonDockerManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.manager.DcaeManager Dcae Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager + * @generated + */ + public Adapter createDcaeManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.dockermanager.DockerManager Docker Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.dockermanager.DockerManager + * @generated + */ + public Adapter createDockerManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ManagerAdapterFactory diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/util/ManagerSwitch.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/util/ManagerSwitch.java new file mode 100644 index 0000000..c80ae7e --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/manager/util/ManagerSwitch.java @@ -0,0 +1,167 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.common.docker.manager.*; + +import org.openecomp.dcae.controller.service.dockermanager.DockerManager; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.common.docker.manager.ManagerPackage + * @generated + */ +public class ManagerSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ManagerSwitch() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ManagerPackage.COMMON_DOCKER_MANAGER: { + CommonDockerManager commonDockerManager = (CommonDockerManager)theEObject; + T result = caseCommonDockerManager(commonDockerManager); + if (result == null) result = caseDockerManager(commonDockerManager); + if (result == null) result = caseDcaeManager(commonDockerManager); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Common Docker Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Common Docker Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCommonDockerManager(CommonDockerManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeManager(DcaeManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Docker Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Docker Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDockerManager(DockerManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ManagerSwitch diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/CommonDockerService.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/CommonDockerService.java new file mode 100644 index 0000000..87adb86 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/CommonDockerService.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.service; + +import org.openecomp.dcae.controller.service.docker.DockerService; + +/** + * + * A representation of the model object 'Common Docker Service'. + * + * + * + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage#getCommonDockerService() + * @model + * @generated + */ +public interface CommonDockerService extends DockerService { +} // CommonDockerService diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/CommonDockerServiceConfiguration.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/CommonDockerServiceConfiguration.java new file mode 100644 index 0000000..a93552a --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/CommonDockerServiceConfiguration.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.service; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Common Docker Service Configuration'. + * + * + * + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage#getCommonDockerServiceConfiguration() + * @model + * @generated + */ +public interface CommonDockerServiceConfiguration extends EObject { +} // CommonDockerServiceConfiguration diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/CommonDockerServiceInstance.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/CommonDockerServiceInstance.java new file mode 100644 index 0000000..653b7f5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/CommonDockerServiceInstance.java @@ -0,0 +1,210 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.service; + +import org.openecomp.dcae.controller.service.docker.DockerServiceInstance; + +/** + * + * A representation of the model object 'Common Docker Service Instance'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getScript Script}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getConfigureTimeout Configure Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getTestTimeout Test Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getSuspendTimeout Suspend Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getResumeTimeout Resume Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getDockerConfiguration Docker Configuration}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage#getCommonDockerServiceInstance() + * @model + * @generated + */ +public interface CommonDockerServiceInstance extends DockerServiceInstance { + /** + * Returns the value of the 'Script' attribute. + * + *

+ * If the meaning of the 'Script' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Script' attribute. + * @see #setScript(String) + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage#getCommonDockerServiceInstance_Script() + * @model unique="false" + * @generated + */ + String getScript(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getScript Script}' attribute. + * + * + * @param value the new value of the 'Script' attribute. + * @see #getScript() + * @generated + */ + void setScript(String value); + + /** + * Returns the value of the 'Configure Timeout' attribute. + * The default value is "60000". + * + *

+ * If the meaning of the 'Configure Timeout' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Configure Timeout' attribute. + * @see #setConfigureTimeout(int) + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage#getCommonDockerServiceInstance_ConfigureTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getConfigureTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getConfigureTimeout Configure Timeout}' attribute. + * + * + * @param value the new value of the 'Configure Timeout' attribute. + * @see #getConfigureTimeout() + * @generated + */ + void setConfigureTimeout(int value); + + /** + * Returns the value of the 'Test Timeout' attribute. + * The default value is "60000". + * + *

+ * If the meaning of the 'Test Timeout' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Test Timeout' attribute. + * @see #setTestTimeout(int) + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage#getCommonDockerServiceInstance_TestTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getTestTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getTestTimeout Test Timeout}' attribute. + * + * + * @param value the new value of the 'Test Timeout' attribute. + * @see #getTestTimeout() + * @generated + */ + void setTestTimeout(int value); + + /** + * Returns the value of the 'Suspend Timeout' attribute. + * The default value is "60000". + * + *

+ * If the meaning of the 'Suspend Timeout' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Suspend Timeout' attribute. + * @see #setSuspendTimeout(int) + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage#getCommonDockerServiceInstance_SuspendTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getSuspendTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getSuspendTimeout Suspend Timeout}' attribute. + * + * + * @param value the new value of the 'Suspend Timeout' attribute. + * @see #getSuspendTimeout() + * @generated + */ + void setSuspendTimeout(int value); + + /** + * Returns the value of the 'Resume Timeout' attribute. + * The default value is "60000". + * + *

+ * If the meaning of the 'Resume Timeout' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Resume Timeout' attribute. + * @see #setResumeTimeout(int) + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage#getCommonDockerServiceInstance_ResumeTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getResumeTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getResumeTimeout Resume Timeout}' attribute. + * + * + * @param value the new value of the 'Resume Timeout' attribute. + * @see #getResumeTimeout() + * @generated + */ + void setResumeTimeout(int value); + + /** + * Returns the value of the 'Docker Configuration' containment reference. + * + *

+ * If the meaning of the 'Docker Configuration' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Docker Configuration' containment reference. + * @see #setDockerConfiguration(CommonDockerServiceConfiguration) + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage#getCommonDockerServiceInstance_DockerConfiguration() + * @model containment="true" + * @generated + */ + CommonDockerServiceConfiguration getDockerConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getDockerConfiguration Docker Configuration}' containment reference. + * + * + * @param value the new value of the 'Docker Configuration' containment reference. + * @see #getDockerConfiguration() + * @generated + */ + void setDockerConfiguration(CommonDockerServiceConfiguration value); + +} // CommonDockerServiceInstance diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/ServiceFactory.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/ServiceFactory.java new file mode 100644 index 0000000..bd4d10e --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/ServiceFactory.java @@ -0,0 +1,90 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.service; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage + * @generated + */ +public interface ServiceFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ServiceFactory eINSTANCE = org.openecomp.dcae.controller.service.common.docker.service.impl.ServiceFactoryImpl.init(); + + /** + * Returns a new object of class 'Common Docker Service'. + * + * + * @return a new object of class 'Common Docker Service'. + * @generated + */ + CommonDockerService createCommonDockerService(); + + /** + * Returns a new object of class 'Common Docker Service Instance'. + * + * + * @return a new object of class 'Common Docker Service Instance'. + * @generated + */ + CommonDockerServiceInstance createCommonDockerServiceInstance(); + + /** + * Returns a new object of class 'Common Docker Service Configuration'. + * + * + * @return a new object of class 'Common Docker Service Configuration'. + * @generated + */ + CommonDockerServiceConfiguration createCommonDockerServiceConfiguration(); + + /** + * Returns a new object of class 'Tommy Docker Service Configuration'. + * + * + * @return a new object of class 'Tommy Docker Service Configuration'. + * @generated + */ + TommyDockerServiceConfiguration createTommyDockerServiceConfiguration(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ServicePackage getServicePackage(); + +} //ServiceFactory diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/ServicePackage.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/ServicePackage.java new file mode 100644 index 0000000..1db6c99 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/ServicePackage.java @@ -0,0 +1,887 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.service; + +import org.openecomp.dcae.controller.service.docker.DockerPackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.common.docker.service.ServiceFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-common-docker-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.common.docker'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org'" + * @generated + */ +public interface ServicePackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "service"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.common.docker.service"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "service"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ServicePackage eINSTANCE = org.openecomp.dcae.controller.service.common.docker.service.impl.ServicePackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceImpl Common Docker Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceImpl + * @see org.openecomp.dcae.controller.service.common.docker.service.impl.ServicePackageImpl#getCommonDockerService() + * @generated + */ + int COMMON_DOCKER_SERVICE = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE__NAME = DockerPackage.DOCKER_SERVICE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE__LAST_POLLED = DockerPackage.DOCKER_SERVICE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE__LAST_CHANGED = DockerPackage.DOCKER_SERVICE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE__CREATED = DockerPackage.DOCKER_SERVICE__CREATED; + + /** + * The feature id for the 'Instances' containment reference list. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE__INSTANCES = DockerPackage.DOCKER_SERVICE__INSTANCES; + + /** + * The number of structural features of the 'Common Docker Service' class. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_FEATURE_COUNT = DockerPackage.DOCKER_SERVICE_FEATURE_COUNT + 0; + + /** + * The operation id for the 'Deploy' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE___DEPLOY__STRING_STRING = DockerPackage.DOCKER_SERVICE___DEPLOY__STRING_STRING; + + /** + * The operation id for the 'Undeploy' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE___UNDEPLOY__STRING = DockerPackage.DOCKER_SERVICE___UNDEPLOY__STRING; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE___TEST__STRING = DockerPackage.DOCKER_SERVICE___TEST__STRING; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE___SUSPEND__STRING = DockerPackage.DOCKER_SERVICE___SUSPEND__STRING; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE___RESUME__STRING = DockerPackage.DOCKER_SERVICE___RESUME__STRING; + + /** + * The operation id for the 'Push Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING = DockerPackage.DOCKER_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Poll Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE___POLL_MANAGER_CONFIGURATION__STRING = DockerPackage.DOCKER_SERVICE___POLL_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE___MANAGER_CONFIGURATION__STRING = DockerPackage.DOCKER_SERVICE___MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Operation' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT = DockerPackage.DOCKER_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT; + + /** + * The operation id for the 'Update Configuration From Policy' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING = DockerPackage.DOCKER_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING; + + /** + * The operation id for the 'Run Health Tests' operation. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE___RUN_HEALTH_TESTS = DockerPackage.DOCKER_SERVICE___RUN_HEALTH_TESTS; + + /** + * The number of operations of the 'Common Docker Service' class. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_OPERATION_COUNT = DockerPackage.DOCKER_SERVICE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceInstanceImpl Common Docker Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.common.docker.service.impl.ServicePackageImpl#getCommonDockerServiceInstance() + * @generated + */ + int COMMON_DOCKER_SERVICE_INSTANCE = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__NAME = DockerPackage.DOCKER_SERVICE_INSTANCE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__LAST_POLLED = DockerPackage.DOCKER_SERVICE_INSTANCE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__LAST_CHANGED = DockerPackage.DOCKER_SERVICE_INSTANCE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__CREATED = DockerPackage.DOCKER_SERVICE_INSTANCE__CREATED; + + /** + * The feature id for the 'Service Container' reference. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__SERVICE_CONTAINER = DockerPackage.DOCKER_SERVICE_INSTANCE__SERVICE_CONTAINER; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__STATUS = DockerPackage.DOCKER_SERVICE_INSTANCE__STATUS; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__INPUT_STREAMS = DockerPackage.DOCKER_SERVICE_INSTANCE__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__OUTPUT_STREAMS = DockerPackage.DOCKER_SERVICE_INSTANCE__OUTPUT_STREAMS; + + /** + * The feature id for the 'Last Health Test' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__LAST_HEALTH_TEST = DockerPackage.DOCKER_SERVICE_INSTANCE__LAST_HEALTH_TEST; + + /** + * The feature id for the 'Health Test Status' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__HEALTH_TEST_STATUS = DockerPackage.DOCKER_SERVICE_INSTANCE__HEALTH_TEST_STATUS; + + /** + * The feature id for the 'Health Test Message Code' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE = DockerPackage.DOCKER_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE; + + /** + * The feature id for the 'Docker Host' containment reference. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__DOCKER_HOST = DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_HOST; + + /** + * The feature id for the 'Host Service' reference. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__HOST_SERVICE = DockerPackage.DOCKER_SERVICE_INSTANCE__HOST_SERVICE; + + /** + * The feature id for the 'Docker Name' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__DOCKER_NAME = DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_NAME; + + /** + * The feature id for the 'Image' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__IMAGE = DockerPackage.DOCKER_SERVICE_INSTANCE__IMAGE; + + /** + * The feature id for the 'Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__CONFIGURATION = DockerPackage.DOCKER_SERVICE_INSTANCE__CONFIGURATION; + + /** + * The feature id for the 'Volumes' attribute list. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__VOLUMES = DockerPackage.DOCKER_SERVICE_INSTANCE__VOLUMES; + + /** + * The feature id for the 'Links' attribute list. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__LINKS = DockerPackage.DOCKER_SERVICE_INSTANCE__LINKS; + + /** + * The feature id for the 'Envs' attribute list. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__ENVS = DockerPackage.DOCKER_SERVICE_INSTANCE__ENVS; + + /** + * The feature id for the 'Port Bindings' containment reference list. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__PORT_BINDINGS = DockerPackage.DOCKER_SERVICE_INSTANCE__PORT_BINDINGS; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__MANAGER_PORT_NUMBER = DockerPackage.DOCKER_SERVICE_INSTANCE__MANAGER_PORT_NUMBER; + + /** + * The feature id for the 'Script' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__SCRIPT = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Configure Timeout' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__CONFIGURE_TIMEOUT = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Test Timeout' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__TEST_TIMEOUT = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Suspend Timeout' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__SUSPEND_TIMEOUT = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Resume Timeout' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__RESUME_TIMEOUT = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Docker Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE__DOCKER_CONFIGURATION = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 5; + + /** + * The number of structural features of the 'Common Docker Service Instance' class. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE_FEATURE_COUNT = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 6; + + /** + * The number of operations of the 'Common Docker Service Instance' class. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_INSTANCE_OPERATION_COUNT = DockerPackage.DOCKER_SERVICE_INSTANCE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceConfigurationImpl Common Docker Service Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.common.docker.service.impl.ServicePackageImpl#getCommonDockerServiceConfiguration() + * @generated + */ + int COMMON_DOCKER_SERVICE_CONFIGURATION = 2; + + /** + * The number of structural features of the 'Common Docker Service Configuration' class. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_CONFIGURATION_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Common Docker Service Configuration' class. + * + * + * @generated + * @ordered + */ + int COMMON_DOCKER_SERVICE_CONFIGURATION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.common.docker.service.impl.TommyDockerServiceConfigurationImpl Tommy Docker Service Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.docker.service.impl.TommyDockerServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.common.docker.service.impl.ServicePackageImpl#getTommyDockerServiceConfiguration() + * @generated + */ + int TOMMY_DOCKER_SERVICE_CONFIGURATION = 3; + + /** + * The feature id for the 'Postgres User Name' attribute. + * + * + * @generated + * @ordered + */ + int TOMMY_DOCKER_SERVICE_CONFIGURATION__POSTGRES_USER_NAME = COMMON_DOCKER_SERVICE_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Postgres Password' attribute. + * + * + * @generated + * @ordered + */ + int TOMMY_DOCKER_SERVICE_CONFIGURATION__POSTGRES_PASSWORD = COMMON_DOCKER_SERVICE_CONFIGURATION_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Portgres Jdbc' attribute. + * + * + * @generated + * @ordered + */ + int TOMMY_DOCKER_SERVICE_CONFIGURATION__PORTGRES_JDBC = COMMON_DOCKER_SERVICE_CONFIGURATION_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Tommy Docker Service Configuration' class. + * + * + * @generated + * @ordered + */ + int TOMMY_DOCKER_SERVICE_CONFIGURATION_FEATURE_COUNT = COMMON_DOCKER_SERVICE_CONFIGURATION_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Tommy Docker Service Configuration' class. + * + * + * @generated + * @ordered + */ + int TOMMY_DOCKER_SERVICE_CONFIGURATION_OPERATION_COUNT = COMMON_DOCKER_SERVICE_CONFIGURATION_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerService Common Docker Service}'. + * + * + * @return the meta object for class 'Common Docker Service'. + * @see org.openecomp.dcae.controller.service.common.docker.service.CommonDockerService + * @generated + */ + EClass getCommonDockerService(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance Common Docker Service Instance}'. + * + * + * @return the meta object for class 'Common Docker Service Instance'. + * @see org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance + * @generated + */ + EClass getCommonDockerServiceInstance(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getScript Script}'. + * + * + * @return the meta object for the attribute 'Script'. + * @see org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getScript() + * @see #getCommonDockerServiceInstance() + * @generated + */ + EAttribute getCommonDockerServiceInstance_Script(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getConfigureTimeout Configure Timeout}'. + * + * + * @return the meta object for the attribute 'Configure Timeout'. + * @see org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getConfigureTimeout() + * @see #getCommonDockerServiceInstance() + * @generated + */ + EAttribute getCommonDockerServiceInstance_ConfigureTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getTestTimeout Test Timeout}'. + * + * + * @return the meta object for the attribute 'Test Timeout'. + * @see org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getTestTimeout() + * @see #getCommonDockerServiceInstance() + * @generated + */ + EAttribute getCommonDockerServiceInstance_TestTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getSuspendTimeout Suspend Timeout}'. + * + * + * @return the meta object for the attribute 'Suspend Timeout'. + * @see org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getSuspendTimeout() + * @see #getCommonDockerServiceInstance() + * @generated + */ + EAttribute getCommonDockerServiceInstance_SuspendTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getResumeTimeout Resume Timeout}'. + * + * + * @return the meta object for the attribute 'Resume Timeout'. + * @see org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getResumeTimeout() + * @see #getCommonDockerServiceInstance() + * @generated + */ + EAttribute getCommonDockerServiceInstance_ResumeTimeout(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getDockerConfiguration Docker Configuration}'. + * + * + * @return the meta object for the containment reference 'Docker Configuration'. + * @see org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance#getDockerConfiguration() + * @see #getCommonDockerServiceInstance() + * @generated + */ + EReference getCommonDockerServiceInstance_DockerConfiguration(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceConfiguration Common Docker Service Configuration}'. + * + * + * @return the meta object for class 'Common Docker Service Configuration'. + * @see org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceConfiguration + * @generated + */ + EClass getCommonDockerServiceConfiguration(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration Tommy Docker Service Configuration}'. + * + * + * @return the meta object for class 'Tommy Docker Service Configuration'. + * @see org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration + * @generated + */ + EClass getTommyDockerServiceConfiguration(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration#getPostgresUserName Postgres User Name}'. + * + * + * @return the meta object for the attribute 'Postgres User Name'. + * @see org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration#getPostgresUserName() + * @see #getTommyDockerServiceConfiguration() + * @generated + */ + EAttribute getTommyDockerServiceConfiguration_PostgresUserName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration#getPostgresPassword Postgres Password}'. + * + * + * @return the meta object for the attribute 'Postgres Password'. + * @see org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration#getPostgresPassword() + * @see #getTommyDockerServiceConfiguration() + * @generated + */ + EAttribute getTommyDockerServiceConfiguration_PostgresPassword(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration#getPortgresJdbc Portgres Jdbc}'. + * + * + * @return the meta object for the attribute 'Portgres Jdbc'. + * @see org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration#getPortgresJdbc() + * @see #getTommyDockerServiceConfiguration() + * @generated + */ + EAttribute getTommyDockerServiceConfiguration_PortgresJdbc(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ServiceFactory getServiceFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceImpl Common Docker Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceImpl + * @see org.openecomp.dcae.controller.service.common.docker.service.impl.ServicePackageImpl#getCommonDockerService() + * @generated + */ + EClass COMMON_DOCKER_SERVICE = eINSTANCE.getCommonDockerService(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceInstanceImpl Common Docker Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.common.docker.service.impl.ServicePackageImpl#getCommonDockerServiceInstance() + * @generated + */ + EClass COMMON_DOCKER_SERVICE_INSTANCE = eINSTANCE.getCommonDockerServiceInstance(); + + /** + * The meta object literal for the 'Script' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_DOCKER_SERVICE_INSTANCE__SCRIPT = eINSTANCE.getCommonDockerServiceInstance_Script(); + + /** + * The meta object literal for the 'Configure Timeout' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_DOCKER_SERVICE_INSTANCE__CONFIGURE_TIMEOUT = eINSTANCE.getCommonDockerServiceInstance_ConfigureTimeout(); + + /** + * The meta object literal for the 'Test Timeout' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_DOCKER_SERVICE_INSTANCE__TEST_TIMEOUT = eINSTANCE.getCommonDockerServiceInstance_TestTimeout(); + + /** + * The meta object literal for the 'Suspend Timeout' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_DOCKER_SERVICE_INSTANCE__SUSPEND_TIMEOUT = eINSTANCE.getCommonDockerServiceInstance_SuspendTimeout(); + + /** + * The meta object literal for the 'Resume Timeout' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_DOCKER_SERVICE_INSTANCE__RESUME_TIMEOUT = eINSTANCE.getCommonDockerServiceInstance_ResumeTimeout(); + + /** + * The meta object literal for the 'Docker Configuration' containment reference feature. + * + * + * @generated + */ + EReference COMMON_DOCKER_SERVICE_INSTANCE__DOCKER_CONFIGURATION = eINSTANCE.getCommonDockerServiceInstance_DockerConfiguration(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceConfigurationImpl Common Docker Service Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.common.docker.service.impl.ServicePackageImpl#getCommonDockerServiceConfiguration() + * @generated + */ + EClass COMMON_DOCKER_SERVICE_CONFIGURATION = eINSTANCE.getCommonDockerServiceConfiguration(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.common.docker.service.impl.TommyDockerServiceConfigurationImpl Tommy Docker Service Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.docker.service.impl.TommyDockerServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.common.docker.service.impl.ServicePackageImpl#getTommyDockerServiceConfiguration() + * @generated + */ + EClass TOMMY_DOCKER_SERVICE_CONFIGURATION = eINSTANCE.getTommyDockerServiceConfiguration(); + + /** + * The meta object literal for the 'Postgres User Name' attribute feature. + * + * + * @generated + */ + EAttribute TOMMY_DOCKER_SERVICE_CONFIGURATION__POSTGRES_USER_NAME = eINSTANCE.getTommyDockerServiceConfiguration_PostgresUserName(); + + /** + * The meta object literal for the 'Postgres Password' attribute feature. + * + * + * @generated + */ + EAttribute TOMMY_DOCKER_SERVICE_CONFIGURATION__POSTGRES_PASSWORD = eINSTANCE.getTommyDockerServiceConfiguration_PostgresPassword(); + + /** + * The meta object literal for the 'Portgres Jdbc' attribute feature. + * + * + * @generated + */ + EAttribute TOMMY_DOCKER_SERVICE_CONFIGURATION__PORTGRES_JDBC = eINSTANCE.getTommyDockerServiceConfiguration_PortgresJdbc(); + + } + +} //ServicePackage diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/TommyDockerServiceConfiguration.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/TommyDockerServiceConfiguration.java new file mode 100644 index 0000000..47dee2b --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/TommyDockerServiceConfiguration.java @@ -0,0 +1,124 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.service; + + +/** + * + * A representation of the model object 'Tommy Docker Service Configuration'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration#getPostgresUserName Postgres User Name}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration#getPostgresPassword Postgres Password}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration#getPortgresJdbc Portgres Jdbc}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage#getTommyDockerServiceConfiguration() + * @model + * @generated + */ +public interface TommyDockerServiceConfiguration extends CommonDockerServiceConfiguration { + /** + * Returns the value of the 'Postgres User Name' attribute. + * + *

+ * If the meaning of the 'Postgres User Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Postgres User Name' attribute. + * @see #setPostgresUserName(String) + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage#getTommyDockerServiceConfiguration_PostgresUserName() + * @model unique="false" + * @generated + */ + String getPostgresUserName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration#getPostgresUserName Postgres User Name}' attribute. + * + * + * @param value the new value of the 'Postgres User Name' attribute. + * @see #getPostgresUserName() + * @generated + */ + void setPostgresUserName(String value); + + /** + * Returns the value of the 'Postgres Password' attribute. + * + *

+ * If the meaning of the 'Postgres Password' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Postgres Password' attribute. + * @see #setPostgresPassword(String) + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage#getTommyDockerServiceConfiguration_PostgresPassword() + * @model unique="false" + * @generated + */ + String getPostgresPassword(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration#getPostgresPassword Postgres Password}' attribute. + * + * + * @param value the new value of the 'Postgres Password' attribute. + * @see #getPostgresPassword() + * @generated + */ + void setPostgresPassword(String value); + + /** + * Returns the value of the 'Portgres Jdbc' attribute. + * + *

+ * If the meaning of the 'Portgres Jdbc' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Portgres Jdbc' attribute. + * @see #setPortgresJdbc(String) + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage#getTommyDockerServiceConfiguration_PortgresJdbc() + * @model unique="false" + * @generated + */ + String getPortgresJdbc(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration#getPortgresJdbc Portgres Jdbc}' attribute. + * + * + * @param value the new value of the 'Portgres Jdbc' attribute. + * @see #getPortgresJdbc() + * @generated + */ + void setPortgresJdbc(String value); + +} // TommyDockerServiceConfiguration diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/CommonDockerServiceConfigurationImpl.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/CommonDockerServiceConfigurationImpl.java new file mode 100644 index 0000000..eb82953 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/CommonDockerServiceConfigurationImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.service.impl; + +import org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceConfiguration; +import org.openecomp.dcae.controller.service.common.docker.service.ServicePackage; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Common Docker Service Configuration'. + * + *

+ *

+ * + * @generated + */ +public class CommonDockerServiceConfigurationImpl extends MinimalEObjectImpl.Container implements CommonDockerServiceConfiguration { + /** + * + * + * @generated + */ + protected CommonDockerServiceConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.COMMON_DOCKER_SERVICE_CONFIGURATION; + } + +} //CommonDockerServiceConfigurationImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/CommonDockerServiceImpl.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/CommonDockerServiceImpl.java new file mode 100644 index 0000000..06c2bba --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/CommonDockerServiceImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.service.impl; + +import org.openecomp.dcae.controller.service.common.docker.service.CommonDockerService; +import org.openecomp.dcae.controller.service.common.docker.service.ServicePackage; + +import org.openecomp.dcae.controller.service.docker.impl.DockerServiceImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Common Docker Service'. + * + *

+ *

+ * + * @generated + */ +public class CommonDockerServiceImpl extends DockerServiceImpl implements CommonDockerService { + /** + * + * + * @generated + */ + protected CommonDockerServiceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.COMMON_DOCKER_SERVICE; + } + +} //CommonDockerServiceImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/CommonDockerServiceInstanceImpl.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/CommonDockerServiceInstanceImpl.java new file mode 100644 index 0000000..22ad45f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/CommonDockerServiceInstanceImpl.java @@ -0,0 +1,482 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.service.impl; + +import org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceConfiguration; +import org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance; +import org.openecomp.dcae.controller.service.common.docker.service.ServicePackage; + +import org.openecomp.dcae.controller.service.docker.impl.DockerServiceInstanceImpl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Common Docker Service Instance'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceInstanceImpl#getScript Script}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceInstanceImpl#getConfigureTimeout Configure Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceInstanceImpl#getTestTimeout Test Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceInstanceImpl#getSuspendTimeout Suspend Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceInstanceImpl#getResumeTimeout Resume Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.impl.CommonDockerServiceInstanceImpl#getDockerConfiguration Docker Configuration}
  • + *
+ *

+ * + * @generated + */ +public class CommonDockerServiceInstanceImpl extends DockerServiceInstanceImpl implements CommonDockerServiceInstance { + /** + * The default value of the '{@link #getScript() Script}' attribute. + * + * + * @see #getScript() + * @generated + * @ordered + */ + protected static final String SCRIPT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getScript() Script}' attribute. + * + * + * @see #getScript() + * @generated + * @ordered + */ + protected String script = SCRIPT_EDEFAULT; + + /** + * The default value of the '{@link #getConfigureTimeout() Configure Timeout}' attribute. + * + * + * @see #getConfigureTimeout() + * @generated + * @ordered + */ + protected static final int CONFIGURE_TIMEOUT_EDEFAULT = 60000; + + /** + * The cached value of the '{@link #getConfigureTimeout() Configure Timeout}' attribute. + * + * + * @see #getConfigureTimeout() + * @generated + * @ordered + */ + protected int configureTimeout = CONFIGURE_TIMEOUT_EDEFAULT; + + /** + * The default value of the '{@link #getTestTimeout() Test Timeout}' attribute. + * + * + * @see #getTestTimeout() + * @generated + * @ordered + */ + protected static final int TEST_TIMEOUT_EDEFAULT = 60000; + + /** + * The cached value of the '{@link #getTestTimeout() Test Timeout}' attribute. + * + * + * @see #getTestTimeout() + * @generated + * @ordered + */ + protected int testTimeout = TEST_TIMEOUT_EDEFAULT; + + /** + * The default value of the '{@link #getSuspendTimeout() Suspend Timeout}' attribute. + * + * + * @see #getSuspendTimeout() + * @generated + * @ordered + */ + protected static final int SUSPEND_TIMEOUT_EDEFAULT = 60000; + + /** + * The cached value of the '{@link #getSuspendTimeout() Suspend Timeout}' attribute. + * + * + * @see #getSuspendTimeout() + * @generated + * @ordered + */ + protected int suspendTimeout = SUSPEND_TIMEOUT_EDEFAULT; + + /** + * The default value of the '{@link #getResumeTimeout() Resume Timeout}' attribute. + * + * + * @see #getResumeTimeout() + * @generated + * @ordered + */ + protected static final int RESUME_TIMEOUT_EDEFAULT = 60000; + + /** + * The cached value of the '{@link #getResumeTimeout() Resume Timeout}' attribute. + * + * + * @see #getResumeTimeout() + * @generated + * @ordered + */ + protected int resumeTimeout = RESUME_TIMEOUT_EDEFAULT; + + /** + * The cached value of the '{@link #getDockerConfiguration() Docker Configuration}' containment reference. + * + * + * @see #getDockerConfiguration() + * @generated + * @ordered + */ + protected CommonDockerServiceConfiguration dockerConfiguration; + + /** + * + * + * @generated + */ + protected CommonDockerServiceInstanceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.COMMON_DOCKER_SERVICE_INSTANCE; + } + + /** + * + * + * @generated + */ + public String getScript() { + return script; + } + + /** + * + * + * @generated + */ + public void setScript(String newScript) { + String oldScript = script; + script = newScript; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__SCRIPT, oldScript, script)); + } + + /** + * + * + * @generated + */ + public int getConfigureTimeout() { + return configureTimeout; + } + + /** + * + * + * @generated + */ + public void setConfigureTimeout(int newConfigureTimeout) { + int oldConfigureTimeout = configureTimeout; + configureTimeout = newConfigureTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__CONFIGURE_TIMEOUT, oldConfigureTimeout, configureTimeout)); + } + + /** + * + * + * @generated + */ + public int getTestTimeout() { + return testTimeout; + } + + /** + * + * + * @generated + */ + public void setTestTimeout(int newTestTimeout) { + int oldTestTimeout = testTimeout; + testTimeout = newTestTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__TEST_TIMEOUT, oldTestTimeout, testTimeout)); + } + + /** + * + * + * @generated + */ + public int getSuspendTimeout() { + return suspendTimeout; + } + + /** + * + * + * @generated + */ + public void setSuspendTimeout(int newSuspendTimeout) { + int oldSuspendTimeout = suspendTimeout; + suspendTimeout = newSuspendTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__SUSPEND_TIMEOUT, oldSuspendTimeout, suspendTimeout)); + } + + /** + * + * + * @generated + */ + public int getResumeTimeout() { + return resumeTimeout; + } + + /** + * + * + * @generated + */ + public void setResumeTimeout(int newResumeTimeout) { + int oldResumeTimeout = resumeTimeout; + resumeTimeout = newResumeTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__RESUME_TIMEOUT, oldResumeTimeout, resumeTimeout)); + } + + /** + * + * + * @generated + */ + public CommonDockerServiceConfiguration getDockerConfiguration() { + return dockerConfiguration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetDockerConfiguration(CommonDockerServiceConfiguration newDockerConfiguration, NotificationChain msgs) { + CommonDockerServiceConfiguration oldDockerConfiguration = dockerConfiguration; + dockerConfiguration = newDockerConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__DOCKER_CONFIGURATION, oldDockerConfiguration, newDockerConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setDockerConfiguration(CommonDockerServiceConfiguration newDockerConfiguration) { + if (newDockerConfiguration != dockerConfiguration) { + NotificationChain msgs = null; + if (dockerConfiguration != null) + msgs = ((InternalEObject)dockerConfiguration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__DOCKER_CONFIGURATION, null, msgs); + if (newDockerConfiguration != null) + msgs = ((InternalEObject)newDockerConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__DOCKER_CONFIGURATION, null, msgs); + msgs = basicSetDockerConfiguration(newDockerConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__DOCKER_CONFIGURATION, newDockerConfiguration, newDockerConfiguration)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__DOCKER_CONFIGURATION: + return basicSetDockerConfiguration(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__SCRIPT: + return getScript(); + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__CONFIGURE_TIMEOUT: + return getConfigureTimeout(); + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__TEST_TIMEOUT: + return getTestTimeout(); + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__SUSPEND_TIMEOUT: + return getSuspendTimeout(); + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__RESUME_TIMEOUT: + return getResumeTimeout(); + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__DOCKER_CONFIGURATION: + return getDockerConfiguration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__SCRIPT: + setScript((String)newValue); + return; + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__CONFIGURE_TIMEOUT: + setConfigureTimeout((Integer)newValue); + return; + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__TEST_TIMEOUT: + setTestTimeout((Integer)newValue); + return; + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__SUSPEND_TIMEOUT: + setSuspendTimeout((Integer)newValue); + return; + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__RESUME_TIMEOUT: + setResumeTimeout((Integer)newValue); + return; + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__DOCKER_CONFIGURATION: + setDockerConfiguration((CommonDockerServiceConfiguration)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__SCRIPT: + setScript(SCRIPT_EDEFAULT); + return; + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__CONFIGURE_TIMEOUT: + setConfigureTimeout(CONFIGURE_TIMEOUT_EDEFAULT); + return; + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__TEST_TIMEOUT: + setTestTimeout(TEST_TIMEOUT_EDEFAULT); + return; + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__SUSPEND_TIMEOUT: + setSuspendTimeout(SUSPEND_TIMEOUT_EDEFAULT); + return; + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__RESUME_TIMEOUT: + setResumeTimeout(RESUME_TIMEOUT_EDEFAULT); + return; + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__DOCKER_CONFIGURATION: + setDockerConfiguration((CommonDockerServiceConfiguration)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__SCRIPT: + return SCRIPT_EDEFAULT == null ? script != null : !SCRIPT_EDEFAULT.equals(script); + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__CONFIGURE_TIMEOUT: + return configureTimeout != CONFIGURE_TIMEOUT_EDEFAULT; + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__TEST_TIMEOUT: + return testTimeout != TEST_TIMEOUT_EDEFAULT; + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__SUSPEND_TIMEOUT: + return suspendTimeout != SUSPEND_TIMEOUT_EDEFAULT; + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__RESUME_TIMEOUT: + return resumeTimeout != RESUME_TIMEOUT_EDEFAULT; + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE__DOCKER_CONFIGURATION: + return dockerConfiguration != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (script: "); + result.append(script); + result.append(", configureTimeout: "); + result.append(configureTimeout); + result.append(", testTimeout: "); + result.append(testTimeout); + result.append(", suspendTimeout: "); + result.append(suspendTimeout); + result.append(", resumeTimeout: "); + result.append(resumeTimeout); + result.append(')'); + return result.toString(); + } + +} //CommonDockerServiceInstanceImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/ServiceFactoryImpl.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/ServiceFactoryImpl.java new file mode 100644 index 0000000..cfe42d7 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/ServiceFactoryImpl.java @@ -0,0 +1,149 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.service.impl; + +import org.openecomp.dcae.controller.service.common.docker.service.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ServiceFactoryImpl extends EFactoryImpl implements ServiceFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ServiceFactory init() { + try { + ServiceFactory theServiceFactory = (ServiceFactory)EPackage.Registry.INSTANCE.getEFactory(ServicePackage.eNS_URI); + if (theServiceFactory != null) { + return theServiceFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ServiceFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ServiceFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ServicePackage.COMMON_DOCKER_SERVICE: return createCommonDockerService(); + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE: return createCommonDockerServiceInstance(); + case ServicePackage.COMMON_DOCKER_SERVICE_CONFIGURATION: return createCommonDockerServiceConfiguration(); + case ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION: return createTommyDockerServiceConfiguration(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public CommonDockerService createCommonDockerService() { + CommonDockerServiceImpl commonDockerService = new CommonDockerServiceImpl(); + return commonDockerService; + } + + /** + * + * + * @generated + */ + public CommonDockerServiceInstance createCommonDockerServiceInstance() { + CommonDockerServiceInstanceImpl commonDockerServiceInstance = new CommonDockerServiceInstanceImpl(); + return commonDockerServiceInstance; + } + + /** + * + * + * @generated + */ + public CommonDockerServiceConfiguration createCommonDockerServiceConfiguration() { + CommonDockerServiceConfigurationImpl commonDockerServiceConfiguration = new CommonDockerServiceConfigurationImpl(); + return commonDockerServiceConfiguration; + } + + /** + * + * + * @generated + */ + public TommyDockerServiceConfiguration createTommyDockerServiceConfiguration() { + TommyDockerServiceConfigurationImpl tommyDockerServiceConfiguration = new TommyDockerServiceConfigurationImpl(); + return tommyDockerServiceConfiguration; + } + + /** + * + * + * @generated + */ + public ServicePackage getServicePackage() { + return (ServicePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ServicePackage getPackage() { + return ServicePackage.eINSTANCE; + } + +} //ServiceFactoryImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/ServicePackageImpl.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/ServicePackageImpl.java new file mode 100644 index 0000000..e975557 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/ServicePackageImpl.java @@ -0,0 +1,383 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.service.impl; + +import org.openecomp.dcae.controller.service.common.docker.service.CommonDockerService; +import org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceConfiguration; +import org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance; +import org.openecomp.dcae.controller.service.common.docker.service.ServiceFactory; +import org.openecomp.dcae.controller.service.common.docker.service.ServicePackage; +import org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration; + +import org.openecomp.dcae.controller.service.docker.DockerPackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ServicePackageImpl extends EPackageImpl implements ServicePackage { + /** + * + * + * @generated + */ + private EClass commonDockerServiceEClass = null; + + /** + * + * + * @generated + */ + private EClass commonDockerServiceInstanceEClass = null; + + /** + * + * + * @generated + */ + private EClass commonDockerServiceConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass tommyDockerServiceConfigurationEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage#eNS_URI + * @see #init() + * @generated + */ + private ServicePackageImpl() { + super(eNS_URI, ServiceFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ServicePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ServicePackage init() { + if (isInited) return (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + + // Obtain or create and register package + ServicePackageImpl theServicePackage = (ServicePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ServicePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ServicePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + DockerPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theServicePackage.createPackageContents(); + + // Initialize created meta-data + theServicePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theServicePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ServicePackage.eNS_URI, theServicePackage); + return theServicePackage; + } + + /** + * + * + * @generated + */ + public EClass getCommonDockerService() { + return commonDockerServiceEClass; + } + + /** + * + * + * @generated + */ + public EClass getCommonDockerServiceInstance() { + return commonDockerServiceInstanceEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCommonDockerServiceInstance_Script() { + return (EAttribute)commonDockerServiceInstanceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCommonDockerServiceInstance_ConfigureTimeout() { + return (EAttribute)commonDockerServiceInstanceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCommonDockerServiceInstance_TestTimeout() { + return (EAttribute)commonDockerServiceInstanceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCommonDockerServiceInstance_SuspendTimeout() { + return (EAttribute)commonDockerServiceInstanceEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getCommonDockerServiceInstance_ResumeTimeout() { + return (EAttribute)commonDockerServiceInstanceEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getCommonDockerServiceInstance_DockerConfiguration() { + return (EReference)commonDockerServiceInstanceEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EClass getCommonDockerServiceConfiguration() { + return commonDockerServiceConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EClass getTommyDockerServiceConfiguration() { + return tommyDockerServiceConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getTommyDockerServiceConfiguration_PostgresUserName() { + return (EAttribute)tommyDockerServiceConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getTommyDockerServiceConfiguration_PostgresPassword() { + return (EAttribute)tommyDockerServiceConfigurationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getTommyDockerServiceConfiguration_PortgresJdbc() { + return (EAttribute)tommyDockerServiceConfigurationEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public ServiceFactory getServiceFactory() { + return (ServiceFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + commonDockerServiceEClass = createEClass(COMMON_DOCKER_SERVICE); + + commonDockerServiceInstanceEClass = createEClass(COMMON_DOCKER_SERVICE_INSTANCE); + createEAttribute(commonDockerServiceInstanceEClass, COMMON_DOCKER_SERVICE_INSTANCE__SCRIPT); + createEAttribute(commonDockerServiceInstanceEClass, COMMON_DOCKER_SERVICE_INSTANCE__CONFIGURE_TIMEOUT); + createEAttribute(commonDockerServiceInstanceEClass, COMMON_DOCKER_SERVICE_INSTANCE__TEST_TIMEOUT); + createEAttribute(commonDockerServiceInstanceEClass, COMMON_DOCKER_SERVICE_INSTANCE__SUSPEND_TIMEOUT); + createEAttribute(commonDockerServiceInstanceEClass, COMMON_DOCKER_SERVICE_INSTANCE__RESUME_TIMEOUT); + createEReference(commonDockerServiceInstanceEClass, COMMON_DOCKER_SERVICE_INSTANCE__DOCKER_CONFIGURATION); + + commonDockerServiceConfigurationEClass = createEClass(COMMON_DOCKER_SERVICE_CONFIGURATION); + + tommyDockerServiceConfigurationEClass = createEClass(TOMMY_DOCKER_SERVICE_CONFIGURATION); + createEAttribute(tommyDockerServiceConfigurationEClass, TOMMY_DOCKER_SERVICE_CONFIGURATION__POSTGRES_USER_NAME); + createEAttribute(tommyDockerServiceConfigurationEClass, TOMMY_DOCKER_SERVICE_CONFIGURATION__POSTGRES_PASSWORD); + createEAttribute(tommyDockerServiceConfigurationEClass, TOMMY_DOCKER_SERVICE_CONFIGURATION__PORTGRES_JDBC); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + DockerPackage theDockerPackage = (DockerPackage)EPackage.Registry.INSTANCE.getEPackage(DockerPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + commonDockerServiceEClass.getESuperTypes().add(theDockerPackage.getDockerService()); + commonDockerServiceInstanceEClass.getESuperTypes().add(theDockerPackage.getDockerServiceInstance()); + tommyDockerServiceConfigurationEClass.getESuperTypes().add(this.getCommonDockerServiceConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(commonDockerServiceEClass, CommonDockerService.class, "CommonDockerService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(commonDockerServiceInstanceEClass, CommonDockerServiceInstance.class, "CommonDockerServiceInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCommonDockerServiceInstance_Script(), theEcorePackage.getEString(), "script", null, 0, 1, CommonDockerServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonDockerServiceInstance_ConfigureTimeout(), theEcorePackage.getEInt(), "configureTimeout", "60000", 0, 1, CommonDockerServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonDockerServiceInstance_TestTimeout(), theEcorePackage.getEInt(), "testTimeout", "60000", 0, 1, CommonDockerServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonDockerServiceInstance_SuspendTimeout(), theEcorePackage.getEInt(), "suspendTimeout", "60000", 0, 1, CommonDockerServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonDockerServiceInstance_ResumeTimeout(), theEcorePackage.getEInt(), "resumeTimeout", "60000", 0, 1, CommonDockerServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCommonDockerServiceInstance_DockerConfiguration(), this.getCommonDockerServiceConfiguration(), null, "dockerConfiguration", null, 0, 1, CommonDockerServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(commonDockerServiceConfigurationEClass, CommonDockerServiceConfiguration.class, "CommonDockerServiceConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(tommyDockerServiceConfigurationEClass, TommyDockerServiceConfiguration.class, "TommyDockerServiceConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getTommyDockerServiceConfiguration_PostgresUserName(), theEcorePackage.getEString(), "postgresUserName", null, 0, 1, TommyDockerServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTommyDockerServiceConfiguration_PostgresPassword(), theEcorePackage.getEString(), "postgresPassword", null, 0, 1, TommyDockerServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTommyDockerServiceConfiguration_PortgresJdbc(), theEcorePackage.getEString(), "portgresJdbc", null, 0, 1, TommyDockerServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "ecomp", "http://openecomp.org" + }); + } + +} //ServicePackageImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/TommyDockerServiceConfigurationImpl.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/TommyDockerServiceConfigurationImpl.java new file mode 100644 index 0000000..352c399 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/impl/TommyDockerServiceConfigurationImpl.java @@ -0,0 +1,291 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.service.impl; + +import org.openecomp.dcae.controller.service.common.docker.service.ServicePackage; +import org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Tommy Docker Service Configuration'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.impl.TommyDockerServiceConfigurationImpl#getPostgresUserName Postgres User Name}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.impl.TommyDockerServiceConfigurationImpl#getPostgresPassword Postgres Password}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.docker.service.impl.TommyDockerServiceConfigurationImpl#getPortgresJdbc Portgres Jdbc}
  • + *
+ *

+ * + * @generated + */ +public class TommyDockerServiceConfigurationImpl extends CommonDockerServiceConfigurationImpl implements TommyDockerServiceConfiguration { + /** + * The default value of the '{@link #getPostgresUserName() Postgres User Name}' attribute. + * + * + * @see #getPostgresUserName() + * @generated + * @ordered + */ + protected static final String POSTGRES_USER_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPostgresUserName() Postgres User Name}' attribute. + * + * + * @see #getPostgresUserName() + * @generated + * @ordered + */ + protected String postgresUserName = POSTGRES_USER_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getPostgresPassword() Postgres Password}' attribute. + * + * + * @see #getPostgresPassword() + * @generated + * @ordered + */ + protected static final String POSTGRES_PASSWORD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPostgresPassword() Postgres Password}' attribute. + * + * + * @see #getPostgresPassword() + * @generated + * @ordered + */ + protected String postgresPassword = POSTGRES_PASSWORD_EDEFAULT; + + /** + * The default value of the '{@link #getPortgresJdbc() Portgres Jdbc}' attribute. + * + * + * @see #getPortgresJdbc() + * @generated + * @ordered + */ + protected static final String PORTGRES_JDBC_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPortgresJdbc() Portgres Jdbc}' attribute. + * + * + * @see #getPortgresJdbc() + * @generated + * @ordered + */ + protected String portgresJdbc = PORTGRES_JDBC_EDEFAULT; + + /** + * + * + * @generated + */ + protected TommyDockerServiceConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.TOMMY_DOCKER_SERVICE_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public String getPostgresUserName() { + return postgresUserName; + } + + /** + * + * + * @generated + */ + public void setPostgresUserName(String newPostgresUserName) { + String oldPostgresUserName = postgresUserName; + postgresUserName = newPostgresUserName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION__POSTGRES_USER_NAME, oldPostgresUserName, postgresUserName)); + } + + /** + * + * + * @generated + */ + public String getPostgresPassword() { + return postgresPassword; + } + + /** + * + * + * @generated + */ + public void setPostgresPassword(String newPostgresPassword) { + String oldPostgresPassword = postgresPassword; + postgresPassword = newPostgresPassword; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION__POSTGRES_PASSWORD, oldPostgresPassword, postgresPassword)); + } + + /** + * + * + * @generated + */ + public String getPortgresJdbc() { + return portgresJdbc; + } + + /** + * + * + * @generated + */ + public void setPortgresJdbc(String newPortgresJdbc) { + String oldPortgresJdbc = portgresJdbc; + portgresJdbc = newPortgresJdbc; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION__PORTGRES_JDBC, oldPortgresJdbc, portgresJdbc)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION__POSTGRES_USER_NAME: + return getPostgresUserName(); + case ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION__POSTGRES_PASSWORD: + return getPostgresPassword(); + case ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION__PORTGRES_JDBC: + return getPortgresJdbc(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION__POSTGRES_USER_NAME: + setPostgresUserName((String)newValue); + return; + case ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION__POSTGRES_PASSWORD: + setPostgresPassword((String)newValue); + return; + case ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION__PORTGRES_JDBC: + setPortgresJdbc((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION__POSTGRES_USER_NAME: + setPostgresUserName(POSTGRES_USER_NAME_EDEFAULT); + return; + case ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION__POSTGRES_PASSWORD: + setPostgresPassword(POSTGRES_PASSWORD_EDEFAULT); + return; + case ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION__PORTGRES_JDBC: + setPortgresJdbc(PORTGRES_JDBC_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION__POSTGRES_USER_NAME: + return POSTGRES_USER_NAME_EDEFAULT == null ? postgresUserName != null : !POSTGRES_USER_NAME_EDEFAULT.equals(postgresUserName); + case ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION__POSTGRES_PASSWORD: + return POSTGRES_PASSWORD_EDEFAULT == null ? postgresPassword != null : !POSTGRES_PASSWORD_EDEFAULT.equals(postgresPassword); + case ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION__PORTGRES_JDBC: + return PORTGRES_JDBC_EDEFAULT == null ? portgresJdbc != null : !PORTGRES_JDBC_EDEFAULT.equals(portgresJdbc); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (postgresUserName: "); + result.append(postgresUserName); + result.append(", postgresPassword: "); + result.append(postgresPassword); + result.append(", portgresJdbc: "); + result.append(portgresJdbc); + result.append(')'); + return result.toString(); + } + +} //TommyDockerServiceConfigurationImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/util/ServiceAdapterFactory.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/util/ServiceAdapterFactory.java new file mode 100644 index 0000000..442e7da --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/util/ServiceAdapterFactory.java @@ -0,0 +1,293 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.common.docker.service.*; + +import org.openecomp.dcae.controller.service.docker.DockerService; +import org.openecomp.dcae.controller.service.docker.DockerServiceInstance; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage + * @generated + */ +public class ServiceAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ServiceAdapterFactory() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ServiceSwitch modelSwitch = + new ServiceSwitch() { + @Override + public Adapter caseCommonDockerService(CommonDockerService object) { + return createCommonDockerServiceAdapter(); + } + @Override + public Adapter caseCommonDockerServiceInstance(CommonDockerServiceInstance object) { + return createCommonDockerServiceInstanceAdapter(); + } + @Override + public Adapter caseCommonDockerServiceConfiguration(CommonDockerServiceConfiguration object) { + return createCommonDockerServiceConfigurationAdapter(); + } + @Override + public Adapter caseTommyDockerServiceConfiguration(TommyDockerServiceConfiguration object) { + return createTommyDockerServiceConfigurationAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseDcaeService(DcaeService object) { + return createDcaeServiceAdapter(); + } + @Override + public Adapter caseDockerService(DockerService object) { + return createDockerServiceAdapter(); + } + @Override + public Adapter caseDcaeServiceInstance(DcaeServiceInstance object) { + return createDcaeServiceInstanceAdapter(); + } + @Override + public Adapter caseDockerServiceInstance(DockerServiceInstance object) { + return createDockerServiceInstanceAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerService Common Docker Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.common.docker.service.CommonDockerService + * @generated + */ + public Adapter createCommonDockerServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance Common Docker Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceInstance + * @generated + */ + public Adapter createCommonDockerServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceConfiguration Common Docker Service Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceConfiguration + * @generated + */ + public Adapter createCommonDockerServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration Tommy Docker Service Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.common.docker.service.TommyDockerServiceConfiguration + * @generated + */ + public Adapter createTommyDockerServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeService Dcae Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeService + * @generated + */ + public Adapter createDcaeServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.docker.DockerService Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.docker.DockerService + * @generated + */ + public Adapter createDockerServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance Dcae Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance + * @generated + */ + public Adapter createDcaeServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceInstance + * @generated + */ + public Adapter createDockerServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ServiceAdapterFactory diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/util/ServiceSwitch.java b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/util/ServiceSwitch.java new file mode 100644 index 0000000..197cfbe --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/docker/service/util/ServiceSwitch.java @@ -0,0 +1,284 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.docker.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.common.docker.service.*; + +import org.openecomp.dcae.controller.service.docker.DockerService; +import org.openecomp.dcae.controller.service.docker.DockerServiceInstance; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.common.docker.service.ServicePackage + * @generated + */ +public class ServiceSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ServiceSwitch() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ServicePackage.COMMON_DOCKER_SERVICE: { + CommonDockerService commonDockerService = (CommonDockerService)theEObject; + T result = caseCommonDockerService(commonDockerService); + if (result == null) result = caseDockerService(commonDockerService); + if (result == null) result = caseDcaeService(commonDockerService); + if (result == null) result = caseNamedEntity(commonDockerService); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.COMMON_DOCKER_SERVICE_INSTANCE: { + CommonDockerServiceInstance commonDockerServiceInstance = (CommonDockerServiceInstance)theEObject; + T result = caseCommonDockerServiceInstance(commonDockerServiceInstance); + if (result == null) result = caseDockerServiceInstance(commonDockerServiceInstance); + if (result == null) result = caseDcaeServiceInstance(commonDockerServiceInstance); + if (result == null) result = caseNamedEntity(commonDockerServiceInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.COMMON_DOCKER_SERVICE_CONFIGURATION: { + CommonDockerServiceConfiguration commonDockerServiceConfiguration = (CommonDockerServiceConfiguration)theEObject; + T result = caseCommonDockerServiceConfiguration(commonDockerServiceConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.TOMMY_DOCKER_SERVICE_CONFIGURATION: { + TommyDockerServiceConfiguration tommyDockerServiceConfiguration = (TommyDockerServiceConfiguration)theEObject; + T result = caseTommyDockerServiceConfiguration(tommyDockerServiceConfiguration); + if (result == null) result = caseCommonDockerServiceConfiguration(tommyDockerServiceConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Common Docker Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Common Docker Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCommonDockerService(CommonDockerService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Common Docker Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Common Docker Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCommonDockerServiceInstance(CommonDockerServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Common Docker Service Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Common Docker Service Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCommonDockerServiceConfiguration(CommonDockerServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Tommy Docker Service Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Tommy Docker Service Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTommyDockerServiceConfiguration(TommyDockerServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeService(DcaeService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDockerService(DockerService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceInstance(DcaeServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDockerServiceInstance(DockerServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ServiceSwitch diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore/manager.xcore b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore/manager.xcore new file mode 100644 index 0000000..09e34d8 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore/manager.xcore @@ -0,0 +1,40 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-common-docker-model/src/main/xcore-gen") + + +package org.openecomp.dcae.controller.service.common.docker.manager + + +import org.openecomp.dcae.controller.service.common.docker.service.CommonDockerServiceConfiguration +import org.openecomp.dcae.controller.service.dockermanager.DockerManager + +// state of manager +class CommonDockerManager extends DockerManager { + String script + int configureTimeout = "60000" + int testTimeout = "60000" + int suspendTimeout = "60000" + int resumeTimeout = "60000" + contains CommonDockerServiceConfiguration dockerConfiguration +} + diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore/service.xcore b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore/service.xcore new file mode 100644 index 0000000..78e0c2e --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/src/main/xcore/service.xcore @@ -0,0 +1,53 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-common-docker-model/src/main/xcore-gen") + + +package org.openecomp.dcae.controller.service.common.docker.service + +import org.openecomp.dcae.controller.service.docker.DockerService +import org.openecomp.dcae.controller.service.docker.DockerServiceInstance + +annotation "http://openecomp.org" as ecomp + +class CommonDockerService extends DockerService { +} + +// state in the controller +class CommonDockerServiceInstance extends DockerServiceInstance { + String script + int configureTimeout = "60000" + int testTimeout = "60000" + int suspendTimeout = "60000" + int resumeTimeout = "60000" + contains CommonDockerServiceConfiguration dockerConfiguration +} + +// state in both controller and manager +class CommonDockerServiceConfiguration { +} + +class TommyDockerServiceConfiguration extends CommonDockerServiceConfiguration { + String postgresUserName + String postgresPassword + String portgresJdbc +} \ No newline at end of file diff --git a/dcae-controller-service-docker/dcae-controller-service-common-docker/pom.xml b/dcae-controller-service-docker/dcae-controller-service-common-docker/pom.xml new file mode 100644 index 0000000..d92ed77 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-common-docker/pom.xml @@ -0,0 +1,82 @@ + + 4.0.0 + + org.openecomp.dcae.controller + dcae-controller-service-common-docker + 0.1.0-SNAPSHOT + pom + dcae-controller-service-common-docker + + + UTF-8 + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + + dcae-controller-service-common-docker-manager + dcae-controller-service-common-docker-model + + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.classpath b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.classpath new file mode 100644 index 0000000..d2d34b3 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.gitignore b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.project b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.project new file mode 100644 index 0000000..0ec52ea --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.project @@ -0,0 +1,35 @@ + + + dcae-controller-service-docker-adaptor + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.settings/org.eclipse.core.resources.prefs b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/LICENSE.txt b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/META-INF/MANIFEST.MF b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/META-INF/MANIFEST.MF new file mode 100644 index 0000000..f9af4b5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/META-INF/MANIFEST.MF @@ -0,0 +1,19 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: dcae-controller-service-docker-adaptor +Bundle-SymbolicName: dcae-controller-service-docker-adaptor +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.dcae.controller.service.docker.manager.tools, + org.openecomp.dcae.controller.service.servers.docker, + org.openecomp.dcae.controller.service.servers.dockermanager +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + dcae-controller-service-docker-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + ncomp-docker-adaptor;bundle-version="0.1.0", + dcae-controller-service-docker-host-manager;bundle-version="0.1.0", + dcae-controller-service-docker-host-model;bundle-version="0.1.0", + dcae-controller-core-utils;bundle-version="0.1.0" diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/build.properties b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/build.properties new file mode 100644 index 0000000..a1ec8c4 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/build.properties @@ -0,0 +1,3 @@ +source.. = src/main/java/ +bin.includes = META-INF/,\ + . diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/config/managers.properties b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/config/managers.properties new file mode 100644 index 0000000..2d13679 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/config/managers.properties @@ -0,0 +1,3 @@ +org.openecomp.dcae.controller.service.docker.host.service.DockerHostServiceInstance.endpoint=http://IP:PORT +org.openecomp.dcae.controller.service.docker.host.service.DockerHostServiceInstance.user=console +org.openecomp.dcae.controller.service.docker.host.service.DockerHostServiceInstance.password=MDBmMzE0NTgyMDU1NmVj \ No newline at end of file diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/pom.xml b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/pom.xml new file mode 100644 index 0000000..c027f9c --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/pom.xml @@ -0,0 +1,210 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-docker-adaptor + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-base + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-base + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-assembly-plugin + 2.6 + + + zipfile + + single + + package + + false + ${project.artifactId}-${project.version} + + src/assembly/assemble_zip.xml + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/lib + false + true + true + false + false + false + org.opendaylight,com.brocade.odl,ch.qos.logback + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/versions + + + src/main/resources/versions + + version.properties + + true + + + + + + copy-resources + + copy-resources + + validate + + ${basedir}/target/etc/bvc-extensions + + + src/main/resources/etc/bvc-extensions + + feature_config_template.cfg + feature_custom.install + + true + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + attach-artifacts + package + + attach-artifact + + + + + target/${project.artifactId}-${project.version}-runtime.zip + zip + runtime + + + + + + + + + + + + org.openecomp.dcae.controller + dcae-controller-service-docker-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-vm-adaptor + ${project.version} + + + org.openecomp.ncomp.docker + ncomp-docker-adaptor + ${project.version} + + + org.openecomp.dcae.controller + + dcae-controller-service-docker-host-manager + + ${project.version} + + + org.openecomp.dcae.operation + operation-utils + ${project.version} + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/assembly/assemble_zip.xml b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..e2c15b1 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/assembly/assemble_zip.xml @@ -0,0 +1,61 @@ + + + + runtime + + zip + + + + false + + + + target + lib + + dcae-controller-service-docker-adaptor-${project.version}.jar + + + + target/assembly/ + . + + + + + . + lib + + *.jar + + + + src/main/server-gen/bin + bin + 0744 + + + + + src/main/server/bin + bin + 0744 + + + + + src/main/server-gen/scripts + scripts + + + src/main/server/scripts + scripts + + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/docker/manager/tools/Generator.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/docker/manager/tools/Generator.java new file mode 100644 index 0000000..49ba09f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/docker/manager/tools/Generator.java @@ -0,0 +1,96 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.docker.manager.tools; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelFactory; +import org.openecomp.ncomp.sirius.manager.generator.ControllerGenerator; +import org.openecomp.ncomp.gwt.siriusportal.model.*; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import org.openecomp.dcae.controller.service.docker.DockerFactory; +import org.openecomp.dcae.controller.service.dockermanager.DockermanagerFactory; +import org.openecomp.utils.YamlToJava; + +public class Generator { + + /** + * @param args + */ + public static void main(String[] args) { + @SuppressWarnings("unused") + ServerPackage f = ServerPackage.eINSTANCE; + genManager(); + genService(); + } + + public static void genManager() { + EObject o = DockermanagerFactory.eINSTANCE.createDockerManager(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix(); + dir = "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceDockerManager"); + m.setTitle("ControllerServiceDockerManager"); + ControllerGenerator g = new ControllerGenerator(o, m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(false); + g.addFactory("org.openecomp.ncomp.servers.docker.DockerDockerFactory"); + g.addFactory(DockerFactory.eINSTANCE); + EObject gui = ModelFactory.eINSTANCE.createGuiClientApi(); + g.addObject("gui", gui, m); + g.generate(dir); + g.generateScripts("src/main/server-gen/bin", "controller-service-docker-manager"); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; +// YamlToJava.convert("src/main/resources/DockerAdaptor.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/DockerManager.yaml", dir + "/logging", pName); + String pName1 = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".gui.logging"; + YamlToJava.convert("src/main/sirius-gen/GuiClientApi.yaml", dir + "/gui/logging", pName1); + } + + public static void genService() { + EObject o = DockerFactory.eINSTANCE.createDockerService(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+"$", "") + "servers." + p.getNsPrefix(); + dir = "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceDockerService"); + m.setTitle("ControllerServiceDockerService"); + ControllerGenerator g = new ControllerGenerator(o, m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(true); + g.generate(dir); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; +// YamlToJava.convert("src/main/resources/DcaeServiceDockerHost.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/DockerService.yaml", dir + "/logging", pName); + + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/docker/manager/tools/TestServiceToManager.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/docker/manager/tools/TestServiceToManager.java new file mode 100644 index 0000000..7623fa8 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/docker/manager/tools/TestServiceToManager.java @@ -0,0 +1,86 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.docker.manager.tools; + +import org.openecomp.dcae.controller.core.server.ServerFactory; +import org.openecomp.dcae.controller.service.docker.DockerFactory; +import org.openecomp.dcae.controller.service.docker.DockerService; +import org.openecomp.dcae.controller.service.docker.DockerServiceInstance; +import org.openecomp.dcae.controller.service.docker.host.servers.manager.DcaeManagerFactory; +import org.openecomp.dcae.controller.service.docker.host.servers.service.DcaeServiceFactory; +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostService; +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostServiceInstance; +import org.openecomp.dcae.controller.service.docker.host.service.ServiceFactory; +import org.openecomp.dcae.controller.service.servers.docker.DcaeDockerFactory; +import org.openecomp.dcae.controller.service.vm.PhysicalMachine; +import org.openecomp.dcae.controller.service.vm.VmFactory; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; + +// Testing service from inside standard Java Process +// This connects to a manager server +public class TestServiceToManager implements ISiriusServer { + + public static void main(String[] args) { + TestServiceToManager t = new TestServiceToManager(); + t.test(); + } + private ManagementServer server; + public void test() { + // setup docker host + server = new ManagementServer(); + + DcaeServiceFactory f1 = new DcaeServiceFactory(this); + DockerHostService s1 = f1.createDockerHostService(); + DockerHostServiceInstance i1 = f1.createDockerHostServiceInstance(); + PhysicalMachine p = VmFactory.eINSTANCE.createPhysicalMachine(); + i1.getServers().add(p); + s1.getInstances().add(i1); + i1.setName("dh-i1"); + s1.setName("dh-s1"); + // Setup connection parameters. + p.setPublicIp("localhost"); + p.setManagerPortNumber(9911); + // setup docker service instance + DockerFactory f = new DcaeDockerFactory(this); + DockerService s = f.createDockerService(); + DockerServiceInstance i = f.createDockerServiceInstance(); + s.getInstances().add(i); + i.setName("d-i"); + s.setName("d-s"); + String dockerRegistry = "cdf-2.novalocal:8453"; + String dockerImage = "dockerdemo_test5"; + String dockerImageTag = "1.0.2"; + String image = dockerRegistry + "/" + dockerImage + ":" + dockerImageTag; + i.setImage(image); +// s.pollManagerConfiguration("docker"); + server.setObject(s1); + s.deploy(i.getName(), "/instances/" + i1.getName()); + // TODO more examples + } + @Override + public ManagementServer getServer() { + // TODO Auto-generated method stub + return server; + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceProvider.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceProvider.java new file mode 100644 index 0000000..e653107 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceProvider.java @@ -0,0 +1,342 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.servers.docker; + +import java.util.Date; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.json.JSONObject; + +import org.openecomp.dcae.controller.core.service.DcaeServiceContainer; +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.service.HealthTestStatus; +import org.openecomp.dcae.controller.core.service.ServiceFactory; +import org.openecomp.dcae.controller.core.stream.DcaeStream; +import org.openecomp.dcae.controller.core.stream.DmaapStream; +import org.openecomp.dcae.controller.service.docker.DockerService; +import org.openecomp.dcae.controller.service.docker.DockerServiceInstance; +import org.openecomp.dcae.controller.service.docker.host.servers.manager.DcaeDockerHostManager; +import org.openecomp.dcae.controller.service.docker.host.servers.manager.DcaeDockerHostManagerConsole; +import org.openecomp.dcae.controller.service.docker.host.servers.service.DcaeDockerHostService; +import org.openecomp.dcae.controller.service.docker.host.servers.service.DcaeDockerHostServiceProvider; +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostServiceInstance; +import org.openecomp.dcae.controller.service.servers.dockermanager.DcaeDockerManagerConsole; +import org.openecomp.dcae.controller.service.servers.vmmanager.DcaeVirtualMachineManagerConsole; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; +import org.openecomp.ncomp.core.DeploymentStatus; +import org.openecomp.ncomp.docker.ContainerOptions; +import org.openecomp.ncomp.docker.ContainerPortBindings; +import org.openecomp.ncomp.docker.DockerContainer; +import org.openecomp.ncomp.docker.DockerFactory; +import org.openecomp.ncomp.servers.docker.DockerDockerHostConsole; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.JavaHttpClient; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; +import org.openecomp.ncomp.sirius.manager.Subject; +import org.openecomp.ncomp.sirius.manager.metrics.MetricStore; +import org.openecomp.ncomp.utils.CryptoUtils; + +public class DcaeDockerServiceProvider extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeDockerServiceProvider.class); + DockerService o; + + public DcaeDockerServiceProvider(ISiriusServer controller, DockerService o) { + super(controller, o); + this.o = o; + } + + public void deploy(String instanceName, String containerPath) { + DockerServiceInstance i = findInstance(instanceName); + if (!(containerPath == null || containerPath.equals(""))) { + Subject s = controller.getServer().find(containerPath); + if (s == null || s.o == null) { + throw new RuntimeException("Unable to find container object: " + containerPath); + } + if (!(s.o instanceof DockerHostServiceInstance)) + throw new RuntimeException("Unable to deploy to this container: " + s.o); + i.setHostService((DockerHostServiceInstance) s.o); + } + if (i.getHostService() == null) { + throw new RuntimeException("Null Container: unable to deploy: " + o.getName() + " " + i.getName()); + } + i.setDockerName(dockerName(i)); + ContainerOptions opts = DockerFactory.eINSTANCE.createContainerOptions(); + opts.setName(i.getDockerName()); + opts.getVolumes().addAll(i.getVolumes()); + opts.getLinks().addAll(i.getLinks()); + opts.getEnv().addAll(i.getEnvs()); + for (ContainerPortBindings p : i.getPortBindings()) { + opts.getPortBindings().add(EcoreUtil.copy(p)); + } + console(instanceName).setupConfiguration(o.getName(), instanceName); + consoleHost(i).dockerRunWithOptions("/resources/dockerHost", image(i), opts); + long toolate = System.currentTimeMillis() + 2 * 60 * 1000; + // if has manager wait 2 minutes for container manager + while (i.getManagerPortNumber() > 0 && System.currentTimeMillis() < toolate) { + try { + o.pushManagerConfiguration(instanceName); + break; + } catch (Exception e) { + try { + Thread.sleep(5000); + } catch (InterruptedException e1) { + throw new RuntimeException("Deployment timeout: Deployment interrupted"); + } + } + if (System.currentTimeMillis() >= toolate) + throw new RuntimeException("Unable to configure Docker"); + } + } + + private String image(DockerServiceInstance i) { + if (i.getImage().contains("/")) + return i.getImage(); + String dns = i.getHostService().getServers().get(0).getNetworks().get(0).getDnsName(); + return dns + ":7113/" + i.getImage(); + } + + public void undeploy(String instanceName) { + DockerServiceInstance i = findInstance(instanceName); + DockerDockerHostConsole c = consoleHost(i); +// c.stopContainer("/resources/dockerHost", i.getDockerName(), 10); +// c.killContainer("/resources/dockerHost", i.getDockerName(), "KILL"); + c.removeContainer("/resources/dockerHost", i.getDockerName(), true, true); + } + + private DcaeDockerHostManagerConsole console(String instanceName) { + DockerServiceInstance i = findInstance(instanceName); + return new DcaeDockerHostManagerConsole(getClient(i)); + } + + public AbstractClient getClient(DockerServiceInstance i) { + DockerHostServiceInstance instance = i.getHostService(); + DcaeDockerHostService service = (DcaeDockerHostService) instance.getService(); + DcaeDockerHostServiceProvider provider = service.getSomfProvider(); + return provider.getClient(instance); + } + + private DockerDockerHostConsole consoleHost(DockerServiceInstance i) { + DockerHostServiceInstance instance = i.getHostService(); + DcaeDockerHostService service = (DcaeDockerHostService) instance.getService(); + DcaeDockerHostServiceProvider provider = service.getSomfProvider(); + AbstractClient c = provider.getClient(instance); + return new DockerDockerHostConsole(c); + } + + private String dockerName(DockerServiceInstance i) { + return "dcae_" + o.getName() + "_" + i.getName(); + // return "dcae"+ new Date().getTime(); + } + + protected DockerServiceInstance findInstance(String instanceName) { + for (DockerServiceInstance ii : o.getInstances()) { + if (ii.getName().equals(instanceName)) { + ii.setDockerName(dockerName(ii)); + return ii; + } + } + throw new RuntimeException("Unable to find instance: " + instanceName); + + } + + public HealthTestResponse test(String instanceName) { + DockerServiceInstance i = findInstance(instanceName); + DockerContainer c = findContainer(i); + HealthTestResponse h = ServiceFactory.eINSTANCE.createHealthTestResponse(); + if (c == null) { + h.setStatus(HealthTestStatus.YELLOW); + h.setMessageCode("Container not Deployed"); + return h; + } + System.out.println("DOCKER: test" + i.getDockerName() + " " + c.getStatus()); + if (c.getStatus().startsWith("Exited")) { + h.setStatus(HealthTestStatus.RED); + h.setMessageCode("Container not running"); + return h; + } + if (c.getStatus().startsWith("Created")) { + h.setStatus(HealthTestStatus.RED); + h.setMessageCode("Container never started"); + return h; + } + if (c.getStatus().startsWith("Restarting")) { + h.setStatus(HealthTestStatus.RED); + h.setMessageCode("Container restarting"); + return h; + } + if (i.getManagerPortNumber() > 0) { + System.out.println("DOCKER: test" + i.getDockerName() + "HERE"); + return console(instanceName).testContainer(i.getDockerName()); + } + h.setStatus(HealthTestStatus.GREEN); + return h; + } + + public void suspend(String instanceName) { + DockerServiceInstance i = findInstance(instanceName); + console(instanceName).suspendContainer(i.getDockerName()); + } + + public void resume(String instanceName) { + DockerServiceInstance i = findInstance(instanceName); + console(instanceName).resumeContainer(i.getDockerName()); + } + + public void pushManagerConfiguration(String instanceName) { + DockerServiceInstance i = findInstance(instanceName); + DcaeDockerHostManagerConsole console = console(instanceName); + EObject config = o.managerConfiguration(instanceName); + System.out.println("DDDDD " + ManagementServer.ecore2json(config, 1000, null, true).toString(2)); + EList l1 = new BasicEList(); + l1.addAll(EcoreUtil.copyAll(i.getInputStreams())); + EList l2 = new BasicEList(); + l2.addAll(EcoreUtil.copyAll(i.getOutputStreams())); + console.updateContainerConfiguration(i.getDockerName(), config, decrypt(l1), decrypt(l2)); + } + + private EList decrypt(EList l) { + for (DcaeStream s : l) { + if (s instanceof DmaapStream) { + DmaapStream s1 = (DmaapStream) s; + String pw = s1.getDmaapPassword(); + if (pw != null && pw.startsWith("rsa:")) { + try { + s1.setDmaapPassword(JavaHttpClient.decryptPassword(pw)); + } catch (Exception e) { + System.err.println("ZZZZZ: bad pw: " + ManagementServer.object2ref(s)); + s1.setDmaapPassword("decryption error"); + } + } + else + System.err.println("ZZZZZ: unencrypted pw: " + ManagementServer.object2ref(s)); + continue; + } + System.err.println("ZZZZZ: unknown type: " + s); + } + return l; + } + + public void pollManagerConfiguration(String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(String instanceName) { + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public JSONObject managerOperation(String instanceName, String operation, JSONObject parameters) { + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void updateConfigurationFromPolicy(String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void runHealthTests() { + System.out.println("DOCKER: runHealthTests" + o.getName()); + for (DockerServiceInstance i : o.getInstances()) { + HealthTestResponse s = null; + try { + s = o.test(i.getName()); + } catch (Exception e) { + s = ServiceFactory.eINSTANCE.createHealthTestResponse(); + s.setMessageCode("Unable to determine health: " + e); + s.setStatus(HealthTestStatus.RED); + } + i.setHealthTestStatus(s.getStatus()); + i.setHealthTestMessageCode(s.getMessageCode()); + MetricStore store = controller.getServer().metrics.getStore(i); + Date now = new Date(); + String path = "/lastHealthTest"; + store.addLongValue(path, now, now.getTime(), "DateMetricAttribute", false); + } + } + + public void start() { + + Thread t = new Thread("docker service: " + o.getName()) { + @Override + public void run() { + while (true) { + try { + if (! controller.getServer().isSlave) + updateDeploymentStatus(); + Thread.sleep(60000); // sleep 60 seconds + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("vm service: " + o.getName() + " : " + e); + try { + Thread.sleep(30000); + } catch (InterruptedException e1) { + } + } + } + } + + }; + t.start(); + } + + public void updateDeploymentStatus() { + for (DockerServiceInstance instance : o.getInstances()) { + instance.setDockerName(dockerName(instance)); + DockerContainer c = findContainer(instance); + if (c != null) { + if (c.getStatus() != null && c.getStatus().startsWith("Up")) + instance.setStatus(DeploymentStatus.DEPLOYED); + else + instance.setStatus(DeploymentStatus.DEPLOYED_PARTIALLY); + } + else + instance.setStatus(DeploymentStatus.UNDEPLOYED); + } + } + + private DockerContainer findContainer(DockerServiceInstance instance) { + if (instance.getHostService() == null) + return null; + for (DockerContainer c : instance.getHostService().getDockerHost().getContainers()) { + if (instance.getDockerName() != null && instance.getDockerName().equals(c.getName())) { + return c; + } + } + return null; + } + + protected EObject convertToManagerConfiguration(DockerServiceInstance i) { + // TODO Auto-generated method stub + return null; + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerProvider.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerProvider.java new file mode 100644 index 0000000..a6e70da --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerProvider.java @@ -0,0 +1,172 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.dockermanager; + + + + + +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.io.OutputStreamWriter; +import java.util.Date; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONArray; +import org.json.JSONObject; + + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; +import org.openecomp.ncomp.webservice.utils.FileUtils; +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.service.HealthTestStatus; +import org.openecomp.dcae.controller.core.service.ServiceFactory; +import org.openecomp.dcae.controller.core.stream.DcaeStream; +import org.openecomp.dcae.controller.service.dockermanager.impl.DockerManagerImpl; +import org.openecomp.dcae.controller.service.dockermanager.DockerManager; + + +public class DcaeDockerManagerProvider extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeDockerManagerProvider.class); + DockerManager o; + private boolean suspended; + + public DcaeDockerManagerProvider(ISiriusServer controller, DockerManager o) { + super(controller, o); + this.o = o; + } + + public HealthTestResponse test() { + HealthTestResponse res = ServiceFactory.eINSTANCE.createHealthTestResponse(); + res.setStatus(HealthTestStatus.GREEN); + return res; + } + + public void suspend() { + suspended = true; + } + + public void resume() { + suspended = false; + } + + public java.lang.String publicKey() { + throw new UnsupportedOperationException(); + } + + // US618656 + public void configurationChanged() { + updateDMaapConfig(); + } + + // US618665 + private void updateDMaapConfig() { + JSONArray a = new JSONArray(); + for (DcaeStream s : o.getInputStreams()) { + JSONObject json = ManagementServer.ecore2json(s, 100, null, true); + json.put("dmaapStreamId", s.getName()); + a.put(json); + } + for (DcaeStream s : o.getOutputStreams()) { + JSONObject json = ManagementServer.ecore2json(s, 100, null, true); + json.put("dmaapStreamId", s.getName()); + a.put(json); + } + write2file(a,"/tmp/dmaap.conf2"); + write2file(a,"/etc/dcae/dmaap.conf"); + + } + + private void write2file(JSONArray a, String fileName) { + try { + OutputStreamWriter w = FileUtils.filename2writer(fileName); + w.write(a.toString(2)); + w.close(); + } catch (Exception e) { + logger.warn("Unable to write file: " + fileName); + ManagementServerUtils.printStackTrace(e); + } + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + o.getInputStreams().clear(); + o.getInputStreams().addAll(inputStreams); + o.getOutputStreams().clear(); + o.getOutputStreams().addAll(outputStreams); + } + + public void scheduleCronjob(final String cmd, final long frequency) { + Thread t = new Thread("crontab: " + cmd) { + @Override + public void run() { + while (true) { + try { + Date now = new Date(); + long wait = frequency - (now.getTime() % frequency); + Thread.sleep(wait); + if (suspended) continue; + Runtime runtime = Runtime.getRuntime(); + Process proc; + try { + now = new Date(); + proc = runtime.exec(cmd); + ByteArrayOutputStream o = new ByteArrayOutputStream(); + ByteArrayOutputStream e = new ByteArrayOutputStream(); + FileUtils.copyStream(proc.getInputStream(), o); + FileUtils.copyStream(proc.getErrorStream(), e); + int i = proc.waitFor(); + if (i != 0) + logger.warn("crontab return error: " + cmd + " " + i); + long duration = new Date().getTime()-now.getTime(); + if (duration > frequency) + logger.warn("crontab took too long: " + cmd + " " + duration); + } catch (Exception e) { + e.printStackTrace(); + logger.warn("ERROR: " + e); + } + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("crontab: " + cmd + " " + e); + try { + Thread.sleep(30000); + } catch (InterruptedException e1) { + } + } + } + }; + }; + t.start(); + } + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApiProvider.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApiProvider.java new file mode 100644 index 0000000..4ac1e4e --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApiProvider.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.dockermanager.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProvider extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProvider.class); + GuiClientApi o; + + public DcaeGuiClientApiProvider(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server-gen/bin/controller-service-docker-manager-controller b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server-gen/bin/controller-service-docker-manager-controller new file mode 100644 index 0000000..c774595 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server-gen/bin/controller-service-docker-manager-controller @@ -0,0 +1,138 @@ +#!/bin/bash + +# setup env if needed. java 6 required +## JAVA_HOME= + +############################## DO NOT EDIT BELOW ########################## + +SNAME="Dcae Controller" +PNAME=controller-service-docker-manager-controller +CLASS=org.openecomp.dcae.controller.service.servers.dockermanager.DcaeDockerManagerServer + +############################## COMMON BELOW ########################## + +check_status () +{ + if [ -f "${_PIDFILE}" ]; then + _PID=`cat "${_PIDFILE}"` + check_status_of_pid $_PID + else + _STATUS="$SNAME (no pidfile) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + +remove_pid_file () +{ + if [ -f "${_PIDFILE}" ]; then + rm "${_PIDFILE}" + fi +} + + +_DIR=`dirname "$0"` +_DIR=`dirname "$_DIR"` + +_PIDFILE=$_DIR/PID + +CMD=$1 +shift + +check_status + +CP=$(find $_DIR/lib/*/* -name \*.jar 2>/dev/null | xargs -I X printf ":%s" X) + +JVMARGS=$(grep 'server.jvmargs' $_DIR/config/dockermanager.properties | sed -e 's/.*=//') + +case $CMD in + status) + echo $_STATUS + exit 0 + ;; + console) + $GROOVY_HOME/bin/groovysh -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP + ;; + run) + $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + groovy) + $GROOVY_HOME/bin/groovy -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + start) + if [ "$_RUNNING" = "1" ]; then + echo $_STATUS + exit 0 + fi + mkdir -p $_DIR/logs + if [ -e $_DIR/logs/$PNAME.out.1 ]; then mv $_DIR/logs/$PNAME.out.1 $_DIR/logs/$PNAME.out.2; fi + if [ -e $_DIR/logs/$PNAME.err.1 ]; then mv $_DIR/logs/$PNAME.err.1 $_DIR/logs/$PNAME.err.2; fi + if [ -e $_DIR/logs/$PNAME.out ]; then mv $_DIR/logs/$PNAME.out $_DIR/logs/$PNAME.out.1; fi + if [ -e $_DIR/logs/$PNAME.err ]; then mv $_DIR/logs/$PNAME.err $_DIR/logs/$PNAME.err.1; fi + + nohup $JAVA_HOME/bin/java $JVMARGS -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" $CLASS > $_DIR/logs/$PNAME.out 2> $_DIR/logs/$PNAME.err & + + _PID=$! + echo $_PID > $_PIDFILE + sleep 5 + check_status + echo $_STATUS + if [ "$_RUNNING" = "1" ]; then + exit 0 + else + echo "Failed to start - make sure the $SNAME is fully configured properly" + exit 1 + fi + ;; + stop) + if [ "$_RUNNING" = "0" ]; then + echo $_STATUS + remove_pid_file + exit 0 + fi + echo "Stopping $SNAME..." + _PID_TO_KILL=$_PID; + echo "$SNAME (pid=${_PID_TO_KILL}) is stopping..." + kill -TERM $_PID_TO_KILL + sleep 5 + check_status_of_pid $_PID_TO_KILL + if [ "$_RUNNING" = "1" ]; then + kill -TERM $_PID_TO_KILL + fi + while [ "$_RUNNING" = "1" ]; do + sleep 2 + check_status_of_pid $_PID_TO_KILL + done + remove_pid_file + echo "$SNAME has stopped." + exit 0 + ;; + *) + echo "$0 start|stop" + ;; +esac + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/console.properties b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/console.properties new file mode 100644 index 0000000..4b63607 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:PORT +localhost.user=console +localhost.password=CONSOLE_PW diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/gui.properties b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/gui.properties new file mode 100644 index 0000000..e69de29 diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/log4j.properties b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/log4j.properties new file mode 100644 index 0000000..8b3b8f9 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/log4j.properties @@ -0,0 +1,24 @@ +#log4j.debug=0 +log4j.rootLogger=warn, file +log4j.logger.org.openecomp.ncomp=info, file +log4j.additivity.org.openecomp.ncomp=false +log4j.logger.org.openecomp.ncomp.datarouter=warn, file +log4j.additivity.org.openecomp.ncomp.datarouter=false +log4j.logger.org.apache.http.headers=debug, file +log4j.logger.org.apache.http.wire=debug, file + +## uploaded logger +log4j.logger.org.openecomp.ncomp.sirius.manager.uploaded=info, uploaded +log4j.additivity.org.openecomp.ncomp.sirius.manager.uploaded=false +## request logging +log4j.logger.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=info, requests +log4j.additivity.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=false + + +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=logs/BBBB.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n +log4j.appender.file.MaxFileSize=50MB +log4j.appender.file.MaxBackupIndex=5 + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/makefile b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/makefile new file mode 100644 index 0000000..717823e --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/makefile @@ -0,0 +1,9 @@ + +restart: stop start + +start: + M2_HOME=/home/ncomp/.m2 bin/BBBB-controller start +stop: + bin/BBBB-controller stop +console: + bin/BBBB-controller console diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/manager.properties b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/manager.properties new file mode 100644 index 0000000..4605389 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/manager.properties @@ -0,0 +1,7 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = PORT +server.user.console = CONSOLE_PW +server.user.gui = GUI_PW +server.user.client = CLIENT_PW diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/pw.sh.sh b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/pw.sh.sh new file mode 100644 index 0000000..cd022ae --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/config/pw.sh.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +### used to generate random passwords + + +echo '#!/bin/bash' +echo "" + +echo 'cat \' + +for i in CONSOLE GUI CLIENT +do + echo ' |' sed s/${i}_PW/$(echo $i:$(date +%s) | sha256sum | base64 | head -c 20 ; echo)/ \\ +done + \ No newline at end of file diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/scripts/console.groovy b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/scripts/console.groovy new file mode 100644 index 0000000..da3d5dc --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/server/scripts/console.groovy @@ -0,0 +1,27 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.openecomp.dcae.controller.service.servers.dockermanager.DcaeDockerManagerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +manager = new DcaeDockerManagerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/DockerManager.yaml b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/DockerManager.yaml new file mode 100644 index 0000000..6ab6771 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/DockerManager.yaml @@ -0,0 +1,69 @@ +operations: + test: {} + suspend: {} + resume: {} + publicKey: {} + configurationChanged: {} + updateStreams: {} + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_publicKey: + decription: Remote call publicKey + REMOTE_configurationChanged: + decription: Remote call configurationChanged + REMOTE_updateStreams: + decription: Remote call updateStreams +messages: + dummy: {} + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + publicKey: + errorCode: publicKey-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + configurationChanged: + errorCode: configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateStreams: + errorCode: updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_publicKey: + errorCode: REMOTE-publicKey-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_configurationChanged: + errorCode: REMOTE-configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateStreams: + errorCode: REMOTE-updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/DockerService.yaml b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/DockerService.yaml new file mode 100644 index 0000000..c449feb --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/DockerService.yaml @@ -0,0 +1,124 @@ +operations: + deploy: {} + undeploy: {} + test: {} + suspend: {} + resume: {} + pushManagerConfiguration: {} + pollManagerConfiguration: {} + managerConfiguration: {} + managerOperation: {} + updateConfigurationFromPolicy: {} + runHealthTests: {} + REMOTE_deploy: + decription: Remote call deploy + REMOTE_undeploy: + decription: Remote call undeploy + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_pushManagerConfiguration: + decription: Remote call pushManagerConfiguration + REMOTE_pollManagerConfiguration: + decription: Remote call pollManagerConfiguration + REMOTE_managerConfiguration: + decription: Remote call managerConfiguration + REMOTE_managerOperation: + decription: Remote call managerOperation + REMOTE_updateConfigurationFromPolicy: + decription: Remote call updateConfigurationFromPolicy + REMOTE_runHealthTests: + decription: Remote call runHealthTests +messages: + dummy: {} + deploy: + errorCode: deploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + undeploy: + errorCode: undeploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pushManagerConfiguration: + errorCode: pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pollManagerConfiguration: + errorCode: pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerConfiguration: + errorCode: managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerOperation: + errorCode: managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateConfigurationFromPolicy: + errorCode: updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + runHealthTests: + errorCode: runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_deploy: + errorCode: REMOTE-deploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_undeploy: + errorCode: REMOTE-undeploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pushManagerConfiguration: + errorCode: REMOTE-pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pollManagerConfiguration: + errorCode: REMOTE-pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerConfiguration: + errorCode: REMOTE-managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerOperation: + errorCode: REMOTE-managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateConfigurationFromPolicy: + errorCode: REMOTE-updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_runHealthTests: + errorCode: REMOTE-runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/GuiClientApi.yaml b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/GuiClientApi.yaml new file mode 100644 index 0000000..bf3d69d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/GuiClientApi.yaml @@ -0,0 +1,69 @@ +operations: + getTree: {} + getObject: {} + getTimeSerie: {} + getTable: {} + getHtml: {} + getGraph: {} + REMOTE_getTree: + decription: Remote call getTree + REMOTE_getObject: + decription: Remote call getObject + REMOTE_getTimeSerie: + decription: Remote call getTimeSerie + REMOTE_getTable: + decription: Remote call getTable + REMOTE_getHtml: + decription: Remote call getHtml + REMOTE_getGraph: + decription: Remote call getGraph +messages: + dummy: {} + getTree: + errorCode: getTree-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getObject: + errorCode: getObject-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTimeSerie: + errorCode: getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTable: + errorCode: getTable-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getHtml: + errorCode: getHtml-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getGraph: + errorCode: getGraph-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_getTree: + errorCode: REMOTE-getTree-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getObject: + errorCode: REMOTE-getObject-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTimeSerie: + errorCode: REMOTE-getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTable: + errorCode: REMOTE-getTable-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getHtml: + errorCode: REMOTE-getHtml-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getGraph: + errorCode: REMOTE-getGraph-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerFactory.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerFactory.java new file mode 100644 index 0000000..bcf9383 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.docker; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.docker.DockerService; +import org.openecomp.dcae.controller.service.docker.DockerPackage; +import org.openecomp.dcae.controller.service.docker.impl.DockerFactoryImpl; + + + + + +public class DcaeDockerFactory extends DockerFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeDockerFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return DockerPackage.eINSTANCE; } + public DcaeDockerFactory(ISiriusServer server) { + this.server = server; + } + @Override + public DockerService createDockerService() { + return new DcaeDockerService(server); + } + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerService.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerService.java new file mode 100644 index 0000000..886713f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerService.java @@ -0,0 +1,356 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.docker; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.servers.docker.logging.DockerServiceOperationEnum; + + + + +import org.openecomp.dcae.controller.service.docker.impl.DockerServiceImpl; + + + +public class DcaeDockerService extends DockerServiceImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeDockerService.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeDockerServiceProvider controller; + ISiriusServer server; + + public DcaeDockerService(ISiriusServer server) { + this.server = server; + this.controller = new DcaeDockerServiceProvider(server,this); + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.START, duration_,instanceName,containerPath); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.deploy); + try { + controller.deploy(instanceName,containerPath); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.ERROR, duration_,instanceName,containerPath); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.OKAY, duration_,instanceName,containerPath); + + } + + public void undeploy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.undeploy); + try { + controller.undeploy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.test); + try { + res = controller.test(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public void suspend(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.suspend); + try { + controller.suspend(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void resume(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.resume); + try { + controller.resume(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.pushManagerConfiguration); + try { + controller.pushManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.pollManagerConfiguration); + try { + controller.pollManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.managerConfiguration); + try { + res = controller.managerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.START, duration_,instanceName,operation,parameters); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.managerOperation); + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.ERROR, duration_,instanceName,operation,parameters); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.OKAY, duration_,instanceName,operation,parameters); + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.updateConfigurationFromPolicy); + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void runHealthTests() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.runHealthTests); + try { + controller.runHealthTests(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.OKAY, duration_); + + } + + + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + DcaeDockerServiceProvider.ecoreSetup(); + } + public DcaeDockerServiceProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceClient.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceClient.java new file mode 100644 index 0000000..3e23682 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceClient.java @@ -0,0 +1,259 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.docker; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.docker.impl.DockerServiceImpl; +import org.openecomp.dcae.controller.service.docker.DockerPackage; +import org.openecomp.dcae.controller.service.servers.docker.logging.DockerServiceOperationEnum; +import org.openecomp.dcae.controller.service.servers.docker.logging.DockerServiceMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeDockerServiceClient extends DockerServiceImpl { + public static final Logger logger = Logger.getLogger(DcaeDockerServiceClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeDockerServiceClient(String file, String name) { + DcaeDockerService.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeDockerServiceClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeDockerServiceClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + EClass c = DockerPackage.eINSTANCE.getDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.REMOTE_deploy); + + try { + client.operationPath("/resources", c, "deploy", null, instanceName,containerPath); + } + catch (Exception e) { + ecomplogger.warn(DockerServiceMessageEnum.REMOTE_deploy, e.toString()); + throw new RuntimeException("remote call failed: deploy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void undeploy(java.lang.String instanceName) { + EClass c = DockerPackage.eINSTANCE.getDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.REMOTE_undeploy); + + try { + client.operationPath("/resources", c, "undeploy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(DockerServiceMessageEnum.REMOTE_undeploy, e.toString()); + throw new RuntimeException("remote call failed: undeploy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + EClass c = DockerPackage.eINSTANCE.getDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(DockerServiceMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: test", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend(java.lang.String instanceName) { + EClass c = DockerPackage.eINSTANCE.getDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(DockerServiceMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: suspend", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume(java.lang.String instanceName) { + EClass c = DockerPackage.eINSTANCE.getDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(DockerServiceMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: resume", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pushManagerConfiguration(java.lang.String instanceName) { + EClass c = DockerPackage.eINSTANCE.getDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.REMOTE_pushManagerConfiguration); + + try { + client.operationPath("/resources", c, "pushManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(DockerServiceMessageEnum.REMOTE_pushManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: pushManagerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pollManagerConfiguration(java.lang.String instanceName) { + EClass c = DockerPackage.eINSTANCE.getDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.REMOTE_pollManagerConfiguration); + + try { + client.operationPath("/resources", c, "pollManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(DockerServiceMessageEnum.REMOTE_pollManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: pollManagerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + EClass c = DockerPackage.eINSTANCE.getDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.REMOTE_managerConfiguration); + org.eclipse.emf.ecore.EObject res; + try { + res = (org.eclipse.emf.ecore.EObject) client.operationPath("/resources", c, "managerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(DockerServiceMessageEnum.REMOTE_managerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: managerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + EClass c = DockerPackage.eINSTANCE.getDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.REMOTE_managerOperation); + org.json.JSONObject res; + try { + res = (org.json.JSONObject) client.operationPath("/resources", c, "managerOperation", null, instanceName,operation,parameters); + } + catch (Exception e) { + ecomplogger.warn(DockerServiceMessageEnum.REMOTE_managerOperation, e.toString()); + throw new RuntimeException("remote call failed: managerOperation", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + EClass c = DockerPackage.eINSTANCE.getDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.REMOTE_updateConfigurationFromPolicy); + + try { + client.operationPath("/resources", c, "updateConfigurationFromPolicy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(DockerServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString()); + throw new RuntimeException("remote call failed: updateConfigurationFromPolicy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void runHealthTests() { + EClass c = DockerPackage.eINSTANCE.getDockerService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerServiceOperationEnum.REMOTE_runHealthTests); + + try { + client.operationPath("/resources", c, "runHealthTests", null); + } + catch (Exception e) { + ecomplogger.warn(DockerServiceMessageEnum.REMOTE_runHealthTests, e.toString()); + throw new RuntimeException("remote call failed: runHealthTests", e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceConsole.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceConsole.java new file mode 100644 index 0000000..eb6ad61 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceConsole.java @@ -0,0 +1,178 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.servers.docker; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeDockerServiceConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeDockerServiceConsole.class); + protected DcaeDockerServiceClient controller; + + + + + public DcaeDockerServiceConsole(String filename, String name) { + super(filename, name); + controller = new DcaeDockerServiceClient(filename,name); + client = controller.client; + + } + + public DcaeDockerServiceConsole(AbstractClient c) { + controller = new DcaeDockerServiceClient(c); + client = controller.client; + } + + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + try { + controller.deploy(instanceName,containerPath); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void undeploy(java.lang.String instanceName) { + + try { + controller.undeploy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend(java.lang.String instanceName) { + + try { + controller.suspend(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume(java.lang.String instanceName) { + + try { + controller.resume(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pushManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pollManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + try { + res = controller.managerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void runHealthTests() { + + try { + controller.runHealthTests(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceProviderTemplate.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceProviderTemplate.java new file mode 100644 index 0000000..7b84e8a --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceProviderTemplate.java @@ -0,0 +1,131 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.docker; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; + + +import org.openecomp.dcae.controller.service.docker.impl.DockerServiceImpl; +import org.openecomp.dcae.controller.service.docker.DockerService; + + +public class DcaeDockerServiceProviderTemplate extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeDockerServiceProviderTemplate.class); + DockerService o; + + public DcaeDockerServiceProviderTemplate(ISiriusServer controller, DockerService o) { + super(controller, o); + this.o = o; + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void undeploy(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void suspend(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void resume(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void runHealthTests() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + + + + + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceServer.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceServer.java new file mode 100644 index 0000000..628a90f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/DcaeDockerServiceServer.java @@ -0,0 +1,98 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.servers.docker; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.docker.DockerService; + + + + + + +public class DcaeDockerServiceServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeDockerServiceServer.class); + String serverPath; + ManagementServer server; + DcaeDockerService controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeDockerFactory f = new DcaeDockerFactory(this); + + + + public DcaeDockerServiceServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeDockerService.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "DockerService", serverPath, filename); + server.addFactory(f); + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeDockerService) server.find("/").o; + webServer = new Jetty8Server("docker.properties"); + webServer.add("/resources",server); + + + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeDockerServiceServer s = new DcaeDockerServiceServer("docker.properties"); + s.runWebserver(); + } + public DockerService getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/logging/DockerService.properties b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/logging/DockerService.properties new file mode 100644 index 0000000..13a57d6 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/logging/DockerService.properties @@ -0,0 +1,138 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +deploy=\ + deploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +undeploy=\ + undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pushManagerConfiguration=\ + pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pollManagerConfiguration=\ + pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerConfiguration=\ + managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerOperation=\ + managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateConfigurationFromPolicy=\ + updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +runHealthTests=\ + runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_deploy=\ + REMOTE-deploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_undeploy=\ + REMOTE-undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pushManagerConfiguration=\ + REMOTE-pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pollManagerConfiguration=\ + REMOTE-pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerConfiguration=\ + REMOTE-managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerOperation=\ + REMOTE-managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateConfigurationFromPolicy=\ + REMOTE-updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_runHealthTests=\ + REMOTE-runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/logging/DockerServiceMessageEnum.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/logging/DockerServiceMessageEnum.java new file mode 100644 index 0000000..314b50c --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/logging/DockerServiceMessageEnum.java @@ -0,0 +1,57 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.docker.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum DockerServiceMessageEnum implements EcompMessageEnum { + + dummy, + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.servers.docker.logging.DockerService"); + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/logging/DockerServiceOperationEnum.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/logging/DockerServiceOperationEnum.java new file mode 100644 index 0000000..b72aabb --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/docker/logging/DockerServiceOperationEnum.java @@ -0,0 +1,51 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.docker.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum DockerServiceOperationEnum implements EcompOperationEnum { + + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests; +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManager.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManager.java new file mode 100644 index 0000000..44682ed --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManager.java @@ -0,0 +1,226 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.dockermanager; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.servers.dockermanager.logging.DockerManagerOperationEnum; + + + + +import org.openecomp.dcae.controller.service.dockermanager.impl.DockerManagerImpl; + + + +public class DcaeDockerManager extends DockerManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeDockerManager.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeDockerManagerProvider controller; + ISiriusServer server; + + public DcaeDockerManager(ISiriusServer server) { + this.server = server; + this.controller = new DcaeDockerManagerProvider(server,this); + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerManagerOperationEnum.test); + try { + res = controller.test(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void suspend() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerManagerOperationEnum.suspend); + try { + controller.suspend(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_); + + } + + public void resume() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerManagerOperationEnum.resume); + try { + controller.resume(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_); + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerManagerOperationEnum.publicKey); + try { + res = controller.publicKey(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void configurationChanged() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerManagerOperationEnum.configurationChanged); + try { + controller.configurationChanged(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.OKAY, duration_); + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.START, duration_,inputStreams,outputStreams); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerManagerOperationEnum.updateStreams); + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.ERROR, duration_,inputStreams,outputStreams); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.OKAY, duration_,inputStreams,outputStreams); + + } + + + + + + + public static void ecoreSetup() { + DcaeDockerManagerProvider.ecoreSetup(); + } + public DcaeDockerManagerProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerClient.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerClient.java new file mode 100644 index 0000000..ef7b4f6 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerClient.java @@ -0,0 +1,174 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.dockermanager; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.dockermanager.impl.DockerManagerImpl; +import org.openecomp.dcae.controller.service.dockermanager.DockermanagerPackage; +import org.openecomp.dcae.controller.service.servers.dockermanager.logging.DockerManagerOperationEnum; +import org.openecomp.dcae.controller.service.servers.dockermanager.logging.DockerManagerMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeDockerManagerClient extends DockerManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeDockerManagerClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeDockerManagerClient(String file, String name) { + DcaeDockerManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeDockerManagerClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeDockerManagerClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + EClass c = DockermanagerPackage.eINSTANCE.getDockerManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerManagerOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null); + } + catch (Exception e) { + ecomplogger.warn(DockerManagerMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: test", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend() { + EClass c = DockermanagerPackage.eINSTANCE.getDockerManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerManagerOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null); + } + catch (Exception e) { + ecomplogger.warn(DockerManagerMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: suspend", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume() { + EClass c = DockermanagerPackage.eINSTANCE.getDockerManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerManagerOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null); + } + catch (Exception e) { + ecomplogger.warn(DockerManagerMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: resume", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public java.lang.String publicKey() { + EClass c = DockermanagerPackage.eINSTANCE.getDockerManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerManagerOperationEnum.REMOTE_publicKey); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "publicKey", null); + } + catch (Exception e) { + ecomplogger.warn(DockerManagerMessageEnum.REMOTE_publicKey, e.toString()); + throw new RuntimeException("remote call failed: publicKey", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void configurationChanged() { + EClass c = DockermanagerPackage.eINSTANCE.getDockerManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerManagerOperationEnum.REMOTE_configurationChanged); + + try { + client.operationPath("/resources", c, "configurationChanged", null); + } + catch (Exception e) { + ecomplogger.warn(DockerManagerMessageEnum.REMOTE_configurationChanged, e.toString()); + throw new RuntimeException("remote call failed: configurationChanged", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void updateStreams(EList inputStreams, EList outputStreams) { + EClass c = DockermanagerPackage.eINSTANCE.getDockerManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerManagerOperationEnum.REMOTE_updateStreams); + + try { + client.operationPath("/resources", c, "updateStreams", null, inputStreams,outputStreams); + } + catch (Exception e) { + ecomplogger.warn(DockerManagerMessageEnum.REMOTE_updateStreams, e.toString()); + throw new RuntimeException("remote call failed: updateStreams", e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerConsole.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerConsole.java new file mode 100644 index 0000000..c0e8361 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerConsole.java @@ -0,0 +1,127 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.servers.dockermanager; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + +import org.openecomp.dcae.controller.service.servers.dockermanager.gui.DcaeGuiClientApiConsole; + + +public class DcaeDockerManagerConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeDockerManagerConsole.class); + protected DcaeDockerManagerClient controller; + + + DcaeGuiClientApiConsole gui; + + + public DcaeDockerManagerConsole(String filename, String name) { + super(filename, name); + controller = new DcaeDockerManagerClient(filename,name); + client = controller.client; + + gui = new DcaeGuiClientApiConsole(filename,name); + } + + public DcaeDockerManagerConsole(AbstractClient c) { + controller = new DcaeDockerManagerClient(c); + client = controller.client; + } + + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend() { + + try { + controller.suspend(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume() { + + try { + controller.resume(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + try { + res = controller.publicKey(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void configurationChanged() { + + try { + controller.configurationChanged(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerProviderTemplate.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerProviderTemplate.java new file mode 100644 index 0000000..0c83c98 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerProviderTemplate.java @@ -0,0 +1,99 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.dockermanager; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; + + +import org.openecomp.dcae.controller.service.dockermanager.impl.DockerManagerImpl; +import org.openecomp.dcae.controller.service.dockermanager.DockerManager; + + +public class DcaeDockerManagerProviderTemplate extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeDockerManagerProviderTemplate.class); + DockerManager o; + + public DcaeDockerManagerProviderTemplate(ISiriusServer controller, DockerManager o) { + super(controller, o); + this.o = o; + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void suspend() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void resume() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String publicKey() { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void configurationChanged() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + + + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerServer.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerServer.java new file mode 100644 index 0000000..d121f93 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockerManagerServer.java @@ -0,0 +1,115 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.servers.dockermanager; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.dockermanager.DockerManager; + + +import org.openecomp.dcae.controller.service.servers.dockermanager.gui.DcaeModelFactory; + + + + + +public class DcaeDockerManagerServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeDockerManagerServer.class); + String serverPath; + ManagementServer server; + DcaeDockerManager controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeDockermanagerFactory f = new DcaeDockermanagerFactory(this); + + + String guiPath; + ManagementServer guiServer; + + + public DcaeDockerManagerServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeDockerManager.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "DockerManager", serverPath, filename); + server.addFactory(f); + + server.addFactory(new org.openecomp.ncomp.servers.docker.DockerDockerFactory(this)); + + + server.addFactory(org.openecomp.dcae.controller.service.docker.DockerFactory.eINSTANCE); + + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeDockerManager) server.find("/").o; + webServer = new Jetty8Server("dockermanager.properties"); + webServer.add("/resources",server); + + + + EFactory guiFactory = new DcaeModelFactory(this); + guiPath = serverPath + "/gui"; + guiServer = new ManagementServer(guiFactory, "GuiClientApi", guiPath, "gui.properties"); + guiServer.start(); + webServer.add("/gui",guiServer); + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeDockerManagerServer s = new DcaeDockerManagerServer("dockermanager.properties"); + s.runWebserver(); + } + public DockerManager getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockermanagerFactory.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockermanagerFactory.java new file mode 100644 index 0000000..14b54c3 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/DcaeDockermanagerFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.dockermanager; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.dockermanager.DockerManager; +import org.openecomp.dcae.controller.service.dockermanager.DockermanagerPackage; +import org.openecomp.dcae.controller.service.dockermanager.impl.DockermanagerFactoryImpl; + + + + + +public class DcaeDockermanagerFactory extends DockermanagerFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeDockermanagerFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return DockermanagerPackage.eINSTANCE; } + public DcaeDockermanagerFactory(ISiriusServer server) { + this.server = server; + } + @Override + public DockerManager createDockerManager() { + return new DcaeDockerManager(server); + } + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApi.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApi.java new file mode 100644 index 0000000..27b1d24 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApi.java @@ -0,0 +1,256 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.dockermanager.gui; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.servers.dockermanager.gui.logging.GuiClientApiOperationEnum; + + + + + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + + + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + + + + +import org.openecomp.ncomp.sirius.manager.Subject; + + + + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + + + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; + + + +public class DcaeGuiClientApi extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApi.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeGuiClientApiProvider controller; + ISiriusServer server; + + public DcaeGuiClientApi(ISiriusServer server) { + this.server = server; + this.controller = new DcaeGuiClientApiProvider(server,this); + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTree); + try { + res = controller.getTree(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.OKAY, duration_); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.START, duration_,path); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getObject); + try { + res = controller.getObject(path); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.ERROR, duration_,path); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.OKAY, duration_,path); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.START, duration_,path,start,end,duration); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTimeSerie); + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.ERROR, duration_,path,start,end,duration); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.OKAY, duration_,path,start,end,duration); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTable); + try { + res = controller.getTable(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getHtml); + try { + res = controller.getHtml(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getGraph); + try { + res = controller.getGraph(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + + + + + + public static void ecoreSetup() { + DcaeGuiClientApiProvider.ecoreSetup(); + } + public DcaeGuiClientApiProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApiClient.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApiClient.java new file mode 100644 index 0000000..8ecfe4a --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApiClient.java @@ -0,0 +1,175 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.dockermanager.gui; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.dcae.controller.service.servers.dockermanager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.servers.dockermanager.gui.logging.GuiClientApiMessageEnum; + + +import org.openecomp.dcae.controller.service.servers.dockermanager.DcaeDockerManager; + + + + +@SuppressWarnings("unchecked") +public class DcaeGuiClientApiClient extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeGuiClientApiClient(String file, String name) { + DcaeDockerManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTree); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTree) client.operationPath("/gui", c, "getTree", null); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTree, e.toString()); + throw new RuntimeException("remote call failed: getTree", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getObject); + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiObject) client.operationPath("/gui", c, "getObject", null, path); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getObject, e.toString()); + throw new RuntimeException("remote call failed: getObject", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTimeSerie); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie) client.operationPath("/gui", c, "getTimeSerie", null, path,start,end,duration); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTimeSerie, e.toString()); + throw new RuntimeException("remote call failed: getTimeSerie", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTable); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTable) client.operationPath("/gui", c, "getTable", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTable, e.toString()); + throw new RuntimeException("remote call failed: getTable", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getHtml); + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml) client.operationPath("/gui", c, "getHtml", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getHtml, e.toString()); + throw new RuntimeException("remote call failed: getHtml", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getGraph); + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res; + try { + res = (org.openecomp.ncomp.sirius.manager.graph.GuiGraph) client.operationPath("/gui", c, "getGraph", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getGraph, e.toString()); + throw new RuntimeException("remote call failed: getGraph", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApiConsole.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApiConsole.java new file mode 100644 index 0000000..a6a6d59 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApiConsole.java @@ -0,0 +1,123 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.servers.dockermanager.gui; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeGuiClientApiConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiConsole.class); + protected DcaeGuiClientApiClient controller; + + + + + public DcaeGuiClientApiConsole(String filename, String name) { + super(filename, name); + controller = new DcaeGuiClientApiClient(filename,name); + client = controller.client; + + } + + public DcaeGuiClientApiConsole(AbstractClient c) { + controller = new DcaeGuiClientApiClient(c); + client = controller.client; + } + + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + try { + res = controller.getTree(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + try { + res = controller.getObject(path); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + try { + res = controller.getTable(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + try { + res = controller.getHtml(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + try { + res = controller.getGraph(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApiProviderTemplate.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApiProviderTemplate.java new file mode 100644 index 0000000..084c6ab --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeGuiClientApiProviderTemplate.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.dockermanager.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProviderTemplate extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProviderTemplate.class); + GuiClientApi o; + + public DcaeGuiClientApiProviderTemplate(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeModelFactory.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeModelFactory.java new file mode 100644 index 0000000..6465760 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/DcaeModelFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.dockermanager.gui; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelFactoryImpl; + +import org.openecomp.dcae.controller.service.servers.dockermanager.DcaeDockerManagerServer; + + + +public class DcaeModelFactory extends ModelFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeModelFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ModelPackage.eINSTANCE; } + public DcaeModelFactory(ISiriusServer server) { + this.server = server; + } + @Override + public GuiClientApi createGuiClientApi() { + return new DcaeGuiClientApi(server); + } + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/logging/GuiClientApi.properties b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/logging/GuiClientApi.properties new file mode 100644 index 0000000..8705ab8 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/logging/GuiClientApi.properties @@ -0,0 +1,78 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +getTree=\ + getTree-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getObject=\ + getObject-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTimeSerie=\ + getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTable=\ + getTable-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getHtml=\ + getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getGraph=\ + getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_getTree=\ + REMOTE-getTree-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getObject=\ + REMOTE-getObject-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTimeSerie=\ + REMOTE-getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTable=\ + REMOTE-getTable-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getHtml=\ + REMOTE-getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getGraph=\ + REMOTE-getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/logging/GuiClientApiMessageEnum.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/logging/GuiClientApiMessageEnum.java new file mode 100644 index 0000000..09155d6 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/logging/GuiClientApiMessageEnum.java @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.dockermanager.gui.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum GuiClientApiMessageEnum implements EcompMessageEnum { + + dummy, + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.servers.dockermanager.gui.logging.GuiClientApi"); + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/logging/GuiClientApiOperationEnum.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/logging/GuiClientApiOperationEnum.java new file mode 100644 index 0000000..63edff6 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/gui/logging/GuiClientApiOperationEnum.java @@ -0,0 +1,41 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.dockermanager.gui.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum GuiClientApiOperationEnum implements EcompOperationEnum { + + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/logging/DockerManager.properties b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/logging/DockerManager.properties new file mode 100644 index 0000000..ef19f9b --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/logging/DockerManager.properties @@ -0,0 +1,78 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +publicKey=\ + publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +configurationChanged=\ + configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateStreams=\ + updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_publicKey=\ + REMOTE-publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_configurationChanged=\ + REMOTE-configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateStreams=\ + REMOTE-updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/logging/DockerManagerMessageEnum.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/logging/DockerManagerMessageEnum.java new file mode 100644 index 0000000..cc1ee62 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/logging/DockerManagerMessageEnum.java @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.dockermanager.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum DockerManagerMessageEnum implements EcompMessageEnum { + + dummy, + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.servers.dockermanager.logging.DockerManager"); + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/logging/DockerManagerOperationEnum.java b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/logging/DockerManagerOperationEnum.java new file mode 100644 index 0000000..835e2c6 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/dockermanager/logging/DockerManagerOperationEnum.java @@ -0,0 +1,41 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.dockermanager.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum DockerManagerOperationEnum implements EcompOperationEnum { + + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams; +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/.gitignore b/dcae-controller-service-docker/dcae-controller-service-docker-host/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/LICENSE.txt b/dcae-controller-service-docker/dcae-controller-service-docker-host/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.classpath b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.classpath new file mode 100644 index 0000000..d2d34b3 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.gitignore b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.gitignore new file mode 100644 index 0000000..3456300 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.gitignore @@ -0,0 +1,4 @@ +/target/ +/config/ +/data/ +/logs/ diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.project b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.project new file mode 100644 index 0000000..93aea9a --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.project @@ -0,0 +1,35 @@ + + + dcae-controller-service-docker-host-manager + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.settings/org.eclipse.core.resources.prefs b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.settings/org.eclipse.jdt.groovy.core.prefs b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/LICENSE.txt b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/META-INF/MANIFEST.MF b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/META-INF/MANIFEST.MF new file mode 100644 index 0000000..bc87351 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: dcae-controller-service-docker-host-manager +Bundle-SymbolicName: dcae-controller-service-docker-host-manager +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.dcae.controller.service.docker.host.manager.tools, + org.openecomp.dcae.controller.service.docker.host.servers.manager, + org.openecomp.dcae.controller.service.docker.host.servers.service +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + dcae-controller-service-docker-host-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + ncomp-docker-adaptor;bundle-version="0.1.0" diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/build.properties b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/build.properties new file mode 100644 index 0000000..a1ec8c4 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/build.properties @@ -0,0 +1,3 @@ +source.. = src/main/java/ +bin.includes = META-INF/,\ + . diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/pom.xml b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/pom.xml new file mode 100644 index 0000000..79c2cfe --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/pom.xml @@ -0,0 +1,203 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-docker-host-manager + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-base + 0.1.0-SNAPSHOT + ../../../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-base + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-assembly-plugin + 2.6 + + + zipfile + + single + + package + + false + ${project.artifactId}-${project.version} + + src/assembly/assemble_zip.xml + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/lib + false + true + true + false + false + false + org.opendaylight,com.brocade.odl,ch.qos.logback + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/versions + + + src/main/resources/versions + + version.properties + + true + + + + + + copy-resources + + copy-resources + + validate + + ${basedir}/target/etc/bvc-extensions + + + src/main/resources/etc/bvc-extensions + + feature_config_template.cfg + feature_custom.install + + true + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + attach-artifacts + package + + attach-artifact + + + + + target/${project.artifactId}-${project.version}-runtime.zip + zip + runtime + + + + + + + + + + + + org.openecomp.dcae.controller + dcae-controller-service-docker-host-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-vm-adaptor + ${project.version} + + + org.openecomp.ncomp.docker + ncomp-docker-adaptor + ${project.version} + + + org.openecomp.dcae.operation + operation-utils + ${project.version} + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/assembly/assemble_zip.xml b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..3d7bbc7 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/assembly/assemble_zip.xml @@ -0,0 +1,61 @@ + + + + runtime + + zip + + + + false + + + + target + lib + + dcae-controller-service-docker-host-manager-${project.version}.jar + + + + target/assembly/ + . + + + + + . + lib + + *.jar + + + + src/main/server-gen/bin + bin + 0744 + + + + + src/main/server/bin + bin + 0744 + + + + + src/main/server-gen/scripts + scripts + + + src/main/server/scripts + scripts + + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/Generator.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/Generator.java new file mode 100644 index 0000000..2f5d097 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/Generator.java @@ -0,0 +1,99 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.docker.host.manager.tools; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.openecomp.dcae.controller.service.docker.host.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.docker.host.service.ServiceFactory; +import org.openecomp.dcae.controller.service.vm.VmFactory; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerFactory; +import org.openecomp.utils.YamlToJava; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelFactory; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelFactory; +import org.openecomp.ncomp.sirius.manager.generator.ControllerGenerator; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; + +public class Generator { + + /** + * @param args + */ + public static void main(String[] args) { + @SuppressWarnings("unused") + ServerPackage f = ServerPackage.eINSTANCE; + genManager(); + genService(); + } + + public static void genManager() { + EObject o = ManagerFactory.eINSTANCE.createDockerHostManager(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix(); + dir = "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceDockerHostManager"); + m.setTitle("ControllerServiceDockerHostManager"); + ControllerGenerator g = new ControllerGenerator(o, m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(false); + g.addFactory("org.openecomp.ncomp.servers.docker.DockerDockerFactory"); + g.addFactory(ServiceFactory.eINSTANCE); + EObject gui = ModelFactory.eINSTANCE.createGuiClientApi(); + g.addObject("gui", gui, m); + g.setProvider(VmmanagerFactory.eINSTANCE.createVirtualMachineManager(),"Dcae"); + g.generate(dir); + g.generateScripts("src/main/server-gen/bin", "controller-service-docker-host-manager"); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; + YamlToJava.convert("src/main/sirius-gen/DockerHostManager.yaml", dir + "/logging", pName); + String pName1 = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".gui.logging"; + YamlToJava.convert("src/main/sirius-gen/GuiClientApi.yaml", dir + "/gui/logging", pName1); + } + + public static void genService() { + EObject o = ServiceFactory.eINSTANCE.createDockerHostService(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+"$", "") + "servers." + p.getNsPrefix(); + dir = "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceDockerHostService"); + m.setTitle("ControllerServiceDockerHostService"); + ControllerGenerator g = new ControllerGenerator(o, m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(true); + g.setProvider(VmFactory.eINSTANCE.createVirtualMachineService(),"Dcae"); + g.generate(dir); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; +// YamlToJava.convert("src/main/resources/DcaeServiceDockerHost.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/DockerHostService.yaml", dir + "/logging", pName); + + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/TestManager.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/TestManager.java new file mode 100644 index 0000000..e84a412 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/TestManager.java @@ -0,0 +1,68 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.docker.host.manager.tools; + +import java.io.IOException; + +import org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager; +import org.openecomp.dcae.controller.service.docker.host.manager.DockerManager; +import org.openecomp.dcae.controller.service.docker.host.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.docker.host.servers.manager.DcaeManagerFactory; +import org.openecomp.ncomp.docker.DockerFactory; +import org.openecomp.ncomp.docker.DockerHost; +import org.openecomp.ncomp.servers.docker.DockerDockerFactory; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +public class TestManager implements ISiriusServer { + + public static void main(String[] args) throws IOException { + TestManager t = new TestManager(); + t.test(); + } + private ManagementServer server; + public void test() throws IOException { + server = new ManagementServer(null, null, null, "manager.properties"); + ManagerFactory f = new DcaeManagerFactory(this); + server.addFactory(f); + DockerHostManager m = f.createDockerHostManager(); + server.setObject(m); + DockerFactory f2 = new DockerDockerFactory(this); + DockerHost h = f2.createDockerHost(); + m.setDockerHost(h); +// h.setUrl("http://10.0.2.2:6902"); + h.setUrl("https://cdf-2.novalocal:4243"); +// server.start(); +// h.poll(); + String dockerRegistry = "cdf-2.novalocal:8453"; + String dockerImage = "dockerdemo_test5"; + String dockerImageTag = "1.0.2"; + String image = dockerRegistry + "/" + dockerImage + ":" + dockerImageTag; + h.dockerRunWithName(image, "hithere33"); + } + @Override + public ManagementServer getServer() { + return server; + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/TestManagerServer.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/TestManagerServer.java new file mode 100644 index 0000000..b5ac116 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/TestManagerServer.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.docker.host.manager.tools; + +import java.io.File; +import java.io.IOException; +import java.util.TimeZone; + +import org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager; +import org.openecomp.dcae.controller.service.docker.host.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.docker.host.servers.manager.DcaeDockerHostManagerConsole; +import org.openecomp.dcae.controller.service.docker.host.servers.manager.DcaeDockerHostManagerServer; +import org.openecomp.ncomp.docker.DockerFactory; +import org.openecomp.ncomp.docker.DockerHost; +import org.openecomp.ncomp.webservice.utils.FileUtils; + +public class TestManagerServer { + + public static void main(String[] args) throws IOException { + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + FileUtils.deleteDirectory(new File("data")); + final DcaeDockerHostManagerServer s = new DcaeDockerHostManagerServer("manager.properties"); + Thread t = new Thread("DockerHost host server") { + @Override + public void run() { + try { + s.runWebserver(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + }; + t.start(); + DcaeDockerHostManagerConsole c = new DcaeDockerHostManagerConsole("console.properties","localhost"); + DockerHostManager m = ManagerFactory.eINSTANCE.createDockerHostManager(); + DockerHost h = DockerFactory.eINSTANCE.createDockerHost(); + m.setDockerHost(h); + h.setUrl("http://10.0.2.2:6902"); + c.create("/dockerHost", h); + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/TestRemoteManagerServer.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/TestRemoteManagerServer.java new file mode 100644 index 0000000..2cb1883 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/TestRemoteManagerServer.java @@ -0,0 +1,49 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.docker.host.manager.tools; + +import java.io.File; +import java.io.IOException; +import java.util.TimeZone; + +import org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager; +import org.openecomp.dcae.controller.service.docker.host.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.docker.host.servers.manager.DcaeDockerHostManagerConsole; +import org.openecomp.dcae.controller.service.docker.host.servers.manager.DcaeDockerHostManagerServer; +import org.openecomp.ncomp.docker.DockerFactory; +import org.openecomp.ncomp.docker.DockerHost; +import org.openecomp.ncomp.webservice.utils.FileUtils; + +public class TestRemoteManagerServer { + + public static void main(String[] args) throws IOException { + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + DcaeDockerHostManagerConsole c = new DcaeDockerHostManagerConsole("console.properties","localhost"); + DockerHostManager m = ManagerFactory.eINSTANCE.createDockerHostManager(); + DockerHost h = DockerFactory.eINSTANCE.createDockerHost(); + m.setDockerHost(h); +// h.setUrl("http://10.0.2.2:6902"); + h.setUrl("https://cdf-2.novalocal:4243"); + c.create("/dockerHost", h); + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/TestServiceToManager.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/TestServiceToManager.java new file mode 100644 index 0000000..685e64e --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/manager/tools/TestServiceToManager.java @@ -0,0 +1,46 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.docker.host.manager.tools; + +import org.openecomp.dcae.controller.service.docker.host.servers.service.DcaeServiceFactory; +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostService; +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostServiceInstance; +import org.openecomp.dcae.controller.service.docker.host.service.ServiceFactory; +import org.openecomp.dcae.controller.service.vm.PhysicalMachine; +import org.openecomp.dcae.controller.service.vm.VmFactory; + +public class TestServiceToManager { + + public static void main(String[] args) { + ServiceFactory f = new DcaeServiceFactory(null); + DockerHostService s = f.createDockerHostService(); + DockerHostServiceInstance i = f.createDockerHostServiceInstance(); + s.getInstances().add(i); + i.setName("foo"); + PhysicalMachine p = VmFactory.eINSTANCE.createPhysicalMachine(); + p.setPublicIp("localhost"); + i.getServers().add(p); + i.setManagerPortNumber(9922); + s.pollManagerConfiguration("foo"); + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerProvider.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerProvider.java new file mode 100644 index 0000000..560f0c8 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerProvider.java @@ -0,0 +1,133 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.docker.host.servers.manager; + +import java.io.ByteArrayOutputStream; +import java.util.Date; +import java.util.Iterator; + +import org.openecomp.ncomp.core.function.Function; +import org.openecomp.ncomp.docker.DockerContainer; +import org.openecomp.ncomp.docker.DockerPort; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.JavaHttpClient; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.webservice.utils.FileUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.json.JSONObject; + +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.service.HealthTestStatus; +import org.openecomp.dcae.controller.core.service.ServiceFactory; +import org.openecomp.dcae.controller.core.stream.DcaeStream; +import org.openecomp.dcae.controller.service.servers.vmmanager.DcaeVirtualMachineManagerProvider; +import org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager; + +public class DcaeDockerHostManagerProvider extends DcaeVirtualMachineManagerProvider { + private static final Logger logger = Logger.getLogger(DcaeDockerHostManagerProvider.class); + DockerHostManager o; + + public DcaeDockerHostManagerProvider(ISiriusServer controller, DockerHostManager o) { + super(controller, o); + this.o = o; + } + + public void updateContainerConfiguration(String name, EObject o2, EList inputStreams, + EList outputStreams) { + DcaeDockerHostManagerConsole c = console(name,true); + c.update("/", ManagementServer.ensureHardUpdate(o2,1)); + c.updateStreams(inputStreams, outputStreams); + c.configurationChanged(); + } + + public void resumeContainer(String name) { + console(name,true).resume(); + } + + public void suspendContainer(String name) { + console(name,true).suspend(); + } + + public HealthTestResponse testContainer(String name) { + return console(name,true).test(); + + } + + private DcaeDockerHostManagerConsole console(String name, boolean pollIfNeeded) { + // TODO this setup assumes a few too many things. + JavaHttpClient c = new JavaHttpClient("console.properties", "localhost"); + for ( DockerContainer container : o.getDockerHost().getContainers()) { + if (! name.equals(container.getName())) continue; + for (DockerPort p : container.getPorts()) { + if (p.getPrivatePort() == 9999) { + c.setBaseAddress(c.getBaseAddress().replace("9999", Integer.toString(p.getPublicPort()))); + return new DcaeDockerHostManagerConsole(c); + } + } + throw new RuntimeException("Unable to find manager port: " + name); + } + if (pollIfNeeded ) { + o.getDockerHost().poll(); + return console(name, false); + } + throw new RuntimeException("Unable to find container: " + name); + } + + public void setupConfiguration(String service, String instance) { + Runtime runtime = Runtime.getRuntime(); + Process proc; + try { + Date now = new Date(); + String cmd = "bin/setup-container-config.sh " + service + " " + instance; + proc = runtime.exec(cmd); + ByteArrayOutputStream o = new ByteArrayOutputStream(); + ByteArrayOutputStream e = new ByteArrayOutputStream(); + FileUtils.copyStream(proc.getInputStream(), o); + FileUtils.copyStream(proc.getErrorStream(), e); + int i = proc.waitFor(); + if (i != 0) + logger.warn("crontab return error: " + cmd + " " + i); + long duration = new Date().getTime()-now.getTime(); + if (duration > 10000) + logger.warn("command took too long: " + cmd + " " + duration); + } catch (Exception e) { + e.printStackTrace(); + logger.warn("ERROR: " + e); + } + + } + + @Override + public HealthTestResponse test() { + HealthTestResponse res = ServiceFactory.eINSTANCE.createHealthTestResponse(); + res.setStatus(HealthTestStatus.GREEN); + if (o.getDockerHost() == null || o.getDockerHost().getNetworks().size() == 0) { + res.setMessageCode("Docker Engine not working"); + res.setStatus(HealthTestStatus.RED); + } + return res; + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerManagerProvider.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerManagerProvider.java new file mode 100644 index 0000000..1f0e069 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerManagerProvider.java @@ -0,0 +1,49 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.docker.host.servers.manager; + + + + + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.apache.log4j.Logger; +import org.openecomp.dcae.controller.service.docker.host.manager.DockerManager; +import org.openecomp.dcae.controller.service.servers.vmmanager.DcaeVirtualMachineManagerProvider; + + +public class DcaeDockerManagerProvider extends DcaeVirtualMachineManagerProvider { + private static final Logger logger = Logger.getLogger(DcaeDockerManagerProvider.class); + DockerManager o; + + public DcaeDockerManagerProvider(ISiriusServer controller, DockerManager o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApiProvider.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApiProvider.java new file mode 100644 index 0000000..645fc69 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApiProvider.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.docker.host.servers.manager.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProvider extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProvider.class); + GuiClientApi o; + + public DcaeGuiClientApiProvider(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceProvider.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceProvider.java new file mode 100644 index 0000000..f5f489d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceProvider.java @@ -0,0 +1,111 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.docker.host.servers.service; + +import org.openecomp.ncomp.core.DeploymentStatus; +import org.openecomp.ncomp.docker.DockerHost; +import org.openecomp.ncomp.docker.DockerPackage; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; +import org.openecomp.ncomp.sirius.manager.console.Utils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.json.JSONObject; + +import org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager; +import org.openecomp.dcae.controller.service.docker.host.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostService; +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostServiceInstance; +import org.openecomp.dcae.controller.service.servers.vm.DcaeVirtualMachineServiceProvider; +import org.openecomp.dcae.controller.service.servers.vmmanager.DcaeVirtualMachineManagerConsole; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +public class DcaeDockerHostServiceProvider extends DcaeVirtualMachineServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeDockerHostServiceProvider.class); + DockerHostService o; + + public DcaeDockerHostServiceProvider(ISiriusServer controller, DockerHostService o) { + super(controller, o); + this.o = o; + } + + @Override + public EObject managerConfiguration(String instanceName) { + DockerHostServiceInstance i = (DockerHostServiceInstance) findInstance(instanceName); + DockerHostManager c = ManagerFactory.eINSTANCE.createDockerHostManager(); + if (i.getDockerHost() != null) { + c.setDockerHost(EcoreUtil.copy(i.getDockerHost())); + c.getDockerHost().setRemote(false); + } + return c; + } + + @Override + public void start() { + for (VirtualMachineServiceInstance i : o.getInstances()) { + DockerHostServiceInstance i1 = (DockerHostServiceInstance) i; + if (i1.getDockerHost() != null) + i1.getDockerHost().setRemote(true); + } + super.start(); + Thread t = new Thread("docker host poller: " + o.getName()) { + @Override + public void run() { + while (true) { + try { + if (!controller.getServer().isSlave) { + for (VirtualMachineServiceInstance i : o.getInstances()) { + DockerHostServiceInstance i1 = (DockerHostServiceInstance) i; + if (i1.getDockerHost() == null) + continue; + if (i.getStatus() == DeploymentStatus.DEPLOYED) { + AbstractClient c = getClient(i); + DcaeVirtualMachineManagerConsole console = new DcaeVirtualMachineManagerConsole(c); + JSONObject json = (JSONObject) Utils.object2json(console.list("/dockerHost", 1000)); + DockerHost h = (DockerHost) controller.getServer().json2ecore( + DockerPackage.eINSTANCE.getDockerHost(), json); + controller.getServer(); + h.setRemote(true); + ManagementServer.merge(i1.getDockerHost(), h, json, true, null); + } + } + } + Thread.sleep(30000); // sleep 30 seconds + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("docker host poller: " + e); + try { + Thread.sleep(30000); + } catch (InterruptedException e1) { + } + } + } + }; + }; + t.start(); + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerServiceProvider.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerServiceProvider.java new file mode 100644 index 0000000..c77123b --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/java/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerServiceProvider.java @@ -0,0 +1,45 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.docker.host.servers.service; + + + + + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.apache.log4j.Logger; +import org.openecomp.dcae.controller.service.docker.host.service.DockerService; +import org.openecomp.dcae.controller.service.servers.vm.DcaeVirtualMachineServiceProvider; + + +public class DcaeDockerServiceProvider extends DcaeVirtualMachineServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeDockerServiceProvider.class); + DockerService o; + + public DcaeDockerServiceProvider(ISiriusServer controller, DockerService o) { + super(controller, o); + this.o = o; + } + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server-gen/bin/controller-service-docker-host-manager-controller b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server-gen/bin/controller-service-docker-host-manager-controller new file mode 100644 index 0000000..af1c5b1 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server-gen/bin/controller-service-docker-host-manager-controller @@ -0,0 +1,138 @@ +#!/bin/bash + +# setup env if needed. java 6 required +## JAVA_HOME= + +############################## DO NOT EDIT BELOW ########################## + +SNAME="Dcae Controller" +PNAME=controller-service-docker-host-manager-controller +CLASS=org.openecomp.dcae.controller.service.docker.host.servers.manager.DcaeDockerHostManagerServer + +############################## COMMON BELOW ########################## + +check_status () +{ + if [ -f "${_PIDFILE}" ]; then + _PID=`cat "${_PIDFILE}"` + check_status_of_pid $_PID + else + _STATUS="$SNAME (no pidfile) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + +remove_pid_file () +{ + if [ -f "${_PIDFILE}" ]; then + rm "${_PIDFILE}" + fi +} + + +_DIR=`dirname "$0"` +_DIR=`dirname "$_DIR"` + +_PIDFILE=$_DIR/PID + +CMD=$1 +shift + +check_status + +CP=$(find $_DIR/lib/*/* -name \*.jar 2>/dev/null | xargs -I X printf ":%s" X) + +JVMARGS=$(grep 'server.jvmargs' $_DIR/config/manager.properties | sed -e 's/.*=//') + +case $CMD in + status) + echo $_STATUS + exit 0 + ;; + console) + $GROOVY_HOME/bin/groovysh -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP + ;; + run) + $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + groovy) + $GROOVY_HOME/bin/groovy -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + start) + if [ "$_RUNNING" = "1" ]; then + echo $_STATUS + exit 0 + fi + mkdir -p $_DIR/logs + if [ -e $_DIR/logs/$PNAME.out.1 ]; then mv $_DIR/logs/$PNAME.out.1 $_DIR/logs/$PNAME.out.2; fi + if [ -e $_DIR/logs/$PNAME.err.1 ]; then mv $_DIR/logs/$PNAME.err.1 $_DIR/logs/$PNAME.err.2; fi + if [ -e $_DIR/logs/$PNAME.out ]; then mv $_DIR/logs/$PNAME.out $_DIR/logs/$PNAME.out.1; fi + if [ -e $_DIR/logs/$PNAME.err ]; then mv $_DIR/logs/$PNAME.err $_DIR/logs/$PNAME.err.1; fi + + nohup $JAVA_HOME/bin/java $JVMARGS -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" $CLASS >> $_DIR/logs/$PNAME.out 2>> $_DIR/logs/$PNAME.err & + + _PID=$! + echo $_PID > $_PIDFILE + sleep 5 + check_status + echo $_STATUS + if [ "$_RUNNING" = "1" ]; then + exit 0 + else + echo "Failed to start - make sure the $SNAME is fully configured properly" + exit 1 + fi + ;; + stop) + if [ "$_RUNNING" = "0" ]; then + echo $_STATUS + remove_pid_file + exit 0 + fi + echo "Stopping $SNAME..." + _PID_TO_KILL=$_PID; + echo "$SNAME (pid=${_PID_TO_KILL}) is stopping..." + kill -TERM $_PID_TO_KILL + sleep 5 + check_status_of_pid $_PID_TO_KILL + if [ "$_RUNNING" = "1" ]; then + kill -TERM $_PID_TO_KILL + fi + while [ "$_RUNNING" = "1" ]; do + sleep 2 + check_status_of_pid $_PID_TO_KILL + done + remove_pid_file + echo "$SNAME has stopped." + exit 0 + ;; + *) + echo "$0 start|stop" + ;; +esac + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/common.funcs b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/common.funcs new file mode 100644 index 0000000..1386d92 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/common.funcs @@ -0,0 +1,32 @@ +# +# common shell functions +# + +_die() { + printf "$(date):FATAL:$1\n" + exit 2; +} + +_fail() { + _die $1; +} + +_fail_with_rc() { + rc=$1 + shift; + printf "$(date):ERROR:$@\n"; + exit $rc; +} + +_warn() { + printf "$(date):WARN:$1\n"; +} + +_info() { + printf "$(date):INFO:$1\n"; +} + +_print() { + _info $1; +} + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/generate-certs.sh b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/generate-certs.sh new file mode 100644 index 0000000..88cf23d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/generate-certs.sh @@ -0,0 +1,70 @@ +#!/bin/bash -x + +# +# this was (mostly) shamelessly cribbed from the io.docker:docker +# install_postproc script. run as root +# +DOCKER_DIR=/opt/app/docker +DOCKER_ETC_DIR=${DOCKER_DIR}/etc +DOCKER_BIN_DIR=${DOCKER_DIR}/bin +DOCKER_DATA_DIR=${DOCKER_DIR}/data +DOCKER_LOG_DIR=${DOCKER_DIR}/logs + +DOCKER_CA_CERT=${DOCKER_ETC_DIR}/docker_ca_cert.pem +DOCKER_CA_KEY=${DOCKER_ETC_DIR}/docker_ca_key.pem +CLIENT_P12_PWD=f22723cffdbd2fff1cb3c558677a7684 + +HOSTNAME=$(hostname -f) + +# Generate certificates for SSL encryption +# Generate a private key for the docker engine + +openssl genrsa -out ${DOCKER_ETC_DIR}/server_key.pem 2048 || + _fail_with_rc 20 "Server private key generation failed" + +# Generate a certificate signing request for the server using the private key. +openssl req -new -key ${DOCKER_ETC_DIR}/server_key.pem -out ${DOCKER_ETC_DIR}/server.csr -batch -subj "/countryName=US/stateOrProvinceName=Michigan/localityName=Southfield/organizationName=AT&T Services, Inc./commonName=${HOSTNAME}" || + _fail_with_rc 21 "Server certificate signing request generation failed." + +# Generate a certificate for the server and sign it with the CA certificate. +openssl x509 -req -days 3650 -in ${DOCKER_ETC_DIR}/server.csr -CA ${DOCKER_CA_CERT} -CAkey ${DOCKER_CA_KEY} -CAcreateserial -out ${DOCKER_ETC_DIR}/server_cert.pem || + _fail_with_rc 22 "Server certificate signing failed." + +# Generate a private key for client authentication +openssl genrsa -out ${DOCKER_ETC_DIR}/client_key.pem 2048 || + _fail_with_rc 20 "Client private key generation failed." + +# Generate a certificate signing request for the client using the private key. +openssl req -new -key ${DOCKER_ETC_DIR}/client_key.pem -out ${DOCKER_ETC_DIR}/client.csr -batch -subj "/countryName=US/stateOrProvinceName=Michigan/localityName=Southfield/organizationName=AT&T Services, Inc./commonName=Client" || + _fail_with_rc 21 "Clienterver certificate signing request generation failed." + +# To make the key suitable for client authentication, +# create an extensions config file +echo extendedKeyUsage = clientAuth > ${DOCKER_ETC_DIR}/client_cert_extfile.cnf + +# Generate a certificate for the client and sign it with the CA certificate +openssl x509 -req -days 3650 -in ${DOCKER_ETC_DIR}/client.csr -CA ${DOCKER_CA_CERT} -CAkey ${DOCKER_CA_KEY} -CAcreateserial -out ${DOCKER_ETC_DIR}/client_cert.pem -extfile ${DOCKER_ETC_DIR}/client_cert_extfile.cnf || + _fail_with_rc 22 "Client certificate signing failed." + +# Protect the keys +chmod 0600 ${DOCKER_ETC_DIR}/server_key.pem ${DOCKER_ETC_DIR}/client_key.pem ${DOCKER_CA_KEY} + +# Make the client key readable by the docker group so people who can access the docker cli can also +# access docker engine via the rest api +chgrp docker ${DOCKER_ETC_DIR}/client_key.pem +# But make the public keys readable +chmod 0644 ${DOCKER_ETC_DIR}/server_cert.pem ${DOCKER_ETC_DIR}/client_cert.pem ${DOCKER_CA_CERT} + +# Remove the password from the client key +openssl rsa -in ${DOCKER_ETC_DIR}/client_key.pem -out ${DOCKER_ETC_DIR}/client_key.pem + +# Convert the client key from pem to pksc12 format so we can add it to the keystore + +openssl pkcs12 -export -inkey ${DOCKER_ETC_DIR}/client_key.pem -in ${DOCKER_ETC_DIR}/client_cert.pem -out ${DOCKER_ETC_DIR}/client_cert.p12 -name client_p12 -CAfile ${DOCKER_CA_CERT} -caname root -chain -passout pass:${CLIENT_P12_PWD} || + _fail_with_rc 6 "CA key not converted to pksc12 format" + +# update the docker opts in /etc/default/docker +DOCKER_OPTS="--debug --graph /opt/app/docker/data --host tcp://0.0.0.0:4243 --host unix:///var/run/docker.sock --tls=true --tlscert=/opt/app/docker/etc/server_cert.pem --tlskey=/opt/app/docker/etc/server_key.pem --tlscacert=/opt/app/docker/etc/docker_ca_cert.pem" + +echo "DOCKER_OPTS=${DOCKER_OPTS}" >> /etc/default/docker + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/get-ecomp-nexus-cert.sh b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/get-ecomp-nexus-cert.sh new file mode 100644 index 0000000..dbf49e0 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/get-ecomp-nexus-cert.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# assumes 10.208.197.75 ecomp-nexus is in /etc/hosts and +# we have a route to it +# +# run as root + +_die() { + printf "$(date):FATAL:$1\n" + exit 2; +} + +_print() { + printf "$(date):INFO:$1\n"; +} + + +DOCKER_ETC_DIR="/opt/app/docker/etc" +NEXUS_CERT=${DOCKER_ETC_DIR}/nexus.crt + +_print "Getting ecomp-nexus certificate ..." + +keytool -printcert -rfc -sslserver ecomp-nexus:8443 > ${NEXUS_CERT} + +grep "BEGIN CERTIFICATE" ${NEXUS_CERT} || + _die "Could not retrieve certificated" + +_print "Adding certificate ..." +cp -p ${NEXUS_CERT} /usr/local/share/ca-certificates || + _die "Could not copy certficate into place" + +_print "Updating CA certificates ..." +update-ca-certficates + +# +# restart docker +# + +_print "Restarting docker ..." +service docker restart diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/install-docker.sh b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/install-docker.sh new file mode 100644 index 0000000..66ff6de --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/install-docker.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +. common.funcs + +TRUSTY_REPO="deb https://apt.dockerproject.org/repo ubuntu-trusty main" + +# +# install docker-engine on ubuntu 14.04 +# +REL=$(uname -r) + +sudo apt-get update + +# +# Add GPG key +# +sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D + +echo "${TRUSTY_REPO}" | sudo tee /etc/apt/sources.list.d/docker.list + +# update apt package index +sudo apt-get update + + +# +# install apparmor +# +sudo app-get install -q -y apparmor || + _fail "apparmor installation failed" + +# +# get certificates +# +sudo apt-get install -q -y apt-transport-http ca-certificates || + _fail "apt-transport-http ca-certificates installation failed" + +# +# makes the aufs storage driver available +# +sudo apt-get install -q -y linux-image-extra-${REL} linux-image-extra-virtual || + _fail "linux-image-extra-${REL} or linux-image-extra-virtual installation failed" + +sudo apt-get install -q -y docker-engine || + _fail "docker-engine installation failed" + +# +# Generate certifcates for TLS +# +sudo -uroot generate-certs.sh + +sudo service docker start +sudo usermod -aG docker ubuntu +sudo usermod -aG docker dcae + +# +# END +# diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/manager.sh b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/manager.sh new file mode 100644 index 0000000..671a029 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/manager.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +export JAVA_HOME=/opt/app/java/jdk/jdk170 +export GROOVY_HOME=/opt/app/groovy/246 + +PATH=$JAVA_HOME/bin:$GROOVY_HOME/bin:$PATH + +cd $(dirname $(dirname $(readlink -e $0))) + +ROOT=$(pwd) +CMD=$ROOT/bin/controller-service-docker-host-manager-controller + + +mkdir -p logs/ +echo $(date) bin/manager.sh "$@" >> logs/manager.sh.log + +CMD1=$1 +VMTYPE=vm-docker-host + +case $CMD1 in + start) + mkdir -p data/resources + if [ ! -e data/resources/dockerHost.json ]; then + echo '{}' > data/resources/dockerHost.json + fi + sed -i s/FQDN/$(hostname -f)/ config/docker.properties + find /opt/app/dcae-controller-service-*/lib -name \*.jar | grep -v docker-host-manager | xargs -I X cp X lib/ + JVMARGS=$(cat config/manager.properties | grep JVMARGS | sed 's/[^=]*=//') + if [ "$JVMARGS" == "" ]; then JVMARGS=-Djavax.net.ssl.trustStore=config/docker-mra-certs.jks; fi + $CMD $CMD1 $JVMARGS + ;; + stop|console) + $CMD $CMD1 + ;; + config) + CONFIGDIR=/var/config/DCAE/chef + if [ ! -e $CONFIGDIR/$VMTYPE-manager.properties ]; then CONFIGDIR=/tmp; fi + mkdir -p config + for FILE in $CONFIGDIR/$VMTYPE-*; do + FILE2=$(echo $FILE | sed s/.*$VMTYPE-//) + cp $FILE config/$FILE2 + done + /opt/app/dcae-controller-core-utils/bin/setup_https.sh config/manager.properties + ;; + restore|clean) + ;; + restart) + $0 stop + $0 start + ;; + restart2) + $CMD stop + JVMARGS=$(cat config/manager.properties | grep JVMARGS | sed 's/[^=]*=//') + if [ "$JVMARGS" == "" ]; then JVMARGS=-Djavax.net.ssl.trustStore=config/docker-mra-certs.jks; fi + $CMD start $JVMARGS + ;; + *) + echo unknown command: $CMD1 + ;; +esac + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/setup-container-config.sh b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/setup-container-config.sh new file mode 100644 index 0000000..59fa036 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/setup-container-config.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +service=$1 +instance=$2 + +DIR=/var/config/DCAE/$service/$instance/manager + +mkdir -p $DIR +for f in manager.properties console.properties gui.properties log4j.properties; do + cp config/$f $DIR +done + +for d in /tmp /var/config/DCAE/chef; do + for f in $(ls $d/$service*); do + f1=$(basename $f | sed s/$service.//) + cp $f $DIR/$f1 + chmod og-rwx $DIR/$f1 + done +done + +sed -i /^server.key/d $DIR/manager.properties + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/console.properties b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/console.properties new file mode 100644 index 0000000..4b63607 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:PORT +localhost.user=console +localhost.password=CONSOLE_PW diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/gui.properties b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/gui.properties new file mode 100644 index 0000000..e69de29 diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/log4j.properties b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/log4j.properties new file mode 100644 index 0000000..8b3b8f9 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/log4j.properties @@ -0,0 +1,24 @@ +#log4j.debug=0 +log4j.rootLogger=warn, file +log4j.logger.org.openecomp.ncomp=info, file +log4j.additivity.org.openecomp.ncomp=false +log4j.logger.org.openecomp.ncomp.datarouter=warn, file +log4j.additivity.org.openecomp.ncomp.datarouter=false +log4j.logger.org.apache.http.headers=debug, file +log4j.logger.org.apache.http.wire=debug, file + +## uploaded logger +log4j.logger.org.openecomp.ncomp.sirius.manager.uploaded=info, uploaded +log4j.additivity.org.openecomp.ncomp.sirius.manager.uploaded=false +## request logging +log4j.logger.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=info, requests +log4j.additivity.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=false + + +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=logs/BBBB.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n +log4j.appender.file.MaxFileSize=50MB +log4j.appender.file.MaxBackupIndex=5 + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/makefile b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/makefile new file mode 100644 index 0000000..717823e --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/makefile @@ -0,0 +1,9 @@ + +restart: stop start + +start: + M2_HOME=/home/ncomp/.m2 bin/BBBB-controller start +stop: + bin/BBBB-controller stop +console: + bin/BBBB-controller console diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/manager.properties b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/manager.properties new file mode 100644 index 0000000..4605389 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/manager.properties @@ -0,0 +1,7 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = PORT +server.user.console = CONSOLE_PW +server.user.gui = GUI_PW +server.user.client = CLIENT_PW diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/pw.sh.sh b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/pw.sh.sh new file mode 100644 index 0000000..cd022ae --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/config/pw.sh.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +### used to generate random passwords + + +echo '#!/bin/bash' +echo "" + +echo 'cat \' + +for i in CONSOLE GUI CLIENT +do + echo ' |' sed s/${i}_PW/$(echo $i:$(date +%s) | sha256sum | base64 | head -c 20 ; echo)/ \\ +done + \ No newline at end of file diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/scripts/console.groovy b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/scripts/console.groovy new file mode 100644 index 0000000..00e8a0b --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/scripts/console.groovy @@ -0,0 +1,27 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.openecomp.dcae.controller.service.docker.host.servers.manager.DcaeDockerHostManagerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +manager = new DcaeDockerHostManagerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/DockerHostManager.yaml b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/DockerHostManager.yaml new file mode 100644 index 0000000..dfaced2 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/DockerHostManager.yaml @@ -0,0 +1,234 @@ +operations: + test: {} + suspend: {} + resume: {} + publicKey: {} + configurationChanged: {} + updateStreams: {} + logs: {} + metrics: {} + properties: {} + uploadInfo: {} + getValues: {} + getValuesAll: {} + getMessages: {} + getRequestLogger: {} + evaluate: {} + update: {} + updateContainerConfiguration: {} + suspendContainer: {} + resumeContainer: {} + testContainer: {} + setupConfiguration: {} + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_publicKey: + decription: Remote call publicKey + REMOTE_configurationChanged: + decription: Remote call configurationChanged + REMOTE_updateStreams: + decription: Remote call updateStreams + REMOTE_logs: + decription: Remote call logs + REMOTE_metrics: + decription: Remote call metrics + REMOTE_properties: + decription: Remote call properties + REMOTE_uploadInfo: + decription: Remote call uploadInfo + REMOTE_getValues: + decription: Remote call getValues + REMOTE_getValuesAll: + decription: Remote call getValuesAll + REMOTE_getMessages: + decription: Remote call getMessages + REMOTE_getRequestLogger: + decription: Remote call getRequestLogger + REMOTE_evaluate: + decription: Remote call evaluate + REMOTE_update: + decription: Remote call update + REMOTE_updateContainerConfiguration: + decription: Remote call updateContainerConfiguration + REMOTE_suspendContainer: + decription: Remote call suspendContainer + REMOTE_resumeContainer: + decription: Remote call resumeContainer + REMOTE_testContainer: + decription: Remote call testContainer + REMOTE_setupConfiguration: + decription: Remote call setupConfiguration +messages: + dummy: {} + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + publicKey: + errorCode: publicKey-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + configurationChanged: + errorCode: configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateStreams: + errorCode: updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + logs: + errorCode: logs-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + metrics: + errorCode: metrics-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + properties: + errorCode: properties-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + uploadInfo: + errorCode: uploadInfo-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getValues: + errorCode: getValues-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getValuesAll: + errorCode: getValuesAll-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getMessages: + errorCode: getMessages-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getRequestLogger: + errorCode: getRequestLogger-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + evaluate: + errorCode: evaluate-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + update: + errorCode: update-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateContainerConfiguration: + errorCode: updateContainerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspendContainer: + errorCode: suspendContainer-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resumeContainer: + errorCode: resumeContainer-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + testContainer: + errorCode: testContainer-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setupConfiguration: + errorCode: setupConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_publicKey: + errorCode: REMOTE-publicKey-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_configurationChanged: + errorCode: REMOTE-configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateStreams: + errorCode: REMOTE-updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_logs: + errorCode: REMOTE-logs-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_metrics: + errorCode: REMOTE-metrics-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_properties: + errorCode: REMOTE-properties-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_uploadInfo: + errorCode: REMOTE-uploadInfo-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getValues: + errorCode: REMOTE-getValues-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getValuesAll: + errorCode: REMOTE-getValuesAll-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getMessages: + errorCode: REMOTE-getMessages-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getRequestLogger: + errorCode: REMOTE-getRequestLogger-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_evaluate: + errorCode: REMOTE-evaluate-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_update: + errorCode: REMOTE-update-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateContainerConfiguration: + errorCode: REMOTE-updateContainerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspendContainer: + errorCode: REMOTE-suspendContainer-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resumeContainer: + errorCode: REMOTE-resumeContainer-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_testContainer: + errorCode: REMOTE-testContainer-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setupConfiguration: + errorCode: REMOTE-setupConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/DockerHostService.yaml b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/DockerHostService.yaml new file mode 100644 index 0000000..6ac8c34 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/DockerHostService.yaml @@ -0,0 +1,135 @@ +operations: + deploy: {} + undeploy: {} + test: {} + suspend: {} + resume: {} + pushManagerConfiguration: {} + pollManagerConfiguration: {} + managerConfiguration: {} + managerOperation: {} + updateConfigurationFromPolicy: {} + runHealthTests: {} + updateDeploymentStatus: {} + REMOTE_deploy: + decription: Remote call deploy + REMOTE_undeploy: + decription: Remote call undeploy + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_pushManagerConfiguration: + decription: Remote call pushManagerConfiguration + REMOTE_pollManagerConfiguration: + decription: Remote call pollManagerConfiguration + REMOTE_managerConfiguration: + decription: Remote call managerConfiguration + REMOTE_managerOperation: + decription: Remote call managerOperation + REMOTE_updateConfigurationFromPolicy: + decription: Remote call updateConfigurationFromPolicy + REMOTE_runHealthTests: + decription: Remote call runHealthTests + REMOTE_updateDeploymentStatus: + decription: Remote call updateDeploymentStatus +messages: + dummy: {} + deploy: + errorCode: deploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + undeploy: + errorCode: undeploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pushManagerConfiguration: + errorCode: pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pollManagerConfiguration: + errorCode: pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerConfiguration: + errorCode: managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerOperation: + errorCode: managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateConfigurationFromPolicy: + errorCode: updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + runHealthTests: + errorCode: runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateDeploymentStatus: + errorCode: updateDeploymentStatus-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_deploy: + errorCode: REMOTE-deploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_undeploy: + errorCode: REMOTE-undeploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pushManagerConfiguration: + errorCode: REMOTE-pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pollManagerConfiguration: + errorCode: REMOTE-pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerConfiguration: + errorCode: REMOTE-managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerOperation: + errorCode: REMOTE-managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateConfigurationFromPolicy: + errorCode: REMOTE-updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_runHealthTests: + errorCode: REMOTE-runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateDeploymentStatus: + errorCode: REMOTE-updateDeploymentStatus-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/GuiClientApi.yaml b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/GuiClientApi.yaml new file mode 100644 index 0000000..bf3d69d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/GuiClientApi.yaml @@ -0,0 +1,69 @@ +operations: + getTree: {} + getObject: {} + getTimeSerie: {} + getTable: {} + getHtml: {} + getGraph: {} + REMOTE_getTree: + decription: Remote call getTree + REMOTE_getObject: + decription: Remote call getObject + REMOTE_getTimeSerie: + decription: Remote call getTimeSerie + REMOTE_getTable: + decription: Remote call getTable + REMOTE_getHtml: + decription: Remote call getHtml + REMOTE_getGraph: + decription: Remote call getGraph +messages: + dummy: {} + getTree: + errorCode: getTree-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getObject: + errorCode: getObject-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTimeSerie: + errorCode: getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTable: + errorCode: getTable-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getHtml: + errorCode: getHtml-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getGraph: + errorCode: getGraph-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_getTree: + errorCode: REMOTE-getTree-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getObject: + errorCode: REMOTE-getObject-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTimeSerie: + errorCode: REMOTE-getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTable: + errorCode: REMOTE-getTable-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getHtml: + errorCode: REMOTE-getHtml-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getGraph: + errorCode: REMOTE-getGraph-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManager.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManager.java new file mode 100644 index 0000000..3bdb693 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManager.java @@ -0,0 +1,664 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.docker.host.servers.manager; + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.docker.host.servers.manager.logging.DockerHostManagerOperationEnum; +import org.openecomp.dcae.controller.service.docker.host.servers.manager.logging.DockerHostManagerMessageEnum; + + + + + + + +import java.util.Date; + + + + + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; + + + + + +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + + +import org.openecomp.dcae.controller.service.docker.host.manager.impl.DockerHostManagerImpl; + + + +public class DcaeDockerHostManager extends DockerHostManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeDockerHostManager.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeDockerHostManagerProvider controller; + ISiriusServer server; + + public DcaeDockerHostManager(ISiriusServer server) { + this.server = server; + this.controller = new DcaeDockerHostManagerProvider(server,this); + } + + public void updateContainerConfiguration(java.lang.String name, org.eclipse.emf.ecore.EObject o, EList inputStreams, EList outputStreams) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateContainerConfiguration", ApiRequestStatus.START, duration_,name,o,inputStreams,outputStreams); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.updateContainerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.updateContainerConfiguration(name,o,inputStreams,outputStreams); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateContainerConfiguration", ApiRequestStatus.ERROR, duration_,name,o,inputStreams,outputStreams); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.updateContainerConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateContainerConfiguration", ApiRequestStatus.OKAY, duration_,name,o,inputStreams,outputStreams); + + } + + public void suspendContainer(java.lang.String name) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspendContainer", ApiRequestStatus.START, duration_,name); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.suspendContainer); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.suspendContainer(name); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspendContainer", ApiRequestStatus.ERROR, duration_,name); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.suspendContainer, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspendContainer", ApiRequestStatus.OKAY, duration_,name); + + } + + public void resumeContainer(java.lang.String name) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resumeContainer", ApiRequestStatus.START, duration_,name); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.resumeContainer); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.resumeContainer(name); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resumeContainer", ApiRequestStatus.ERROR, duration_,name); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.resumeContainer, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resumeContainer", ApiRequestStatus.OKAY, duration_,name); + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse testContainer(java.lang.String name) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "testContainer", ApiRequestStatus.START, duration_,name); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.testContainer); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.testContainer(name); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "testContainer", ApiRequestStatus.ERROR, duration_,name); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.testContainer, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "testContainer", ApiRequestStatus.OKAY, duration_,name); + return res; + } + + public void setupConfiguration(java.lang.String service, java.lang.String instance) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setupConfiguration", ApiRequestStatus.START, duration_,service,instance); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.setupConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.setupConfiguration(service,instance); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setupConfiguration", ApiRequestStatus.ERROR, duration_,service,instance); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.setupConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setupConfiguration", ApiRequestStatus.OKAY, duration_,service,instance); + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.test); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.test(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.test, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void suspend() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.suspend); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.suspend(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.suspend, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_); + + } + + public void resume() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.resume); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.resume(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.resume, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_); + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.publicKey); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.publicKey(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.publicKey, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void configurationChanged() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.configurationChanged); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.configurationChanged(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.configurationChanged, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.OKAY, duration_); + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.START, duration_,inputStreams,outputStreams); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.updateStreams); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.ERROR, duration_,inputStreams,outputStreams); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.updateStreams, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.OKAY, duration_,inputStreams,outputStreams); + + } + + public void logs(org.json.JSONObject cx, EList logs) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.START, duration_,cx,logs); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.logs); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.logs(cx,logs); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.ERROR, duration_,cx,logs); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.logs, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.OKAY, duration_,cx,logs); + + } + + public void metrics(org.json.JSONObject cx, EList metrics) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.START, duration_,cx,metrics); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.metrics); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.metrics(cx,metrics); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.ERROR, duration_,cx,metrics); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.metrics, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.OKAY, duration_,cx,metrics); + + } + + public void properties(org.json.JSONObject cx, EList l) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.START, duration_,cx,l); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.properties); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.properties(cx,l); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.ERROR, duration_,cx,l); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.properties, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.OKAY, duration_,cx,l); + + } + + public void uploadInfo(org.json.JSONObject cx, EList info) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.START, duration_,cx,info); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.uploadInfo); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.uploadInfo(cx,info); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.ERROR, duration_,cx,info); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.uploadInfo, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.OKAY, duration_,cx,info); + + } + + public EList getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.START, duration_,cx,path,start,end,option,relativeInterval); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.getValues); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getValues(cx,path,start,end,option,relativeInterval); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.ERROR, duration_,cx,path,start,end,option,relativeInterval); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.getValues, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.OKAY, duration_,cx,path,start,end,option,relativeInterval); + return res; + } + + public EList getValuesAll(org.json.JSONObject cx, java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.START, duration_,cx,path,metrics,start,end,option,relativeInterval); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.getValuesAll); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getValuesAll(cx,path,metrics,start,end,option,relativeInterval); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.ERROR, duration_,cx,path,metrics,start,end,option,relativeInterval); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.getValuesAll, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.OKAY, duration_,cx,path,metrics,start,end,option,relativeInterval); + return res; + } + + public EList getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.START, duration_,cx,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.getMessages); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getMessages(cx,path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.ERROR, duration_,cx,path,start,end); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.getMessages, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.OKAY, duration_,cx,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.START, duration_,userName,action,resourcePath,context); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.getRequestLogger); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getRequestLogger(userName,action,resourcePath,context); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.ERROR, duration_,userName,action,resourcePath,context); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.getRequestLogger, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.OKAY, duration_,userName,action,resourcePath,context); + return res; + } + + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.START, duration_,path,function); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.evaluate); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.evaluate(path,function); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.ERROR, duration_,path,function); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.evaluate, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.OKAY, duration_,path,function); + return res; + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.START, duration_,path,function); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.update); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.update(path,function); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.ERROR, duration_,path,function); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostManagerMessageEnum.update, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.OKAY, duration_,path,function); + + } + + + + + + + public static void ecoreSetup() { + DcaeDockerHostManagerProvider.ecoreSetup(); + } + public DcaeDockerHostManagerProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerClient.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerClient.java new file mode 100644 index 0000000..34fd247 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerClient.java @@ -0,0 +1,429 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.docker.host.servers.manager; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.docker.host.manager.impl.DockerHostManagerImpl; +import org.openecomp.dcae.controller.service.docker.host.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.docker.host.servers.manager.logging.DockerHostManagerOperationEnum; +import org.openecomp.dcae.controller.service.docker.host.servers.manager.logging.DockerHostManagerMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeDockerHostManagerClient extends DockerHostManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeDockerHostManagerClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeDockerHostManagerClient(String file, String name) { + DcaeDockerHostManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeDockerHostManagerClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeDockerHostManagerClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public void updateContainerConfiguration(java.lang.String name, org.eclipse.emf.ecore.EObject o, EList inputStreams, EList outputStreams) { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_updateContainerConfiguration); + + try { + client.operationPath("/resources", c, "updateContainerConfiguration", null, name,o,inputStreams,outputStreams); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_updateContainerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateContainerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void suspendContainer(java.lang.String name) { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_suspendContainer); + + try { + client.operationPath("/resources", c, "suspendContainer", null, name); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_suspendContainer, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspendContainer: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resumeContainer(java.lang.String name) { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_resumeContainer); + + try { + client.operationPath("/resources", c, "resumeContainer", null, name); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_resumeContainer, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@resumeContainer: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse testContainer(java.lang.String name) { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_testContainer); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "testContainer", null, name); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_testContainer, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@testContainer: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void setupConfiguration(java.lang.String service, java.lang.String instance) { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_setupConfiguration); + + try { + client.operationPath("/resources", c, "setupConfiguration", null, service,instance); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_setupConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@setupConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@test: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend() { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspend: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume() { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@resume: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public java.lang.String publicKey() { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_publicKey); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "publicKey", null); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_publicKey, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@publicKey: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void configurationChanged() { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_configurationChanged); + + try { + client.operationPath("/resources", c, "configurationChanged", null); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_configurationChanged, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@configurationChanged: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void updateStreams(EList inputStreams, EList outputStreams) { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_updateStreams); + + try { + client.operationPath("/resources", c, "updateStreams", null, inputStreams,outputStreams); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_updateStreams, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateStreams: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void logs(org.json.JSONObject cx, EList logs) { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_logs); + + try { + client.operationPath("/resources", c, "logs", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,logs); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_logs, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@logs: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void metrics(org.json.JSONObject cx, EList metrics) { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_metrics); + + try { + client.operationPath("/resources", c, "metrics", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,metrics); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_metrics, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@metrics: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void properties(org.json.JSONObject cx, EList l) { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_properties); + + try { + client.operationPath("/resources", c, "properties", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,l); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_properties, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@properties: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void uploadInfo(org.json.JSONObject cx, EList info) { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_uploadInfo); + + try { + client.operationPath("/resources", c, "uploadInfo", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,info); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_uploadInfo, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@uploadInfo: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public EList getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_getValues); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getValues", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end,option,relativeInterval); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_getValues, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getValues: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList getValuesAll(org.json.JSONObject cx, java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_getValuesAll); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getValuesAll", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,metrics,start,end,option,relativeInterval); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_getValuesAll, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getValuesAll: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_getMessages); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getMessages", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_getMessages, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getMessages: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_getRequestLogger); + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res; + try { + res = (org.openecomp.ncomp.sirius.manager.server.LoggerInfo) client.operationPath("/resources", c, "getRequestLogger", null, userName,action,resourcePath,context); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_getRequestLogger, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getRequestLogger: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_evaluate); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "evaluate", null, path,function); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_evaluate, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@evaluate: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = ManagerPackage.eINSTANCE.getDockerHostManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostManagerOperationEnum.REMOTE_update); + + try { + client.operationPath("/resources", c, "update", null, path,function); + } + catch (Exception e) { + ecomplogger.warn(DockerHostManagerMessageEnum.REMOTE_update, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@update: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerConsole.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerConsole.java new file mode 100644 index 0000000..52b845e --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerConsole.java @@ -0,0 +1,292 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.docker.host.servers.manager; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + +import org.openecomp.dcae.controller.service.docker.host.servers.manager.gui.DcaeGuiClientApiConsole; + + +public class DcaeDockerHostManagerConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeDockerHostManagerConsole.class); + protected DcaeDockerHostManagerClient controller; + + + DcaeGuiClientApiConsole gui; + + + public DcaeDockerHostManagerConsole(String filename, String name) { + super(filename, name); + controller = new DcaeDockerHostManagerClient(filename,name); + client = controller.client; + + gui = new DcaeGuiClientApiConsole(filename,name); + } + + public DcaeDockerHostManagerConsole(AbstractClient c) { + controller = new DcaeDockerHostManagerClient(c); + client = controller.client; + } + + + public void updateContainerConfiguration(java.lang.String name, org.eclipse.emf.ecore.EObject o, EList inputStreams, EList outputStreams) { + + try { + controller.updateContainerConfiguration(name,o,inputStreams,outputStreams); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void suspendContainer(java.lang.String name) { + + try { + controller.suspendContainer(name); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resumeContainer(java.lang.String name) { + + try { + controller.resumeContainer(name); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse testContainer(java.lang.String name) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.testContainer(name); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void setupConfiguration(java.lang.String service, java.lang.String instance) { + + try { + controller.setupConfiguration(service,instance); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend() { + + try { + controller.suspend(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume() { + + try { + controller.resume(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + try { + res = controller.publicKey(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void configurationChanged() { + + try { + controller.configurationChanged(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void logs(EList logs) { + + try { + controller.logs(null,logs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void metrics(EList metrics) { + + try { + controller.metrics(null,metrics); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void properties(EList l) { + + try { + controller.properties(null,l); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void uploadInfo(EList info) { + + try { + controller.uploadInfo(null,info); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public EList getValues(java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + try { + res = controller.getValues(null,path,start,end,option,relativeInterval); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getValuesAll(java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + try { + res = controller.getValuesAll(null,path,metrics,start,end,option,relativeInterval); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getMessages(java.lang.String path, java.lang.Long start, java.lang.Long end) { + EList res = null; + try { + res = controller.getMessages(null,path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res = null; + try { + res = controller.getRequestLogger(userName,action,resourcePath,context); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EList res = null; + try { + res = controller.evaluate(path,function); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + + try { + controller.update(path,function); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerProviderTemplate.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerProviderTemplate.java new file mode 100644 index 0000000..440ef45 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerProviderTemplate.java @@ -0,0 +1,102 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.docker.host.servers.manager; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import java.util.Date; + + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; + + +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + + +import org.openecomp.dcae.controller.service.servers.vmmanager.DcaeVirtualMachineManagerProvider; + + +import org.openecomp.dcae.controller.service.docker.host.manager.impl.DockerHostManagerImpl; +import org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager; + + +public class DcaeDockerHostManagerProviderTemplate extends DcaeVirtualMachineManagerProvider { + private static final Logger logger = Logger.getLogger(DcaeDockerHostManagerProviderTemplate.class); + DockerHostManager o; + + public DcaeDockerHostManagerProviderTemplate(ISiriusServer controller, DockerHostManager o) { + super(controller, o); + this.o = o; + } + + public void updateContainerConfiguration(java.lang.String name, org.eclipse.emf.ecore.EObject o, EList inputStreams, EList outputStreams) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void suspendContainer(java.lang.String name) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void resumeContainer(java.lang.String name) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse testContainer(java.lang.String name) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void setupConfiguration(java.lang.String service, java.lang.String instance) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + + + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerServer.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerServer.java new file mode 100644 index 0000000..8bd963b --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeDockerHostManagerServer.java @@ -0,0 +1,115 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.docker.host.servers.manager; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager; + + +import org.openecomp.dcae.controller.service.docker.host.servers.manager.gui.DcaeModelFactory; + + + + + +public class DcaeDockerHostManagerServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeDockerHostManagerServer.class); + String serverPath; + ManagementServer server; + DcaeDockerHostManager controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeManagerFactory f = new DcaeManagerFactory(this); + + + String guiPath; + ManagementServer guiServer; + + + public DcaeDockerHostManagerServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeDockerHostManager.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "DockerHostManager", serverPath, filename); + server.addFactory(f); + + server.addFactory(new org.openecomp.ncomp.servers.docker.DockerDockerFactory(this)); + + + server.addFactory(org.openecomp.dcae.controller.service.docker.host.service.ServiceFactory.eINSTANCE); + + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeDockerHostManager) server.find("/").o; + webServer = new Jetty8Server("manager.properties"); + webServer.add("/resources",server); + + + + EFactory guiFactory = new DcaeModelFactory(this); + guiPath = serverPath + "/gui"; + guiServer = new ManagementServer(guiFactory, "GuiClientApi", guiPath, "gui.properties"); + guiServer.start(); + webServer.add("/gui",guiServer); + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeDockerHostManagerServer s = new DcaeDockerHostManagerServer("manager.properties"); + s.runWebserver(); + } + public DockerHostManager getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeManagerFactory.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeManagerFactory.java new file mode 100644 index 0000000..0723b52 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/DcaeManagerFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.docker.host.servers.manager; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager; +import org.openecomp.dcae.controller.service.docker.host.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.docker.host.manager.impl.ManagerFactoryImpl; + + + + + +public class DcaeManagerFactory extends ManagerFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeManagerFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ManagerPackage.eINSTANCE; } + public DcaeManagerFactory(ISiriusServer server) { + this.server = server; + } + @Override + public DockerHostManager createDockerHostManager() { + return new DcaeDockerHostManager(server); + } + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApi.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApi.java new file mode 100644 index 0000000..9b99753 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApi.java @@ -0,0 +1,271 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.docker.host.servers.manager.gui; + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.docker.host.servers.manager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.docker.host.servers.manager.gui.logging.GuiClientApiMessageEnum; + + + + + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + + + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + + + + +import org.openecomp.ncomp.sirius.manager.Subject; + + + + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + + + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; + + + +public class DcaeGuiClientApi extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApi.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeGuiClientApiProvider controller; + ISiriusServer server; + + public DcaeGuiClientApi(ISiriusServer server) { + this.server = server; + this.controller = new DcaeGuiClientApiProvider(server,this); + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTree); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getTree(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getTree, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.OKAY, duration_); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.START, duration_,path); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getObject); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getObject(path); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.ERROR, duration_,path); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getObject, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.OKAY, duration_,path); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.START, duration_,path,start,end,duration); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTimeSerie); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.ERROR, duration_,path,start,end,duration); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getTimeSerie, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.OKAY, duration_,path,start,end,duration); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTable); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getTable(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getTable, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getHtml); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getHtml(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getHtml, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getGraph); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getGraph(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getGraph, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + + + + + + public static void ecoreSetup() { + DcaeGuiClientApiProvider.ecoreSetup(); + } + public DcaeGuiClientApiProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApiClient.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApiClient.java new file mode 100644 index 0000000..0ce3ec5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApiClient.java @@ -0,0 +1,175 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.docker.host.servers.manager.gui; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.dcae.controller.service.docker.host.servers.manager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.docker.host.servers.manager.gui.logging.GuiClientApiMessageEnum; + + +import org.openecomp.dcae.controller.service.docker.host.servers.manager.DcaeDockerHostManager; + + + + +@SuppressWarnings("unchecked") +public class DcaeGuiClientApiClient extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeGuiClientApiClient(String file, String name) { + DcaeDockerHostManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTree); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTree) client.operationPath("/gui", c, "getTree", null); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTree, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getTree: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getObject); + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiObject) client.operationPath("/gui", c, "getObject", null, path); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getObject, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getObject: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTimeSerie); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie) client.operationPath("/gui", c, "getTimeSerie", null, path,start,end,duration); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTimeSerie, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getTimeSerie: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTable); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTable) client.operationPath("/gui", c, "getTable", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTable, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getTable: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getHtml); + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml) client.operationPath("/gui", c, "getHtml", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getHtml, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getHtml: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getGraph); + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res; + try { + res = (org.openecomp.ncomp.sirius.manager.graph.GuiGraph) client.operationPath("/gui", c, "getGraph", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getGraph, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getGraph: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApiConsole.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApiConsole.java new file mode 100644 index 0000000..42b3143 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApiConsole.java @@ -0,0 +1,123 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.docker.host.servers.manager.gui; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeGuiClientApiConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiConsole.class); + protected DcaeGuiClientApiClient controller; + + + + + public DcaeGuiClientApiConsole(String filename, String name) { + super(filename, name); + controller = new DcaeGuiClientApiClient(filename,name); + client = controller.client; + + } + + public DcaeGuiClientApiConsole(AbstractClient c) { + controller = new DcaeGuiClientApiClient(c); + client = controller.client; + } + + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + try { + res = controller.getTree(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + try { + res = controller.getObject(path); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + try { + res = controller.getTable(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + try { + res = controller.getHtml(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + try { + res = controller.getGraph(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java new file mode 100644 index 0000000..b95d799 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.docker.host.servers.manager.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProviderTemplate extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProviderTemplate.class); + GuiClientApi o; + + public DcaeGuiClientApiProviderTemplate(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeModelFactory.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeModelFactory.java new file mode 100644 index 0000000..c47a9bb --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/DcaeModelFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.docker.host.servers.manager.gui; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelFactoryImpl; + +import org.openecomp.dcae.controller.service.docker.host.servers.manager.DcaeDockerHostManagerServer; + + + +public class DcaeModelFactory extends ModelFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeModelFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ModelPackage.eINSTANCE; } + public DcaeModelFactory(ISiriusServer server) { + this.server = server; + } + @Override + public GuiClientApi createGuiClientApi() { + return new DcaeGuiClientApi(server); + } + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/logging/GuiClientApi.properties b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/logging/GuiClientApi.properties new file mode 100644 index 0000000..8705ab8 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/logging/GuiClientApi.properties @@ -0,0 +1,78 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +getTree=\ + getTree-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getObject=\ + getObject-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTimeSerie=\ + getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTable=\ + getTable-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getHtml=\ + getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getGraph=\ + getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_getTree=\ + REMOTE-getTree-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getObject=\ + REMOTE-getObject-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTimeSerie=\ + REMOTE-getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTable=\ + REMOTE-getTable-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getHtml=\ + REMOTE-getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getGraph=\ + REMOTE-getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/logging/GuiClientApiMessageEnum.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/logging/GuiClientApiMessageEnum.java new file mode 100644 index 0000000..64b8fa9 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/logging/GuiClientApiMessageEnum.java @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.docker.host.servers.manager.gui.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum GuiClientApiMessageEnum implements EcompMessageEnum { + + dummy, + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.docker.host.servers.manager.gui.logging.GuiClientApi"); + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/logging/GuiClientApiOperationEnum.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/logging/GuiClientApiOperationEnum.java new file mode 100644 index 0000000..6bf7447 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/gui/logging/GuiClientApiOperationEnum.java @@ -0,0 +1,41 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.docker.host.servers.manager.gui.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum GuiClientApiOperationEnum implements EcompOperationEnum { + + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/logging/DockerHostManager.properties b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/logging/DockerHostManager.properties new file mode 100644 index 0000000..8c5a5fa --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/logging/DockerHostManager.properties @@ -0,0 +1,258 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +publicKey=\ + publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +configurationChanged=\ + configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateStreams=\ + updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +logs=\ + logs-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +metrics=\ + metrics-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +properties=\ + properties-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +uploadInfo=\ + uploadInfo-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getValues=\ + getValues-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getValuesAll=\ + getValuesAll-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getMessages=\ + getMessages-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getRequestLogger=\ + getRequestLogger-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +evaluate=\ + evaluate-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +update=\ + update-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateContainerConfiguration=\ + updateContainerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspendContainer=\ + suspendContainer-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resumeContainer=\ + resumeContainer-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +testContainer=\ + testContainer-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setupConfiguration=\ + setupConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_publicKey=\ + REMOTE-publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_configurationChanged=\ + REMOTE-configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateStreams=\ + REMOTE-updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_logs=\ + REMOTE-logs-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_metrics=\ + REMOTE-metrics-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_properties=\ + REMOTE-properties-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_uploadInfo=\ + REMOTE-uploadInfo-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getValues=\ + REMOTE-getValues-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getValuesAll=\ + REMOTE-getValuesAll-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getMessages=\ + REMOTE-getMessages-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getRequestLogger=\ + REMOTE-getRequestLogger-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_evaluate=\ + REMOTE-evaluate-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_update=\ + REMOTE-update-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateContainerConfiguration=\ + REMOTE-updateContainerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspendContainer=\ + REMOTE-suspendContainer-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resumeContainer=\ + REMOTE-resumeContainer-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_testContainer=\ + REMOTE-testContainer-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setupConfiguration=\ + REMOTE-setupConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/logging/DockerHostManagerMessageEnum.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/logging/DockerHostManagerMessageEnum.java new file mode 100644 index 0000000..3d6fd36 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/logging/DockerHostManagerMessageEnum.java @@ -0,0 +1,77 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.docker.host.servers.manager.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum DockerHostManagerMessageEnum implements EcompMessageEnum { + + dummy, + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + updateContainerConfiguration, + suspendContainer, + resumeContainer, + testContainer, + setupConfiguration, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams, + REMOTE_logs, + REMOTE_metrics, + REMOTE_properties, + REMOTE_uploadInfo, + REMOTE_getValues, + REMOTE_getValuesAll, + REMOTE_getMessages, + REMOTE_getRequestLogger, + REMOTE_evaluate, + REMOTE_update, + REMOTE_updateContainerConfiguration, + REMOTE_suspendContainer, + REMOTE_resumeContainer, + REMOTE_testContainer, + REMOTE_setupConfiguration; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.docker.host.servers.manager.logging.DockerHostManager"); + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/logging/DockerHostManagerOperationEnum.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/logging/DockerHostManagerOperationEnum.java new file mode 100644 index 0000000..5f78870 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/manager/logging/DockerHostManagerOperationEnum.java @@ -0,0 +1,71 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.docker.host.servers.manager.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum DockerHostManagerOperationEnum implements EcompOperationEnum { + + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + updateContainerConfiguration, + suspendContainer, + resumeContainer, + testContainer, + setupConfiguration, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams, + REMOTE_logs, + REMOTE_metrics, + REMOTE_properties, + REMOTE_uploadInfo, + REMOTE_getValues, + REMOTE_getValuesAll, + REMOTE_getMessages, + REMOTE_getRequestLogger, + REMOTE_evaluate, + REMOTE_update, + REMOTE_updateContainerConfiguration, + REMOTE_suspendContainer, + REMOTE_resumeContainer, + REMOTE_testContainer, + REMOTE_setupConfiguration; +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostService.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostService.java new file mode 100644 index 0000000..f1faaf4 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostService.java @@ -0,0 +1,408 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.docker.host.servers.service; + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.docker.host.servers.service.logging.DockerHostServiceOperationEnum; +import org.openecomp.dcae.controller.service.docker.host.servers.service.logging.DockerHostServiceMessageEnum; + + + + +import org.openecomp.dcae.controller.service.docker.host.service.impl.DockerHostServiceImpl; + + + +public class DcaeDockerHostService extends DockerHostServiceImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeDockerHostService.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeDockerHostServiceProvider controller; + ISiriusServer server; + + public DcaeDockerHostService(ISiriusServer server) { + this.server = server; + this.controller = new DcaeDockerHostServiceProvider(server,this); + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.START, duration_,instanceName,containerPath); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.deploy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.deploy(instanceName,containerPath); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.ERROR, duration_,instanceName,containerPath); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostServiceMessageEnum.deploy, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.OKAY, duration_,instanceName,containerPath); + + } + + public void undeploy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.undeploy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.undeploy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostServiceMessageEnum.undeploy, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.test); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.test(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostServiceMessageEnum.test, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public void suspend(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.suspend); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.suspend(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostServiceMessageEnum.suspend, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void resume(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.resume); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.resume(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostServiceMessageEnum.resume, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.pushManagerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.pushManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostServiceMessageEnum.pushManagerConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.pollManagerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.pollManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostServiceMessageEnum.pollManagerConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.managerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.managerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostServiceMessageEnum.managerConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.START, duration_,instanceName,operation,parameters); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.managerOperation); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.ERROR, duration_,instanceName,operation,parameters); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostServiceMessageEnum.managerOperation, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.OKAY, duration_,instanceName,operation,parameters); + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.updateConfigurationFromPolicy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostServiceMessageEnum.updateConfigurationFromPolicy, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void runHealthTests() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.runHealthTests); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.runHealthTests(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostServiceMessageEnum.runHealthTests, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.OKAY, duration_); + + } + + public void updateDeploymentStatus() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.updateDeploymentStatus); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.updateDeploymentStatus(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(DockerHostServiceMessageEnum.updateDeploymentStatus, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.OKAY, duration_); + + } + + + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + DcaeDockerHostServiceProvider.ecoreSetup(); + } + public DcaeDockerHostServiceProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceClient.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceClient.java new file mode 100644 index 0000000..74caf0f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceClient.java @@ -0,0 +1,276 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.docker.host.servers.service; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.docker.host.service.impl.DockerHostServiceImpl; +import org.openecomp.dcae.controller.service.docker.host.service.ServicePackage; +import org.openecomp.dcae.controller.service.docker.host.servers.service.logging.DockerHostServiceOperationEnum; +import org.openecomp.dcae.controller.service.docker.host.servers.service.logging.DockerHostServiceMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeDockerHostServiceClient extends DockerHostServiceImpl { + public static final Logger logger = Logger.getLogger(DcaeDockerHostServiceClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeDockerHostServiceClient(String file, String name) { + DcaeDockerHostService.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeDockerHostServiceClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeDockerHostServiceClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + EClass c = ServicePackage.eINSTANCE.getDockerHostService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.REMOTE_deploy); + + try { + client.operationPath("/resources", c, "deploy", null, instanceName,containerPath); + } + catch (Exception e) { + ecomplogger.warn(DockerHostServiceMessageEnum.REMOTE_deploy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@deploy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void undeploy(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getDockerHostService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.REMOTE_undeploy); + + try { + client.operationPath("/resources", c, "undeploy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(DockerHostServiceMessageEnum.REMOTE_undeploy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@undeploy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getDockerHostService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(DockerHostServiceMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@test: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getDockerHostService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(DockerHostServiceMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspend: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getDockerHostService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(DockerHostServiceMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@resume: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pushManagerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getDockerHostService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.REMOTE_pushManagerConfiguration); + + try { + client.operationPath("/resources", c, "pushManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(DockerHostServiceMessageEnum.REMOTE_pushManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@pushManagerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pollManagerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getDockerHostService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.REMOTE_pollManagerConfiguration); + + try { + client.operationPath("/resources", c, "pollManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(DockerHostServiceMessageEnum.REMOTE_pollManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@pollManagerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getDockerHostService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.REMOTE_managerConfiguration); + org.eclipse.emf.ecore.EObject res; + try { + res = (org.eclipse.emf.ecore.EObject) client.operationPath("/resources", c, "managerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(DockerHostServiceMessageEnum.REMOTE_managerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@managerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + EClass c = ServicePackage.eINSTANCE.getDockerHostService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.REMOTE_managerOperation); + org.json.JSONObject res; + try { + res = (org.json.JSONObject) client.operationPath("/resources", c, "managerOperation", null, instanceName,operation,parameters); + } + catch (Exception e) { + ecomplogger.warn(DockerHostServiceMessageEnum.REMOTE_managerOperation, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@managerOperation: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getDockerHostService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.REMOTE_updateConfigurationFromPolicy); + + try { + client.operationPath("/resources", c, "updateConfigurationFromPolicy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(DockerHostServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateConfigurationFromPolicy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void runHealthTests() { + EClass c = ServicePackage.eINSTANCE.getDockerHostService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.REMOTE_runHealthTests); + + try { + client.operationPath("/resources", c, "runHealthTests", null); + } + catch (Exception e) { + ecomplogger.warn(DockerHostServiceMessageEnum.REMOTE_runHealthTests, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@runHealthTests: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void updateDeploymentStatus() { + EClass c = ServicePackage.eINSTANCE.getDockerHostService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(DockerHostServiceOperationEnum.REMOTE_updateDeploymentStatus); + + try { + client.operationPath("/resources", c, "updateDeploymentStatus", null); + } + catch (Exception e) { + ecomplogger.warn(DockerHostServiceMessageEnum.REMOTE_updateDeploymentStatus, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateDeploymentStatus: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceConsole.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceConsole.java new file mode 100644 index 0000000..8749a1b --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceConsole.java @@ -0,0 +1,189 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.docker.host.servers.service; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeDockerHostServiceConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeDockerHostServiceConsole.class); + protected DcaeDockerHostServiceClient controller; + + + + + public DcaeDockerHostServiceConsole(String filename, String name) { + super(filename, name); + controller = new DcaeDockerHostServiceClient(filename,name); + client = controller.client; + + } + + public DcaeDockerHostServiceConsole(AbstractClient c) { + controller = new DcaeDockerHostServiceClient(c); + client = controller.client; + } + + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + try { + controller.deploy(instanceName,containerPath); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void undeploy(java.lang.String instanceName) { + + try { + controller.undeploy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend(java.lang.String instanceName) { + + try { + controller.suspend(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume(java.lang.String instanceName) { + + try { + controller.resume(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pushManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pollManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + try { + res = controller.managerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void runHealthTests() { + + try { + controller.runHealthTests(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void updateDeploymentStatus() { + + try { + controller.updateDeploymentStatus(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceProviderTemplate.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceProviderTemplate.java new file mode 100644 index 0000000..bc35e5b --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceProviderTemplate.java @@ -0,0 +1,65 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.docker.host.servers.service; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.dcae.controller.service.servers.vm.DcaeVirtualMachineServiceProvider; + + +import org.openecomp.dcae.controller.service.docker.host.service.impl.DockerHostServiceImpl; +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostService; + + +public class DcaeDockerHostServiceProviderTemplate extends DcaeVirtualMachineServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeDockerHostServiceProviderTemplate.class); + DockerHostService o; + + public DcaeDockerHostServiceProviderTemplate(ISiriusServer controller, DockerHostService o) { + super(controller, o); + this.o = o; + } + + + + + + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceServer.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceServer.java new file mode 100644 index 0000000..74e8d0d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeDockerHostServiceServer.java @@ -0,0 +1,98 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.docker.host.servers.service; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostService; + + + + + + +public class DcaeDockerHostServiceServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeDockerHostServiceServer.class); + String serverPath; + ManagementServer server; + DcaeDockerHostService controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeServiceFactory f = new DcaeServiceFactory(this); + + + + public DcaeDockerHostServiceServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeDockerHostService.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "DockerHostService", serverPath, filename); + server.addFactory(f); + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeDockerHostService) server.find("/").o; + webServer = new Jetty8Server("service.properties"); + webServer.add("/resources",server); + + + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeDockerHostServiceServer s = new DcaeDockerHostServiceServer("service.properties"); + s.runWebserver(); + } + public DockerHostService getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeServiceFactory.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeServiceFactory.java new file mode 100644 index 0000000..f7572b3 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/DcaeServiceFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.docker.host.servers.service; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostService; +import org.openecomp.dcae.controller.service.docker.host.service.ServicePackage; +import org.openecomp.dcae.controller.service.docker.host.service.impl.ServiceFactoryImpl; + + + + + +public class DcaeServiceFactory extends ServiceFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeServiceFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ServicePackage.eINSTANCE; } + public DcaeServiceFactory(ISiriusServer server) { + this.server = server; + } + @Override + public DockerHostService createDockerHostService() { + return new DcaeDockerHostService(server); + } + + + +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/logging/DockerHostService.properties b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/logging/DockerHostService.properties new file mode 100644 index 0000000..d32cf07 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/logging/DockerHostService.properties @@ -0,0 +1,150 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +deploy=\ + deploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +undeploy=\ + undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pushManagerConfiguration=\ + pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pollManagerConfiguration=\ + pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerConfiguration=\ + managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerOperation=\ + managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateConfigurationFromPolicy=\ + updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +runHealthTests=\ + runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateDeploymentStatus=\ + updateDeploymentStatus-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_deploy=\ + REMOTE-deploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_undeploy=\ + REMOTE-undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pushManagerConfiguration=\ + REMOTE-pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pollManagerConfiguration=\ + REMOTE-pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerConfiguration=\ + REMOTE-managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerOperation=\ + REMOTE-managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateConfigurationFromPolicy=\ + REMOTE-updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_runHealthTests=\ + REMOTE-runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateDeploymentStatus=\ + REMOTE-updateDeploymentStatus-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/logging/DockerHostServiceMessageEnum.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/logging/DockerHostServiceMessageEnum.java new file mode 100644 index 0000000..1987966 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/logging/DockerHostServiceMessageEnum.java @@ -0,0 +1,59 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.docker.host.servers.service.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum DockerHostServiceMessageEnum implements EcompMessageEnum { + + dummy, + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateDeploymentStatus, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateDeploymentStatus; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.docker.host.servers.service.logging.DockerHostService"); + } +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/logging/DockerHostServiceOperationEnum.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/logging/DockerHostServiceOperationEnum.java new file mode 100644 index 0000000..1efe437 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/docker/host/servers/service/logging/DockerHostServiceOperationEnum.java @@ -0,0 +1,53 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.docker.host.servers.service.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum DockerHostServiceOperationEnum implements EcompOperationEnum { + + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateDeploymentStatus, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateDeploymentStatus; +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.classpath b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.gitignore b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.project b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.project new file mode 100644 index 0000000..e7bb1ca --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.project @@ -0,0 +1,34 @@ + + + dcae-controller-service-docker-host-model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/LICENSE.txt b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/META-INF/MANIFEST.MF b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..53dbb83 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/META-INF/MANIFEST.MF @@ -0,0 +1,30 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: dcae-controller-service-docker-host-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.openecomp.dcae.controller.service.docker.host.manager, + org.openecomp.dcae.controller.service.docker.host.manager.impl, + org.openecomp.dcae.controller.service.docker.host.manager.util, + org.openecomp.dcae.controller.service.docker.host.service, + org.openecomp.dcae.controller.service.docker.host.service.impl, + org.openecomp.dcae.controller.service.docker.host.service.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + dcae-controller-core-model;visibility:=reexport, + dcae-controller-service-docker-host-model;visibility:=reexport, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-openstack-model;visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + dcae-controller-service-vm-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-agent-model;visibility:=reexport, + ncomp-docker-model;bundle-version="0.1.0";visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/build.properties b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/build.properties @@ -0,0 +1,11 @@ +# + +bin.includes = .,\ + src/main/xcore/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/xcore-gen/,\ + src/main/xcore/ +output.. = target/classes/ diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/plugin.properties b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/plugin.xml b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/plugin.xml new file mode 100644 index 0000000..8289338 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/plugin.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/pom.xml b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/pom.xml new file mode 100644 index 0000000..429223c --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/pom.xml @@ -0,0 +1,29 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-docker-host-model + + org.openecomp.ncomp.maven + ncomp-maven-xcore + 0.1.0-SNAPSHOT + ../../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore + + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-vm-model + ${project.version} + + + org.openecomp.ncomp.docker + ncomp-docker-model + ${project.version} + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/DockerHostManager.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/DockerHostManager.java new file mode 100644 index 0000000..8505e0f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/DockerHostManager.java @@ -0,0 +1,85 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.manager; + +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.stream.DcaeStream; +import org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Docker Host Manager'. + * + * + * + * @see org.openecomp.dcae.controller.service.docker.host.manager.ManagerPackage#getDockerHostManager() + * @model + * @generated + */ +public interface DockerHostManager extends VirtualMachineManager, DockerConfiguration { + + /** + * + * + * @model nameUnique="false" oUnique="false" inputStreamsUnique="false" inputStreamsMany="true" outputStreamsUnique="false" outputStreamsMany="true" + * @generated + */ + void updateContainerConfiguration(String name, EObject o, EList inputStreams, EList outputStreams); + + /** + * + * + * @model nameUnique="false" + * @generated + */ + void suspendContainer(String name); + + /** + * + * + * @model nameUnique="false" + * @generated + */ + void resumeContainer(String name); + + /** + * + * + * @model unique="false" nameUnique="false" + * @generated + */ + HealthTestResponse testContainer(String name); + + /** + * + * + * @model serviceUnique="false" instanceUnique="false" + * @generated + */ + void setupConfiguration(String service, String instance); +} // DockerHostManager diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/DockerManager.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/DockerManager.java new file mode 100644 index 0000000..935160e --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/DockerManager.java @@ -0,0 +1,40 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.manager; + +import org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration; +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; + +/** + * + * A representation of the model object 'Docker Manager'. + * + * + * + * @see org.openecomp.dcae.controller.service.docker.host.manager.ManagerPackage#getDockerManager() + * @model + * @generated + */ +public interface DockerManager extends VirtualMachineManager, DockerConfiguration { +} // DockerManager diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/ManagerFactory.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/ManagerFactory.java new file mode 100644 index 0000000..95bc2f5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/ManagerFactory.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.manager; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.docker.host.manager.ManagerPackage + * @generated + */ +public interface ManagerFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ManagerFactory eINSTANCE = org.openecomp.dcae.controller.service.docker.host.manager.impl.ManagerFactoryImpl.init(); + + /** + * Returns a new object of class 'Docker Host Manager'. + * + * + * @return a new object of class 'Docker Host Manager'. + * @generated + */ + DockerHostManager createDockerHostManager(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ManagerPackage getManagerPackage(); + +} //ManagerFactory diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/ManagerPackage.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/ManagerPackage.java new file mode 100644 index 0000000..0c86891 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/ManagerPackage.java @@ -0,0 +1,474 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.manager; + +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.docker.host.manager.ManagerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-docker-host-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.docker.host'" + * @generated + */ +public interface ManagerPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "manager"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.docker.host.manager"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "manager"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ManagerPackage eINSTANCE = org.openecomp.dcae.controller.service.docker.host.manager.impl.ManagerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.docker.host.manager.impl.DockerHostManagerImpl Docker Host Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.docker.host.manager.impl.DockerHostManagerImpl + * @see org.openecomp.dcae.controller.service.docker.host.manager.impl.ManagerPackageImpl#getDockerHostManager() + * @generated + */ + int DOCKER_HOST_MANAGER = 0; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER__INPUT_STREAMS = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER__OUTPUT_STREAMS = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__OUTPUT_STREAMS; + + /** + * The feature id for the 'Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER__CONFIGURATION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION; + + /** + * The feature id for the 'Component' containment reference. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER__COMPONENT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT; + + /** + * The feature id for the 'Docker Host' containment reference. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER__DOCKER_HOST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Docker Host Manager' class. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER_FEATURE_COUNT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 1; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___TEST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___TEST; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___SUSPEND = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___SUSPEND; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___RESUME = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___RESUME; + + /** + * The operation id for the 'Public Key' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___PUBLIC_KEY = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___PUBLIC_KEY; + + /** + * The operation id for the 'Configuration Changed' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___CONFIGURATION_CHANGED = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___CONFIGURATION_CHANGED; + + /** + * The operation id for the 'Update Streams' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___UPDATE_STREAMS__ELIST_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE_STREAMS__ELIST_ELIST; + + /** + * The operation id for the 'Logs' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___LOGS__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___LOGS__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Metrics' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___METRICS__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___METRICS__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Properties' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___PROPERTIES__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___PROPERTIES__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Upload Info' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Get Values' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + + /** + * The operation id for the 'Get Values All' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + + /** + * The operation id for the 'Get Messages' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG; + + /** + * The operation id for the 'Get Request Logger' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT; + + /** + * The operation id for the 'Evaluate' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___EVALUATE__STRING_FUNCTION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___EVALUATE__STRING_FUNCTION; + + /** + * The operation id for the 'Update' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___UPDATE__STRING_FUNCTION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE__STRING_FUNCTION; + + /** + * The operation id for the 'Update Container Configuration' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___UPDATE_CONTAINER_CONFIGURATION__STRING_EOBJECT_ELIST_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 0; + + /** + * The operation id for the 'Suspend Container' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___SUSPEND_CONTAINER__STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 1; + + /** + * The operation id for the 'Resume Container' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___RESUME_CONTAINER__STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 2; + + /** + * The operation id for the 'Test Container' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___TEST_CONTAINER__STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 3; + + /** + * The operation id for the 'Setup Configuration' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER___SETUP_CONFIGURATION__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 4; + + /** + * The number of operations of the 'Docker Host Manager' class. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_MANAGER_OPERATION_COUNT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 5; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager Docker Host Manager}'. + * + * + * @return the meta object for class 'Docker Host Manager'. + * @see org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager + * @generated + */ + EClass getDockerHostManager(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager#updateContainerConfiguration(java.lang.String, org.eclipse.emf.ecore.EObject, org.eclipse.emf.common.util.EList, org.eclipse.emf.common.util.EList) Update Container Configuration}' operation. + * + * + * @return the meta object for the 'Update Container Configuration' operation. + * @see org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager#updateContainerConfiguration(java.lang.String, org.eclipse.emf.ecore.EObject, org.eclipse.emf.common.util.EList, org.eclipse.emf.common.util.EList) + * @generated + */ + EOperation getDockerHostManager__UpdateContainerConfiguration__String_EObject_EList_EList(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager#suspendContainer(java.lang.String) Suspend Container}' operation. + * + * + * @return the meta object for the 'Suspend Container' operation. + * @see org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager#suspendContainer(java.lang.String) + * @generated + */ + EOperation getDockerHostManager__SuspendContainer__String(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager#resumeContainer(java.lang.String) Resume Container}' operation. + * + * + * @return the meta object for the 'Resume Container' operation. + * @see org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager#resumeContainer(java.lang.String) + * @generated + */ + EOperation getDockerHostManager__ResumeContainer__String(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager#testContainer(java.lang.String) Test Container}' operation. + * + * + * @return the meta object for the 'Test Container' operation. + * @see org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager#testContainer(java.lang.String) + * @generated + */ + EOperation getDockerHostManager__TestContainer__String(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager#setupConfiguration(java.lang.String, java.lang.String) Setup Configuration}' operation. + * + * + * @return the meta object for the 'Setup Configuration' operation. + * @see org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager#setupConfiguration(java.lang.String, java.lang.String) + * @generated + */ + EOperation getDockerHostManager__SetupConfiguration__String_String(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ManagerFactory getManagerFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.docker.host.manager.impl.DockerHostManagerImpl Docker Host Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.docker.host.manager.impl.DockerHostManagerImpl + * @see org.openecomp.dcae.controller.service.docker.host.manager.impl.ManagerPackageImpl#getDockerHostManager() + * @generated + */ + EClass DOCKER_HOST_MANAGER = eINSTANCE.getDockerHostManager(); + /** + * The meta object literal for the 'Update Container Configuration' operation. + * + * + * @generated + */ + EOperation DOCKER_HOST_MANAGER___UPDATE_CONTAINER_CONFIGURATION__STRING_EOBJECT_ELIST_ELIST = eINSTANCE.getDockerHostManager__UpdateContainerConfiguration__String_EObject_EList_EList(); + /** + * The meta object literal for the 'Suspend Container' operation. + * + * + * @generated + */ + EOperation DOCKER_HOST_MANAGER___SUSPEND_CONTAINER__STRING = eINSTANCE.getDockerHostManager__SuspendContainer__String(); + /** + * The meta object literal for the 'Resume Container' operation. + * + * + * @generated + */ + EOperation DOCKER_HOST_MANAGER___RESUME_CONTAINER__STRING = eINSTANCE.getDockerHostManager__ResumeContainer__String(); + /** + * The meta object literal for the 'Test Container' operation. + * + * + * @generated + */ + EOperation DOCKER_HOST_MANAGER___TEST_CONTAINER__STRING = eINSTANCE.getDockerHostManager__TestContainer__String(); + /** + * The meta object literal for the 'Setup Configuration' operation. + * + * + * @generated + */ + EOperation DOCKER_HOST_MANAGER___SETUP_CONFIGURATION__STRING_STRING = eINSTANCE.getDockerHostManager__SetupConfiguration__String_String(); + + } + +} //ManagerPackage diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/impl/DockerHostManagerImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/impl/DockerHostManagerImpl.java new file mode 100644 index 0000000..1d2bb16 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/impl/DockerHostManagerImpl.java @@ -0,0 +1,315 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.manager.impl; + +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.stream.DcaeStream; +import org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager; +import org.openecomp.dcae.controller.service.docker.host.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration; +import org.openecomp.dcae.controller.service.docker.host.service.ServicePackage; +import org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl; +import org.openecomp.ncomp.docker.DockerHost; +import java.lang.reflect.InvocationTargetException; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Docker Host Manager'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.docker.host.manager.impl.DockerHostManagerImpl#getDockerHost Docker Host}
  • + *
+ *

+ * + * @generated + */ +public class DockerHostManagerImpl extends VirtualMachineManagerImpl implements DockerHostManager { + /** + * The cached value of the '{@link #getDockerHost() Docker Host}' containment reference. + * + * + * @see #getDockerHost() + * @generated + * @ordered + */ + protected DockerHost dockerHost; + + /** + * + * + * @generated + */ + protected DockerHostManagerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ManagerPackage.Literals.DOCKER_HOST_MANAGER; + } + + /** + * + * + * @generated + */ + public DockerHost getDockerHost() { + return dockerHost; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetDockerHost(DockerHost newDockerHost, NotificationChain msgs) { + DockerHost oldDockerHost = dockerHost; + dockerHost = newDockerHost; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ManagerPackage.DOCKER_HOST_MANAGER__DOCKER_HOST, oldDockerHost, newDockerHost); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setDockerHost(DockerHost newDockerHost) { + if (newDockerHost != dockerHost) { + NotificationChain msgs = null; + if (dockerHost != null) + msgs = ((InternalEObject)dockerHost).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ManagerPackage.DOCKER_HOST_MANAGER__DOCKER_HOST, null, msgs); + if (newDockerHost != null) + msgs = ((InternalEObject)newDockerHost).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ManagerPackage.DOCKER_HOST_MANAGER__DOCKER_HOST, null, msgs); + msgs = basicSetDockerHost(newDockerHost, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.DOCKER_HOST_MANAGER__DOCKER_HOST, newDockerHost, newDockerHost)); + } + + /** + * + * + * @generated + */ + public void updateContainerConfiguration(String name, EObject o, EList inputStreams, EList outputStreams) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void suspendContainer(String name) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void resumeContainer(String name) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public HealthTestResponse testContainer(String name) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void setupConfiguration(String service, String instance) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ManagerPackage.DOCKER_HOST_MANAGER__DOCKER_HOST: + return basicSetDockerHost(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ManagerPackage.DOCKER_HOST_MANAGER__DOCKER_HOST: + return getDockerHost(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ManagerPackage.DOCKER_HOST_MANAGER__DOCKER_HOST: + setDockerHost((DockerHost)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ManagerPackage.DOCKER_HOST_MANAGER__DOCKER_HOST: + setDockerHost((DockerHost)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ManagerPackage.DOCKER_HOST_MANAGER__DOCKER_HOST: + return dockerHost != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == DockerConfiguration.class) { + switch (derivedFeatureID) { + case ManagerPackage.DOCKER_HOST_MANAGER__DOCKER_HOST: return ServicePackage.DOCKER_CONFIGURATION__DOCKER_HOST; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == DockerConfiguration.class) { + switch (baseFeatureID) { + case ServicePackage.DOCKER_CONFIGURATION__DOCKER_HOST: return ManagerPackage.DOCKER_HOST_MANAGER__DOCKER_HOST; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + @SuppressWarnings("unchecked") + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ManagerPackage.DOCKER_HOST_MANAGER___UPDATE_CONTAINER_CONFIGURATION__STRING_EOBJECT_ELIST_ELIST: + updateContainerConfiguration((String)arguments.get(0), (EObject)arguments.get(1), (EList)arguments.get(2), (EList)arguments.get(3)); + return null; + case ManagerPackage.DOCKER_HOST_MANAGER___SUSPEND_CONTAINER__STRING: + suspendContainer((String)arguments.get(0)); + return null; + case ManagerPackage.DOCKER_HOST_MANAGER___RESUME_CONTAINER__STRING: + resumeContainer((String)arguments.get(0)); + return null; + case ManagerPackage.DOCKER_HOST_MANAGER___TEST_CONTAINER__STRING: + return testContainer((String)arguments.get(0)); + case ManagerPackage.DOCKER_HOST_MANAGER___SETUP_CONFIGURATION__STRING_STRING: + setupConfiguration((String)arguments.get(0), (String)arguments.get(1)); + return null; + } + return super.eInvoke(operationID, arguments); + } + +} //DockerHostManagerImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/impl/ManagerFactoryImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/impl/ManagerFactoryImpl.java new file mode 100644 index 0000000..435884f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/impl/ManagerFactoryImpl.java @@ -0,0 +1,116 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.manager.impl; + +import org.openecomp.dcae.controller.service.docker.host.manager.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ManagerFactoryImpl extends EFactoryImpl implements ManagerFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ManagerFactory init() { + try { + ManagerFactory theManagerFactory = (ManagerFactory)EPackage.Registry.INSTANCE.getEFactory(ManagerPackage.eNS_URI); + if (theManagerFactory != null) { + return theManagerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ManagerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ManagerFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ManagerPackage.DOCKER_HOST_MANAGER: return createDockerHostManager(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public DockerHostManager createDockerHostManager() { + DockerHostManagerImpl dockerHostManager = new DockerHostManagerImpl(); + return dockerHostManager; + } + + /** + * + * + * @generated + */ + public ManagerPackage getManagerPackage() { + return (ManagerPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ManagerPackage getPackage() { + return ManagerPackage.eINSTANCE; + } + +} //ManagerFactoryImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/impl/ManagerPackageImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/impl/ManagerPackageImpl.java new file mode 100644 index 0000000..24277b7 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/impl/ManagerPackageImpl.java @@ -0,0 +1,270 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.manager.impl; + +import org.openecomp.dcae.controller.core.stream.StreamPackage; +import org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager; +import org.openecomp.dcae.controller.service.docker.host.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.docker.host.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.docker.host.service.ServicePackage; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ManagerPackageImpl extends EPackageImpl implements ManagerPackage { + /** + * + * + * @generated + */ + private EClass dockerHostManagerEClass = null; + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.docker.host.manager.ManagerPackage#eNS_URI + * @see #init() + * @generated + */ + private ManagerPackageImpl() { + super(eNS_URI, ManagerFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ManagerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ManagerPackage init() { + if (isInited) return (ManagerPackage)EPackage.Registry.INSTANCE.getEPackage(ManagerPackage.eNS_URI); + + // Obtain or create and register package + ManagerPackageImpl theManagerPackage = (ManagerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ManagerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ManagerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + VmmanagerPackage.eINSTANCE.eClass(); + ServicePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theManagerPackage.createPackageContents(); + + // Initialize created meta-data + theManagerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theManagerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ManagerPackage.eNS_URI, theManagerPackage); + return theManagerPackage; + } + + /** + * + * + * @generated + */ + public EClass getDockerHostManager() { + return dockerHostManagerEClass; + } + + /** + * + * + * @generated + */ + public EOperation getDockerHostManager__UpdateContainerConfiguration__String_EObject_EList_EList() { + return dockerHostManagerEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EOperation getDockerHostManager__SuspendContainer__String() { + return dockerHostManagerEClass.getEOperations().get(1); + } + + /** + * + * + * @generated + */ + public EOperation getDockerHostManager__ResumeContainer__String() { + return dockerHostManagerEClass.getEOperations().get(2); + } + + /** + * + * + * @generated + */ + public EOperation getDockerHostManager__TestContainer__String() { + return dockerHostManagerEClass.getEOperations().get(3); + } + + /** + * + * + * @generated + */ + public EOperation getDockerHostManager__SetupConfiguration__String_String() { + return dockerHostManagerEClass.getEOperations().get(4); + } + + /** + * + * + * @generated + */ + public ManagerFactory getManagerFactory() { + return (ManagerFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + dockerHostManagerEClass = createEClass(DOCKER_HOST_MANAGER); + createEOperation(dockerHostManagerEClass, DOCKER_HOST_MANAGER___UPDATE_CONTAINER_CONFIGURATION__STRING_EOBJECT_ELIST_ELIST); + createEOperation(dockerHostManagerEClass, DOCKER_HOST_MANAGER___SUSPEND_CONTAINER__STRING); + createEOperation(dockerHostManagerEClass, DOCKER_HOST_MANAGER___RESUME_CONTAINER__STRING); + createEOperation(dockerHostManagerEClass, DOCKER_HOST_MANAGER___TEST_CONTAINER__STRING); + createEOperation(dockerHostManagerEClass, DOCKER_HOST_MANAGER___SETUP_CONFIGURATION__STRING_STRING); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + VmmanagerPackage theVmmanagerPackage = (VmmanagerPackage)EPackage.Registry.INSTANCE.getEPackage(VmmanagerPackage.eNS_URI); + ServicePackage theServicePackage = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + StreamPackage theStreamPackage = (StreamPackage)EPackage.Registry.INSTANCE.getEPackage(StreamPackage.eNS_URI); + org.openecomp.dcae.controller.core.service.ServicePackage theServicePackage_1 = (org.openecomp.dcae.controller.core.service.ServicePackage)EPackage.Registry.INSTANCE.getEPackage(org.openecomp.dcae.controller.core.service.ServicePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + dockerHostManagerEClass.getESuperTypes().add(theVmmanagerPackage.getVirtualMachineManager()); + dockerHostManagerEClass.getESuperTypes().add(theServicePackage.getDockerConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(dockerHostManagerEClass, DockerHostManager.class, "DockerHostManager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + EOperation op = initEOperation(getDockerHostManager__UpdateContainerConfiguration__String_EObject_EList_EList(), null, "updateContainerConfiguration", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "name", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEObject(), "o", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theStreamPackage.getDcaeStream(), "inputStreams", 0, -1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theStreamPackage.getDcaeStream(), "outputStreams", 0, -1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getDockerHostManager__SuspendContainer__String(), null, "suspendContainer", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "name", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getDockerHostManager__ResumeContainer__String(), null, "resumeContainer", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "name", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getDockerHostManager__TestContainer__String(), theServicePackage_1.getHealthTestResponse(), "testContainer", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "name", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getDockerHostManager__SetupConfiguration__String_String(), null, "setupConfiguration", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "service", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "instance", 0, 1, !IS_UNIQUE, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //ManagerPackageImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/util/ManagerAdapterFactory.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/util/ManagerAdapterFactory.java new file mode 100644 index 0000000..52b5aef --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/util/ManagerAdapterFactory.java @@ -0,0 +1,257 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; +import org.openecomp.dcae.controller.service.docker.host.manager.*; + +import org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.docker.host.manager.ManagerPackage + * @generated + */ +public class ManagerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ManagerAdapterFactory() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ManagerSwitch modelSwitch = + new ManagerSwitch() { + @Override + public Adapter caseDockerHostManager(DockerHostManager object) { + return createDockerHostManagerAdapter(); + } + @Override + public Adapter caseDcaeManager(DcaeManager object) { + return createDcaeManagerAdapter(); + } + @Override + public Adapter caseSouthBoundApi(SouthBoundApi object) { + return createSouthBoundApiAdapter(); + } + @Override + public Adapter caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return createSouthBoundApiWithProxyAdapter(); + } + @Override + public Adapter caseAbstractManagementServer(AbstractManagementServer object) { + return createAbstractManagementServerAdapter(); + } + @Override + public Adapter caseVirtualMachineManager(VirtualMachineManager object) { + return createVirtualMachineManagerAdapter(); + } + @Override + public Adapter caseDockerConfiguration(DockerConfiguration object) { + return createDockerConfigurationAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager Docker Host Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.docker.host.manager.DockerHostManager + * @generated + */ + public Adapter createDockerHostManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.manager.DcaeManager Dcae Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager + * @generated + */ + public Adapter createDcaeManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApi South Bound Api}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApi + * @generated + */ + public Adapter createSouthBoundApiAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy South Bound Api With Proxy}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy + * @generated + */ + public Adapter createSouthBoundApiWithProxyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer Abstract Management Server}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer + * @generated + */ + public Adapter createAbstractManagementServerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager Virtual Machine Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager + * @generated + */ + public Adapter createVirtualMachineManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration Docker Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration + * @generated + */ + public Adapter createDockerConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ManagerAdapterFactory diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/util/ManagerSwitch.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/util/ManagerSwitch.java new file mode 100644 index 0000000..ecd7d03 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/manager/util/ManagerSwitch.java @@ -0,0 +1,235 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; +import org.openecomp.dcae.controller.service.docker.host.manager.*; + +import org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.docker.host.manager.ManagerPackage + * @generated + */ +public class ManagerSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ManagerSwitch() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ManagerPackage.DOCKER_HOST_MANAGER: { + DockerHostManager dockerHostManager = (DockerHostManager)theEObject; + T result = caseDockerHostManager(dockerHostManager); + if (result == null) result = caseVirtualMachineManager(dockerHostManager); + if (result == null) result = caseDockerConfiguration(dockerHostManager); + if (result == null) result = caseDcaeManager(dockerHostManager); + if (result == null) result = caseAbstractManagementServer(dockerHostManager); + if (result == null) result = caseSouthBoundApiWithProxy(dockerHostManager); + if (result == null) result = caseSouthBoundApi(dockerHostManager); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Docker Host Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Docker Host Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDockerHostManager(DockerHostManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeManager(DcaeManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'South Bound Api'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'South Bound Api'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApi(SouthBoundApi object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'South Bound Api With Proxy'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'South Bound Api With Proxy'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Abstract Management Server'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Abstract Management Server'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAbstractManagementServer(AbstractManagementServer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineManager(VirtualMachineManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Docker Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Docker Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDockerConfiguration(DockerConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ManagerSwitch diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerConfiguration.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerConfiguration.java new file mode 100644 index 0000000..34098d8 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerConfiguration.java @@ -0,0 +1,74 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.service; + +import org.openecomp.ncomp.docker.DockerHost; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Docker Configuration'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration#getDockerHost Docker Host}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.docker.host.service.ServicePackage#getDockerConfiguration() + * @model + * @generated + */ +public interface DockerConfiguration extends EObject { + /** + * Returns the value of the 'Docker Host' containment reference. + * + *

+ * If the meaning of the 'Docker Host' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Docker Host' containment reference. + * @see #setDockerHost(DockerHost) + * @see org.openecomp.dcae.controller.service.docker.host.service.ServicePackage#getDockerConfiguration_DockerHost() + * @model containment="true" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + DockerHost getDockerHost(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration#getDockerHost Docker Host}' containment reference. + * + * + * @param value the new value of the 'Docker Host' containment reference. + * @see #getDockerHost() + * @generated + */ + void setDockerHost(DockerHost value); + +} // DockerConfiguration diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerHostService.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerHostService.java new file mode 100644 index 0000000..16aed28 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerHostService.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; + +/** + * + * A representation of the model object 'Docker Host Service'. + * + * + * + * @see org.openecomp.dcae.controller.service.docker.host.service.ServicePackage#getDockerHostService() + * @model + * @generated + */ +public interface DockerHostService extends VirtualMachineService { +} // DockerHostService diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerHostServiceInstance.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerHostServiceInstance.java new file mode 100644 index 0000000..8479743 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerHostServiceInstance.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +/** + * + * A representation of the model object 'Docker Host Service Instance'. + * + * + * + * @see org.openecomp.dcae.controller.service.docker.host.service.ServicePackage#getDockerHostServiceInstance() + * @model + * @generated + */ +public interface DockerHostServiceInstance extends VirtualMachineServiceInstance, DockerConfiguration { +} // DockerHostServiceInstance diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerService.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerService.java new file mode 100644 index 0000000..d58281e --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerService.java @@ -0,0 +1,40 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; + +/** + * + * A representation of the model object 'Docker Service'. + * + * + * + * @see org.openecomp.dcae.controller.service.docker.host.service.ServicePackage#getDockerService() + * @model + * @generated + */ +public interface DockerService extends VirtualMachineService { + +} // DockerService diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerServiceInstance.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerServiceInstance.java new file mode 100644 index 0000000..7f65da3 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/DockerServiceInstance.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +/** + * + * A representation of the model object 'Docker Service Instance'. + * + * + * + * @see org.openecomp.dcae.controller.service.docker.host.service.ServicePackage#getDockerServiceInstance() + * @model + * @generated + */ +public interface DockerServiceInstance extends VirtualMachineServiceInstance, DockerConfiguration { +} // DockerServiceInstance diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/ServiceFactory.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/ServiceFactory.java new file mode 100644 index 0000000..6c462d8 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/ServiceFactory.java @@ -0,0 +1,81 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.service; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.docker.host.service.ServicePackage + * @generated + */ +public interface ServiceFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ServiceFactory eINSTANCE = org.openecomp.dcae.controller.service.docker.host.service.impl.ServiceFactoryImpl.init(); + + /** + * Returns a new object of class 'Docker Host Service'. + * + * + * @return a new object of class 'Docker Host Service'. + * @generated + */ + DockerHostService createDockerHostService(); + + /** + * Returns a new object of class 'Docker Host Service Instance'. + * + * + * @return a new object of class 'Docker Host Service Instance'. + * @generated + */ + DockerHostServiceInstance createDockerHostServiceInstance(); + + /** + * Returns a new object of class 'Docker Configuration'. + * + * + * @return a new object of class 'Docker Configuration'. + * @generated + */ + DockerConfiguration createDockerConfiguration(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ServicePackage getServicePackage(); + +} //ServiceFactory diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/ServicePackage.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/ServicePackage.java new file mode 100644 index 0000000..aa3729d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/ServicePackage.java @@ -0,0 +1,739 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.service; + +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.docker.host.service.ServiceFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-docker-host-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.docker.host'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org'" + * @generated + */ +public interface ServicePackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "service"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.docker.host.service"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "service"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ServicePackage eINSTANCE = org.openecomp.dcae.controller.service.docker.host.service.impl.ServicePackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.docker.host.service.impl.DockerHostServiceImpl Docker Host Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.docker.host.service.impl.DockerHostServiceImpl + * @see org.openecomp.dcae.controller.service.docker.host.service.impl.ServicePackageImpl#getDockerHostService() + * @generated + */ + int DOCKER_HOST_SERVICE = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE__NAME = VmPackage.VIRTUAL_MACHINE_SERVICE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE__LAST_POLLED = VmPackage.VIRTUAL_MACHINE_SERVICE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE__LAST_CHANGED = VmPackage.VIRTUAL_MACHINE_SERVICE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE__CREATED = VmPackage.VIRTUAL_MACHINE_SERVICE__CREATED; + + /** + * The feature id for the 'Instances' containment reference list. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE__INSTANCES = VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE__MANAGER_PORT_NUMBER = VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER; + + /** + * The number of structural features of the 'Docker Host Service' class. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_FEATURE_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_FEATURE_COUNT + 0; + + /** + * The operation id for the 'Deploy' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE___DEPLOY__STRING_STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___DEPLOY__STRING_STRING; + + /** + * The operation id for the 'Undeploy' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE___UNDEPLOY__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___UNDEPLOY__STRING; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE___TEST__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___TEST__STRING; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE___SUSPEND__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___SUSPEND__STRING; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE___RESUME__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___RESUME__STRING; + + /** + * The operation id for the 'Push Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Poll Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE___POLL_MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___POLL_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE___MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Operation' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT = VmPackage.VIRTUAL_MACHINE_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT; + + /** + * The operation id for the 'Update Configuration From Policy' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING; + + /** + * The operation id for the 'Run Health Tests' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE___RUN_HEALTH_TESTS = VmPackage.VIRTUAL_MACHINE_SERVICE___RUN_HEALTH_TESTS; + + /** + * The operation id for the 'Update Deployment Status' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE___UPDATE_DEPLOYMENT_STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS; + + /** + * The number of operations of the 'Docker Host Service' class. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_OPERATION_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.docker.host.service.impl.DockerHostServiceInstanceImpl Docker Host Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.docker.host.service.impl.DockerHostServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.docker.host.service.impl.ServicePackageImpl#getDockerHostServiceInstance() + * @generated + */ + int DOCKER_HOST_SERVICE_INSTANCE = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__NAME = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__LAST_POLLED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__LAST_CHANGED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__CREATED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CREATED; + + /** + * The feature id for the 'Service Container' reference. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__SERVICE_CONTAINER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_CONTAINER; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STATUS; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__INPUT_STREAMS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__OUTPUT_STREAMS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OUTPUT_STREAMS; + + /** + * The feature id for the 'Last Health Test' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__LAST_HEALTH_TEST = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_HEALTH_TEST; + + /** + * The feature id for the 'Health Test Status' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__HEALTH_TEST_STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__HEALTH_TEST_STATUS; + + /** + * The feature id for the 'Health Test Message Code' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE; + + /** + * The feature id for the 'Configuration' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__CONFIGURATION = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION; + + /** + * The feature id for the 'Location' reference. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__LOCATION = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION; + + /** + * The feature id for the 'Vm Type' reference. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__VM_TYPE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE; + + /** + * The feature id for the 'Users' reference list. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__USERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS; + + /** + * The feature id for the 'Admin Users' reference list. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__ADMIN_USERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS; + + /** + * The feature id for the 'Application Ids' attribute list. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__APPLICATION_IDS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS; + + /** + * The feature id for the 'Admin Id' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__ADMIN_ID = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID; + + /** + * The feature id for the 'Number Of Servers' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__NUMBER_OF_SERVERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS; + + /** + * The feature id for the 'Availability Zone' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__AVAILABILITY_ZONE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__MANAGER_PORT_NUMBER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER; + + /** + * The feature id for the 'Servers' containment reference list. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__SERVERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS; + + /** + * The feature id for the 'Leader Server' reference. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__LEADER_SERVER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER; + + /** + * The feature id for the 'Service' container reference. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__SERVICE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE; + + /** + * The feature id for the 'Ieds Admin' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__IEDS_ADMIN = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN; + + /** + * The feature id for the 'Chef User' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__CHEF_USER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER; + + /** + * The feature id for the 'Chef Org' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__CHEF_ORG = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG; + + /** + * The feature id for the 'Chef Topology' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__CHEF_TOPOLOGY = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY; + + /** + * The feature id for the 'Openstack Flavor' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__OPENSTACK_FLAVOR = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR; + + /** + * The feature id for the 'Service Fqdn' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__SERVICE_FQDN = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN; + + /** + * The feature id for the 'Deployment Timeout Minutes' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES; + + /** + * The feature id for the 'Steps' containment reference list. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__STEPS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS; + + /** + * The feature id for the 'Docker Host' containment reference. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE__DOCKER_HOST = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Docker Host Service Instance' class. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE_FEATURE_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Docker Host Service Instance' class. + * + * + * @generated + * @ordered + */ + int DOCKER_HOST_SERVICE_INSTANCE_OPERATION_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.docker.host.service.impl.DockerConfigurationImpl Docker Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.docker.host.service.impl.DockerConfigurationImpl + * @see org.openecomp.dcae.controller.service.docker.host.service.impl.ServicePackageImpl#getDockerConfiguration() + * @generated + */ + int DOCKER_CONFIGURATION = 2; + + /** + * The feature id for the 'Docker Host' containment reference. + * + * + * @generated + * @ordered + */ + int DOCKER_CONFIGURATION__DOCKER_HOST = 0; + + /** + * The number of structural features of the 'Docker Configuration' class. + * + * + * @generated + * @ordered + */ + int DOCKER_CONFIGURATION_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Docker Configuration' class. + * + * + * @generated + * @ordered + */ + int DOCKER_CONFIGURATION_OPERATION_COUNT = 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.docker.host.service.DockerHostService Docker Host Service}'. + * + * + * @return the meta object for class 'Docker Host Service'. + * @see org.openecomp.dcae.controller.service.docker.host.service.DockerHostService + * @generated + */ + EClass getDockerHostService(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.docker.host.service.DockerHostServiceInstance Docker Host Service Instance}'. + * + * + * @return the meta object for class 'Docker Host Service Instance'. + * @see org.openecomp.dcae.controller.service.docker.host.service.DockerHostServiceInstance + * @generated + */ + EClass getDockerHostServiceInstance(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration Docker Configuration}'. + * + * + * @return the meta object for class 'Docker Configuration'. + * @see org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration + * @generated + */ + EClass getDockerConfiguration(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration#getDockerHost Docker Host}'. + * + * + * @return the meta object for the containment reference 'Docker Host'. + * @see org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration#getDockerHost() + * @see #getDockerConfiguration() + * @generated + */ + EReference getDockerConfiguration_DockerHost(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ServiceFactory getServiceFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.docker.host.service.impl.DockerHostServiceImpl Docker Host Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.docker.host.service.impl.DockerHostServiceImpl + * @see org.openecomp.dcae.controller.service.docker.host.service.impl.ServicePackageImpl#getDockerHostService() + * @generated + */ + EClass DOCKER_HOST_SERVICE = eINSTANCE.getDockerHostService(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.docker.host.service.impl.DockerHostServiceInstanceImpl Docker Host Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.docker.host.service.impl.DockerHostServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.docker.host.service.impl.ServicePackageImpl#getDockerHostServiceInstance() + * @generated + */ + EClass DOCKER_HOST_SERVICE_INSTANCE = eINSTANCE.getDockerHostServiceInstance(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.docker.host.service.impl.DockerConfigurationImpl Docker Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.docker.host.service.impl.DockerConfigurationImpl + * @see org.openecomp.dcae.controller.service.docker.host.service.impl.ServicePackageImpl#getDockerConfiguration() + * @generated + */ + EClass DOCKER_CONFIGURATION = eINSTANCE.getDockerConfiguration(); + + /** + * The meta object literal for the 'Docker Host' containment reference feature. + * + * + * @generated + */ + EReference DOCKER_CONFIGURATION__DOCKER_HOST = eINSTANCE.getDockerConfiguration_DockerHost(); + + } + +} //ServicePackage diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/DockerConfigurationImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/DockerConfigurationImpl.java new file mode 100644 index 0000000..fea3eb2 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/DockerConfigurationImpl.java @@ -0,0 +1,198 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.service.impl; + +import org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration; +import org.openecomp.dcae.controller.service.docker.host.service.ServicePackage; + +import org.openecomp.ncomp.docker.DockerHost; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Docker Configuration'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.docker.host.service.impl.DockerConfigurationImpl#getDockerHost Docker Host}
  • + *
+ *

+ * + * @generated + */ +public class DockerConfigurationImpl extends MinimalEObjectImpl.Container implements DockerConfiguration { + /** + * The cached value of the '{@link #getDockerHost() Docker Host}' containment reference. + * + * + * @see #getDockerHost() + * @generated + * @ordered + */ + protected DockerHost dockerHost; + + /** + * + * + * @generated + */ + protected DockerConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.DOCKER_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public DockerHost getDockerHost() { + return dockerHost; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetDockerHost(DockerHost newDockerHost, NotificationChain msgs) { + DockerHost oldDockerHost = dockerHost; + dockerHost = newDockerHost; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServicePackage.DOCKER_CONFIGURATION__DOCKER_HOST, oldDockerHost, newDockerHost); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setDockerHost(DockerHost newDockerHost) { + if (newDockerHost != dockerHost) { + NotificationChain msgs = null; + if (dockerHost != null) + msgs = ((InternalEObject)dockerHost).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServicePackage.DOCKER_CONFIGURATION__DOCKER_HOST, null, msgs); + if (newDockerHost != null) + msgs = ((InternalEObject)newDockerHost).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServicePackage.DOCKER_CONFIGURATION__DOCKER_HOST, null, msgs); + msgs = basicSetDockerHost(newDockerHost, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DOCKER_CONFIGURATION__DOCKER_HOST, newDockerHost, newDockerHost)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.DOCKER_CONFIGURATION__DOCKER_HOST: + return basicSetDockerHost(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.DOCKER_CONFIGURATION__DOCKER_HOST: + return getDockerHost(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.DOCKER_CONFIGURATION__DOCKER_HOST: + setDockerHost((DockerHost)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.DOCKER_CONFIGURATION__DOCKER_HOST: + setDockerHost((DockerHost)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.DOCKER_CONFIGURATION__DOCKER_HOST: + return dockerHost != null; + } + return super.eIsSet(featureID); + } + +} //DockerConfigurationImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/DockerHostServiceImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/DockerHostServiceImpl.java new file mode 100644 index 0000000..0b42225 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/DockerHostServiceImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.service.impl; + +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostService; +import org.openecomp.dcae.controller.service.docker.host.service.ServicePackage; + +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Docker Host Service'. + * + *

+ *

+ * + * @generated + */ +public class DockerHostServiceImpl extends VirtualMachineServiceImpl implements DockerHostService { + /** + * + * + * @generated + */ + protected DockerHostServiceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.DOCKER_HOST_SERVICE; + } + +} //DockerHostServiceImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/DockerHostServiceInstanceImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/DockerHostServiceInstanceImpl.java new file mode 100644 index 0000000..c3d0853 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/DockerHostServiceInstanceImpl.java @@ -0,0 +1,232 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.service.impl; + +import org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration; +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostServiceInstance; +import org.openecomp.dcae.controller.service.docker.host.service.ServicePackage; + +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl; + +import org.openecomp.ncomp.docker.DockerHost; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Docker Host Service Instance'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.docker.host.service.impl.DockerHostServiceInstanceImpl#getDockerHost Docker Host}
  • + *
+ *

+ * + * @generated + */ +public class DockerHostServiceInstanceImpl extends VirtualMachineServiceInstanceImpl implements DockerHostServiceInstance { + /** + * The cached value of the '{@link #getDockerHost() Docker Host}' containment reference. + * + * + * @see #getDockerHost() + * @generated + * @ordered + */ + protected DockerHost dockerHost; + + /** + * + * + * @generated + */ + protected DockerHostServiceInstanceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.DOCKER_HOST_SERVICE_INSTANCE; + } + + /** + * + * + * @generated + */ + public DockerHost getDockerHost() { + return dockerHost; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetDockerHost(DockerHost newDockerHost, NotificationChain msgs) { + DockerHost oldDockerHost = dockerHost; + dockerHost = newDockerHost; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServicePackage.DOCKER_HOST_SERVICE_INSTANCE__DOCKER_HOST, oldDockerHost, newDockerHost); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setDockerHost(DockerHost newDockerHost) { + if (newDockerHost != dockerHost) { + NotificationChain msgs = null; + if (dockerHost != null) + msgs = ((InternalEObject)dockerHost).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServicePackage.DOCKER_HOST_SERVICE_INSTANCE__DOCKER_HOST, null, msgs); + if (newDockerHost != null) + msgs = ((InternalEObject)newDockerHost).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServicePackage.DOCKER_HOST_SERVICE_INSTANCE__DOCKER_HOST, null, msgs); + msgs = basicSetDockerHost(newDockerHost, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DOCKER_HOST_SERVICE_INSTANCE__DOCKER_HOST, newDockerHost, newDockerHost)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.DOCKER_HOST_SERVICE_INSTANCE__DOCKER_HOST: + return basicSetDockerHost(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.DOCKER_HOST_SERVICE_INSTANCE__DOCKER_HOST: + return getDockerHost(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.DOCKER_HOST_SERVICE_INSTANCE__DOCKER_HOST: + setDockerHost((DockerHost)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.DOCKER_HOST_SERVICE_INSTANCE__DOCKER_HOST: + setDockerHost((DockerHost)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.DOCKER_HOST_SERVICE_INSTANCE__DOCKER_HOST: + return dockerHost != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == DockerConfiguration.class) { + switch (derivedFeatureID) { + case ServicePackage.DOCKER_HOST_SERVICE_INSTANCE__DOCKER_HOST: return ServicePackage.DOCKER_CONFIGURATION__DOCKER_HOST; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == DockerConfiguration.class) { + switch (baseFeatureID) { + case ServicePackage.DOCKER_CONFIGURATION__DOCKER_HOST: return ServicePackage.DOCKER_HOST_SERVICE_INSTANCE__DOCKER_HOST; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} //DockerHostServiceInstanceImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/ServiceFactoryImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/ServiceFactoryImpl.java new file mode 100644 index 0000000..750dc5d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/ServiceFactoryImpl.java @@ -0,0 +1,138 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.service.impl; + +import org.openecomp.dcae.controller.service.docker.host.service.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ServiceFactoryImpl extends EFactoryImpl implements ServiceFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ServiceFactory init() { + try { + ServiceFactory theServiceFactory = (ServiceFactory)EPackage.Registry.INSTANCE.getEFactory(ServicePackage.eNS_URI); + if (theServiceFactory != null) { + return theServiceFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ServiceFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ServiceFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ServicePackage.DOCKER_HOST_SERVICE: return createDockerHostService(); + case ServicePackage.DOCKER_HOST_SERVICE_INSTANCE: return createDockerHostServiceInstance(); + case ServicePackage.DOCKER_CONFIGURATION: return createDockerConfiguration(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public DockerHostService createDockerHostService() { + DockerHostServiceImpl dockerHostService = new DockerHostServiceImpl(); + return dockerHostService; + } + + /** + * + * + * @generated + */ + public DockerHostServiceInstance createDockerHostServiceInstance() { + DockerHostServiceInstanceImpl dockerHostServiceInstance = new DockerHostServiceInstanceImpl(); + return dockerHostServiceInstance; + } + + /** + * + * + * @generated + */ + public DockerConfiguration createDockerConfiguration() { + DockerConfigurationImpl dockerConfiguration = new DockerConfigurationImpl(); + return dockerConfiguration; + } + + /** + * + * + * @generated + */ + public ServicePackage getServicePackage() { + return (ServicePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ServicePackage getPackage() { + return ServicePackage.eINSTANCE; + } + +} //ServiceFactoryImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/ServicePackageImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/ServicePackageImpl.java new file mode 100644 index 0000000..20c8469 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/impl/ServicePackageImpl.java @@ -0,0 +1,289 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.service.impl; + +import org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration; +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostService; +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostServiceInstance; +import org.openecomp.dcae.controller.service.docker.host.service.ServiceFactory; +import org.openecomp.dcae.controller.service.docker.host.service.ServicePackage; +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.openecomp.ncomp.docker.DockerPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ServicePackageImpl extends EPackageImpl implements ServicePackage { + /** + * + * + * @generated + */ + private EClass dockerHostServiceEClass = null; + + /** + * + * + * @generated + */ + private EClass dockerHostServiceInstanceEClass = null; + + /** + * + * + * @generated + */ + private EClass dockerConfigurationEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.docker.host.service.ServicePackage#eNS_URI + * @see #init() + * @generated + */ + private ServicePackageImpl() { + super(eNS_URI, ServiceFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ServicePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ServicePackage init() { + if (isInited) return (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + + // Obtain or create and register package + ServicePackageImpl theServicePackage = (ServicePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ServicePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ServicePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + VmPackage.eINSTANCE.eClass(); + DockerPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theServicePackage.createPackageContents(); + + // Initialize created meta-data + theServicePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theServicePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ServicePackage.eNS_URI, theServicePackage); + return theServicePackage; + } + + /** + * + * + * @generated + */ + public EClass getDockerHostService() { + return dockerHostServiceEClass; + } + + /** + * + * + * @generated + */ + public EClass getDockerHostServiceInstance() { + return dockerHostServiceInstanceEClass; + } + + /** + * + * + * @generated + */ + public EClass getDockerConfiguration() { + return dockerConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EReference getDockerConfiguration_DockerHost() { + return (EReference)dockerConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public ServiceFactory getServiceFactory() { + return (ServiceFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + dockerHostServiceEClass = createEClass(DOCKER_HOST_SERVICE); + + dockerHostServiceInstanceEClass = createEClass(DOCKER_HOST_SERVICE_INSTANCE); + + dockerConfigurationEClass = createEClass(DOCKER_CONFIGURATION); + createEReference(dockerConfigurationEClass, DOCKER_CONFIGURATION__DOCKER_HOST); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + VmPackage theVmPackage = (VmPackage)EPackage.Registry.INSTANCE.getEPackage(VmPackage.eNS_URI); + DockerPackage theDockerPackage = (DockerPackage)EPackage.Registry.INSTANCE.getEPackage(DockerPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + dockerHostServiceEClass.getESuperTypes().add(theVmPackage.getVirtualMachineService()); + dockerHostServiceInstanceEClass.getESuperTypes().add(theVmPackage.getVirtualMachineServiceInstance()); + dockerHostServiceInstanceEClass.getESuperTypes().add(this.getDockerConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(dockerHostServiceEClass, DockerHostService.class, "DockerHostService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(dockerHostServiceInstanceEClass, DockerHostServiceInstance.class, "DockerHostServiceInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(dockerConfigurationEClass, DockerConfiguration.class, "DockerConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDockerConfiguration_DockerHost(), theDockerPackage.getDockerHost(), null, "dockerHost", null, 0, 1, DockerConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + // http://openecomp.org + createEcompAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "ecomp", "http://openecomp.org" + }); + } + + /** + * Initializes the annotations for http://openecomp.org. + * + * + * @generated + */ + protected void createEcompAnnotations() { + String source = "http://openecomp.org"; + addAnnotation + (getDockerConfiguration_DockerHost(), + source, + new String[] { + "type", "configuration" + }); + } + +} //ServicePackageImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/util/ServiceAdapterFactory.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/util/ServiceAdapterFactory.java new file mode 100644 index 0000000..d282ac2 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/util/ServiceAdapterFactory.java @@ -0,0 +1,294 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.docker.host.service.*; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.docker.host.service.ServicePackage + * @generated + */ +public class ServiceAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ServiceAdapterFactory() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ServiceSwitch modelSwitch = + new ServiceSwitch() { + @Override + public Adapter caseDockerHostService(DockerHostService object) { + return createDockerHostServiceAdapter(); + } + @Override + public Adapter caseDockerHostServiceInstance(DockerHostServiceInstance object) { + return createDockerHostServiceInstanceAdapter(); + } + @Override + public Adapter caseDockerConfiguration(DockerConfiguration object) { + return createDockerConfigurationAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseDcaeService(DcaeService object) { + return createDcaeServiceAdapter(); + } + @Override + public Adapter caseVirtualMachineService(VirtualMachineService object) { + return createVirtualMachineServiceAdapter(); + } + @Override + public Adapter caseDcaeServiceInstance(DcaeServiceInstance object) { + return createDcaeServiceInstanceAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceConfiguration(VirtualMachineServiceConfiguration object) { + return createVirtualMachineServiceConfigurationAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceInstance(VirtualMachineServiceInstance object) { + return createVirtualMachineServiceInstanceAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.docker.host.service.DockerHostService Docker Host Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.docker.host.service.DockerHostService + * @generated + */ + public Adapter createDockerHostServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.docker.host.service.DockerHostServiceInstance Docker Host Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.docker.host.service.DockerHostServiceInstance + * @generated + */ + public Adapter createDockerHostServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration Docker Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration + * @generated + */ + public Adapter createDockerConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeService Dcae Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeService + * @generated + */ + public Adapter createDcaeServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService Virtual Machine Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService + * @generated + */ + public Adapter createVirtualMachineServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance Dcae Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance + * @generated + */ + public Adapter createDcaeServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration Virtual Machine Service Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration + * @generated + */ + public Adapter createVirtualMachineServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance Virtual Machine Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance + * @generated + */ + public Adapter createVirtualMachineServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ServiceAdapterFactory diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/util/ServiceSwitch.java b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/util/ServiceSwitch.java new file mode 100644 index 0000000..8788e0e --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/host/service/util/ServiceSwitch.java @@ -0,0 +1,280 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.host.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.docker.host.service.*; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.docker.host.service.ServicePackage + * @generated + */ +public class ServiceSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ServiceSwitch() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ServicePackage.DOCKER_HOST_SERVICE: { + DockerHostService dockerHostService = (DockerHostService)theEObject; + T result = caseDockerHostService(dockerHostService); + if (result == null) result = caseVirtualMachineService(dockerHostService); + if (result == null) result = caseDcaeService(dockerHostService); + if (result == null) result = caseNamedEntity(dockerHostService); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.DOCKER_HOST_SERVICE_INSTANCE: { + DockerHostServiceInstance dockerHostServiceInstance = (DockerHostServiceInstance)theEObject; + T result = caseDockerHostServiceInstance(dockerHostServiceInstance); + if (result == null) result = caseVirtualMachineServiceInstance(dockerHostServiceInstance); + if (result == null) result = caseDockerConfiguration(dockerHostServiceInstance); + if (result == null) result = caseDcaeServiceInstance(dockerHostServiceInstance); + if (result == null) result = caseVirtualMachineServiceConfiguration(dockerHostServiceInstance); + if (result == null) result = caseNamedEntity(dockerHostServiceInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.DOCKER_CONFIGURATION: { + DockerConfiguration dockerConfiguration = (DockerConfiguration)theEObject; + T result = caseDockerConfiguration(dockerConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Docker Host Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Docker Host Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDockerHostService(DockerHostService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Docker Host Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Docker Host Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDockerHostServiceInstance(DockerHostServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Docker Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Docker Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDockerConfiguration(DockerConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeService(DcaeService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineService(VirtualMachineService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceInstance(DcaeServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineServiceConfiguration(VirtualMachineServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineServiceInstance(VirtualMachineServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ServiceSwitch diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore/manager.xcore b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore/manager.xcore new file mode 100644 index 0000000..34f51c0 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore/manager.xcore @@ -0,0 +1,43 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-docker-host-model/src/main/xcore-gen") + + +package org.openecomp.dcae.controller.service.docker.host.manager + + +import org.openecomp.dcae.controller.service.docker.host.service.DockerConfiguration +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager +import org.eclipse.emf.ecore.EObject +import org.openecomp.dcae.controller.core.stream.DcaeStream +import org.openecomp.dcae.controller.core.service.HealthTestResponse + +// state of manager +class DockerHostManager extends VirtualMachineManager, DockerConfiguration { + op void updateContainerConfiguration(String name, EObject o, DcaeStream[] inputStreams, DcaeStream[] outputStreams) + op void suspendContainer(String name) + op void resumeContainer(String name) + op HealthTestResponse testContainer(String name) + op void setupConfiguration(String service, String instance) +} + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore/service.xcore b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore/service.xcore new file mode 100644 index 0000000..c2a0ccc --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/src/main/xcore/service.xcore @@ -0,0 +1,45 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-docker-host-model/src/main/xcore-gen") + + +package org.openecomp.dcae.controller.service.docker.host.service + + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance +import org.openecomp.ncomp.docker.DockerHost + +annotation "http://openecomp.org" as ecomp + +class DockerHostService extends VirtualMachineService { +} + +// state in the controller +class DockerHostServiceInstance extends VirtualMachineServiceInstance, DockerConfiguration { +} + +// state in both controller and manager +class DockerConfiguration { + @ecomp(^type = "configuration") + contains DockerHost dockerHost +} diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-host/pom.xml b/dcae-controller-service-docker/dcae-controller-service-docker-host/pom.xml new file mode 100644 index 0000000..af9323d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-host/pom.xml @@ -0,0 +1,82 @@ + + 4.0.0 + + org.openecomp.dcae.controller + dcae-controller-service-docker-host + 0.1.0-SNAPSHOT + pom + dcae-controller-service-docker-host + + + UTF-8 + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + + dcae-controller-service-docker-host-manager + dcae-controller-service-docker-host-model + + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/.classpath b/dcae-controller-service-docker/dcae-controller-service-docker-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/.gitignore b/dcae-controller-service-docker/dcae-controller-service-docker-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/.project b/dcae-controller-service-docker/dcae-controller-service-docker-model/.project new file mode 100644 index 0000000..d0956da --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/.project @@ -0,0 +1,34 @@ + + + dcae-controller-service-docker-model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-docker/dcae-controller-service-docker-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-docker/dcae-controller-service-docker-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/LICENSE.txt b/dcae-controller-service-docker/dcae-controller-service-docker-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/META-INF/MANIFEST.MF b/dcae-controller-service-docker/dcae-controller-service-docker-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..b7ce9fb --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/META-INF/MANIFEST.MF @@ -0,0 +1,31 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: dcae-controller-service-docker-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.openecomp.dcae.controller.service.dockermanager, + org.openecomp.dcae.controller.service.dockermanager.impl, + org.openecomp.dcae.controller.service.dockermanager.util, + org.openecomp.dcae.controller.service.docker, + org.openecomp.dcae.controller.service.docker.impl, + org.openecomp.dcae.controller.service.docker.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + dcae-controller-core-model;visibility:=reexport, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-openstack-model;visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + ncomp-sirius-manager-agent-model;visibility:=reexport, + ncomp-docker-model;bundle-version="0.1.0";visibility:=reexport, + dcae-controller-service-vm-model;bundle-version="0.1.0";visibility:=reexport, + dcae-controller-service-docker-model;visibility:=reexport, + dcae-controller-service-docker-host-model;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/build.properties b/dcae-controller-service-docker/dcae-controller-service-docker-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/build.properties @@ -0,0 +1,11 @@ +# + +bin.includes = .,\ + src/main/xcore/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/xcore-gen/,\ + src/main/xcore/ +output.. = target/classes/ diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/plugin.properties b/dcae-controller-service-docker/dcae-controller-service-docker-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/plugin.xml b/dcae-controller-service-docker/dcae-controller-service-docker-model/plugin.xml new file mode 100644 index 0000000..360106d --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/plugin.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/pom.xml b/dcae-controller-service-docker/dcae-controller-service-docker-model/pom.xml new file mode 100644 index 0000000..e7c8945 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/pom.xml @@ -0,0 +1,36 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-docker-model + + org.openecomp.ncomp.maven + ncomp-maven-xcore + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore + + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-vm-model + ${project.version} + + + org.openecomp.ncomp.docker + ncomp-docker-model + ${project.version} + + + org.openecomp.dcae.controller + + dcae-controller-service-docker-host-model + + ${project.version} + + + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerConfiguration.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerConfiguration.java new file mode 100644 index 0000000..bbf2a17 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerConfiguration.java @@ -0,0 +1,72 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Configuration'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerConfiguration#getConfiguration Configuration}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerConfiguration() + * @model + * @generated + */ +public interface DockerConfiguration extends EObject { + /** + * Returns the value of the 'Configuration' attribute. + * + *

+ * If the meaning of the 'Configuration' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Configuration' attribute. + * @see #setConfiguration(String) + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerConfiguration_Configuration() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.docker.DockerConfiguration#getConfiguration Configuration}' attribute. + * + * + * @param value the new value of the 'Configuration' attribute. + * @see #getConfiguration() + * @generated + */ + void setConfiguration(String value); + +} // DockerConfiguration diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerFactory.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerFactory.java new file mode 100644 index 0000000..c8eb4d5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerFactory.java @@ -0,0 +1,90 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.docker.DockerPackage + * @generated + */ +public interface DockerFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + DockerFactory eINSTANCE = org.openecomp.dcae.controller.service.docker.impl.DockerFactoryImpl.init(); + + /** + * Returns a new object of class 'Service'. + * + * + * @return a new object of class 'Service'. + * @generated + */ + DockerService createDockerService(); + + /** + * Returns a new object of class 'Service Instance'. + * + * + * @return a new object of class 'Service Instance'. + * @generated + */ + DockerServiceInstance createDockerServiceInstance(); + + /** + * Returns a new object of class 'Configuration'. + * + * + * @return a new object of class 'Configuration'. + * @generated + */ + DockerConfiguration createDockerConfiguration(); + + /** + * Returns a new object of class 'Service Descriptor'. + * + * + * @return a new object of class 'Service Descriptor'. + * @generated + */ + DockerServiceDescriptor createDockerServiceDescriptor(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + DockerPackage getDockerPackage(); + +} //DockerFactory diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerPackage.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerPackage.java new file mode 100644 index 0000000..cf53fe1 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerPackage.java @@ -0,0 +1,1131 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker; + +import org.openecomp.dcae.controller.core.service.ServicePackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.docker.DockerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-docker-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org'" + * @generated + */ +public interface DockerPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "docker"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.docker"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "docker"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + DockerPackage eINSTANCE = org.openecomp.dcae.controller.service.docker.impl.DockerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceImpl Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.docker.impl.DockerServiceImpl + * @see org.openecomp.dcae.controller.service.docker.impl.DockerPackageImpl#getDockerService() + * @generated + */ + int DOCKER_SERVICE = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE__NAME = ServicePackage.DCAE_SERVICE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE__LAST_POLLED = ServicePackage.DCAE_SERVICE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE__LAST_CHANGED = ServicePackage.DCAE_SERVICE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE__CREATED = ServicePackage.DCAE_SERVICE__CREATED; + + /** + * The feature id for the 'Instances' containment reference list. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE__INSTANCES = ServicePackage.DCAE_SERVICE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Service' class. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_FEATURE_COUNT = ServicePackage.DCAE_SERVICE_FEATURE_COUNT + 1; + + /** + * The operation id for the 'Deploy' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE___DEPLOY__STRING_STRING = ServicePackage.DCAE_SERVICE___DEPLOY__STRING_STRING; + + /** + * The operation id for the 'Undeploy' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE___UNDEPLOY__STRING = ServicePackage.DCAE_SERVICE___UNDEPLOY__STRING; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE___TEST__STRING = ServicePackage.DCAE_SERVICE___TEST__STRING; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE___SUSPEND__STRING = ServicePackage.DCAE_SERVICE___SUSPEND__STRING; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE___RESUME__STRING = ServicePackage.DCAE_SERVICE___RESUME__STRING; + + /** + * The operation id for the 'Push Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING = ServicePackage.DCAE_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Poll Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE___POLL_MANAGER_CONFIGURATION__STRING = ServicePackage.DCAE_SERVICE___POLL_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE___MANAGER_CONFIGURATION__STRING = ServicePackage.DCAE_SERVICE___MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Operation' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT = ServicePackage.DCAE_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT; + + /** + * The operation id for the 'Update Configuration From Policy' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING = ServicePackage.DCAE_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING; + + /** + * The operation id for the 'Run Health Tests' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE___RUN_HEALTH_TESTS = ServicePackage.DCAE_SERVICE___RUN_HEALTH_TESTS; + + /** + * The number of operations of the 'Service' class. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_OPERATION_COUNT = ServicePackage.DCAE_SERVICE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceInstanceImpl Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.docker.impl.DockerServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.docker.impl.DockerPackageImpl#getDockerServiceInstance() + * @generated + */ + int DOCKER_SERVICE_INSTANCE = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__NAME = ServicePackage.DCAE_SERVICE_INSTANCE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__LAST_POLLED = ServicePackage.DCAE_SERVICE_INSTANCE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__LAST_CHANGED = ServicePackage.DCAE_SERVICE_INSTANCE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__CREATED = ServicePackage.DCAE_SERVICE_INSTANCE__CREATED; + + /** + * The feature id for the 'Service Container' reference. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__SERVICE_CONTAINER = ServicePackage.DCAE_SERVICE_INSTANCE__SERVICE_CONTAINER; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__STATUS = ServicePackage.DCAE_SERVICE_INSTANCE__STATUS; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__INPUT_STREAMS = ServicePackage.DCAE_SERVICE_INSTANCE__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__OUTPUT_STREAMS = ServicePackage.DCAE_SERVICE_INSTANCE__OUTPUT_STREAMS; + + /** + * The feature id for the 'Last Health Test' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__LAST_HEALTH_TEST = ServicePackage.DCAE_SERVICE_INSTANCE__LAST_HEALTH_TEST; + + /** + * The feature id for the 'Health Test Status' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__HEALTH_TEST_STATUS = ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_STATUS; + + /** + * The feature id for the 'Health Test Message Code' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE = ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE; + + /** + * The feature id for the 'Docker Host' containment reference. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__DOCKER_HOST = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Host Service' reference. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__HOST_SERVICE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Docker Name' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__DOCKER_NAME = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Image' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__IMAGE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__CONFIGURATION = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Volumes' attribute list. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__VOLUMES = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Links' attribute list. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__LINKS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Envs' attribute list. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__ENVS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Port Bindings' containment reference list. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__PORT_BINDINGS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 8; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE__MANAGER_PORT_NUMBER = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 9; + + /** + * The number of structural features of the 'Service Instance' class. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE_FEATURE_COUNT = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 10; + + /** + * The number of operations of the 'Service Instance' class. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_INSTANCE_OPERATION_COUNT = ServicePackage.DCAE_SERVICE_INSTANCE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.docker.impl.DockerConfigurationImpl Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.docker.impl.DockerConfigurationImpl + * @see org.openecomp.dcae.controller.service.docker.impl.DockerPackageImpl#getDockerConfiguration() + * @generated + */ + int DOCKER_CONFIGURATION = 2; + + /** + * The feature id for the 'Configuration' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_CONFIGURATION__CONFIGURATION = 0; + + /** + * The number of structural features of the 'Configuration' class. + * + * + * @generated + * @ordered + */ + int DOCKER_CONFIGURATION_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Configuration' class. + * + * + * @generated + * @ordered + */ + int DOCKER_CONFIGURATION_OPERATION_COUNT = 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceDescriptorImpl Service Descriptor}' class. + * + * + * @see org.openecomp.dcae.controller.service.docker.impl.DockerServiceDescriptorImpl + * @see org.openecomp.dcae.controller.service.docker.impl.DockerPackageImpl#getDockerServiceDescriptor() + * @generated + */ + int DOCKER_SERVICE_DESCRIPTOR = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_DESCRIPTOR__NAME = ServicePackage.DCAE_SERVICE_DESCRIPTOR__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_DESCRIPTOR__LAST_POLLED = ServicePackage.DCAE_SERVICE_DESCRIPTOR__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_DESCRIPTOR__LAST_CHANGED = ServicePackage.DCAE_SERVICE_DESCRIPTOR__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_DESCRIPTOR__CREATED = ServicePackage.DCAE_SERVICE_DESCRIPTOR__CREATED; + + /** + * The feature id for the 'Group Id' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_DESCRIPTOR__GROUP_ID = ServicePackage.DCAE_SERVICE_DESCRIPTOR__GROUP_ID; + + /** + * The feature id for the 'Artifact' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_DESCRIPTOR__ARTIFACT = ServicePackage.DCAE_SERVICE_DESCRIPTOR__ARTIFACT; + + /** + * The feature id for the 'Version' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_DESCRIPTOR__VERSION = ServicePackage.DCAE_SERVICE_DESCRIPTOR__VERSION; + + /** + * The feature id for the 'Service Package' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_DESCRIPTOR__SERVICE_PACKAGE = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Service Class' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_DESCRIPTOR__SERVICE_CLASS = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Service Instance Class' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Docker Image' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_DESCRIPTOR__DOCKER_IMAGE = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Manager User' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_DESCRIPTOR__MANAGER_USER = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Encrypted Password' attribute. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 6; + + /** + * The number of structural features of the 'Service Descriptor' class. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_DESCRIPTOR_FEATURE_COUNT = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 7; + + /** + * The number of operations of the 'Service Descriptor' class. + * + * + * @generated + * @ordered + */ + int DOCKER_SERVICE_DESCRIPTOR_OPERATION_COUNT = ServicePackage.DCAE_SERVICE_DESCRIPTOR_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.docker.DockerService Service}'. + * + * + * @return the meta object for class 'Service'. + * @see org.openecomp.dcae.controller.service.docker.DockerService + * @generated + */ + EClass getDockerService(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.docker.DockerService#getInstances Instances}'. + * + * + * @return the meta object for the containment reference list 'Instances'. + * @see org.openecomp.dcae.controller.service.docker.DockerService#getInstances() + * @see #getDockerService() + * @generated + */ + EReference getDockerService_Instances(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance Service Instance}'. + * + * + * @return the meta object for class 'Service Instance'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceInstance + * @generated + */ + EClass getDockerServiceInstance(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getDockerHost Docker Host}'. + * + * + * @return the meta object for the containment reference 'Docker Host'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getDockerHost() + * @see #getDockerServiceInstance() + * @generated + */ + EReference getDockerServiceInstance_DockerHost(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getHostService Host Service}'. + * + * + * @return the meta object for the reference 'Host Service'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getHostService() + * @see #getDockerServiceInstance() + * @generated + */ + EReference getDockerServiceInstance_HostService(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getDockerName Docker Name}'. + * + * + * @return the meta object for the attribute 'Docker Name'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getDockerName() + * @see #getDockerServiceInstance() + * @generated + */ + EAttribute getDockerServiceInstance_DockerName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getImage Image}'. + * + * + * @return the meta object for the attribute 'Image'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getImage() + * @see #getDockerServiceInstance() + * @generated + */ + EAttribute getDockerServiceInstance_Image(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getConfiguration Configuration}'. + * + * + * @return the meta object for the containment reference 'Configuration'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getConfiguration() + * @see #getDockerServiceInstance() + * @generated + */ + EReference getDockerServiceInstance_Configuration(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getVolumes Volumes}'. + * + * + * @return the meta object for the attribute list 'Volumes'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getVolumes() + * @see #getDockerServiceInstance() + * @generated + */ + EAttribute getDockerServiceInstance_Volumes(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getLinks Links}'. + * + * + * @return the meta object for the attribute list 'Links'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getLinks() + * @see #getDockerServiceInstance() + * @generated + */ + EAttribute getDockerServiceInstance_Links(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getEnvs Envs}'. + * + * + * @return the meta object for the attribute list 'Envs'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getEnvs() + * @see #getDockerServiceInstance() + * @generated + */ + EAttribute getDockerServiceInstance_Envs(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getPortBindings Port Bindings}'. + * + * + * @return the meta object for the containment reference list 'Port Bindings'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getPortBindings() + * @see #getDockerServiceInstance() + * @generated + */ + EReference getDockerServiceInstance_PortBindings(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getManagerPortNumber Manager Port Number}'. + * + * + * @return the meta object for the attribute 'Manager Port Number'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getManagerPortNumber() + * @see #getDockerServiceInstance() + * @generated + */ + EAttribute getDockerServiceInstance_ManagerPortNumber(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.docker.DockerConfiguration Configuration}'. + * + * + * @return the meta object for class 'Configuration'. + * @see org.openecomp.dcae.controller.service.docker.DockerConfiguration + * @generated + */ + EClass getDockerConfiguration(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.docker.DockerConfiguration#getConfiguration Configuration}'. + * + * + * @return the meta object for the attribute 'Configuration'. + * @see org.openecomp.dcae.controller.service.docker.DockerConfiguration#getConfiguration() + * @see #getDockerConfiguration() + * @generated + */ + EAttribute getDockerConfiguration_Configuration(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor Service Descriptor}'. + * + * + * @return the meta object for class 'Service Descriptor'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor + * @generated + */ + EClass getDockerServiceDescriptor(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getServicePackage Service Package}'. + * + * + * @return the meta object for the attribute 'Service Package'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getServicePackage() + * @see #getDockerServiceDescriptor() + * @generated + */ + EAttribute getDockerServiceDescriptor_ServicePackage(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getServiceClass Service Class}'. + * + * + * @return the meta object for the attribute 'Service Class'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getServiceClass() + * @see #getDockerServiceDescriptor() + * @generated + */ + EAttribute getDockerServiceDescriptor_ServiceClass(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getServiceInstanceClass Service Instance Class}'. + * + * + * @return the meta object for the attribute 'Service Instance Class'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getServiceInstanceClass() + * @see #getDockerServiceDescriptor() + * @generated + */ + EAttribute getDockerServiceDescriptor_ServiceInstanceClass(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getDockerImage Docker Image}'. + * + * + * @return the meta object for the attribute 'Docker Image'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getDockerImage() + * @see #getDockerServiceDescriptor() + * @generated + */ + EAttribute getDockerServiceDescriptor_DockerImage(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getManagerPortNumber Manager Port Number}'. + * + * + * @return the meta object for the attribute 'Manager Port Number'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getManagerPortNumber() + * @see #getDockerServiceDescriptor() + * @generated + */ + EAttribute getDockerServiceDescriptor_ManagerPortNumber(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getManagerUser Manager User}'. + * + * + * @return the meta object for the attribute 'Manager User'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getManagerUser() + * @see #getDockerServiceDescriptor() + * @generated + */ + EAttribute getDockerServiceDescriptor_ManagerUser(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getEncryptedPassword Encrypted Password}'. + * + * + * @return the meta object for the attribute 'Encrypted Password'. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getEncryptedPassword() + * @see #getDockerServiceDescriptor() + * @generated + */ + EAttribute getDockerServiceDescriptor_EncryptedPassword(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + DockerFactory getDockerFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceImpl Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.docker.impl.DockerServiceImpl + * @see org.openecomp.dcae.controller.service.docker.impl.DockerPackageImpl#getDockerService() + * @generated + */ + EClass DOCKER_SERVICE = eINSTANCE.getDockerService(); + + /** + * The meta object literal for the 'Instances' containment reference list feature. + * + * + * @generated + */ + EReference DOCKER_SERVICE__INSTANCES = eINSTANCE.getDockerService_Instances(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceInstanceImpl Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.docker.impl.DockerServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.docker.impl.DockerPackageImpl#getDockerServiceInstance() + * @generated + */ + EClass DOCKER_SERVICE_INSTANCE = eINSTANCE.getDockerServiceInstance(); + + /** + * The meta object literal for the 'Docker Host' containment reference feature. + * + * + * @generated + */ + EReference DOCKER_SERVICE_INSTANCE__DOCKER_HOST = eINSTANCE.getDockerServiceInstance_DockerHost(); + + /** + * The meta object literal for the 'Host Service' reference feature. + * + * + * @generated + */ + EReference DOCKER_SERVICE_INSTANCE__HOST_SERVICE = eINSTANCE.getDockerServiceInstance_HostService(); + + /** + * The meta object literal for the 'Docker Name' attribute feature. + * + * + * @generated + */ + EAttribute DOCKER_SERVICE_INSTANCE__DOCKER_NAME = eINSTANCE.getDockerServiceInstance_DockerName(); + + /** + * The meta object literal for the 'Image' attribute feature. + * + * + * @generated + */ + EAttribute DOCKER_SERVICE_INSTANCE__IMAGE = eINSTANCE.getDockerServiceInstance_Image(); + + /** + * The meta object literal for the 'Configuration' containment reference feature. + * + * + * @generated + */ + EReference DOCKER_SERVICE_INSTANCE__CONFIGURATION = eINSTANCE.getDockerServiceInstance_Configuration(); + + /** + * The meta object literal for the 'Volumes' attribute list feature. + * + * + * @generated + */ + EAttribute DOCKER_SERVICE_INSTANCE__VOLUMES = eINSTANCE.getDockerServiceInstance_Volumes(); + + /** + * The meta object literal for the 'Links' attribute list feature. + * + * + * @generated + */ + EAttribute DOCKER_SERVICE_INSTANCE__LINKS = eINSTANCE.getDockerServiceInstance_Links(); + + /** + * The meta object literal for the 'Envs' attribute list feature. + * + * + * @generated + */ + EAttribute DOCKER_SERVICE_INSTANCE__ENVS = eINSTANCE.getDockerServiceInstance_Envs(); + + /** + * The meta object literal for the 'Port Bindings' containment reference list feature. + * + * + * @generated + */ + EReference DOCKER_SERVICE_INSTANCE__PORT_BINDINGS = eINSTANCE.getDockerServiceInstance_PortBindings(); + + /** + * The meta object literal for the 'Manager Port Number' attribute feature. + * + * + * @generated + */ + EAttribute DOCKER_SERVICE_INSTANCE__MANAGER_PORT_NUMBER = eINSTANCE.getDockerServiceInstance_ManagerPortNumber(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.docker.impl.DockerConfigurationImpl Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.docker.impl.DockerConfigurationImpl + * @see org.openecomp.dcae.controller.service.docker.impl.DockerPackageImpl#getDockerConfiguration() + * @generated + */ + EClass DOCKER_CONFIGURATION = eINSTANCE.getDockerConfiguration(); + + /** + * The meta object literal for the 'Configuration' attribute feature. + * + * + * @generated + */ + EAttribute DOCKER_CONFIGURATION__CONFIGURATION = eINSTANCE.getDockerConfiguration_Configuration(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceDescriptorImpl Service Descriptor}' class. + * + * + * @see org.openecomp.dcae.controller.service.docker.impl.DockerServiceDescriptorImpl + * @see org.openecomp.dcae.controller.service.docker.impl.DockerPackageImpl#getDockerServiceDescriptor() + * @generated + */ + EClass DOCKER_SERVICE_DESCRIPTOR = eINSTANCE.getDockerServiceDescriptor(); + + /** + * The meta object literal for the 'Service Package' attribute feature. + * + * + * @generated + */ + EAttribute DOCKER_SERVICE_DESCRIPTOR__SERVICE_PACKAGE = eINSTANCE.getDockerServiceDescriptor_ServicePackage(); + + /** + * The meta object literal for the 'Service Class' attribute feature. + * + * + * @generated + */ + EAttribute DOCKER_SERVICE_DESCRIPTOR__SERVICE_CLASS = eINSTANCE.getDockerServiceDescriptor_ServiceClass(); + + /** + * The meta object literal for the 'Service Instance Class' attribute feature. + * + * + * @generated + */ + EAttribute DOCKER_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS = eINSTANCE.getDockerServiceDescriptor_ServiceInstanceClass(); + + /** + * The meta object literal for the 'Docker Image' attribute feature. + * + * + * @generated + */ + EAttribute DOCKER_SERVICE_DESCRIPTOR__DOCKER_IMAGE = eINSTANCE.getDockerServiceDescriptor_DockerImage(); + + /** + * The meta object literal for the 'Manager Port Number' attribute feature. + * + * + * @generated + */ + EAttribute DOCKER_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER = eINSTANCE.getDockerServiceDescriptor_ManagerPortNumber(); + + /** + * The meta object literal for the 'Manager User' attribute feature. + * + * + * @generated + */ + EAttribute DOCKER_SERVICE_DESCRIPTOR__MANAGER_USER = eINSTANCE.getDockerServiceDescriptor_ManagerUser(); + + /** + * The meta object literal for the 'Encrypted Password' attribute feature. + * + * + * @generated + */ + EAttribute DOCKER_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD = eINSTANCE.getDockerServiceDescriptor_EncryptedPassword(); + + } + +} //DockerPackage diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerService.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerService.java new file mode 100644 index 0000000..fd57ae7 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerService.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker; + +import org.openecomp.dcae.controller.core.service.DcaeService; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Service'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerService#getInstances Instances}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerService() + * @model + * @generated + */ +public interface DockerService extends DcaeService { + /** + * Returns the value of the 'Instances' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance}. + * + *

+ * If the meaning of the 'Instances' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Instances' containment reference list. + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerService_Instances() + * @model containment="true" + * @generated + */ + EList getInstances(); + +} // DockerService diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerServiceDescriptor.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerServiceDescriptor.java new file mode 100644 index 0000000..fc114e2 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerServiceDescriptor.java @@ -0,0 +1,233 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker; + +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; + +/** + * + * A representation of the model object 'Service Descriptor'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getServicePackage Service Package}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getServiceClass Service Class}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getServiceInstanceClass Service Instance Class}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getDockerImage Docker Image}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getManagerPortNumber Manager Port Number}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getManagerUser Manager User}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getEncryptedPassword Encrypted Password}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceDescriptor() + * @model + * @generated + */ +public interface DockerServiceDescriptor extends DcaeServiceDescriptor { + /** + * Returns the value of the 'Service Package' attribute. + * + *

+ * If the meaning of the 'Service Package' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Service Package' attribute. + * @see #setServicePackage(String) + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceDescriptor_ServicePackage() + * @model unique="false" + * @generated + */ + String getServicePackage(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getServicePackage Service Package}' attribute. + * + * + * @param value the new value of the 'Service Package' attribute. + * @see #getServicePackage() + * @generated + */ + void setServicePackage(String value); + + /** + * Returns the value of the 'Service Class' attribute. + * + *

+ * If the meaning of the 'Service Class' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Service Class' attribute. + * @see #setServiceClass(String) + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceDescriptor_ServiceClass() + * @model unique="false" + * @generated + */ + String getServiceClass(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getServiceClass Service Class}' attribute. + * + * + * @param value the new value of the 'Service Class' attribute. + * @see #getServiceClass() + * @generated + */ + void setServiceClass(String value); + + /** + * Returns the value of the 'Service Instance Class' attribute. + * + *

+ * If the meaning of the 'Service Instance Class' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Service Instance Class' attribute. + * @see #setServiceInstanceClass(String) + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceDescriptor_ServiceInstanceClass() + * @model unique="false" + * @generated + */ + String getServiceInstanceClass(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getServiceInstanceClass Service Instance Class}' attribute. + * + * + * @param value the new value of the 'Service Instance Class' attribute. + * @see #getServiceInstanceClass() + * @generated + */ + void setServiceInstanceClass(String value); + + /** + * Returns the value of the 'Docker Image' attribute. + * + *

+ * If the meaning of the 'Docker Image' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Docker Image' attribute. + * @see #setDockerImage(String) + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceDescriptor_DockerImage() + * @model unique="false" + * @generated + */ + String getDockerImage(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getDockerImage Docker Image}' attribute. + * + * + * @param value the new value of the 'Docker Image' attribute. + * @see #getDockerImage() + * @generated + */ + void setDockerImage(String value); + + /** + * Returns the value of the 'Manager Port Number' attribute. + * + *

+ * If the meaning of the 'Manager Port Number' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Manager Port Number' attribute. + * @see #setManagerPortNumber(String) + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceDescriptor_ManagerPortNumber() + * @model unique="false" + * @generated + */ + String getManagerPortNumber(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getManagerPortNumber Manager Port Number}' attribute. + * + * + * @param value the new value of the 'Manager Port Number' attribute. + * @see #getManagerPortNumber() + * @generated + */ + void setManagerPortNumber(String value); + + /** + * Returns the value of the 'Manager User' attribute. + * + *

+ * If the meaning of the 'Manager User' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Manager User' attribute. + * @see #setManagerUser(String) + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceDescriptor_ManagerUser() + * @model unique="false" + * @generated + */ + String getManagerUser(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getManagerUser Manager User}' attribute. + * + * + * @param value the new value of the 'Manager User' attribute. + * @see #getManagerUser() + * @generated + */ + void setManagerUser(String value); + + /** + * Returns the value of the 'Encrypted Password' attribute. + * + *

+ * If the meaning of the 'Encrypted Password' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Encrypted Password' attribute. + * @see #setEncryptedPassword(String) + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceDescriptor_EncryptedPassword() + * @model unique="false" + * @generated + */ + String getEncryptedPassword(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor#getEncryptedPassword Encrypted Password}' attribute. + * + * + * @param value the new value of the 'Encrypted Password' attribute. + * @see #getEncryptedPassword() + * @generated + */ + void setEncryptedPassword(String value); + +} // DockerServiceDescriptor diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerServiceInstance.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerServiceInstance.java new file mode 100644 index 0000000..0d9ecb9 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/DockerServiceInstance.java @@ -0,0 +1,280 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker; + +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostServiceInstance; +import org.openecomp.ncomp.docker.ContainerPortBindings; +import org.openecomp.ncomp.docker.DockerHost; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Service Instance'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getDockerHost Docker Host}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getHostService Host Service}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getDockerName Docker Name}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getImage Image}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getConfiguration Configuration}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getVolumes Volumes}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getLinks Links}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getEnvs Envs}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getPortBindings Port Bindings}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getManagerPortNumber Manager Port Number}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceInstance() + * @model + * @generated + */ +public interface DockerServiceInstance extends DcaeServiceInstance { + /** + * Returns the value of the 'Docker Host' containment reference. + * + *

+ * If the meaning of the 'Docker Host' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Docker Host' containment reference. + * @see #setDockerHost(DockerHost) + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceInstance_DockerHost() + * @model containment="true" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + DockerHost getDockerHost(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getDockerHost Docker Host}' containment reference. + * + * + * @param value the new value of the 'Docker Host' containment reference. + * @see #getDockerHost() + * @generated + */ + void setDockerHost(DockerHost value); + + /** + * Returns the value of the 'Host Service' reference. + * + *

+ * If the meaning of the 'Host Service' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Host Service' reference. + * @see #setHostService(DockerHostServiceInstance) + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceInstance_HostService() + * @model + * @generated + */ + DockerHostServiceInstance getHostService(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getHostService Host Service}' reference. + * + * + * @param value the new value of the 'Host Service' reference. + * @see #getHostService() + * @generated + */ + void setHostService(DockerHostServiceInstance value); + + /** + * Returns the value of the 'Docker Name' attribute. + * + *

+ * If the meaning of the 'Docker Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Docker Name' attribute. + * @see #setDockerName(String) + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceInstance_DockerName() + * @model unique="false" + * @generated + */ + String getDockerName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getDockerName Docker Name}' attribute. + * + * + * @param value the new value of the 'Docker Name' attribute. + * @see #getDockerName() + * @generated + */ + void setDockerName(String value); + + /** + * Returns the value of the 'Image' attribute. + * + *

+ * If the meaning of the 'Image' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Image' attribute. + * @see #setImage(String) + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceInstance_Image() + * @model unique="false" + * @generated + */ + String getImage(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getImage Image}' attribute. + * + * + * @param value the new value of the 'Image' attribute. + * @see #getImage() + * @generated + */ + void setImage(String value); + + /** + * Returns the value of the 'Configuration' containment reference. + * + *

+ * If the meaning of the 'Configuration' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Configuration' containment reference. + * @see #setConfiguration(DockerConfiguration) + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceInstance_Configuration() + * @model containment="true" + * @generated + */ + DockerConfiguration getConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getConfiguration Configuration}' containment reference. + * + * + * @param value the new value of the 'Configuration' containment reference. + * @see #getConfiguration() + * @generated + */ + void setConfiguration(DockerConfiguration value); + + /** + * Returns the value of the 'Volumes' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

+ * If the meaning of the 'Volumes' attribute list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Volumes' attribute list. + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceInstance_Volumes() + * @model unique="false" + * @generated + */ + EList getVolumes(); + + /** + * Returns the value of the 'Links' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

+ * If the meaning of the 'Links' attribute list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Links' attribute list. + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceInstance_Links() + * @model unique="false" + * @generated + */ + EList getLinks(); + + /** + * Returns the value of the 'Envs' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

+ * If the meaning of the 'Envs' attribute list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Envs' attribute list. + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceInstance_Envs() + * @model unique="false" + * @generated + */ + EList getEnvs(); + + /** + * Returns the value of the 'Port Bindings' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.docker.ContainerPortBindings}. + * + *

+ * If the meaning of the 'Port Bindings' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Port Bindings' containment reference list. + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceInstance_PortBindings() + * @model containment="true" + * @generated + */ + EList getPortBindings(); + + /** + * Returns the value of the 'Manager Port Number' attribute. + * The default value is "9999". + * + *

+ * If the meaning of the 'Manager Port Number' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Manager Port Number' attribute. + * @see #setManagerPortNumber(int) + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#getDockerServiceInstance_ManagerPortNumber() + * @model default="9999" unique="false" + * @generated + */ + int getManagerPortNumber(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance#getManagerPortNumber Manager Port Number}' attribute. + * + * + * @param value the new value of the 'Manager Port Number' attribute. + * @see #getManagerPortNumber() + * @generated + */ + void setManagerPortNumber(int value); + +} // DockerServiceInstance diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerConfigurationImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerConfigurationImpl.java new file mode 100644 index 0000000..dc9797b --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerConfigurationImpl.java @@ -0,0 +1,184 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.impl; + +import org.openecomp.dcae.controller.service.docker.DockerConfiguration; +import org.openecomp.dcae.controller.service.docker.DockerPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Configuration'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerConfigurationImpl#getConfiguration Configuration}
  • + *
+ *

+ * + * @generated + */ +public class DockerConfigurationImpl extends MinimalEObjectImpl.Container implements DockerConfiguration { + /** + * The default value of the '{@link #getConfiguration() Configuration}' attribute. + * + * + * @see #getConfiguration() + * @generated + * @ordered + */ + protected static final String CONFIGURATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getConfiguration() Configuration}' attribute. + * + * + * @see #getConfiguration() + * @generated + * @ordered + */ + protected String configuration = CONFIGURATION_EDEFAULT; + + /** + * + * + * @generated + */ + protected DockerConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return DockerPackage.Literals.DOCKER_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public String getConfiguration() { + return configuration; + } + + /** + * + * + * @generated + */ + public void setConfiguration(String newConfiguration) { + String oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_CONFIGURATION__CONFIGURATION, oldConfiguration, configuration)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case DockerPackage.DOCKER_CONFIGURATION__CONFIGURATION: + return getConfiguration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case DockerPackage.DOCKER_CONFIGURATION__CONFIGURATION: + setConfiguration((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case DockerPackage.DOCKER_CONFIGURATION__CONFIGURATION: + setConfiguration(CONFIGURATION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case DockerPackage.DOCKER_CONFIGURATION__CONFIGURATION: + return CONFIGURATION_EDEFAULT == null ? configuration != null : !CONFIGURATION_EDEFAULT.equals(configuration); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (configuration: "); + result.append(configuration); + result.append(')'); + return result.toString(); + } + +} //DockerConfigurationImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerFactoryImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerFactoryImpl.java new file mode 100644 index 0000000..70aeab7 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerFactoryImpl.java @@ -0,0 +1,149 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.impl; + +import org.openecomp.dcae.controller.service.docker.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class DockerFactoryImpl extends EFactoryImpl implements DockerFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static DockerFactory init() { + try { + DockerFactory theDockerFactory = (DockerFactory)EPackage.Registry.INSTANCE.getEFactory(DockerPackage.eNS_URI); + if (theDockerFactory != null) { + return theDockerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new DockerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public DockerFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case DockerPackage.DOCKER_SERVICE: return createDockerService(); + case DockerPackage.DOCKER_SERVICE_INSTANCE: return createDockerServiceInstance(); + case DockerPackage.DOCKER_CONFIGURATION: return createDockerConfiguration(); + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR: return createDockerServiceDescriptor(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public DockerService createDockerService() { + DockerServiceImpl dockerService = new DockerServiceImpl(); + return dockerService; + } + + /** + * + * + * @generated + */ + public DockerServiceInstance createDockerServiceInstance() { + DockerServiceInstanceImpl dockerServiceInstance = new DockerServiceInstanceImpl(); + return dockerServiceInstance; + } + + /** + * + * + * @generated + */ + public DockerConfiguration createDockerConfiguration() { + DockerConfigurationImpl dockerConfiguration = new DockerConfigurationImpl(); + return dockerConfiguration; + } + + /** + * + * + * @generated + */ + public DockerServiceDescriptor createDockerServiceDescriptor() { + DockerServiceDescriptorImpl dockerServiceDescriptor = new DockerServiceDescriptorImpl(); + return dockerServiceDescriptor; + } + + /** + * + * + * @generated + */ + public DockerPackage getDockerPackage() { + return (DockerPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static DockerPackage getPackage() { + return DockerPackage.eINSTANCE; + } + +} //DockerFactoryImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerPackageImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerPackageImpl.java new file mode 100644 index 0000000..0d4f93e --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerPackageImpl.java @@ -0,0 +1,516 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.impl; + +import org.openecomp.dcae.controller.core.service.ServicePackage; +import org.openecomp.dcae.controller.service.docker.DockerConfiguration; +import org.openecomp.dcae.controller.service.docker.DockerFactory; +import org.openecomp.dcae.controller.service.docker.DockerPackage; +import org.openecomp.dcae.controller.service.docker.DockerService; +import org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor; +import org.openecomp.dcae.controller.service.docker.DockerServiceInstance; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class DockerPackageImpl extends EPackageImpl implements DockerPackage { + /** + * + * + * @generated + */ + private EClass dockerServiceEClass = null; + + /** + * + * + * @generated + */ + private EClass dockerServiceInstanceEClass = null; + + /** + * + * + * @generated + */ + private EClass dockerConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass dockerServiceDescriptorEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.docker.DockerPackage#eNS_URI + * @see #init() + * @generated + */ + private DockerPackageImpl() { + super(eNS_URI, DockerFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link DockerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static DockerPackage init() { + if (isInited) return (DockerPackage)EPackage.Registry.INSTANCE.getEPackage(DockerPackage.eNS_URI); + + // Obtain or create and register package + DockerPackageImpl theDockerPackage = (DockerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DockerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new DockerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + org.openecomp.dcae.controller.service.docker.host.service.ServicePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theDockerPackage.createPackageContents(); + + // Initialize created meta-data + theDockerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theDockerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(DockerPackage.eNS_URI, theDockerPackage); + return theDockerPackage; + } + + /** + * + * + * @generated + */ + public EClass getDockerService() { + return dockerServiceEClass; + } + + /** + * + * + * @generated + */ + public EReference getDockerService_Instances() { + return (EReference)dockerServiceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getDockerServiceInstance() { + return dockerServiceInstanceEClass; + } + + /** + * + * + * @generated + */ + public EReference getDockerServiceInstance_DockerHost() { + return (EReference)dockerServiceInstanceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getDockerServiceInstance_HostService() { + return (EReference)dockerServiceInstanceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDockerServiceInstance_DockerName() { + return (EAttribute)dockerServiceInstanceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getDockerServiceInstance_Image() { + return (EAttribute)dockerServiceInstanceEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getDockerServiceInstance_Configuration() { + return (EReference)dockerServiceInstanceEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getDockerServiceInstance_Volumes() { + return (EAttribute)dockerServiceInstanceEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getDockerServiceInstance_Links() { + return (EAttribute)dockerServiceInstanceEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getDockerServiceInstance_Envs() { + return (EAttribute)dockerServiceInstanceEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EReference getDockerServiceInstance_PortBindings() { + return (EReference)dockerServiceInstanceEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EAttribute getDockerServiceInstance_ManagerPortNumber() { + return (EAttribute)dockerServiceInstanceEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EClass getDockerConfiguration() { + return dockerConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDockerConfiguration_Configuration() { + return (EAttribute)dockerConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getDockerServiceDescriptor() { + return dockerServiceDescriptorEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDockerServiceDescriptor_ServicePackage() { + return (EAttribute)dockerServiceDescriptorEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDockerServiceDescriptor_ServiceClass() { + return (EAttribute)dockerServiceDescriptorEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDockerServiceDescriptor_ServiceInstanceClass() { + return (EAttribute)dockerServiceDescriptorEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getDockerServiceDescriptor_DockerImage() { + return (EAttribute)dockerServiceDescriptorEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getDockerServiceDescriptor_ManagerPortNumber() { + return (EAttribute)dockerServiceDescriptorEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getDockerServiceDescriptor_ManagerUser() { + return (EAttribute)dockerServiceDescriptorEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getDockerServiceDescriptor_EncryptedPassword() { + return (EAttribute)dockerServiceDescriptorEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public DockerFactory getDockerFactory() { + return (DockerFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + dockerServiceEClass = createEClass(DOCKER_SERVICE); + createEReference(dockerServiceEClass, DOCKER_SERVICE__INSTANCES); + + dockerServiceInstanceEClass = createEClass(DOCKER_SERVICE_INSTANCE); + createEReference(dockerServiceInstanceEClass, DOCKER_SERVICE_INSTANCE__DOCKER_HOST); + createEReference(dockerServiceInstanceEClass, DOCKER_SERVICE_INSTANCE__HOST_SERVICE); + createEAttribute(dockerServiceInstanceEClass, DOCKER_SERVICE_INSTANCE__DOCKER_NAME); + createEAttribute(dockerServiceInstanceEClass, DOCKER_SERVICE_INSTANCE__IMAGE); + createEReference(dockerServiceInstanceEClass, DOCKER_SERVICE_INSTANCE__CONFIGURATION); + createEAttribute(dockerServiceInstanceEClass, DOCKER_SERVICE_INSTANCE__VOLUMES); + createEAttribute(dockerServiceInstanceEClass, DOCKER_SERVICE_INSTANCE__LINKS); + createEAttribute(dockerServiceInstanceEClass, DOCKER_SERVICE_INSTANCE__ENVS); + createEReference(dockerServiceInstanceEClass, DOCKER_SERVICE_INSTANCE__PORT_BINDINGS); + createEAttribute(dockerServiceInstanceEClass, DOCKER_SERVICE_INSTANCE__MANAGER_PORT_NUMBER); + + dockerConfigurationEClass = createEClass(DOCKER_CONFIGURATION); + createEAttribute(dockerConfigurationEClass, DOCKER_CONFIGURATION__CONFIGURATION); + + dockerServiceDescriptorEClass = createEClass(DOCKER_SERVICE_DESCRIPTOR); + createEAttribute(dockerServiceDescriptorEClass, DOCKER_SERVICE_DESCRIPTOR__SERVICE_PACKAGE); + createEAttribute(dockerServiceDescriptorEClass, DOCKER_SERVICE_DESCRIPTOR__SERVICE_CLASS); + createEAttribute(dockerServiceDescriptorEClass, DOCKER_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS); + createEAttribute(dockerServiceDescriptorEClass, DOCKER_SERVICE_DESCRIPTOR__DOCKER_IMAGE); + createEAttribute(dockerServiceDescriptorEClass, DOCKER_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER); + createEAttribute(dockerServiceDescriptorEClass, DOCKER_SERVICE_DESCRIPTOR__MANAGER_USER); + createEAttribute(dockerServiceDescriptorEClass, DOCKER_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + ServicePackage theServicePackage_1 = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + org.openecomp.ncomp.docker.DockerPackage theDockerPackage_1 = (org.openecomp.ncomp.docker.DockerPackage)EPackage.Registry.INSTANCE.getEPackage(org.openecomp.ncomp.docker.DockerPackage.eNS_URI); + org.openecomp.dcae.controller.service.docker.host.service.ServicePackage theServicePackage = (org.openecomp.dcae.controller.service.docker.host.service.ServicePackage)EPackage.Registry.INSTANCE.getEPackage(org.openecomp.dcae.controller.service.docker.host.service.ServicePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + dockerServiceEClass.getESuperTypes().add(theServicePackage_1.getDcaeService()); + dockerServiceInstanceEClass.getESuperTypes().add(theServicePackage_1.getDcaeServiceInstance()); + dockerServiceDescriptorEClass.getESuperTypes().add(theServicePackage_1.getDcaeServiceDescriptor()); + + // Initialize classes, features, and operations; add parameters + initEClass(dockerServiceEClass, DockerService.class, "DockerService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDockerService_Instances(), this.getDockerServiceInstance(), null, "instances", null, 0, -1, DockerService.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(dockerServiceInstanceEClass, DockerServiceInstance.class, "DockerServiceInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDockerServiceInstance_DockerHost(), theDockerPackage_1.getDockerHost(), null, "dockerHost", null, 0, 1, DockerServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDockerServiceInstance_HostService(), theServicePackage.getDockerHostServiceInstance(), null, "hostService", null, 0, 1, DockerServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDockerServiceInstance_DockerName(), theEcorePackage.getEString(), "dockerName", null, 0, 1, DockerServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDockerServiceInstance_Image(), theEcorePackage.getEString(), "image", null, 0, 1, DockerServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDockerServiceInstance_Configuration(), this.getDockerConfiguration(), null, "configuration", null, 0, 1, DockerServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDockerServiceInstance_Volumes(), theEcorePackage.getEString(), "volumes", null, 0, -1, DockerServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDockerServiceInstance_Links(), theEcorePackage.getEString(), "links", null, 0, -1, DockerServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDockerServiceInstance_Envs(), theEcorePackage.getEString(), "envs", null, 0, -1, DockerServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDockerServiceInstance_PortBindings(), theDockerPackage_1.getContainerPortBindings(), null, "portBindings", null, 0, -1, DockerServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDockerServiceInstance_ManagerPortNumber(), theEcorePackage.getEInt(), "managerPortNumber", "9999", 0, 1, DockerServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(dockerConfigurationEClass, DockerConfiguration.class, "DockerConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDockerConfiguration_Configuration(), theEcorePackage.getEString(), "configuration", null, 0, 1, DockerConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(dockerServiceDescriptorEClass, DockerServiceDescriptor.class, "DockerServiceDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDockerServiceDescriptor_ServicePackage(), theEcorePackage.getEString(), "servicePackage", null, 0, 1, DockerServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDockerServiceDescriptor_ServiceClass(), theEcorePackage.getEString(), "serviceClass", null, 0, 1, DockerServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDockerServiceDescriptor_ServiceInstanceClass(), theEcorePackage.getEString(), "serviceInstanceClass", null, 0, 1, DockerServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDockerServiceDescriptor_DockerImage(), theEcorePackage.getEString(), "dockerImage", null, 0, 1, DockerServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDockerServiceDescriptor_ManagerPortNumber(), theEcorePackage.getEString(), "managerPortNumber", null, 0, 1, DockerServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDockerServiceDescriptor_ManagerUser(), theEcorePackage.getEString(), "managerUser", null, 0, 1, DockerServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDockerServiceDescriptor_EncryptedPassword(), theEcorePackage.getEString(), "encryptedPassword", null, 0, 1, DockerServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + // http://openecomp.org + createEcompAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "ecomp", "http://openecomp.org" + }); + } + + /** + * Initializes the annotations for http://openecomp.org. + * + * + * @generated + */ + protected void createEcompAnnotations() { + String source = "http://openecomp.org"; + addAnnotation + (getDockerServiceInstance_DockerHost(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getDockerConfiguration_Configuration(), + source, + new String[] { + "type", "configuration" + }); + } + +} //DockerPackageImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerServiceDescriptorImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerServiceDescriptorImpl.java new file mode 100644 index 0000000..ef3d9b3 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerServiceDescriptorImpl.java @@ -0,0 +1,509 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.impl; + +import org.openecomp.dcae.controller.core.service.impl.DcaeServiceDescriptorImpl; + +import org.openecomp.dcae.controller.service.docker.DockerPackage; +import org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Service Descriptor'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceDescriptorImpl#getServicePackage Service Package}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceDescriptorImpl#getServiceClass Service Class}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceDescriptorImpl#getServiceInstanceClass Service Instance Class}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceDescriptorImpl#getDockerImage Docker Image}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceDescriptorImpl#getManagerPortNumber Manager Port Number}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceDescriptorImpl#getManagerUser Manager User}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceDescriptorImpl#getEncryptedPassword Encrypted Password}
  • + *
+ *

+ * + * @generated + */ +public class DockerServiceDescriptorImpl extends DcaeServiceDescriptorImpl implements DockerServiceDescriptor { + /** + * The default value of the '{@link #getServicePackage() Service Package}' attribute. + * + * + * @see #getServicePackage() + * @generated + * @ordered + */ + protected static final String SERVICE_PACKAGE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServicePackage() Service Package}' attribute. + * + * + * @see #getServicePackage() + * @generated + * @ordered + */ + protected String servicePackage = SERVICE_PACKAGE_EDEFAULT; + + /** + * The default value of the '{@link #getServiceClass() Service Class}' attribute. + * + * + * @see #getServiceClass() + * @generated + * @ordered + */ + protected static final String SERVICE_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServiceClass() Service Class}' attribute. + * + * + * @see #getServiceClass() + * @generated + * @ordered + */ + protected String serviceClass = SERVICE_CLASS_EDEFAULT; + + /** + * The default value of the '{@link #getServiceInstanceClass() Service Instance Class}' attribute. + * + * + * @see #getServiceInstanceClass() + * @generated + * @ordered + */ + protected static final String SERVICE_INSTANCE_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServiceInstanceClass() Service Instance Class}' attribute. + * + * + * @see #getServiceInstanceClass() + * @generated + * @ordered + */ + protected String serviceInstanceClass = SERVICE_INSTANCE_CLASS_EDEFAULT; + + /** + * The default value of the '{@link #getDockerImage() Docker Image}' attribute. + * + * + * @see #getDockerImage() + * @generated + * @ordered + */ + protected static final String DOCKER_IMAGE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDockerImage() Docker Image}' attribute. + * + * + * @see #getDockerImage() + * @generated + * @ordered + */ + protected String dockerImage = DOCKER_IMAGE_EDEFAULT; + + /** + * The default value of the '{@link #getManagerPortNumber() Manager Port Number}' attribute. + * + * + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected static final String MANAGER_PORT_NUMBER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getManagerPortNumber() Manager Port Number}' attribute. + * + * + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected String managerPortNumber = MANAGER_PORT_NUMBER_EDEFAULT; + + /** + * The default value of the '{@link #getManagerUser() Manager User}' attribute. + * + * + * @see #getManagerUser() + * @generated + * @ordered + */ + protected static final String MANAGER_USER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getManagerUser() Manager User}' attribute. + * + * + * @see #getManagerUser() + * @generated + * @ordered + */ + protected String managerUser = MANAGER_USER_EDEFAULT; + + /** + * The default value of the '{@link #getEncryptedPassword() Encrypted Password}' attribute. + * + * + * @see #getEncryptedPassword() + * @generated + * @ordered + */ + protected static final String ENCRYPTED_PASSWORD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getEncryptedPassword() Encrypted Password}' attribute. + * + * + * @see #getEncryptedPassword() + * @generated + * @ordered + */ + protected String encryptedPassword = ENCRYPTED_PASSWORD_EDEFAULT; + + /** + * + * + * @generated + */ + protected DockerServiceDescriptorImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return DockerPackage.Literals.DOCKER_SERVICE_DESCRIPTOR; + } + + /** + * + * + * @generated + */ + public String getServicePackage() { + return servicePackage; + } + + /** + * + * + * @generated + */ + public void setServicePackage(String newServicePackage) { + String oldServicePackage = servicePackage; + servicePackage = newServicePackage; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_SERVICE_DESCRIPTOR__SERVICE_PACKAGE, oldServicePackage, servicePackage)); + } + + /** + * + * + * @generated + */ + public String getServiceClass() { + return serviceClass; + } + + /** + * + * + * @generated + */ + public void setServiceClass(String newServiceClass) { + String oldServiceClass = serviceClass; + serviceClass = newServiceClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_SERVICE_DESCRIPTOR__SERVICE_CLASS, oldServiceClass, serviceClass)); + } + + /** + * + * + * @generated + */ + public String getServiceInstanceClass() { + return serviceInstanceClass; + } + + /** + * + * + * @generated + */ + public void setServiceInstanceClass(String newServiceInstanceClass) { + String oldServiceInstanceClass = serviceInstanceClass; + serviceInstanceClass = newServiceInstanceClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS, oldServiceInstanceClass, serviceInstanceClass)); + } + + /** + * + * + * @generated + */ + public String getDockerImage() { + return dockerImage; + } + + /** + * + * + * @generated + */ + public void setDockerImage(String newDockerImage) { + String oldDockerImage = dockerImage; + dockerImage = newDockerImage; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_SERVICE_DESCRIPTOR__DOCKER_IMAGE, oldDockerImage, dockerImage)); + } + + /** + * + * + * @generated + */ + public String getManagerPortNumber() { + return managerPortNumber; + } + + /** + * + * + * @generated + */ + public void setManagerPortNumber(String newManagerPortNumber) { + String oldManagerPortNumber = managerPortNumber; + managerPortNumber = newManagerPortNumber; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER, oldManagerPortNumber, managerPortNumber)); + } + + /** + * + * + * @generated + */ + public String getManagerUser() { + return managerUser; + } + + /** + * + * + * @generated + */ + public void setManagerUser(String newManagerUser) { + String oldManagerUser = managerUser; + managerUser = newManagerUser; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_SERVICE_DESCRIPTOR__MANAGER_USER, oldManagerUser, managerUser)); + } + + /** + * + * + * @generated + */ + public String getEncryptedPassword() { + return encryptedPassword; + } + + /** + * + * + * @generated + */ + public void setEncryptedPassword(String newEncryptedPassword) { + String oldEncryptedPassword = encryptedPassword; + encryptedPassword = newEncryptedPassword; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD, oldEncryptedPassword, encryptedPassword)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + return getServicePackage(); + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__SERVICE_CLASS: + return getServiceClass(); + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + return getServiceInstanceClass(); + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__DOCKER_IMAGE: + return getDockerImage(); + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER: + return getManagerPortNumber(); + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__MANAGER_USER: + return getManagerUser(); + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD: + return getEncryptedPassword(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + setServicePackage((String)newValue); + return; + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__SERVICE_CLASS: + setServiceClass((String)newValue); + return; + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + setServiceInstanceClass((String)newValue); + return; + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__DOCKER_IMAGE: + setDockerImage((String)newValue); + return; + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER: + setManagerPortNumber((String)newValue); + return; + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__MANAGER_USER: + setManagerUser((String)newValue); + return; + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD: + setEncryptedPassword((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + setServicePackage(SERVICE_PACKAGE_EDEFAULT); + return; + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__SERVICE_CLASS: + setServiceClass(SERVICE_CLASS_EDEFAULT); + return; + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + setServiceInstanceClass(SERVICE_INSTANCE_CLASS_EDEFAULT); + return; + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__DOCKER_IMAGE: + setDockerImage(DOCKER_IMAGE_EDEFAULT); + return; + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER: + setManagerPortNumber(MANAGER_PORT_NUMBER_EDEFAULT); + return; + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__MANAGER_USER: + setManagerUser(MANAGER_USER_EDEFAULT); + return; + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD: + setEncryptedPassword(ENCRYPTED_PASSWORD_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + return SERVICE_PACKAGE_EDEFAULT == null ? servicePackage != null : !SERVICE_PACKAGE_EDEFAULT.equals(servicePackage); + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__SERVICE_CLASS: + return SERVICE_CLASS_EDEFAULT == null ? serviceClass != null : !SERVICE_CLASS_EDEFAULT.equals(serviceClass); + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + return SERVICE_INSTANCE_CLASS_EDEFAULT == null ? serviceInstanceClass != null : !SERVICE_INSTANCE_CLASS_EDEFAULT.equals(serviceInstanceClass); + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__DOCKER_IMAGE: + return DOCKER_IMAGE_EDEFAULT == null ? dockerImage != null : !DOCKER_IMAGE_EDEFAULT.equals(dockerImage); + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER: + return MANAGER_PORT_NUMBER_EDEFAULT == null ? managerPortNumber != null : !MANAGER_PORT_NUMBER_EDEFAULT.equals(managerPortNumber); + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__MANAGER_USER: + return MANAGER_USER_EDEFAULT == null ? managerUser != null : !MANAGER_USER_EDEFAULT.equals(managerUser); + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD: + return ENCRYPTED_PASSWORD_EDEFAULT == null ? encryptedPassword != null : !ENCRYPTED_PASSWORD_EDEFAULT.equals(encryptedPassword); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (servicePackage: "); + result.append(servicePackage); + result.append(", serviceClass: "); + result.append(serviceClass); + result.append(", serviceInstanceClass: "); + result.append(serviceInstanceClass); + result.append(", dockerImage: "); + result.append(dockerImage); + result.append(", managerPortNumber: "); + result.append(managerPortNumber); + result.append(", managerUser: "); + result.append(managerUser); + result.append(", encryptedPassword: "); + result.append(encryptedPassword); + result.append(')'); + return result.toString(); + } + +} //DockerServiceDescriptorImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerServiceImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerServiceImpl.java new file mode 100644 index 0000000..fb663d7 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerServiceImpl.java @@ -0,0 +1,173 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.impl; + +import org.openecomp.dcae.controller.core.service.impl.DcaeServiceImpl; + +import org.openecomp.dcae.controller.service.docker.DockerPackage; +import org.openecomp.dcae.controller.service.docker.DockerService; +import org.openecomp.dcae.controller.service.docker.DockerServiceInstance; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Service'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceImpl#getInstances Instances}
  • + *
+ *

+ * + * @generated + */ +public class DockerServiceImpl extends DcaeServiceImpl implements DockerService { + /** + * The cached value of the '{@link #getInstances() Instances}' containment reference list. + * + * + * @see #getInstances() + * @generated + * @ordered + */ + protected EList instances; + + /** + * + * + * @generated + */ + protected DockerServiceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return DockerPackage.Literals.DOCKER_SERVICE; + } + + /** + * + * + * @generated + */ + public EList getInstances() { + if (instances == null) { + instances = new EObjectContainmentEList(DockerServiceInstance.class, this, DockerPackage.DOCKER_SERVICE__INSTANCES); + } + return instances; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case DockerPackage.DOCKER_SERVICE__INSTANCES: + return ((InternalEList)getInstances()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case DockerPackage.DOCKER_SERVICE__INSTANCES: + return getInstances(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case DockerPackage.DOCKER_SERVICE__INSTANCES: + getInstances().clear(); + getInstances().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case DockerPackage.DOCKER_SERVICE__INSTANCES: + getInstances().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case DockerPackage.DOCKER_SERVICE__INSTANCES: + return instances != null && !instances.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //DockerServiceImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerServiceInstanceImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerServiceInstanceImpl.java new file mode 100644 index 0000000..ddf7377 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/impl/DockerServiceInstanceImpl.java @@ -0,0 +1,649 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.impl; + +import org.openecomp.dcae.controller.core.service.impl.DcaeServiceInstanceImpl; +import org.openecomp.dcae.controller.service.docker.DockerConfiguration; +import org.openecomp.dcae.controller.service.docker.DockerPackage; +import org.openecomp.dcae.controller.service.docker.DockerServiceInstance; +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostServiceInstance; +import org.openecomp.ncomp.docker.ContainerPortBindings; +import org.openecomp.ncomp.docker.DockerHost; +import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EDataTypeEList; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Service Instance'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceInstanceImpl#getDockerHost Docker Host}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceInstanceImpl#getHostService Host Service}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceInstanceImpl#getDockerName Docker Name}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceInstanceImpl#getImage Image}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceInstanceImpl#getConfiguration Configuration}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceInstanceImpl#getVolumes Volumes}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceInstanceImpl#getLinks Links}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceInstanceImpl#getEnvs Envs}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceInstanceImpl#getPortBindings Port Bindings}
  • + *
  • {@link org.openecomp.dcae.controller.service.docker.impl.DockerServiceInstanceImpl#getManagerPortNumber Manager Port Number}
  • + *
+ *

+ * + * @generated + */ +public class DockerServiceInstanceImpl extends DcaeServiceInstanceImpl implements DockerServiceInstance { + /** + * The cached value of the '{@link #getDockerHost() Docker Host}' containment reference. + * + * + * @see #getDockerHost() + * @generated + * @ordered + */ + protected DockerHost dockerHost; + + /** + * The cached value of the '{@link #getHostService() Host Service}' reference. + * + * + * @see #getHostService() + * @generated + * @ordered + */ + protected DockerHostServiceInstance hostService; + + /** + * The default value of the '{@link #getDockerName() Docker Name}' attribute. + * + * + * @see #getDockerName() + * @generated + * @ordered + */ + protected static final String DOCKER_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDockerName() Docker Name}' attribute. + * + * + * @see #getDockerName() + * @generated + * @ordered + */ + protected String dockerName = DOCKER_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getImage() Image}' attribute. + * + * + * @see #getImage() + * @generated + * @ordered + */ + protected static final String IMAGE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getImage() Image}' attribute. + * + * + * @see #getImage() + * @generated + * @ordered + */ + protected String image = IMAGE_EDEFAULT; + + /** + * The cached value of the '{@link #getConfiguration() Configuration}' containment reference. + * + * + * @see #getConfiguration() + * @generated + * @ordered + */ + protected DockerConfiguration configuration; + + /** + * The cached value of the '{@link #getVolumes() Volumes}' attribute list. + * + * + * @see #getVolumes() + * @generated + * @ordered + */ + protected EList volumes; + + /** + * The cached value of the '{@link #getLinks() Links}' attribute list. + * + * + * @see #getLinks() + * @generated + * @ordered + */ + protected EList links; + + /** + * The cached value of the '{@link #getEnvs() Envs}' attribute list. + * + * + * @see #getEnvs() + * @generated + * @ordered + */ + protected EList envs; + + /** + * The cached value of the '{@link #getPortBindings() Port Bindings}' containment reference list. + * + * + * @see #getPortBindings() + * @generated + * @ordered + */ + protected EList portBindings; + + /** + * The default value of the '{@link #getManagerPortNumber() Manager Port Number}' attribute. + * + * + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected static final int MANAGER_PORT_NUMBER_EDEFAULT = 9999; + + /** + * The cached value of the '{@link #getManagerPortNumber() Manager Port Number}' attribute. + * + * + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected int managerPortNumber = MANAGER_PORT_NUMBER_EDEFAULT; + + /** + * + * + * @generated + */ + protected DockerServiceInstanceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return DockerPackage.Literals.DOCKER_SERVICE_INSTANCE; + } + + /** + * + * + * @generated + */ + public DockerHost getDockerHost() { + return dockerHost; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetDockerHost(DockerHost newDockerHost, NotificationChain msgs) { + DockerHost oldDockerHost = dockerHost; + dockerHost = newDockerHost; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_HOST, oldDockerHost, newDockerHost); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setDockerHost(DockerHost newDockerHost) { + if (newDockerHost != dockerHost) { + NotificationChain msgs = null; + if (dockerHost != null) + msgs = ((InternalEObject)dockerHost).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_HOST, null, msgs); + if (newDockerHost != null) + msgs = ((InternalEObject)newDockerHost).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_HOST, null, msgs); + msgs = basicSetDockerHost(newDockerHost, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_HOST, newDockerHost, newDockerHost)); + } + + /** + * + * + * @generated + */ + public DockerHostServiceInstance getHostService() { + if (hostService != null && hostService.eIsProxy()) { + InternalEObject oldHostService = (InternalEObject)hostService; + hostService = (DockerHostServiceInstance)eResolveProxy(oldHostService); + if (hostService != oldHostService) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, DockerPackage.DOCKER_SERVICE_INSTANCE__HOST_SERVICE, oldHostService, hostService)); + } + } + return hostService; + } + + /** + * + * + * @generated + */ + public DockerHostServiceInstance basicGetHostService() { + return hostService; + } + + /** + * + * + * @generated + */ + public void setHostService(DockerHostServiceInstance newHostService) { + DockerHostServiceInstance oldHostService = hostService; + hostService = newHostService; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_SERVICE_INSTANCE__HOST_SERVICE, oldHostService, hostService)); + } + + /** + * + * + * @generated + */ + public String getDockerName() { + return dockerName; + } + + /** + * + * + * @generated + */ + public void setDockerName(String newDockerName) { + String oldDockerName = dockerName; + dockerName = newDockerName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_NAME, oldDockerName, dockerName)); + } + + /** + * + * + * @generated + */ + public String getImage() { + return image; + } + + /** + * + * + * @generated + */ + public void setImage(String newImage) { + String oldImage = image; + image = newImage; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_SERVICE_INSTANCE__IMAGE, oldImage, image)); + } + + /** + * + * + * @generated + */ + public DockerConfiguration getConfiguration() { + return configuration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetConfiguration(DockerConfiguration newConfiguration, NotificationChain msgs) { + DockerConfiguration oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_SERVICE_INSTANCE__CONFIGURATION, oldConfiguration, newConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setConfiguration(DockerConfiguration newConfiguration) { + if (newConfiguration != configuration) { + NotificationChain msgs = null; + if (configuration != null) + msgs = ((InternalEObject)configuration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DockerPackage.DOCKER_SERVICE_INSTANCE__CONFIGURATION, null, msgs); + if (newConfiguration != null) + msgs = ((InternalEObject)newConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DockerPackage.DOCKER_SERVICE_INSTANCE__CONFIGURATION, null, msgs); + msgs = basicSetConfiguration(newConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_SERVICE_INSTANCE__CONFIGURATION, newConfiguration, newConfiguration)); + } + + /** + * + * + * @generated + */ + public EList getVolumes() { + if (volumes == null) { + volumes = new EDataTypeEList(String.class, this, DockerPackage.DOCKER_SERVICE_INSTANCE__VOLUMES); + } + return volumes; + } + + /** + * + * + * @generated + */ + public EList getLinks() { + if (links == null) { + links = new EDataTypeEList(String.class, this, DockerPackage.DOCKER_SERVICE_INSTANCE__LINKS); + } + return links; + } + + /** + * + * + * @generated + */ + public EList getEnvs() { + if (envs == null) { + envs = new EDataTypeEList(String.class, this, DockerPackage.DOCKER_SERVICE_INSTANCE__ENVS); + } + return envs; + } + + /** + * + * + * @generated + */ + public EList getPortBindings() { + if (portBindings == null) { + portBindings = new EObjectContainmentEList(ContainerPortBindings.class, this, DockerPackage.DOCKER_SERVICE_INSTANCE__PORT_BINDINGS); + } + return portBindings; + } + + /** + * + * + * @generated + */ + public int getManagerPortNumber() { + return managerPortNumber; + } + + /** + * + * + * @generated + */ + public void setManagerPortNumber(int newManagerPortNumber) { + int oldManagerPortNumber = managerPortNumber; + managerPortNumber = newManagerPortNumber; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_SERVICE_INSTANCE__MANAGER_PORT_NUMBER, oldManagerPortNumber, managerPortNumber)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_HOST: + return basicSetDockerHost(null, msgs); + case DockerPackage.DOCKER_SERVICE_INSTANCE__CONFIGURATION: + return basicSetConfiguration(null, msgs); + case DockerPackage.DOCKER_SERVICE_INSTANCE__PORT_BINDINGS: + return ((InternalEList)getPortBindings()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_HOST: + return getDockerHost(); + case DockerPackage.DOCKER_SERVICE_INSTANCE__HOST_SERVICE: + if (resolve) return getHostService(); + return basicGetHostService(); + case DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_NAME: + return getDockerName(); + case DockerPackage.DOCKER_SERVICE_INSTANCE__IMAGE: + return getImage(); + case DockerPackage.DOCKER_SERVICE_INSTANCE__CONFIGURATION: + return getConfiguration(); + case DockerPackage.DOCKER_SERVICE_INSTANCE__VOLUMES: + return getVolumes(); + case DockerPackage.DOCKER_SERVICE_INSTANCE__LINKS: + return getLinks(); + case DockerPackage.DOCKER_SERVICE_INSTANCE__ENVS: + return getEnvs(); + case DockerPackage.DOCKER_SERVICE_INSTANCE__PORT_BINDINGS: + return getPortBindings(); + case DockerPackage.DOCKER_SERVICE_INSTANCE__MANAGER_PORT_NUMBER: + return getManagerPortNumber(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_HOST: + setDockerHost((DockerHost)newValue); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__HOST_SERVICE: + setHostService((DockerHostServiceInstance)newValue); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_NAME: + setDockerName((String)newValue); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__IMAGE: + setImage((String)newValue); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__CONFIGURATION: + setConfiguration((DockerConfiguration)newValue); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__VOLUMES: + getVolumes().clear(); + getVolumes().addAll((Collection)newValue); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__LINKS: + getLinks().clear(); + getLinks().addAll((Collection)newValue); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__ENVS: + getEnvs().clear(); + getEnvs().addAll((Collection)newValue); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__PORT_BINDINGS: + getPortBindings().clear(); + getPortBindings().addAll((Collection)newValue); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__MANAGER_PORT_NUMBER: + setManagerPortNumber((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_HOST: + setDockerHost((DockerHost)null); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__HOST_SERVICE: + setHostService((DockerHostServiceInstance)null); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_NAME: + setDockerName(DOCKER_NAME_EDEFAULT); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__IMAGE: + setImage(IMAGE_EDEFAULT); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__CONFIGURATION: + setConfiguration((DockerConfiguration)null); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__VOLUMES: + getVolumes().clear(); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__LINKS: + getLinks().clear(); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__ENVS: + getEnvs().clear(); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__PORT_BINDINGS: + getPortBindings().clear(); + return; + case DockerPackage.DOCKER_SERVICE_INSTANCE__MANAGER_PORT_NUMBER: + setManagerPortNumber(MANAGER_PORT_NUMBER_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_HOST: + return dockerHost != null; + case DockerPackage.DOCKER_SERVICE_INSTANCE__HOST_SERVICE: + return hostService != null; + case DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_NAME: + return DOCKER_NAME_EDEFAULT == null ? dockerName != null : !DOCKER_NAME_EDEFAULT.equals(dockerName); + case DockerPackage.DOCKER_SERVICE_INSTANCE__IMAGE: + return IMAGE_EDEFAULT == null ? image != null : !IMAGE_EDEFAULT.equals(image); + case DockerPackage.DOCKER_SERVICE_INSTANCE__CONFIGURATION: + return configuration != null; + case DockerPackage.DOCKER_SERVICE_INSTANCE__VOLUMES: + return volumes != null && !volumes.isEmpty(); + case DockerPackage.DOCKER_SERVICE_INSTANCE__LINKS: + return links != null && !links.isEmpty(); + case DockerPackage.DOCKER_SERVICE_INSTANCE__ENVS: + return envs != null && !envs.isEmpty(); + case DockerPackage.DOCKER_SERVICE_INSTANCE__PORT_BINDINGS: + return portBindings != null && !portBindings.isEmpty(); + case DockerPackage.DOCKER_SERVICE_INSTANCE__MANAGER_PORT_NUMBER: + return managerPortNumber != MANAGER_PORT_NUMBER_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (dockerName: "); + result.append(dockerName); + result.append(", image: "); + result.append(image); + result.append(", volumes: "); + result.append(volumes); + result.append(", links: "); + result.append(links); + result.append(", envs: "); + result.append(envs); + result.append(", managerPortNumber: "); + result.append(managerPortNumber); + result.append(')'); + return result.toString(); + } + +} //DockerServiceInstanceImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/util/DockerAdapterFactory.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/util/DockerAdapterFactory.java new file mode 100644 index 0000000..8949887 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/util/DockerAdapterFactory.java @@ -0,0 +1,273 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; + +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; +import org.openecomp.dcae.controller.service.docker.*; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.docker.DockerPackage + * @generated + */ +public class DockerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static DockerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public DockerAdapterFactory() { + if (modelPackage == null) { + modelPackage = DockerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected DockerSwitch modelSwitch = + new DockerSwitch() { + @Override + public Adapter caseDockerService(DockerService object) { + return createDockerServiceAdapter(); + } + @Override + public Adapter caseDockerServiceInstance(DockerServiceInstance object) { + return createDockerServiceInstanceAdapter(); + } + @Override + public Adapter caseDockerConfiguration(DockerConfiguration object) { + return createDockerConfigurationAdapter(); + } + @Override + public Adapter caseDockerServiceDescriptor(DockerServiceDescriptor object) { + return createDockerServiceDescriptorAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseDcaeService(DcaeService object) { + return createDcaeServiceAdapter(); + } + @Override + public Adapter caseDcaeServiceInstance(DcaeServiceInstance object) { + return createDcaeServiceInstanceAdapter(); + } + @Override + public Adapter caseDcaeServiceDescriptor(DcaeServiceDescriptor object) { + return createDcaeServiceDescriptorAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.docker.DockerService Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.docker.DockerService + * @generated + */ + public Adapter createDockerServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceInstance + * @generated + */ + public Adapter createDockerServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.docker.DockerConfiguration Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.docker.DockerConfiguration + * @generated + */ + public Adapter createDockerConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor Service Descriptor}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceDescriptor + * @generated + */ + public Adapter createDockerServiceDescriptorAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeService Dcae Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeService + * @generated + */ + public Adapter createDcaeServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance Dcae Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance + * @generated + */ + public Adapter createDcaeServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor Dcae Service Descriptor}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor + * @generated + */ + public Adapter createDcaeServiceDescriptorAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //DockerAdapterFactory diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/util/DockerSwitch.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/util/DockerSwitch.java new file mode 100644 index 0000000..d712bfc --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/docker/util/DockerSwitch.java @@ -0,0 +1,266 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.docker.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; + +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; +import org.openecomp.dcae.controller.service.docker.*; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.docker.DockerPackage + * @generated + */ +public class DockerSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static DockerPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public DockerSwitch() { + if (modelPackage == null) { + modelPackage = DockerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case DockerPackage.DOCKER_SERVICE: { + DockerService dockerService = (DockerService)theEObject; + T result = caseDockerService(dockerService); + if (result == null) result = caseDcaeService(dockerService); + if (result == null) result = caseNamedEntity(dockerService); + if (result == null) result = defaultCase(theEObject); + return result; + } + case DockerPackage.DOCKER_SERVICE_INSTANCE: { + DockerServiceInstance dockerServiceInstance = (DockerServiceInstance)theEObject; + T result = caseDockerServiceInstance(dockerServiceInstance); + if (result == null) result = caseDcaeServiceInstance(dockerServiceInstance); + if (result == null) result = caseNamedEntity(dockerServiceInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + case DockerPackage.DOCKER_CONFIGURATION: { + DockerConfiguration dockerConfiguration = (DockerConfiguration)theEObject; + T result = caseDockerConfiguration(dockerConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case DockerPackage.DOCKER_SERVICE_DESCRIPTOR: { + DockerServiceDescriptor dockerServiceDescriptor = (DockerServiceDescriptor)theEObject; + T result = caseDockerServiceDescriptor(dockerServiceDescriptor); + if (result == null) result = caseDcaeServiceDescriptor(dockerServiceDescriptor); + if (result == null) result = caseNamedEntity(dockerServiceDescriptor); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDockerService(DockerService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDockerServiceInstance(DockerServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDockerConfiguration(DockerConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Service Descriptor'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Service Descriptor'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDockerServiceDescriptor(DockerServiceDescriptor object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeService(DcaeService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceInstance(DcaeServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service Descriptor'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service Descriptor'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceDescriptor(DcaeServiceDescriptor object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //DockerSwitch diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/DockerManager.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/DockerManager.java new file mode 100644 index 0000000..99ba892 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/DockerManager.java @@ -0,0 +1,72 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dockermanager; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; +import org.openecomp.dcae.controller.service.docker.DockerConfiguration; + +/** + * + * A representation of the model object 'Docker Manager'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.dockermanager.DockerManager#getConfiguration Configuration}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.dockermanager.DockermanagerPackage#getDockerManager() + * @model + * @generated + */ +public interface DockerManager extends DcaeManager { + /** + * Returns the value of the 'Configuration' containment reference. + * + *

+ * If the meaning of the 'Configuration' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Configuration' containment reference. + * @see #setConfiguration(DockerConfiguration) + * @see org.openecomp.dcae.controller.service.dockermanager.DockermanagerPackage#getDockerManager_Configuration() + * @model containment="true" + * @generated + */ + DockerConfiguration getConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dockermanager.DockerManager#getConfiguration Configuration}' containment reference. + * + * + * @param value the new value of the 'Configuration' containment reference. + * @see #getConfiguration() + * @generated + */ + void setConfiguration(DockerConfiguration value); + +} // DockerManager diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/DockermanagerFactory.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/DockermanagerFactory.java new file mode 100644 index 0000000..de949b9 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/DockermanagerFactory.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dockermanager; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.dockermanager.DockermanagerPackage + * @generated + */ +public interface DockermanagerFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + DockermanagerFactory eINSTANCE = org.openecomp.dcae.controller.service.dockermanager.impl.DockermanagerFactoryImpl.init(); + + /** + * Returns a new object of class 'Docker Manager'. + * + * + * @return a new object of class 'Docker Manager'. + * @generated + */ + DockerManager createDockerManager(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + DockermanagerPackage getDockermanagerPackage(); + +} //DockermanagerFactory diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/DockermanagerPackage.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/DockermanagerPackage.java new file mode 100644 index 0000000..a2292a8 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/DockermanagerPackage.java @@ -0,0 +1,256 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dockermanager; + +import org.openecomp.dcae.controller.core.manager.ManagerPackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.dockermanager.DockermanagerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-docker-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service'" + * @generated + */ +public interface DockermanagerPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "dockermanager"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.dockermanager"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "dockermanager"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + DockermanagerPackage eINSTANCE = org.openecomp.dcae.controller.service.dockermanager.impl.DockermanagerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.dockermanager.impl.DockerManagerImpl Docker Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.dockermanager.impl.DockerManagerImpl + * @see org.openecomp.dcae.controller.service.dockermanager.impl.DockermanagerPackageImpl#getDockerManager() + * @generated + */ + int DOCKER_MANAGER = 0; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int DOCKER_MANAGER__INPUT_STREAMS = ManagerPackage.DCAE_MANAGER__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int DOCKER_MANAGER__OUTPUT_STREAMS = ManagerPackage.DCAE_MANAGER__OUTPUT_STREAMS; + + /** + * The feature id for the 'Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int DOCKER_MANAGER__CONFIGURATION = ManagerPackage.DCAE_MANAGER_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Docker Manager' class. + * + * + * @generated + * @ordered + */ + int DOCKER_MANAGER_FEATURE_COUNT = ManagerPackage.DCAE_MANAGER_FEATURE_COUNT + 1; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_MANAGER___TEST = ManagerPackage.DCAE_MANAGER___TEST; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_MANAGER___SUSPEND = ManagerPackage.DCAE_MANAGER___SUSPEND; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_MANAGER___RESUME = ManagerPackage.DCAE_MANAGER___RESUME; + + /** + * The operation id for the 'Public Key' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_MANAGER___PUBLIC_KEY = ManagerPackage.DCAE_MANAGER___PUBLIC_KEY; + + /** + * The operation id for the 'Configuration Changed' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_MANAGER___CONFIGURATION_CHANGED = ManagerPackage.DCAE_MANAGER___CONFIGURATION_CHANGED; + + /** + * The operation id for the 'Update Streams' operation. + * + * + * @generated + * @ordered + */ + int DOCKER_MANAGER___UPDATE_STREAMS__ELIST_ELIST = ManagerPackage.DCAE_MANAGER___UPDATE_STREAMS__ELIST_ELIST; + + /** + * The number of operations of the 'Docker Manager' class. + * + * + * @generated + * @ordered + */ + int DOCKER_MANAGER_OPERATION_COUNT = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.dockermanager.DockerManager Docker Manager}'. + * + * + * @return the meta object for class 'Docker Manager'. + * @see org.openecomp.dcae.controller.service.dockermanager.DockerManager + * @generated + */ + EClass getDockerManager(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.dockermanager.DockerManager#getConfiguration Configuration}'. + * + * + * @return the meta object for the containment reference 'Configuration'. + * @see org.openecomp.dcae.controller.service.dockermanager.DockerManager#getConfiguration() + * @see #getDockerManager() + * @generated + */ + EReference getDockerManager_Configuration(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + DockermanagerFactory getDockermanagerFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.dockermanager.impl.DockerManagerImpl Docker Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.dockermanager.impl.DockerManagerImpl + * @see org.openecomp.dcae.controller.service.dockermanager.impl.DockermanagerPackageImpl#getDockerManager() + * @generated + */ + EClass DOCKER_MANAGER = eINSTANCE.getDockerManager(); + + /** + * The meta object literal for the 'Configuration' containment reference feature. + * + * + * @generated + */ + EReference DOCKER_MANAGER__CONFIGURATION = eINSTANCE.getDockerManager_Configuration(); + + } + +} //DockermanagerPackage diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/impl/DockerManagerImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/impl/DockerManagerImpl.java new file mode 100644 index 0000000..281b7a5 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/impl/DockerManagerImpl.java @@ -0,0 +1,194 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dockermanager.impl; + +import org.openecomp.dcae.controller.core.manager.impl.DcaeManagerImpl; +import org.openecomp.dcae.controller.service.docker.DockerConfiguration; +import org.openecomp.dcae.controller.service.dockermanager.DockerManager; +import org.openecomp.dcae.controller.service.dockermanager.DockermanagerPackage; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Docker Manager'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.dockermanager.impl.DockerManagerImpl#getConfiguration Configuration}
  • + *
+ *

+ * + * @generated + */ +public class DockerManagerImpl extends DcaeManagerImpl implements DockerManager { + /** + * The cached value of the '{@link #getConfiguration() Configuration}' containment reference. + * + * + * @see #getConfiguration() + * @generated + * @ordered + */ + protected DockerConfiguration configuration; + + /** + * + * + * @generated + */ + protected DockerManagerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return DockermanagerPackage.Literals.DOCKER_MANAGER; + } + + /** + * + * + * @generated + */ + public DockerConfiguration getConfiguration() { + return configuration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetConfiguration(DockerConfiguration newConfiguration, NotificationChain msgs) { + DockerConfiguration oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DockermanagerPackage.DOCKER_MANAGER__CONFIGURATION, oldConfiguration, newConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setConfiguration(DockerConfiguration newConfiguration) { + if (newConfiguration != configuration) { + NotificationChain msgs = null; + if (configuration != null) + msgs = ((InternalEObject)configuration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DockermanagerPackage.DOCKER_MANAGER__CONFIGURATION, null, msgs); + if (newConfiguration != null) + msgs = ((InternalEObject)newConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DockermanagerPackage.DOCKER_MANAGER__CONFIGURATION, null, msgs); + msgs = basicSetConfiguration(newConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockermanagerPackage.DOCKER_MANAGER__CONFIGURATION, newConfiguration, newConfiguration)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case DockermanagerPackage.DOCKER_MANAGER__CONFIGURATION: + return basicSetConfiguration(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case DockermanagerPackage.DOCKER_MANAGER__CONFIGURATION: + return getConfiguration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case DockermanagerPackage.DOCKER_MANAGER__CONFIGURATION: + setConfiguration((DockerConfiguration)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case DockermanagerPackage.DOCKER_MANAGER__CONFIGURATION: + setConfiguration((DockerConfiguration)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case DockermanagerPackage.DOCKER_MANAGER__CONFIGURATION: + return configuration != null; + } + return super.eIsSet(featureID); + } + +} //DockerManagerImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/impl/DockermanagerFactoryImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/impl/DockermanagerFactoryImpl.java new file mode 100644 index 0000000..37afecb --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/impl/DockermanagerFactoryImpl.java @@ -0,0 +1,116 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dockermanager.impl; + +import org.openecomp.dcae.controller.service.dockermanager.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class DockermanagerFactoryImpl extends EFactoryImpl implements DockermanagerFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static DockermanagerFactory init() { + try { + DockermanagerFactory theDockermanagerFactory = (DockermanagerFactory)EPackage.Registry.INSTANCE.getEFactory(DockermanagerPackage.eNS_URI); + if (theDockermanagerFactory != null) { + return theDockermanagerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new DockermanagerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public DockermanagerFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case DockermanagerPackage.DOCKER_MANAGER: return createDockerManager(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public DockerManager createDockerManager() { + DockerManagerImpl dockerManager = new DockerManagerImpl(); + return dockerManager; + } + + /** + * + * + * @generated + */ + public DockermanagerPackage getDockermanagerPackage() { + return (DockermanagerPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static DockermanagerPackage getPackage() { + return DockermanagerPackage.eINSTANCE; + } + +} //DockermanagerFactoryImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/impl/DockermanagerPackageImpl.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/impl/DockermanagerPackageImpl.java new file mode 100644 index 0000000..462f627 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/impl/DockermanagerPackageImpl.java @@ -0,0 +1,207 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dockermanager.impl; + +import org.openecomp.dcae.controller.core.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.docker.DockerPackage; +import org.openecomp.dcae.controller.service.dockermanager.DockerManager; +import org.openecomp.dcae.controller.service.dockermanager.DockermanagerFactory; +import org.openecomp.dcae.controller.service.dockermanager.DockermanagerPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class DockermanagerPackageImpl extends EPackageImpl implements DockermanagerPackage { + /** + * + * + * @generated + */ + private EClass dockerManagerEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.dockermanager.DockermanagerPackage#eNS_URI + * @see #init() + * @generated + */ + private DockermanagerPackageImpl() { + super(eNS_URI, DockermanagerFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link DockermanagerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static DockermanagerPackage init() { + if (isInited) return (DockermanagerPackage)EPackage.Registry.INSTANCE.getEPackage(DockermanagerPackage.eNS_URI); + + // Obtain or create and register package + DockermanagerPackageImpl theDockermanagerPackage = (DockermanagerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DockermanagerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new DockermanagerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + DockerPackage.eINSTANCE.eClass(); + ManagerPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theDockermanagerPackage.createPackageContents(); + + // Initialize created meta-data + theDockermanagerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theDockermanagerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(DockermanagerPackage.eNS_URI, theDockermanagerPackage); + return theDockermanagerPackage; + } + + /** + * + * + * @generated + */ + public EClass getDockerManager() { + return dockerManagerEClass; + } + + /** + * + * + * @generated + */ + public EReference getDockerManager_Configuration() { + return (EReference)dockerManagerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public DockermanagerFactory getDockermanagerFactory() { + return (DockermanagerFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + dockerManagerEClass = createEClass(DOCKER_MANAGER); + createEReference(dockerManagerEClass, DOCKER_MANAGER__CONFIGURATION); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + ManagerPackage theManagerPackage = (ManagerPackage)EPackage.Registry.INSTANCE.getEPackage(ManagerPackage.eNS_URI); + DockerPackage theDockerPackage = (DockerPackage)EPackage.Registry.INSTANCE.getEPackage(DockerPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + dockerManagerEClass.getESuperTypes().add(theManagerPackage.getDcaeManager()); + + // Initialize classes, features, and operations; add parameters + initEClass(dockerManagerEClass, DockerManager.class, "DockerManager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDockerManager_Configuration(), theDockerPackage.getDockerConfiguration(), null, "configuration", null, 0, 1, DockerManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //DockermanagerPackageImpl diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/util/DockermanagerAdapterFactory.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/util/DockermanagerAdapterFactory.java new file mode 100644 index 0000000..8ac00d4 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/util/DockermanagerAdapterFactory.java @@ -0,0 +1,161 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dockermanager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.dockermanager.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.dockermanager.DockermanagerPackage + * @generated + */ +public class DockermanagerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static DockermanagerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public DockermanagerAdapterFactory() { + if (modelPackage == null) { + modelPackage = DockermanagerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected DockermanagerSwitch modelSwitch = + new DockermanagerSwitch() { + @Override + public Adapter caseDockerManager(DockerManager object) { + return createDockerManagerAdapter(); + } + @Override + public Adapter caseDcaeManager(DcaeManager object) { + return createDcaeManagerAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.dockermanager.DockerManager Docker Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.dockermanager.DockerManager + * @generated + */ + public Adapter createDockerManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.manager.DcaeManager Dcae Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager + * @generated + */ + public Adapter createDcaeManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //DockermanagerAdapterFactory diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/util/DockermanagerSwitch.java b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/util/DockermanagerSwitch.java new file mode 100644 index 0000000..f87a202 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dockermanager/util/DockermanagerSwitch.java @@ -0,0 +1,149 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dockermanager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.dockermanager.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.dockermanager.DockermanagerPackage + * @generated + */ +public class DockermanagerSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static DockermanagerPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public DockermanagerSwitch() { + if (modelPackage == null) { + modelPackage = DockermanagerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case DockermanagerPackage.DOCKER_MANAGER: { + DockerManager dockerManager = (DockerManager)theEObject; + T result = caseDockerManager(dockerManager); + if (result == null) result = caseDcaeManager(dockerManager); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Docker Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Docker Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDockerManager(DockerManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeManager(DcaeManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //DockermanagerSwitch diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore/manager.xcore b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore/manager.xcore new file mode 100644 index 0000000..db767eb --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore/manager.xcore @@ -0,0 +1,34 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-docker-model/src/main/xcore-gen") + + +package org.openecomp.dcae.controller.service.dockermanager + +import org.openecomp.dcae.controller.core.manager.DcaeManager +import org.openecomp.dcae.controller.service.docker.DockerConfiguration + +// state of manager +class DockerManager extends DcaeManager { + contains DockerConfiguration configuration +} + diff --git a/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore/service.xcore b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore/service.xcore new file mode 100644 index 0000000..0ccf5b4 --- /dev/null +++ b/dcae-controller-service-docker/dcae-controller-service-docker-model/src/main/xcore/service.xcore @@ -0,0 +1,72 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-docker-model/src/main/xcore-gen") + +package org.openecomp.dcae.controller.service.docker + +import org.openecomp.dcae.controller.core.service.DcaeService +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance +import org.openecomp.dcae.controller.service.docker.host.service.DockerHostServiceInstance +import org.openecomp.ncomp.docker.ContainerPortBindings +import org.openecomp.ncomp.docker.DockerHost + +annotation "http://openecomp.org" as ecomp + +class DockerService extends DcaeService { + contains DockerServiceInstance[] instances +} + +// state in the controller +class DockerServiceInstance extends DcaeServiceInstance { + @ecomp(^type = "configuration") + contains DockerHost dockerHost + refers DockerHostServiceInstance hostService + String dockerName + String image + contains DockerConfiguration configuration + String[] volumes + String[] links + String[] envs + contains ContainerPortBindings[] portBindings + int managerPortNumber = "9999" +} + +// state in both controller and manager +class DockerConfiguration { + @ecomp(^type = "configuration") + String configuration +} + +class DockerServiceDescriptor extends DcaeServiceDescriptor { + String servicePackage + String serviceClass + String serviceInstanceClass + String dockerImage + String managerPortNumber + String managerUser + String encryptedPassword +} + + + + diff --git a/dcae-controller-service-docker/pom.xml b/dcae-controller-service-docker/pom.xml new file mode 100644 index 0000000..486bc6a --- /dev/null +++ b/dcae-controller-service-docker/pom.xml @@ -0,0 +1,83 @@ + + 4.0.0 + + org.openecomp.dcae.controller + dcae-controller-service-docker + 0.1.0-SNAPSHOT + pom + dcae-controller-service-docker + + + UTF-8 + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + + dcae-controller-service-docker-host + dcae-controller-service-docker-adaptor + dcae-controller-service-docker-model + dcae-controller-service-common-docker + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + diff --git a/dcae-controller-service-vm/.gitignore b/dcae-controller-service-vm/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-vm/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-vm/LICENSE.txt b/dcae-controller-service-vm/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-vm/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/.gitignore b/dcae-controller-service-vm/dcae-controller-service-common-vm/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/LICENSE.txt b/dcae-controller-service-vm/dcae-controller-service-common-vm/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.classpath b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.classpath new file mode 100644 index 0000000..d2d34b3 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.gitignore b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.project b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.project new file mode 100644 index 0000000..ed102cd --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.project @@ -0,0 +1,35 @@ + + + dcae-controller-service-common-vm-manager + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.core.resources.prefs b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.jdt.groovy.core.prefs b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/LICENSE.txt b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/META-INF/MANIFEST.MF b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/META-INF/MANIFEST.MF new file mode 100644 index 0000000..95af390 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/META-INF/MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: dcae-controller-service-common-vm-manager +Bundle-SymbolicName: dcae-controller-service-common-vm-manager +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.dcae.controller.service.common.vm.manager.tools, + org.openecomp.dcae.controller.service.common.vm.servers.manager +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + dcae-controller-service-common-vm-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/build.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/build.properties new file mode 100644 index 0000000..80bc250 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/build.properties @@ -0,0 +1,6 @@ +source.. = src/main/java/,\ + src/main/resources/,\ + src/test/java/,\ + src/test/resources/ +bin.includes = META-INF/,\ + . diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/console.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/console.properties new file mode 100644 index 0000000..3a2eb59 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:9801 +localhost.user=console +localhost.password=ZDJmYjUwZTgxZGIyNDBm diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/gui.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/gui.properties new file mode 100644 index 0000000..e69de29 diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/manager.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/manager.properties new file mode 100644 index 0000000..bb590b3 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/manager.properties @@ -0,0 +1,7 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = 9802 +server.user.console = ZDJmYjUwZTgxZGIyNDBm +server.user.gui = ZmJiMWUxYjFiN2NjODE0 +server.user.client = ZTVmNjA2OTA1YTU0ZGZk diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/managers.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/managers.properties new file mode 100644 index 0000000..d006fc0 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/managers.properties @@ -0,0 +1,3 @@ +org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance.endpoint=http://IP:PORT +org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance.user=console +org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance.password=ZDJmYjUwZTgxZGIyNDBm \ No newline at end of file diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/pom.xml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/pom.xml new file mode 100644 index 0000000..361753b --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/pom.xml @@ -0,0 +1,193 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-common-vm-manager + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-base + 0.1.0-SNAPSHOT + ../../../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-base + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-assembly-plugin + 2.6 + + + zipfile + + single + + package + + false + ${project.artifactId}-${project.version} + + src/assembly/assemble_zip.xml + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/lib + false + true + true + false + false + false + org.opendaylight,com.brocade.odl,ch.qos.logback + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/versions + + + src/main/resources/versions + + version.properties + + true + + + + + + copy-resources + + copy-resources + + validate + + ${basedir}/target/etc/bvc-extensions + + + src/main/resources/etc/bvc-extensions + + feature_config_template.cfg + feature_custom.install + + true + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + attach-artifacts + package + + attach-artifact + + + + + target/${project.artifactId}-${project.version}-runtime.zip + zip + runtime + + + + + + + + + + + + org.openecomp.dcae.controller + dcae-controller-service-common-vm-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-vm-adaptor + ${project.version} + + + diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/assembly/assemble_zip.xml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..a6503d1 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/assembly/assemble_zip.xml @@ -0,0 +1,61 @@ + + + + runtime + + zip + + + + false + + + + target + lib + + dcae-controller-service-common-vm-manager-${project.version}.jar + + + + target/assembly/ + . + + + + + . + lib + + *.jar + + + + src/main/server-gen/bin + bin + 0744 + + + + + src/main/server/bin + bin + 0744 + + + + + src/main/server-gen/scripts + scripts + + + src/main/server/scripts + scripts + + + + diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/Generator.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/Generator.java new file mode 100644 index 0000000..770d847 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/Generator.java @@ -0,0 +1,99 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.common.vm.manager.tools; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.openecomp.dcae.controller.service.vm.VmFactory; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelFactory; +import org.openecomp.ncomp.sirius.manager.generator.ControllerGenerator; +import org.openecomp.ncomp.gwt.siriusportal.model.*; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerFactory; +import org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory; +import org.openecomp.dcae.controller.service.common.vm.manager.ManagerFactory; +import org.openecomp.utils.YamlToJava; + +public class Generator { + + /** + * @param args + */ + public static void main(String[] args) { + @SuppressWarnings("unused") + ServerPackage f = ServerPackage.eINSTANCE; + genManager(); + genService(); + } + + public static void genManager() { + EObject o = ManagerFactory.eINSTANCE.createCommonVmManager(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix(); + dir = "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceCommonVmManager"); + m.setTitle("ControllerServiceCommonVmManager"); + ControllerGenerator g = new ControllerGenerator(o, m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(false); + g.addFactory(ServiceFactory.eINSTANCE); + EObject gui = ModelFactory.eINSTANCE.createGuiClientApi(); + g.addObject("gui", gui, m); + g.setProvider(VmmanagerFactory.eINSTANCE.createVirtualMachineManager(), "Dcae"); + g.generate(dir); + g.generateScripts("src/main/server-gen/bin", "controller-service-common-vm-manager"); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; +// YamlToJava.convert("src/main/resources/DcaeServiceDockerHost.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/CommonVmManager.yaml", dir + "/logging", pName); + String pName1 = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".gui.logging"; + YamlToJava.convert("src/main/sirius-gen/GuiClientApi.yaml", dir + "/gui/logging", pName1); + } + + public static void genService() { + EObject o = ServiceFactory.eINSTANCE.createCommonVmService(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+"$", "") + "servers." + p.getNsPrefix(); + dir = "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceCommonVmService"); + m.setTitle("ControllerServiceCommonVmService"); + ControllerGenerator g = new ControllerGenerator(o, m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(true); + g.addFactory(ServiceFactory.eINSTANCE); + g.setProvider(VmFactory.eINSTANCE.createVirtualMachineService(), "Dcae"); + g.generate(dir); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; +// YamlToJava.convert("src/main/resources/DcaeServiceDockerHost.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/CommonVmService.yaml", dir + "/logging", pName); + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestManager.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestManager.java new file mode 100644 index 0000000..af58900 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestManager.java @@ -0,0 +1,70 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.common.vm.manager.tools; + +import java.io.IOException; + +import org.json.JSONObject; + +import org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager; +import org.openecomp.dcae.controller.service.common.vm.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.common.vm.servers.manager.DcaeManagerFactory; +import org.openecomp.dcae.controller.service.common.vm.servers.service.DcaeServiceFactory; +import org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; + +// Testing manager from inside standard Java Process +// Manager process and Test Process in the same Java JVM in the same thread +public class TestManager implements ISiriusServer { + + public static void main(String[] args) throws IOException { + TestManager t = new TestManager(); + t.test(); + } + + private ManagementServer server; + + public void test() throws IOException { +// server = new ManagementServer(null, null, null, "manager.properties"); +// ManagerFactory f1 = new DcaeManagerFactory(this); +// server.addFactory(f1); +// CommonVmManager m = f1.createCommonVmManager(); +// server.setObject(m); +// server.start(); +// // Start interacting with the manager. +// ServiceFactory f2 = new DcaeServiceFactory(this); +// JSONObject j = ManagementServer.ecore2json(m, 100, null, true); +// System.err.println(j.toString(2)); +// x.setContrailIp("1.2.3.5"); +// j = ManagementServer.ecore2json(m, 100, null, true); +// System.err.println(j.toString(2)); +// m.restart(); +// m.hello_manager("hi"); + } + + @Override + public ManagementServer getServer() { + return server; + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestManagerServer.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestManagerServer.java new file mode 100644 index 0000000..d94cf3d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestManagerServer.java @@ -0,0 +1,90 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.common.vm.manager.tools; + +import java.io.File; +import java.io.IOException; +import java.util.TimeZone; + +import org.json.JSONObject; + +import org.openecomp.dcae.controller.service.common.vm.servers.manager.DcaeCommonVmManagerConsole; +import org.openecomp.dcae.controller.service.common.vm.servers.manager.DcaeCommonVmManagerServer; +import org.openecomp.dcae.controller.service.common.vm.servers.service.DcaeServiceFactory; +import org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.webservice.utils.FileUtils; + +// Testing manager from inside standard Java Process +// Manager process and Test Process in the same Java JVM in the different threads +// Manager thread is starting HTTP server end point. +// Testing thread (or other external clients) can use the manager. +public class TestManagerServer implements ISiriusServer { + + public static void main(String[] args) throws IOException { + TestManagerServer t = new TestManagerServer(); + t.test(); + } + + private ManagementServer server; + + public void test() throws IOException { + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + File dir = new File("data"); + if (dir.exists()) + FileUtils.deleteDirectory(dir); + final DcaeCommonVmManagerServer s = new DcaeCommonVmManagerServer("manager.properties"); + Thread t = new Thread("CommonVm host server") { + @Override + public void run() { + try { + s.runWebserver(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + }; + t.start(); + DcaeCommonVmManagerConsole c = + new DcaeCommonVmManagerConsole("console.properties", "localhost"); + // ManagerFactory f1 = new DcaeManagerFactory(this); + ServiceFactory f2 = new DcaeServiceFactory(this); +// ContrailController x = f2.createContrailController(); +// x.setContrailIp("1.2.3.4"); +// c.create("/localControllers/local1", x); +// JSONObject j = (JSONObject) c.list("/", 100); +// System.err.println(j.toString(2)); +// x.setContrailIp("1.2.3.5"); +// c.update("/localControllers/local1", x); +// j = (JSONObject) c.list("/", 100); +// System.err.println(j.toString(2)); +// c.restart(); +// c.hello_manager("hi"); + } + + public ManagementServer getServer() { + return server; + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestServiceToManager.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestServiceToManager.java new file mode 100644 index 0000000..24eb31a --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestServiceToManager.java @@ -0,0 +1,58 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.common.vm.manager.tools; + +import org.openecomp.dcae.controller.service.common.vm.servers.service.DcaeServiceFactory; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmService; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance; +import org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory; +import org.openecomp.dcae.controller.service.common.vm.service.TommyVmService; +import org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.PhysicalMachine; +import org.openecomp.dcae.controller.service.vm.VmFactory; + +// Testing service from inside standard Java Process +// This connects to a manager server +public class TestServiceToManager { + + public static void main(String[] args) { + ServiceFactory f = new DcaeServiceFactory(null); + CommonVmService s = f.createCommonVmService(); + CommonVmServiceInstance i = f.createCommonVmServiceInstance(); + s.getInstances().add(i); + i.setName("myInstance"); + PhysicalMachine p = VmFactory.eINSTANCE.createPhysicalMachine(); + i.getServers().add(p); + // Setup connection parameters. + p.setPublicIp("localhost"); + p.setManagerPortNumber(9802); + s.pollManagerConfiguration(i.getName()); + TommyVmServiceConfiguration c = ServiceFactory.eINSTANCE.createTommyVmServiceConfiguration(); + c.setPortgresJdbc("dafdf"); + // TODO more examples + i.setVmConfiguration(c); + i.setScript("/home/vagrant/log.sh"); + s.pushManagerConfiguration(i.getName()); + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProvider.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProvider.java new file mode 100644 index 0000000..66aca85 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProvider.java @@ -0,0 +1,119 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.common.vm.servers.manager; + +import java.io.File; +import java.io.OutputStreamWriter; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; + +import org.apache.log4j.Logger; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.ncomp.utils.ShellCmd; +import org.openecomp.ncomp.webservice.utils.FileUtils; +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.service.HealthTestStatus; +import org.openecomp.dcae.controller.core.service.ServiceFactory; +import org.openecomp.dcae.controller.service.servers.vmmanager.DcaeVirtualMachineManagerProvider; +import org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager; + +public class DcaeCommonVmManagerProvider extends DcaeVirtualMachineManagerProvider { + private static final Logger logger = Logger.getLogger(DcaeCommonVmManagerProvider.class); + CommonVmManager o; + + public DcaeCommonVmManagerProvider(ISiriusServer controller, CommonVmManager o) { + super(controller, o); + this.o = o; + } + + @Override + public void configurationChanged() { + super.configurationChanged(); + try { + Date now = new Date(); + controller.getServer(); + JSONObject json = ManagementServer.ecore2json(o, 1000, null, true); + String filename = "/tmp/" + now.getTime() + "json"; + OutputStreamWriter w = FileUtils.filename2writer(filename); + w.append(json.toString(2)); + w.close(); + File f = new File(filename); + f.setReadable(true); + run(o.getScript() + " configurationChanged " + filename, o.getConfigureTimeout()); + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("configurationChanged" + e); + throw new RuntimeException(e); + } + } + + @Override + public HealthTestResponse test() { + String s = run(o.getScript() + " test", o.getTestTimeout()); + String a[] = s.split(":"); + int index = s.indexOf(":"); + String msg = index < 0 ? null : s.substring(index).trim(); + String status = a[0].trim(); + HealthTestResponse res = ServiceFactory.eINSTANCE.createHealthTestResponse(); + if ("GREEN".equalsIgnoreCase(status)) { + res.setStatus(HealthTestStatus.GREEN); + res.setMessageCode(msg); + } else if ("YELLOW".equalsIgnoreCase(status)) { + res.setStatus(HealthTestStatus.YELLOW); + res.setMessageCode(msg); + } else if ("RED".equalsIgnoreCase(status)) { + res.setStatus(HealthTestStatus.RED); + res.setMessageCode(msg); + } else { + res.setStatus(HealthTestStatus.RED); + res.setMessageCode("Bad return string: " + s); + } + return res; + } + + @Override + public void suspend() { + run(o.getScript() + " suspend", o.getSuspendTimeout()); + } + + @Override + public void resume() { + run(o.getScript() + " resume", o.getResumeTimeout()); + } + + private String run(String cmd, long wait) { + try { + ShellCmd worker = new ShellCmd(cmd); + return worker.result(wait); + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.warn("Unable to run cmd: " + cmd + " " + e); + throw new RuntimeException("Unable to run cmd: " + cmd + " " + e,e); + } + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiProvider.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiProvider.java new file mode 100644 index 0000000..b762ebf --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiProvider.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.vm.servers.manager.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProvider extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProvider.class); + GuiClientApi o; + + public DcaeGuiClientApiProvider(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProvider.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProvider.java new file mode 100644 index 0000000..3d02bfd --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProvider.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.vm.servers.service; + + + + + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; + +import org.openecomp.dcae.controller.service.servers.vm.DcaeVirtualMachineServiceProvider; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; +import org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager; +import org.openecomp.dcae.controller.service.common.vm.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmService; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance; +import org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory; + + +public class DcaeCommonVmServiceProvider extends DcaeVirtualMachineServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeCommonVmServiceProvider.class); + CommonVmService o; + + public DcaeCommonVmServiceProvider(ISiriusServer controller, CommonVmService o) { + super(controller, o); + this.o = o; + } + + @Override + protected EObject convertToManagerConfiguration(VirtualMachineServiceInstance i) { + CommonVmServiceInstance i1 = (CommonVmServiceInstance) i; + CommonVmServiceInstance c = ServiceFactory.eINSTANCE.createCommonVmServiceInstance(); + c.setScript(i1.getScript()); + c.setVmConfiguration(EcoreUtil.copy(i1.getVmConfiguration())); + return c; + } + + @Override + public EObject managerConfiguration(String instanceName) { + CommonVmServiceInstance i1 = (CommonVmServiceInstance) findInstance(instanceName); + CommonVmManager c = ManagerFactory.eINSTANCE.createCommonVmManager(); + c.setScript(i1.getScript()); + c.setConfigureTimeout(i1.getConfigureTimeout()); + c.setTestTimeout(i1.getTestTimeout()); + c.setSuspendTimeout(i1.getSuspendTimeout()); + c.setResumeTimeout(i1.getResumeTimeout()); + c.setVmConfiguration(EcoreUtil.copy(i1.getVmConfiguration())); + ManagementServer.decryptPasswords(c.getVmConfiguration()); + return c; + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server-gen/bin/controller-service-common-vm-manager-controller b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server-gen/bin/controller-service-common-vm-manager-controller new file mode 100644 index 0000000..16efe22 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server-gen/bin/controller-service-common-vm-manager-controller @@ -0,0 +1,138 @@ +#!/bin/bash + +# setup env if needed. java 6 required +## JAVA_HOME= + +############################## DO NOT EDIT BELOW ########################## + +SNAME="Dcae Controller" +PNAME=controller-service-common-vm-manager-controller +CLASS=org.openecomp.dcae.controller.service.common.vm.servers.manager.DcaeCommonVmManagerServer + +############################## COMMON BELOW ########################## + +check_status () +{ + if [ -f "${_PIDFILE}" ]; then + _PID=`cat "${_PIDFILE}"` + check_status_of_pid $_PID + else + _STATUS="$SNAME (no pidfile) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + +remove_pid_file () +{ + if [ -f "${_PIDFILE}" ]; then + rm "${_PIDFILE}" + fi +} + + +_DIR=`dirname "$0"` +_DIR=`dirname "$_DIR"` + +_PIDFILE=$_DIR/PID + +CMD=$1 +shift + +check_status + +CP=$(find $_DIR/lib/*/* -name \*.jar 2>/dev/null | xargs -I X printf ":%s" X) + +JVMARGS=$(grep 'server.jvmargs' $_DIR/config/manager.properties | sed -e 's/.*=//') + +case $CMD in + status) + echo $_STATUS + exit 0 + ;; + console) + $GROOVY_HOME/bin/groovysh -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP + ;; + run) + $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + groovy) + $GROOVY_HOME/bin/groovy -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + start) + if [ "$_RUNNING" = "1" ]; then + echo $_STATUS + exit 0 + fi + mkdir -p $_DIR/logs + if [ -e $_DIR/logs/$PNAME.out.1 ]; then mv $_DIR/logs/$PNAME.out.1 $_DIR/logs/$PNAME.out.2; fi + if [ -e $_DIR/logs/$PNAME.err.1 ]; then mv $_DIR/logs/$PNAME.err.1 $_DIR/logs/$PNAME.err.2; fi + if [ -e $_DIR/logs/$PNAME.out ]; then mv $_DIR/logs/$PNAME.out $_DIR/logs/$PNAME.out.1; fi + if [ -e $_DIR/logs/$PNAME.err ]; then mv $_DIR/logs/$PNAME.err $_DIR/logs/$PNAME.err.1; fi + + nohup $JAVA_HOME/bin/java $JVMARGS -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" $CLASS >> $_DIR/logs/$PNAME.out 2>> $_DIR/logs/$PNAME.err & + + _PID=$! + echo $_PID > $_PIDFILE + sleep 5 + check_status + echo $_STATUS + if [ "$_RUNNING" = "1" ]; then + exit 0 + else + echo "Failed to start - make sure the $SNAME is fully configured properly" + exit 1 + fi + ;; + stop) + if [ "$_RUNNING" = "0" ]; then + echo $_STATUS + remove_pid_file + exit 0 + fi + echo "Stopping $SNAME..." + _PID_TO_KILL=$_PID; + echo "$SNAME (pid=${_PID_TO_KILL}) is stopping..." + kill -TERM $_PID_TO_KILL + sleep 5 + check_status_of_pid $_PID_TO_KILL + if [ "$_RUNNING" = "1" ]; then + kill -TERM $_PID_TO_KILL + fi + while [ "$_RUNNING" = "1" ]; do + sleep 2 + check_status_of_pid $_PID_TO_KILL + done + remove_pid_file + echo "$SNAME has stopped." + exit 0 + ;; + *) + echo "$0 start|stop" + ;; +esac + + diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/bin/manager.sh b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/bin/manager.sh new file mode 100644 index 0000000..1d2f31a --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/bin/manager.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +export JAVA_HOME=/opt/app/java/jdk/jdk170 +export GROOVY_HOME=/opt/app/groovy/246 + +PATH=$JAVA_HOME/bin:$GROOVY_HOME/bin:$PATH + +cd $(dirname $(dirname $0)) + +ROOT=$(pwd) +CMD=$ROOT/bin/$(echo $(basename $(pwd)) | sed s/dcae-//)-controller + + +mkdir -p logs/ +echo $(date) bin/manager.sh "$@" >> logs/manager.sh.log + +CMD1=$1 +VMTYPE=$(ls /tmp/vm-*manager.properties | sed s/-manager.properties// | sed sx/tmp/xx) + +case $CMD1 in + start) + for jar in /opt/app/{ncomp,dcae}-*-model/lib/*jar; do cp -p $jar lib/; done + JVMARGS=$(cat config/manager.properties | grep JVMARGS | sed 's/[^=]*=//') + $CMD $CMD1 $JVMARGS + ;; + stop|console) + $CMD $CMD1 + ;; + config) + CONFIGDIR=/var/config/DCAE/chef + if [ ! -e $CONFIGDIR/$VMTYPE-manager.properties ]; then CONFIGDIR=/tmp; fi + mkdir -p config + for FILE in $CONFIGDIR/$VMTYPE-*; do + FILE2=$(echo $FILE | sed s/.*$VMTYPE-//) + cp $FILE config/$FILE2 + done + /opt/app/dcae-controller-core-utils/bin/setup_https.sh config/manager.properties + ;; + restore|clean) + ;; + restart) + $0 stop + $0 start + ;; + restart2) + $CMD stop + JVMARGS=$(cat config/manager.properties | grep JVMARGS | sed 's/[^=]*=//') + $CMD start $JVMARGS + ;; + *) + echo unknown command: $CMD1 + ;; +esac + + diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/console.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/console.properties new file mode 100644 index 0000000..4b63607 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:PORT +localhost.user=console +localhost.password=CONSOLE_PW diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/gui.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/gui.properties new file mode 100644 index 0000000..e69de29 diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/log4j.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/log4j.properties new file mode 100644 index 0000000..8b3b8f9 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/log4j.properties @@ -0,0 +1,24 @@ +#log4j.debug=0 +log4j.rootLogger=warn, file +log4j.logger.org.openecomp.ncomp=info, file +log4j.additivity.org.openecomp.ncomp=false +log4j.logger.org.openecomp.ncomp.datarouter=warn, file +log4j.additivity.org.openecomp.ncomp.datarouter=false +log4j.logger.org.apache.http.headers=debug, file +log4j.logger.org.apache.http.wire=debug, file + +## uploaded logger +log4j.logger.org.openecomp.ncomp.sirius.manager.uploaded=info, uploaded +log4j.additivity.org.openecomp.ncomp.sirius.manager.uploaded=false +## request logging +log4j.logger.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=info, requests +log4j.additivity.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=false + + +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=logs/BBBB.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n +log4j.appender.file.MaxFileSize=50MB +log4j.appender.file.MaxBackupIndex=5 + diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/makefile b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/makefile new file mode 100644 index 0000000..e272181 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/makefile @@ -0,0 +1,9 @@ + +restart: stop start + +start: + M2_HOME=$(HOME)/.m2 bin/BBBB-controller start +stop: + bin/BBBB-controller stop +console: + bin/BBBB-controller console diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/manager.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/manager.properties new file mode 100644 index 0000000..4605389 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/manager.properties @@ -0,0 +1,7 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = PORT +server.user.console = CONSOLE_PW +server.user.gui = GUI_PW +server.user.client = CLIENT_PW diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/pw.sh.sh b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/pw.sh.sh new file mode 100644 index 0000000..cd022ae --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/pw.sh.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +### used to generate random passwords + + +echo '#!/bin/bash' +echo "" + +echo 'cat \' + +for i in CONSOLE GUI CLIENT +do + echo ' |' sed s/${i}_PW/$(echo $i:$(date +%s) | sha256sum | base64 | head -c 20 ; echo)/ \\ +done + \ No newline at end of file diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/scripts/console.groovy b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/scripts/console.groovy new file mode 100644 index 0000000..f215de5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/scripts/console.groovy @@ -0,0 +1,27 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.openecomp.dcae.controller.service.common.vm.servers.manager.DcaeCommonVmManagerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +manager = new DcaeCommonVmManagerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmManager.yaml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmManager.yaml new file mode 100644 index 0000000..63cb773 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmManager.yaml @@ -0,0 +1,179 @@ +operations: + test: {} + suspend: {} + resume: {} + publicKey: {} + configurationChanged: {} + updateStreams: {} + logs: {} + metrics: {} + properties: {} + uploadInfo: {} + getValues: {} + getValuesAll: {} + getMessages: {} + getRequestLogger: {} + evaluate: {} + update: {} + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_publicKey: + decription: Remote call publicKey + REMOTE_configurationChanged: + decription: Remote call configurationChanged + REMOTE_updateStreams: + decription: Remote call updateStreams + REMOTE_logs: + decription: Remote call logs + REMOTE_metrics: + decription: Remote call metrics + REMOTE_properties: + decription: Remote call properties + REMOTE_uploadInfo: + decription: Remote call uploadInfo + REMOTE_getValues: + decription: Remote call getValues + REMOTE_getValuesAll: + decription: Remote call getValuesAll + REMOTE_getMessages: + decription: Remote call getMessages + REMOTE_getRequestLogger: + decription: Remote call getRequestLogger + REMOTE_evaluate: + decription: Remote call evaluate + REMOTE_update: + decription: Remote call update +messages: + dummy: {} + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + publicKey: + errorCode: publicKey-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + configurationChanged: + errorCode: configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateStreams: + errorCode: updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + logs: + errorCode: logs-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + metrics: + errorCode: metrics-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + properties: + errorCode: properties-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + uploadInfo: + errorCode: uploadInfo-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getValues: + errorCode: getValues-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getValuesAll: + errorCode: getValuesAll-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getMessages: + errorCode: getMessages-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getRequestLogger: + errorCode: getRequestLogger-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + evaluate: + errorCode: evaluate-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + update: + errorCode: update-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_publicKey: + errorCode: REMOTE-publicKey-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_configurationChanged: + errorCode: REMOTE-configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateStreams: + errorCode: REMOTE-updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_logs: + errorCode: REMOTE-logs-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_metrics: + errorCode: REMOTE-metrics-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_properties: + errorCode: REMOTE-properties-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_uploadInfo: + errorCode: REMOTE-uploadInfo-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getValues: + errorCode: REMOTE-getValues-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getValuesAll: + errorCode: REMOTE-getValuesAll-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getMessages: + errorCode: REMOTE-getMessages-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getRequestLogger: + errorCode: REMOTE-getRequestLogger-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_evaluate: + errorCode: REMOTE-evaluate-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_update: + errorCode: REMOTE-update-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmService.yaml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmService.yaml new file mode 100644 index 0000000..6ac8c34 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmService.yaml @@ -0,0 +1,135 @@ +operations: + deploy: {} + undeploy: {} + test: {} + suspend: {} + resume: {} + pushManagerConfiguration: {} + pollManagerConfiguration: {} + managerConfiguration: {} + managerOperation: {} + updateConfigurationFromPolicy: {} + runHealthTests: {} + updateDeploymentStatus: {} + REMOTE_deploy: + decription: Remote call deploy + REMOTE_undeploy: + decription: Remote call undeploy + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_pushManagerConfiguration: + decription: Remote call pushManagerConfiguration + REMOTE_pollManagerConfiguration: + decription: Remote call pollManagerConfiguration + REMOTE_managerConfiguration: + decription: Remote call managerConfiguration + REMOTE_managerOperation: + decription: Remote call managerOperation + REMOTE_updateConfigurationFromPolicy: + decription: Remote call updateConfigurationFromPolicy + REMOTE_runHealthTests: + decription: Remote call runHealthTests + REMOTE_updateDeploymentStatus: + decription: Remote call updateDeploymentStatus +messages: + dummy: {} + deploy: + errorCode: deploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + undeploy: + errorCode: undeploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pushManagerConfiguration: + errorCode: pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pollManagerConfiguration: + errorCode: pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerConfiguration: + errorCode: managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerOperation: + errorCode: managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateConfigurationFromPolicy: + errorCode: updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + runHealthTests: + errorCode: runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateDeploymentStatus: + errorCode: updateDeploymentStatus-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_deploy: + errorCode: REMOTE-deploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_undeploy: + errorCode: REMOTE-undeploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pushManagerConfiguration: + errorCode: REMOTE-pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pollManagerConfiguration: + errorCode: REMOTE-pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerConfiguration: + errorCode: REMOTE-managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerOperation: + errorCode: REMOTE-managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateConfigurationFromPolicy: + errorCode: REMOTE-updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_runHealthTests: + errorCode: REMOTE-runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateDeploymentStatus: + errorCode: REMOTE-updateDeploymentStatus-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/GuiClientApi.yaml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/GuiClientApi.yaml new file mode 100644 index 0000000..bf3d69d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/GuiClientApi.yaml @@ -0,0 +1,69 @@ +operations: + getTree: {} + getObject: {} + getTimeSerie: {} + getTable: {} + getHtml: {} + getGraph: {} + REMOTE_getTree: + decription: Remote call getTree + REMOTE_getObject: + decription: Remote call getObject + REMOTE_getTimeSerie: + decription: Remote call getTimeSerie + REMOTE_getTable: + decription: Remote call getTable + REMOTE_getHtml: + decription: Remote call getHtml + REMOTE_getGraph: + decription: Remote call getGraph +messages: + dummy: {} + getTree: + errorCode: getTree-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getObject: + errorCode: getObject-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTimeSerie: + errorCode: getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTable: + errorCode: getTable-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getHtml: + errorCode: getHtml-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getGraph: + errorCode: getGraph-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_getTree: + errorCode: REMOTE-getTree-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getObject: + errorCode: REMOTE-getObject-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTimeSerie: + errorCode: REMOTE-getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTable: + errorCode: REMOTE-getTable-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getHtml: + errorCode: REMOTE-getHtml-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getGraph: + errorCode: REMOTE-getGraph-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManager.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManager.java new file mode 100644 index 0000000..dabe74e --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManager.java @@ -0,0 +1,529 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.vm.servers.manager; + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.common.vm.servers.manager.logging.CommonVmManagerOperationEnum; +import org.openecomp.dcae.controller.service.common.vm.servers.manager.logging.CommonVmManagerMessageEnum; + + + + + + + +import java.util.Date; + + + + + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; + + + + + +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + + +import org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl; + + + +public class DcaeCommonVmManager extends CommonVmManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeCommonVmManager.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeCommonVmManagerProvider controller; + ISiriusServer server; + + public DcaeCommonVmManager(ISiriusServer server) { + this.server = server; + this.controller = new DcaeCommonVmManagerProvider(server,this); + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.test); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.test(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmManagerMessageEnum.test, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void suspend() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.suspend); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.suspend(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmManagerMessageEnum.suspend, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_); + + } + + public void resume() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.resume); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.resume(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmManagerMessageEnum.resume, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_); + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.publicKey); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.publicKey(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmManagerMessageEnum.publicKey, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void configurationChanged() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.configurationChanged); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.configurationChanged(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmManagerMessageEnum.configurationChanged, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.OKAY, duration_); + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.START, duration_,inputStreams,outputStreams); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.updateStreams); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.ERROR, duration_,inputStreams,outputStreams); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmManagerMessageEnum.updateStreams, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.OKAY, duration_,inputStreams,outputStreams); + + } + + public void logs(org.json.JSONObject cx, EList logs) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.START, duration_,cx,logs); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.logs); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.logs(cx,logs); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.ERROR, duration_,cx,logs); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmManagerMessageEnum.logs, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.OKAY, duration_,cx,logs); + + } + + public void metrics(org.json.JSONObject cx, EList metrics) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.START, duration_,cx,metrics); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.metrics); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.metrics(cx,metrics); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.ERROR, duration_,cx,metrics); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmManagerMessageEnum.metrics, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.OKAY, duration_,cx,metrics); + + } + + public void properties(org.json.JSONObject cx, EList l) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.START, duration_,cx,l); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.properties); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.properties(cx,l); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.ERROR, duration_,cx,l); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmManagerMessageEnum.properties, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.OKAY, duration_,cx,l); + + } + + public void uploadInfo(org.json.JSONObject cx, EList info) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.START, duration_,cx,info); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.uploadInfo); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.uploadInfo(cx,info); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.ERROR, duration_,cx,info); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmManagerMessageEnum.uploadInfo, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.OKAY, duration_,cx,info); + + } + + public EList getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.START, duration_,cx,path,start,end,option,relativeInterval); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.getValues); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getValues(cx,path,start,end,option,relativeInterval); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.ERROR, duration_,cx,path,start,end,option,relativeInterval); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmManagerMessageEnum.getValues, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.OKAY, duration_,cx,path,start,end,option,relativeInterval); + return res; + } + + public EList getValuesAll(org.json.JSONObject cx, java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.START, duration_,cx,path,metrics,start,end,option,relativeInterval); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.getValuesAll); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getValuesAll(cx,path,metrics,start,end,option,relativeInterval); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.ERROR, duration_,cx,path,metrics,start,end,option,relativeInterval); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmManagerMessageEnum.getValuesAll, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.OKAY, duration_,cx,path,metrics,start,end,option,relativeInterval); + return res; + } + + public EList getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.START, duration_,cx,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.getMessages); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getMessages(cx,path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.ERROR, duration_,cx,path,start,end); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmManagerMessageEnum.getMessages, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.OKAY, duration_,cx,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.START, duration_,userName,action,resourcePath,context); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.getRequestLogger); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getRequestLogger(userName,action,resourcePath,context); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.ERROR, duration_,userName,action,resourcePath,context); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmManagerMessageEnum.getRequestLogger, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.OKAY, duration_,userName,action,resourcePath,context); + return res; + } + + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.START, duration_,path,function); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.evaluate); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.evaluate(path,function); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.ERROR, duration_,path,function); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmManagerMessageEnum.evaluate, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.OKAY, duration_,path,function); + return res; + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.START, duration_,path,function); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.update); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.update(path,function); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.ERROR, duration_,path,function); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmManagerMessageEnum.update, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.OKAY, duration_,path,function); + + } + + + + + + + public static void ecoreSetup() { + DcaeCommonVmManagerProvider.ecoreSetup(); + } + public DcaeCommonVmManagerProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerClient.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerClient.java new file mode 100644 index 0000000..57a8525 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerClient.java @@ -0,0 +1,344 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.vm.servers.manager; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl; +import org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.common.vm.servers.manager.logging.CommonVmManagerOperationEnum; +import org.openecomp.dcae.controller.service.common.vm.servers.manager.logging.CommonVmManagerMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeCommonVmManagerClient extends CommonVmManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeCommonVmManagerClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeCommonVmManagerClient(String file, String name) { + DcaeCommonVmManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeCommonVmManagerClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeCommonVmManagerClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@test: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend() { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspend: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume() { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@resume: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public java.lang.String publicKey() { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_publicKey); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "publicKey", null); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_publicKey, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@publicKey: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void configurationChanged() { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_configurationChanged); + + try { + client.operationPath("/resources", c, "configurationChanged", null); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_configurationChanged, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@configurationChanged: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void updateStreams(EList inputStreams, EList outputStreams) { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_updateStreams); + + try { + client.operationPath("/resources", c, "updateStreams", null, inputStreams,outputStreams); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_updateStreams, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateStreams: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void logs(org.json.JSONObject cx, EList logs) { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_logs); + + try { + client.operationPath("/resources", c, "logs", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,logs); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_logs, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@logs: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void metrics(org.json.JSONObject cx, EList metrics) { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_metrics); + + try { + client.operationPath("/resources", c, "metrics", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,metrics); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_metrics, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@metrics: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void properties(org.json.JSONObject cx, EList l) { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_properties); + + try { + client.operationPath("/resources", c, "properties", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,l); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_properties, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@properties: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void uploadInfo(org.json.JSONObject cx, EList info) { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_uploadInfo); + + try { + client.operationPath("/resources", c, "uploadInfo", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,info); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_uploadInfo, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@uploadInfo: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public EList getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_getValues); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getValues", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end,option,relativeInterval); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_getValues, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getValues: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList getValuesAll(org.json.JSONObject cx, java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_getValuesAll); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getValuesAll", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,metrics,start,end,option,relativeInterval); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_getValuesAll, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getValuesAll: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_getMessages); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getMessages", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_getMessages, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getMessages: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_getRequestLogger); + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res; + try { + res = (org.openecomp.ncomp.sirius.manager.server.LoggerInfo) client.operationPath("/resources", c, "getRequestLogger", null, userName,action,resourcePath,context); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_getRequestLogger, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getRequestLogger: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_evaluate); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "evaluate", null, path,function); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_evaluate, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@evaluate: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_update); + + try { + client.operationPath("/resources", c, "update", null, path,function); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_update, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@update: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerConsole.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerConsole.java new file mode 100644 index 0000000..8f94bc4 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerConsole.java @@ -0,0 +1,237 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.common.vm.servers.manager; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + +import org.openecomp.dcae.controller.service.common.vm.servers.manager.gui.DcaeGuiClientApiConsole; + + +public class DcaeCommonVmManagerConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeCommonVmManagerConsole.class); + protected DcaeCommonVmManagerClient controller; + + + DcaeGuiClientApiConsole gui; + + + public DcaeCommonVmManagerConsole(String filename, String name) { + super(filename, name); + controller = new DcaeCommonVmManagerClient(filename,name); + client = controller.client; + + gui = new DcaeGuiClientApiConsole(filename,name); + } + + public DcaeCommonVmManagerConsole(AbstractClient c) { + controller = new DcaeCommonVmManagerClient(c); + client = controller.client; + } + + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend() { + + try { + controller.suspend(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume() { + + try { + controller.resume(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + try { + res = controller.publicKey(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void configurationChanged() { + + try { + controller.configurationChanged(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void logs(EList logs) { + + try { + controller.logs(null,logs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void metrics(EList metrics) { + + try { + controller.metrics(null,metrics); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void properties(EList l) { + + try { + controller.properties(null,l); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void uploadInfo(EList info) { + + try { + controller.uploadInfo(null,info); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public EList getValues(java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + try { + res = controller.getValues(null,path,start,end,option,relativeInterval); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getValuesAll(java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + try { + res = controller.getValuesAll(null,path,metrics,start,end,option,relativeInterval); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getMessages(java.lang.String path, java.lang.Long start, java.lang.Long end) { + EList res = null; + try { + res = controller.getMessages(null,path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res = null; + try { + res = controller.getRequestLogger(userName,action,resourcePath,context); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EList res = null; + try { + res = controller.evaluate(path,function); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + + try { + controller.update(path,function); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProviderTemplate.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProviderTemplate.java new file mode 100644 index 0000000..e7bfd3a --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProviderTemplate.java @@ -0,0 +1,72 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.vm.servers.manager; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import java.util.Date; + + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; + + +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + + +import org.openecomp.dcae.controller.service.servers.vmmanager.DcaeVirtualMachineManagerProvider; + + +import org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl; +import org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager; + + +public class DcaeCommonVmManagerProviderTemplate extends DcaeVirtualMachineManagerProvider { + private static final Logger logger = Logger.getLogger(DcaeCommonVmManagerProviderTemplate.class); + CommonVmManager o; + + public DcaeCommonVmManagerProviderTemplate(ISiriusServer controller, CommonVmManager o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerServer.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerServer.java new file mode 100644 index 0000000..639b301 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerServer.java @@ -0,0 +1,112 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.common.vm.servers.manager; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager; + + +import org.openecomp.dcae.controller.service.common.vm.servers.manager.gui.DcaeModelFactory; + + + + + +public class DcaeCommonVmManagerServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeCommonVmManagerServer.class); + String serverPath; + ManagementServer server; + DcaeCommonVmManager controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeManagerFactory f = new DcaeManagerFactory(this); + + + String guiPath; + ManagementServer guiServer; + + + public DcaeCommonVmManagerServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeCommonVmManager.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "CommonVmManager", serverPath, filename); + server.addFactory(f); + + server.addFactory(org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory.eINSTANCE); + + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeCommonVmManager) server.find("/").o; + webServer = new Jetty8Server("manager.properties"); + webServer.add("/resources",server); + + + + EFactory guiFactory = new DcaeModelFactory(this); + guiPath = serverPath + "/gui"; + guiServer = new ManagementServer(guiFactory, "GuiClientApi", guiPath, "gui.properties"); + guiServer.start(); + webServer.add("/gui",guiServer); + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeCommonVmManagerServer s = new DcaeCommonVmManagerServer("manager.properties"); + s.runWebserver(); + } + public CommonVmManager getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeManagerFactory.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeManagerFactory.java new file mode 100644 index 0000000..5b7ccce --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeManagerFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.vm.servers.manager; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager; +import org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.common.vm.manager.impl.ManagerFactoryImpl; + + + + + +public class DcaeManagerFactory extends ManagerFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeManagerFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ManagerPackage.eINSTANCE; } + public DcaeManagerFactory(ISiriusServer server) { + this.server = server; + } + @Override + public CommonVmManager createCommonVmManager() { + return new DcaeCommonVmManager(server); + } + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApi.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApi.java new file mode 100644 index 0000000..d9da84b --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApi.java @@ -0,0 +1,271 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.vm.servers.manager.gui; + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.common.vm.servers.manager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.common.vm.servers.manager.gui.logging.GuiClientApiMessageEnum; + + + + + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + + + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + + + + +import org.openecomp.ncomp.sirius.manager.Subject; + + + + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + + + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; + + + +public class DcaeGuiClientApi extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApi.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeGuiClientApiProvider controller; + ISiriusServer server; + + public DcaeGuiClientApi(ISiriusServer server) { + this.server = server; + this.controller = new DcaeGuiClientApiProvider(server,this); + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTree); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getTree(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getTree, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.OKAY, duration_); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.START, duration_,path); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getObject); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getObject(path); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.ERROR, duration_,path); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getObject, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.OKAY, duration_,path); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.START, duration_,path,start,end,duration); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTimeSerie); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.ERROR, duration_,path,start,end,duration); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getTimeSerie, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.OKAY, duration_,path,start,end,duration); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTable); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getTable(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getTable, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getHtml); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getHtml(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getHtml, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getGraph); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getGraph(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + ecomplogger.warn(GuiClientApiMessageEnum.getGraph, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + + + + + + public static void ecoreSetup() { + DcaeGuiClientApiProvider.ecoreSetup(); + } + public DcaeGuiClientApiProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiClient.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiClient.java new file mode 100644 index 0000000..05d15d1 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiClient.java @@ -0,0 +1,175 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.vm.servers.manager.gui; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.dcae.controller.service.common.vm.servers.manager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.common.vm.servers.manager.gui.logging.GuiClientApiMessageEnum; + + +import org.openecomp.dcae.controller.service.common.vm.servers.manager.DcaeCommonVmManager; + + + + +@SuppressWarnings("unchecked") +public class DcaeGuiClientApiClient extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeGuiClientApiClient(String file, String name) { + DcaeCommonVmManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTree); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTree) client.operationPath("/gui", c, "getTree", null); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTree, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getTree: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getObject); + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiObject) client.operationPath("/gui", c, "getObject", null, path); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getObject, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getObject: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTimeSerie); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie) client.operationPath("/gui", c, "getTimeSerie", null, path,start,end,duration); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTimeSerie, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getTimeSerie: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTable); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTable) client.operationPath("/gui", c, "getTable", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTable, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getTable: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getHtml); + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml) client.operationPath("/gui", c, "getHtml", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getHtml, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getHtml: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getGraph); + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res; + try { + res = (org.openecomp.ncomp.sirius.manager.graph.GuiGraph) client.operationPath("/gui", c, "getGraph", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getGraph, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getGraph: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiConsole.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiConsole.java new file mode 100644 index 0000000..3865b07 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiConsole.java @@ -0,0 +1,123 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.common.vm.servers.manager.gui; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeGuiClientApiConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiConsole.class); + protected DcaeGuiClientApiClient controller; + + + + + public DcaeGuiClientApiConsole(String filename, String name) { + super(filename, name); + controller = new DcaeGuiClientApiClient(filename,name); + client = controller.client; + + } + + public DcaeGuiClientApiConsole(AbstractClient c) { + controller = new DcaeGuiClientApiClient(c); + client = controller.client; + } + + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + try { + res = controller.getTree(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + try { + res = controller.getObject(path); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + try { + res = controller.getTable(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + try { + res = controller.getHtml(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + try { + res = controller.getGraph(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java new file mode 100644 index 0000000..62999fa --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.vm.servers.manager.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProviderTemplate extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProviderTemplate.class); + GuiClientApi o; + + public DcaeGuiClientApiProviderTemplate(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeModelFactory.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeModelFactory.java new file mode 100644 index 0000000..b027f3b --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeModelFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.vm.servers.manager.gui; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelFactoryImpl; + +import org.openecomp.dcae.controller.service.common.vm.servers.manager.DcaeCommonVmManagerServer; + + + +public class DcaeModelFactory extends ModelFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeModelFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ModelPackage.eINSTANCE; } + public DcaeModelFactory(ISiriusServer server) { + this.server = server; + } + @Override + public GuiClientApi createGuiClientApi() { + return new DcaeGuiClientApi(server); + } + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApi.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApi.properties new file mode 100644 index 0000000..8705ab8 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApi.properties @@ -0,0 +1,78 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +getTree=\ + getTree-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getObject=\ + getObject-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTimeSerie=\ + getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTable=\ + getTable-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getHtml=\ + getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getGraph=\ + getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_getTree=\ + REMOTE-getTree-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getObject=\ + REMOTE-getObject-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTimeSerie=\ + REMOTE-getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTable=\ + REMOTE-getTable-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getHtml=\ + REMOTE-getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getGraph=\ + REMOTE-getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiMessageEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiMessageEnum.java new file mode 100644 index 0000000..26a6f5c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiMessageEnum.java @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.vm.servers.manager.gui.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum GuiClientApiMessageEnum implements EcompMessageEnum { + + dummy, + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.common.vm.servers.manager.gui.logging.GuiClientApi"); + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiOperationEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiOperationEnum.java new file mode 100644 index 0000000..d42fa0c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiOperationEnum.java @@ -0,0 +1,41 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.vm.servers.manager.gui.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum GuiClientApiOperationEnum implements EcompOperationEnum { + + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManager.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManager.properties new file mode 100644 index 0000000..9eb6331 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManager.properties @@ -0,0 +1,198 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +publicKey=\ + publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +configurationChanged=\ + configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateStreams=\ + updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +logs=\ + logs-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +metrics=\ + metrics-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +properties=\ + properties-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +uploadInfo=\ + uploadInfo-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getValues=\ + getValues-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getValuesAll=\ + getValuesAll-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getMessages=\ + getMessages-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getRequestLogger=\ + getRequestLogger-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +evaluate=\ + evaluate-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +update=\ + update-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_publicKey=\ + REMOTE-publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_configurationChanged=\ + REMOTE-configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateStreams=\ + REMOTE-updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_logs=\ + REMOTE-logs-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_metrics=\ + REMOTE-metrics-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_properties=\ + REMOTE-properties-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_uploadInfo=\ + REMOTE-uploadInfo-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getValues=\ + REMOTE-getValues-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getValuesAll=\ + REMOTE-getValuesAll-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getMessages=\ + REMOTE-getMessages-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getRequestLogger=\ + REMOTE-getRequestLogger-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_evaluate=\ + REMOTE-evaluate-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_update=\ + REMOTE-update-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerMessageEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerMessageEnum.java new file mode 100644 index 0000000..4c3dd1d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerMessageEnum.java @@ -0,0 +1,67 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.vm.servers.manager.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum CommonVmManagerMessageEnum implements EcompMessageEnum { + + dummy, + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams, + REMOTE_logs, + REMOTE_metrics, + REMOTE_properties, + REMOTE_uploadInfo, + REMOTE_getValues, + REMOTE_getValuesAll, + REMOTE_getMessages, + REMOTE_getRequestLogger, + REMOTE_evaluate, + REMOTE_update; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.common.vm.servers.manager.logging.CommonVmManager"); + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerOperationEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerOperationEnum.java new file mode 100644 index 0000000..0b6ccd7 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerOperationEnum.java @@ -0,0 +1,61 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.vm.servers.manager.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum CommonVmManagerOperationEnum implements EcompOperationEnum { + + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams, + REMOTE_logs, + REMOTE_metrics, + REMOTE_properties, + REMOTE_uploadInfo, + REMOTE_getValues, + REMOTE_getValuesAll, + REMOTE_getMessages, + REMOTE_getRequestLogger, + REMOTE_evaluate, + REMOTE_update; +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmService.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmService.java new file mode 100644 index 0000000..df84442 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmService.java @@ -0,0 +1,408 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.vm.servers.service; + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.common.vm.servers.service.logging.CommonVmServiceOperationEnum; +import org.openecomp.dcae.controller.service.common.vm.servers.service.logging.CommonVmServiceMessageEnum; + + + + +import org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceImpl; + + + +public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeCommonVmService.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeCommonVmServiceProvider controller; + ISiriusServer server; + + public DcaeCommonVmService(ISiriusServer server) { + this.server = server; + this.controller = new DcaeCommonVmServiceProvider(server,this); + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.START, duration_,instanceName,containerPath); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.deploy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.deploy(instanceName,containerPath); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.ERROR, duration_,instanceName,containerPath); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmServiceMessageEnum.deploy, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.OKAY, duration_,instanceName,containerPath); + + } + + public void undeploy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.undeploy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.undeploy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmServiceMessageEnum.undeploy, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.test); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.test(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmServiceMessageEnum.test, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public void suspend(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.suspend); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.suspend(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmServiceMessageEnum.suspend, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void resume(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.resume); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.resume(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmServiceMessageEnum.resume, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.pushManagerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.pushManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmServiceMessageEnum.pushManagerConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.pollManagerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.pollManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmServiceMessageEnum.pollManagerConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.managerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.managerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmServiceMessageEnum.managerConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.START, duration_,instanceName,operation,parameters); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.managerOperation); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.ERROR, duration_,instanceName,operation,parameters); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmServiceMessageEnum.managerOperation, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.OKAY, duration_,instanceName,operation,parameters); + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.updateConfigurationFromPolicy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmServiceMessageEnum.updateConfigurationFromPolicy, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void runHealthTests() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.runHealthTests); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.runHealthTests(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmServiceMessageEnum.runHealthTests, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.OKAY, duration_); + + } + + public void updateDeploymentStatus() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.updateDeploymentStatus); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.updateDeploymentStatus(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(CommonVmServiceMessageEnum.updateDeploymentStatus, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.OKAY, duration_); + + } + + + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + DcaeCommonVmServiceProvider.ecoreSetup(); + } + public DcaeCommonVmServiceProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceClient.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceClient.java new file mode 100644 index 0000000..19ffd2d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceClient.java @@ -0,0 +1,276 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.vm.servers.service; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceImpl; +import org.openecomp.dcae.controller.service.common.vm.service.ServicePackage; +import org.openecomp.dcae.controller.service.common.vm.servers.service.logging.CommonVmServiceOperationEnum; +import org.openecomp.dcae.controller.service.common.vm.servers.service.logging.CommonVmServiceMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeCommonVmServiceClient extends CommonVmServiceImpl { + public static final Logger logger = Logger.getLogger(DcaeCommonVmServiceClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeCommonVmServiceClient(String file, String name) { + DcaeCommonVmService.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeCommonVmServiceClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeCommonVmServiceClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_deploy); + + try { + client.operationPath("/resources", c, "deploy", null, instanceName,containerPath); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_deploy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@deploy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void undeploy(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_undeploy); + + try { + client.operationPath("/resources", c, "undeploy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_undeploy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@undeploy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@test: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspend: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@resume: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pushManagerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_pushManagerConfiguration); + + try { + client.operationPath("/resources", c, "pushManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_pushManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@pushManagerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pollManagerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_pollManagerConfiguration); + + try { + client.operationPath("/resources", c, "pollManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_pollManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@pollManagerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_managerConfiguration); + org.eclipse.emf.ecore.EObject res; + try { + res = (org.eclipse.emf.ecore.EObject) client.operationPath("/resources", c, "managerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_managerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@managerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_managerOperation); + org.json.JSONObject res; + try { + res = (org.json.JSONObject) client.operationPath("/resources", c, "managerOperation", null, instanceName,operation,parameters); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_managerOperation, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@managerOperation: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_updateConfigurationFromPolicy); + + try { + client.operationPath("/resources", c, "updateConfigurationFromPolicy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateConfigurationFromPolicy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void runHealthTests() { + EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_runHealthTests); + + try { + client.operationPath("/resources", c, "runHealthTests", null); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_runHealthTests, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@runHealthTests: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void updateDeploymentStatus() { + EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_updateDeploymentStatus); + + try { + client.operationPath("/resources", c, "updateDeploymentStatus", null); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_updateDeploymentStatus, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateDeploymentStatus: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceConsole.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceConsole.java new file mode 100644 index 0000000..50a6129 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceConsole.java @@ -0,0 +1,189 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.common.vm.servers.service; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeCommonVmServiceConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeCommonVmServiceConsole.class); + protected DcaeCommonVmServiceClient controller; + + + + + public DcaeCommonVmServiceConsole(String filename, String name) { + super(filename, name); + controller = new DcaeCommonVmServiceClient(filename,name); + client = controller.client; + + } + + public DcaeCommonVmServiceConsole(AbstractClient c) { + controller = new DcaeCommonVmServiceClient(c); + client = controller.client; + } + + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + try { + controller.deploy(instanceName,containerPath); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void undeploy(java.lang.String instanceName) { + + try { + controller.undeploy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend(java.lang.String instanceName) { + + try { + controller.suspend(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume(java.lang.String instanceName) { + + try { + controller.resume(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pushManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pollManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + try { + res = controller.managerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void runHealthTests() { + + try { + controller.runHealthTests(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void updateDeploymentStatus() { + + try { + controller.updateDeploymentStatus(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProviderTemplate.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProviderTemplate.java new file mode 100644 index 0000000..a49ef66 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProviderTemplate.java @@ -0,0 +1,65 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.vm.servers.service; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.dcae.controller.service.servers.vm.DcaeVirtualMachineServiceProvider; + + +import org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceImpl; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmService; + + +public class DcaeCommonVmServiceProviderTemplate extends DcaeVirtualMachineServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeCommonVmServiceProviderTemplate.class); + CommonVmService o; + + public DcaeCommonVmServiceProviderTemplate(ISiriusServer controller, CommonVmService o) { + super(controller, o); + this.o = o; + } + + + + + + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceServer.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceServer.java new file mode 100644 index 0000000..67e4088 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceServer.java @@ -0,0 +1,101 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.common.vm.servers.service; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmService; + + + + + + +public class DcaeCommonVmServiceServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeCommonVmServiceServer.class); + String serverPath; + ManagementServer server; + DcaeCommonVmService controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeServiceFactory f = new DcaeServiceFactory(this); + + + + public DcaeCommonVmServiceServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeCommonVmService.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "CommonVmService", serverPath, filename); + server.addFactory(f); + + server.addFactory(org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory.eINSTANCE); + + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeCommonVmService) server.find("/").o; + webServer = new Jetty8Server("service.properties"); + webServer.add("/resources",server); + + + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeCommonVmServiceServer s = new DcaeCommonVmServiceServer("service.properties"); + s.runWebserver(); + } + public CommonVmService getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeServiceFactory.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeServiceFactory.java new file mode 100644 index 0000000..c64c8f6 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeServiceFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.common.vm.servers.service; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmService; +import org.openecomp.dcae.controller.service.common.vm.service.ServicePackage; +import org.openecomp.dcae.controller.service.common.vm.service.impl.ServiceFactoryImpl; + + + + + +public class DcaeServiceFactory extends ServiceFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeServiceFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ServicePackage.eINSTANCE; } + public DcaeServiceFactory(ISiriusServer server) { + this.server = server; + } + @Override + public CommonVmService createCommonVmService() { + return new DcaeCommonVmService(server); + } + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmService.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmService.properties new file mode 100644 index 0000000..d32cf07 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmService.properties @@ -0,0 +1,150 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +deploy=\ + deploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +undeploy=\ + undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pushManagerConfiguration=\ + pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pollManagerConfiguration=\ + pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerConfiguration=\ + managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerOperation=\ + managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateConfigurationFromPolicy=\ + updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +runHealthTests=\ + runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateDeploymentStatus=\ + updateDeploymentStatus-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_deploy=\ + REMOTE-deploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_undeploy=\ + REMOTE-undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pushManagerConfiguration=\ + REMOTE-pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pollManagerConfiguration=\ + REMOTE-pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerConfiguration=\ + REMOTE-managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerOperation=\ + REMOTE-managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateConfigurationFromPolicy=\ + REMOTE-updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_runHealthTests=\ + REMOTE-runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateDeploymentStatus=\ + REMOTE-updateDeploymentStatus-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceMessageEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceMessageEnum.java new file mode 100644 index 0000000..b46423a --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceMessageEnum.java @@ -0,0 +1,59 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.vm.servers.service.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum CommonVmServiceMessageEnum implements EcompMessageEnum { + + dummy, + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateDeploymentStatus, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateDeploymentStatus; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.common.vm.servers.service.logging.CommonVmService"); + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceOperationEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceOperationEnum.java new file mode 100644 index 0000000..f0f2971 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceOperationEnum.java @@ -0,0 +1,53 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.common.vm.servers.service.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum CommonVmServiceOperationEnum implements EcompOperationEnum { + + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateDeploymentStatus, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateDeploymentStatus; +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.classpath b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.gitignore b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.project b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.project new file mode 100644 index 0000000..4ec7482 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.project @@ -0,0 +1,34 @@ + + + dcae-controller-service-common-vm-model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/LICENSE.txt b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/META-INF/MANIFEST.MF b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..2eece10 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/META-INF/MANIFEST.MF @@ -0,0 +1,29 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: dcae-controller-service-common-vm-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.openecomp.dcae.controller.service.common.vm.manager, + org.openecomp.dcae.controller.service.common.vm.manager.impl, + org.openecomp.dcae.controller.service.common.vm.manager.util, + org.openecomp.dcae.controller.service.common.vm.service, + org.openecomp.dcae.controller.service.common.vm.service.impl, + org.openecomp.dcae.controller.service.common.vm.service.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + dcae-controller-core-model;visibility:=reexport, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-openstack-model;visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + dcae-controller-service-common-vm-model;visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + dcae-controller-service-vm-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-agent-model;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/build.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/build.properties @@ -0,0 +1,11 @@ +# + +bin.includes = .,\ + src/main/xcore/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/xcore-gen/,\ + src/main/xcore/ +output.. = target/classes/ diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/plugin.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/plugin.xml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/plugin.xml new file mode 100644 index 0000000..03e5c2a --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/plugin.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/pom.xml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/pom.xml new file mode 100644 index 0000000..2ee6f0c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/pom.xml @@ -0,0 +1,24 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-common-vm-model + + org.openecomp.ncomp.maven + ncomp-maven-xcore + 0.1.0-SNAPSHOT + ../../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore + + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-vm-model + ${project.version} + + + diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/CommonVmManager.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/CommonVmManager.java new file mode 100644 index 0000000..27f9976 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/CommonVmManager.java @@ -0,0 +1,212 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.manager; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; + +/** + * + * A representation of the model object 'Common Vm Manager'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getScript Script}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getConfigureTimeout Configure Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getTestTimeout Test Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getSuspendTimeout Suspend Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getResumeTimeout Resume Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getVmConfiguration Vm Configuration}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage#getCommonVmManager() + * @model + * @generated + */ +public interface CommonVmManager extends VirtualMachineManager { + /** + * Returns the value of the 'Script' attribute. + * + *

+ * If the meaning of the 'Script' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Script' attribute. + * @see #setScript(String) + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage#getCommonVmManager_Script() + * @model unique="false" + * @generated + */ + String getScript(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getScript Script}' attribute. + * + * + * @param value the new value of the 'Script' attribute. + * @see #getScript() + * @generated + */ + void setScript(String value); + + /** + * Returns the value of the 'Configure Timeout' attribute. + * The default value is "60000". + * + *

+ * If the meaning of the 'Configure Timeout' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Configure Timeout' attribute. + * @see #setConfigureTimeout(int) + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage#getCommonVmManager_ConfigureTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getConfigureTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getConfigureTimeout Configure Timeout}' attribute. + * + * + * @param value the new value of the 'Configure Timeout' attribute. + * @see #getConfigureTimeout() + * @generated + */ + void setConfigureTimeout(int value); + + /** + * Returns the value of the 'Test Timeout' attribute. + * The default value is "60000". + * + *

+ * If the meaning of the 'Test Timeout' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Test Timeout' attribute. + * @see #setTestTimeout(int) + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage#getCommonVmManager_TestTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getTestTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getTestTimeout Test Timeout}' attribute. + * + * + * @param value the new value of the 'Test Timeout' attribute. + * @see #getTestTimeout() + * @generated + */ + void setTestTimeout(int value); + + /** + * Returns the value of the 'Suspend Timeout' attribute. + * The default value is "60000". + * + *

+ * If the meaning of the 'Suspend Timeout' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Suspend Timeout' attribute. + * @see #setSuspendTimeout(int) + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage#getCommonVmManager_SuspendTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getSuspendTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getSuspendTimeout Suspend Timeout}' attribute. + * + * + * @param value the new value of the 'Suspend Timeout' attribute. + * @see #getSuspendTimeout() + * @generated + */ + void setSuspendTimeout(int value); + + /** + * Returns the value of the 'Resume Timeout' attribute. + * The default value is "60000". + * + *

+ * If the meaning of the 'Resume Timeout' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Resume Timeout' attribute. + * @see #setResumeTimeout(int) + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage#getCommonVmManager_ResumeTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getResumeTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getResumeTimeout Resume Timeout}' attribute. + * + * + * @param value the new value of the 'Resume Timeout' attribute. + * @see #getResumeTimeout() + * @generated + */ + void setResumeTimeout(int value); + + /** + * Returns the value of the 'Vm Configuration' containment reference. + * + *

+ * If the meaning of the 'Vm Configuration' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Vm Configuration' containment reference. + * @see #setVmConfiguration(CommonVmServiceConfiguration) + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage#getCommonVmManager_VmConfiguration() + * @model containment="true" + * @generated + */ + CommonVmServiceConfiguration getVmConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getVmConfiguration Vm Configuration}' containment reference. + * + * + * @param value the new value of the 'Vm Configuration' containment reference. + * @see #getVmConfiguration() + * @generated + */ + void setVmConfiguration(CommonVmServiceConfiguration value); + +} // CommonVmManager diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/ManagerFactory.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/ManagerFactory.java new file mode 100644 index 0000000..906e656 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/ManagerFactory.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.manager; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage + * @generated + */ +public interface ManagerFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ManagerFactory eINSTANCE = org.openecomp.dcae.controller.service.common.vm.manager.impl.ManagerFactoryImpl.init(); + + /** + * Returns a new object of class 'Common Vm Manager'. + * + * + * @return a new object of class 'Common Vm Manager'. + * @generated + */ + CommonVmManager createCommonVmManager(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ManagerPackage getManagerPackage(); + +} //ManagerFactory diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/ManagerPackage.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/ManagerPackage.java new file mode 100644 index 0000000..fa668c4 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/ManagerPackage.java @@ -0,0 +1,505 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.manager; + +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-common-vm-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.common.vm'" + * @generated + */ +public interface ManagerPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "manager"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.common.vm.manager"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "manager"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ManagerPackage eINSTANCE = org.openecomp.dcae.controller.service.common.vm.manager.impl.ManagerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl Common Vm Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl + * @see org.openecomp.dcae.controller.service.common.vm.manager.impl.ManagerPackageImpl#getCommonVmManager() + * @generated + */ + int COMMON_VM_MANAGER = 0; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER__INPUT_STREAMS = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER__OUTPUT_STREAMS = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__OUTPUT_STREAMS; + + /** + * The feature id for the 'Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER__CONFIGURATION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION; + + /** + * The feature id for the 'Component' containment reference. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER__COMPONENT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT; + + /** + * The feature id for the 'Script' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER__SCRIPT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Configure Timeout' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER__CONFIGURE_TIMEOUT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Test Timeout' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER__TEST_TIMEOUT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Suspend Timeout' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER__SUSPEND_TIMEOUT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Resume Timeout' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER__RESUME_TIMEOUT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Vm Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER__VM_CONFIGURATION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 5; + + /** + * The number of structural features of the 'Common Vm Manager' class. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER_FEATURE_COUNT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 6; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER___TEST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___TEST; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER___SUSPEND = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___SUSPEND; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER___RESUME = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___RESUME; + + /** + * The operation id for the 'Public Key' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER___PUBLIC_KEY = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___PUBLIC_KEY; + + /** + * The operation id for the 'Configuration Changed' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER___CONFIGURATION_CHANGED = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___CONFIGURATION_CHANGED; + + /** + * The operation id for the 'Update Streams' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER___UPDATE_STREAMS__ELIST_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE_STREAMS__ELIST_ELIST; + + /** + * The operation id for the 'Logs' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER___LOGS__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___LOGS__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Metrics' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER___METRICS__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___METRICS__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Properties' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER___PROPERTIES__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___PROPERTIES__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Upload Info' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Get Values' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + + /** + * The operation id for the 'Get Values All' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + + /** + * The operation id for the 'Get Messages' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG; + + /** + * The operation id for the 'Get Request Logger' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT; + + /** + * The operation id for the 'Evaluate' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER___EVALUATE__STRING_FUNCTION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___EVALUATE__STRING_FUNCTION; + + /** + * The operation id for the 'Update' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER___UPDATE__STRING_FUNCTION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE__STRING_FUNCTION; + + /** + * The number of operations of the 'Common Vm Manager' class. + * + * + * @generated + * @ordered + */ + int COMMON_VM_MANAGER_OPERATION_COUNT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager Common Vm Manager}'. + * + * + * @return the meta object for class 'Common Vm Manager'. + * @see org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager + * @generated + */ + EClass getCommonVmManager(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getScript Script}'. + * + * + * @return the meta object for the attribute 'Script'. + * @see org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getScript() + * @see #getCommonVmManager() + * @generated + */ + EAttribute getCommonVmManager_Script(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getConfigureTimeout Configure Timeout}'. + * + * + * @return the meta object for the attribute 'Configure Timeout'. + * @see org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getConfigureTimeout() + * @see #getCommonVmManager() + * @generated + */ + EAttribute getCommonVmManager_ConfigureTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getTestTimeout Test Timeout}'. + * + * + * @return the meta object for the attribute 'Test Timeout'. + * @see org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getTestTimeout() + * @see #getCommonVmManager() + * @generated + */ + EAttribute getCommonVmManager_TestTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getSuspendTimeout Suspend Timeout}'. + * + * + * @return the meta object for the attribute 'Suspend Timeout'. + * @see org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getSuspendTimeout() + * @see #getCommonVmManager() + * @generated + */ + EAttribute getCommonVmManager_SuspendTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getResumeTimeout Resume Timeout}'. + * + * + * @return the meta object for the attribute 'Resume Timeout'. + * @see org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getResumeTimeout() + * @see #getCommonVmManager() + * @generated + */ + EAttribute getCommonVmManager_ResumeTimeout(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getVmConfiguration Vm Configuration}'. + * + * + * @return the meta object for the containment reference 'Vm Configuration'. + * @see org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getVmConfiguration() + * @see #getCommonVmManager() + * @generated + */ + EReference getCommonVmManager_VmConfiguration(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ManagerFactory getManagerFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl Common Vm Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl + * @see org.openecomp.dcae.controller.service.common.vm.manager.impl.ManagerPackageImpl#getCommonVmManager() + * @generated + */ + EClass COMMON_VM_MANAGER = eINSTANCE.getCommonVmManager(); + + /** + * The meta object literal for the 'Script' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_VM_MANAGER__SCRIPT = eINSTANCE.getCommonVmManager_Script(); + + /** + * The meta object literal for the 'Configure Timeout' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_VM_MANAGER__CONFIGURE_TIMEOUT = eINSTANCE.getCommonVmManager_ConfigureTimeout(); + + /** + * The meta object literal for the 'Test Timeout' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_VM_MANAGER__TEST_TIMEOUT = eINSTANCE.getCommonVmManager_TestTimeout(); + + /** + * The meta object literal for the 'Suspend Timeout' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_VM_MANAGER__SUSPEND_TIMEOUT = eINSTANCE.getCommonVmManager_SuspendTimeout(); + + /** + * The meta object literal for the 'Resume Timeout' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_VM_MANAGER__RESUME_TIMEOUT = eINSTANCE.getCommonVmManager_ResumeTimeout(); + + /** + * The meta object literal for the 'Vm Configuration' containment reference feature. + * + * + * @generated + */ + EReference COMMON_VM_MANAGER__VM_CONFIGURATION = eINSTANCE.getCommonVmManager_VmConfiguration(); + + } + +} //ManagerPackage diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/CommonVmManagerImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/CommonVmManagerImpl.java new file mode 100644 index 0000000..9f6e7c5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/CommonVmManagerImpl.java @@ -0,0 +1,473 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.manager.impl; + +import org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager; +import org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; + +import org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Common Vm Manager'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl#getScript Script}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl#getConfigureTimeout Configure Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl#getTestTimeout Test Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl#getSuspendTimeout Suspend Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl#getResumeTimeout Resume Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl#getVmConfiguration Vm Configuration}
  • + *
+ *

+ * + * @generated + */ +public class CommonVmManagerImpl extends VirtualMachineManagerImpl implements CommonVmManager { + /** + * The default value of the '{@link #getScript() Script}' attribute. + * + * + * @see #getScript() + * @generated + * @ordered + */ + protected static final String SCRIPT_EDEFAULT = null; + /** + * The cached value of the '{@link #getScript() Script}' attribute. + * + * + * @see #getScript() + * @generated + * @ordered + */ + protected String script = SCRIPT_EDEFAULT; + /** + * The default value of the '{@link #getConfigureTimeout() Configure Timeout}' attribute. + * + * + * @see #getConfigureTimeout() + * @generated + * @ordered + */ + protected static final int CONFIGURE_TIMEOUT_EDEFAULT = 60000; + /** + * The cached value of the '{@link #getConfigureTimeout() Configure Timeout}' attribute. + * + * + * @see #getConfigureTimeout() + * @generated + * @ordered + */ + protected int configureTimeout = CONFIGURE_TIMEOUT_EDEFAULT; + /** + * The default value of the '{@link #getTestTimeout() Test Timeout}' attribute. + * + * + * @see #getTestTimeout() + * @generated + * @ordered + */ + protected static final int TEST_TIMEOUT_EDEFAULT = 60000; + /** + * The cached value of the '{@link #getTestTimeout() Test Timeout}' attribute. + * + * + * @see #getTestTimeout() + * @generated + * @ordered + */ + protected int testTimeout = TEST_TIMEOUT_EDEFAULT; + /** + * The default value of the '{@link #getSuspendTimeout() Suspend Timeout}' attribute. + * + * + * @see #getSuspendTimeout() + * @generated + * @ordered + */ + protected static final int SUSPEND_TIMEOUT_EDEFAULT = 60000; + /** + * The cached value of the '{@link #getSuspendTimeout() Suspend Timeout}' attribute. + * + * + * @see #getSuspendTimeout() + * @generated + * @ordered + */ + protected int suspendTimeout = SUSPEND_TIMEOUT_EDEFAULT; + /** + * The default value of the '{@link #getResumeTimeout() Resume Timeout}' attribute. + * + * + * @see #getResumeTimeout() + * @generated + * @ordered + */ + protected static final int RESUME_TIMEOUT_EDEFAULT = 60000; + /** + * The cached value of the '{@link #getResumeTimeout() Resume Timeout}' attribute. + * + * + * @see #getResumeTimeout() + * @generated + * @ordered + */ + protected int resumeTimeout = RESUME_TIMEOUT_EDEFAULT; + /** + * The cached value of the '{@link #getVmConfiguration() Vm Configuration}' containment reference. + * + * + * @see #getVmConfiguration() + * @generated + * @ordered + */ + protected CommonVmServiceConfiguration vmConfiguration; + + /** + * + * + * @generated + */ + protected CommonVmManagerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ManagerPackage.Literals.COMMON_VM_MANAGER; + } + + /** + * + * + * @generated + */ + public String getScript() { + return script; + } + + /** + * + * + * @generated + */ + public void setScript(String newScript) { + String oldScript = script; + script = newScript; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_VM_MANAGER__SCRIPT, oldScript, script)); + } + + /** + * + * + * @generated + */ + public int getConfigureTimeout() { + return configureTimeout; + } + + /** + * + * + * @generated + */ + public void setConfigureTimeout(int newConfigureTimeout) { + int oldConfigureTimeout = configureTimeout; + configureTimeout = newConfigureTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_VM_MANAGER__CONFIGURE_TIMEOUT, oldConfigureTimeout, configureTimeout)); + } + + /** + * + * + * @generated + */ + public int getTestTimeout() { + return testTimeout; + } + + /** + * + * + * @generated + */ + public void setTestTimeout(int newTestTimeout) { + int oldTestTimeout = testTimeout; + testTimeout = newTestTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_VM_MANAGER__TEST_TIMEOUT, oldTestTimeout, testTimeout)); + } + + /** + * + * + * @generated + */ + public int getSuspendTimeout() { + return suspendTimeout; + } + + /** + * + * + * @generated + */ + public void setSuspendTimeout(int newSuspendTimeout) { + int oldSuspendTimeout = suspendTimeout; + suspendTimeout = newSuspendTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_VM_MANAGER__SUSPEND_TIMEOUT, oldSuspendTimeout, suspendTimeout)); + } + + /** + * + * + * @generated + */ + public int getResumeTimeout() { + return resumeTimeout; + } + + /** + * + * + * @generated + */ + public void setResumeTimeout(int newResumeTimeout) { + int oldResumeTimeout = resumeTimeout; + resumeTimeout = newResumeTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_VM_MANAGER__RESUME_TIMEOUT, oldResumeTimeout, resumeTimeout)); + } + + /** + * + * + * @generated + */ + public CommonVmServiceConfiguration getVmConfiguration() { + return vmConfiguration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetVmConfiguration(CommonVmServiceConfiguration newVmConfiguration, NotificationChain msgs) { + CommonVmServiceConfiguration oldVmConfiguration = vmConfiguration; + vmConfiguration = newVmConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION, oldVmConfiguration, newVmConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setVmConfiguration(CommonVmServiceConfiguration newVmConfiguration) { + if (newVmConfiguration != vmConfiguration) { + NotificationChain msgs = null; + if (vmConfiguration != null) + msgs = ((InternalEObject)vmConfiguration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION, null, msgs); + if (newVmConfiguration != null) + msgs = ((InternalEObject)newVmConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION, null, msgs); + msgs = basicSetVmConfiguration(newVmConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION, newVmConfiguration, newVmConfiguration)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION: + return basicSetVmConfiguration(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ManagerPackage.COMMON_VM_MANAGER__SCRIPT: + return getScript(); + case ManagerPackage.COMMON_VM_MANAGER__CONFIGURE_TIMEOUT: + return getConfigureTimeout(); + case ManagerPackage.COMMON_VM_MANAGER__TEST_TIMEOUT: + return getTestTimeout(); + case ManagerPackage.COMMON_VM_MANAGER__SUSPEND_TIMEOUT: + return getSuspendTimeout(); + case ManagerPackage.COMMON_VM_MANAGER__RESUME_TIMEOUT: + return getResumeTimeout(); + case ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION: + return getVmConfiguration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ManagerPackage.COMMON_VM_MANAGER__SCRIPT: + setScript((String)newValue); + return; + case ManagerPackage.COMMON_VM_MANAGER__CONFIGURE_TIMEOUT: + setConfigureTimeout((Integer)newValue); + return; + case ManagerPackage.COMMON_VM_MANAGER__TEST_TIMEOUT: + setTestTimeout((Integer)newValue); + return; + case ManagerPackage.COMMON_VM_MANAGER__SUSPEND_TIMEOUT: + setSuspendTimeout((Integer)newValue); + return; + case ManagerPackage.COMMON_VM_MANAGER__RESUME_TIMEOUT: + setResumeTimeout((Integer)newValue); + return; + case ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION: + setVmConfiguration((CommonVmServiceConfiguration)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ManagerPackage.COMMON_VM_MANAGER__SCRIPT: + setScript(SCRIPT_EDEFAULT); + return; + case ManagerPackage.COMMON_VM_MANAGER__CONFIGURE_TIMEOUT: + setConfigureTimeout(CONFIGURE_TIMEOUT_EDEFAULT); + return; + case ManagerPackage.COMMON_VM_MANAGER__TEST_TIMEOUT: + setTestTimeout(TEST_TIMEOUT_EDEFAULT); + return; + case ManagerPackage.COMMON_VM_MANAGER__SUSPEND_TIMEOUT: + setSuspendTimeout(SUSPEND_TIMEOUT_EDEFAULT); + return; + case ManagerPackage.COMMON_VM_MANAGER__RESUME_TIMEOUT: + setResumeTimeout(RESUME_TIMEOUT_EDEFAULT); + return; + case ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION: + setVmConfiguration((CommonVmServiceConfiguration)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ManagerPackage.COMMON_VM_MANAGER__SCRIPT: + return SCRIPT_EDEFAULT == null ? script != null : !SCRIPT_EDEFAULT.equals(script); + case ManagerPackage.COMMON_VM_MANAGER__CONFIGURE_TIMEOUT: + return configureTimeout != CONFIGURE_TIMEOUT_EDEFAULT; + case ManagerPackage.COMMON_VM_MANAGER__TEST_TIMEOUT: + return testTimeout != TEST_TIMEOUT_EDEFAULT; + case ManagerPackage.COMMON_VM_MANAGER__SUSPEND_TIMEOUT: + return suspendTimeout != SUSPEND_TIMEOUT_EDEFAULT; + case ManagerPackage.COMMON_VM_MANAGER__RESUME_TIMEOUT: + return resumeTimeout != RESUME_TIMEOUT_EDEFAULT; + case ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION: + return vmConfiguration != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (script: "); + result.append(script); + result.append(", configureTimeout: "); + result.append(configureTimeout); + result.append(", testTimeout: "); + result.append(testTimeout); + result.append(", suspendTimeout: "); + result.append(suspendTimeout); + result.append(", resumeTimeout: "); + result.append(resumeTimeout); + result.append(')'); + return result.toString(); + } + +} //CommonVmManagerImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/ManagerFactoryImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/ManagerFactoryImpl.java new file mode 100644 index 0000000..b4326a0 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/ManagerFactoryImpl.java @@ -0,0 +1,116 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.manager.impl; + +import org.openecomp.dcae.controller.service.common.vm.manager.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ManagerFactoryImpl extends EFactoryImpl implements ManagerFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ManagerFactory init() { + try { + ManagerFactory theManagerFactory = (ManagerFactory)EPackage.Registry.INSTANCE.getEFactory(ManagerPackage.eNS_URI); + if (theManagerFactory != null) { + return theManagerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ManagerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ManagerFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ManagerPackage.COMMON_VM_MANAGER: return createCommonVmManager(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public CommonVmManager createCommonVmManager() { + CommonVmManagerImpl commonVmManager = new CommonVmManagerImpl(); + return commonVmManager; + } + + /** + * + * + * @generated + */ + public ManagerPackage getManagerPackage() { + return (ManagerPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ManagerPackage getPackage() { + return ManagerPackage.eINSTANCE; + } + +} //ManagerFactoryImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/ManagerPackageImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/ManagerPackageImpl.java new file mode 100644 index 0000000..64be77d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/ManagerPackageImpl.java @@ -0,0 +1,265 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.manager.impl; + +import org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager; +import org.openecomp.dcae.controller.service.common.vm.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.common.vm.service.ServicePackage; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ManagerPackageImpl extends EPackageImpl implements ManagerPackage { + /** + * + * + * @generated + */ + private EClass commonVmManagerEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage#eNS_URI + * @see #init() + * @generated + */ + private ManagerPackageImpl() { + super(eNS_URI, ManagerFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ManagerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ManagerPackage init() { + if (isInited) return (ManagerPackage)EPackage.Registry.INSTANCE.getEPackage(ManagerPackage.eNS_URI); + + // Obtain or create and register package + ManagerPackageImpl theManagerPackage = (ManagerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ManagerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ManagerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + VmmanagerPackage.eINSTANCE.eClass(); + ServicePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theManagerPackage.createPackageContents(); + + // Initialize created meta-data + theManagerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theManagerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ManagerPackage.eNS_URI, theManagerPackage); + return theManagerPackage; + } + + /** + * + * + * @generated + */ + public EClass getCommonVmManager() { + return commonVmManagerEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCommonVmManager_Script() { + return (EAttribute)commonVmManagerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCommonVmManager_ConfigureTimeout() { + return (EAttribute)commonVmManagerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCommonVmManager_TestTimeout() { + return (EAttribute)commonVmManagerEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCommonVmManager_SuspendTimeout() { + return (EAttribute)commonVmManagerEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getCommonVmManager_ResumeTimeout() { + return (EAttribute)commonVmManagerEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getCommonVmManager_VmConfiguration() { + return (EReference)commonVmManagerEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public ManagerFactory getManagerFactory() { + return (ManagerFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + commonVmManagerEClass = createEClass(COMMON_VM_MANAGER); + createEAttribute(commonVmManagerEClass, COMMON_VM_MANAGER__SCRIPT); + createEAttribute(commonVmManagerEClass, COMMON_VM_MANAGER__CONFIGURE_TIMEOUT); + createEAttribute(commonVmManagerEClass, COMMON_VM_MANAGER__TEST_TIMEOUT); + createEAttribute(commonVmManagerEClass, COMMON_VM_MANAGER__SUSPEND_TIMEOUT); + createEAttribute(commonVmManagerEClass, COMMON_VM_MANAGER__RESUME_TIMEOUT); + createEReference(commonVmManagerEClass, COMMON_VM_MANAGER__VM_CONFIGURATION); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + VmmanagerPackage theVmmanagerPackage = (VmmanagerPackage)EPackage.Registry.INSTANCE.getEPackage(VmmanagerPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + ServicePackage theServicePackage = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + commonVmManagerEClass.getESuperTypes().add(theVmmanagerPackage.getVirtualMachineManager()); + + // Initialize classes, features, and operations; add parameters + initEClass(commonVmManagerEClass, CommonVmManager.class, "CommonVmManager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCommonVmManager_Script(), theEcorePackage.getEString(), "script", null, 0, 1, CommonVmManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonVmManager_ConfigureTimeout(), theEcorePackage.getEInt(), "configureTimeout", "60000", 0, 1, CommonVmManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonVmManager_TestTimeout(), theEcorePackage.getEInt(), "testTimeout", "60000", 0, 1, CommonVmManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonVmManager_SuspendTimeout(), theEcorePackage.getEInt(), "suspendTimeout", "60000", 0, 1, CommonVmManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonVmManager_ResumeTimeout(), theEcorePackage.getEInt(), "resumeTimeout", "60000", 0, 1, CommonVmManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCommonVmManager_VmConfiguration(), theServicePackage.getCommonVmServiceConfiguration(), null, "vmConfiguration", null, 0, 1, CommonVmManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //ManagerPackageImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/util/ManagerAdapterFactory.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/util/ManagerAdapterFactory.java new file mode 100644 index 0000000..e3dff15 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/util/ManagerAdapterFactory.java @@ -0,0 +1,239 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.common.vm.manager.*; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage + * @generated + */ +public class ManagerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ManagerAdapterFactory() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ManagerSwitch modelSwitch = + new ManagerSwitch() { + @Override + public Adapter caseCommonVmManager(CommonVmManager object) { + return createCommonVmManagerAdapter(); + } + @Override + public Adapter caseDcaeManager(DcaeManager object) { + return createDcaeManagerAdapter(); + } + @Override + public Adapter caseSouthBoundApi(SouthBoundApi object) { + return createSouthBoundApiAdapter(); + } + @Override + public Adapter caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return createSouthBoundApiWithProxyAdapter(); + } + @Override + public Adapter caseAbstractManagementServer(AbstractManagementServer object) { + return createAbstractManagementServerAdapter(); + } + @Override + public Adapter caseVirtualMachineManager(VirtualMachineManager object) { + return createVirtualMachineManagerAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager Common Vm Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager + * @generated + */ + public Adapter createCommonVmManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.manager.DcaeManager Dcae Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager + * @generated + */ + public Adapter createDcaeManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApi South Bound Api}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApi + * @generated + */ + public Adapter createSouthBoundApiAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy South Bound Api With Proxy}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy + * @generated + */ + public Adapter createSouthBoundApiWithProxyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer Abstract Management Server}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer + * @generated + */ + public Adapter createAbstractManagementServerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager Virtual Machine Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager + * @generated + */ + public Adapter createVirtualMachineManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ManagerAdapterFactory diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/util/ManagerSwitch.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/util/ManagerSwitch.java new file mode 100644 index 0000000..2bd5be4 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/util/ManagerSwitch.java @@ -0,0 +1,219 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.common.vm.manager.*; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage + * @generated + */ +public class ManagerSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ManagerSwitch() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ManagerPackage.COMMON_VM_MANAGER: { + CommonVmManager commonVmManager = (CommonVmManager)theEObject; + T result = caseCommonVmManager(commonVmManager); + if (result == null) result = caseVirtualMachineManager(commonVmManager); + if (result == null) result = caseDcaeManager(commonVmManager); + if (result == null) result = caseAbstractManagementServer(commonVmManager); + if (result == null) result = caseSouthBoundApiWithProxy(commonVmManager); + if (result == null) result = caseSouthBoundApi(commonVmManager); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Common Vm Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Common Vm Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCommonVmManager(CommonVmManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeManager(DcaeManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'South Bound Api'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'South Bound Api'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApi(SouthBoundApi object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'South Bound Api With Proxy'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'South Bound Api With Proxy'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Abstract Management Server'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Abstract Management Server'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAbstractManagementServer(AbstractManagementServer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineManager(VirtualMachineManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ManagerSwitch diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmService.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmService.java new file mode 100644 index 0000000..58777c1 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmService.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; + +/** + * + * A representation of the model object 'Common Vm Service'. + * + * + * + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmService() + * @model + * @generated + */ +public interface CommonVmService extends VirtualMachineService { +} // CommonVmService diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmServiceConfiguration.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmServiceConfiguration.java new file mode 100644 index 0000000..e4b2f5e --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmServiceConfiguration.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.service; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Common Vm Service Configuration'. + * + * + * + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmServiceConfiguration() + * @model + * @generated + */ +public interface CommonVmServiceConfiguration extends EObject { +} // CommonVmServiceConfiguration diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmServiceInstance.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmServiceInstance.java new file mode 100644 index 0000000..e19a8b8 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmServiceInstance.java @@ -0,0 +1,210 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +/** + * + * A representation of the model object 'Common Vm Service Instance'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getScript Script}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getConfigureTimeout Configure Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getTestTimeout Test Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getSuspendTimeout Suspend Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getResumeTimeout Resume Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getVmConfiguration Vm Configuration}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmServiceInstance() + * @model + * @generated + */ +public interface CommonVmServiceInstance extends VirtualMachineServiceInstance { + /** + * Returns the value of the 'Script' attribute. + * + *

+ * If the meaning of the 'Script' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Script' attribute. + * @see #setScript(String) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmServiceInstance_Script() + * @model unique="false" + * @generated + */ + String getScript(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getScript Script}' attribute. + * + * + * @param value the new value of the 'Script' attribute. + * @see #getScript() + * @generated + */ + void setScript(String value); + + /** + * Returns the value of the 'Configure Timeout' attribute. + * The default value is "60000". + * + *

+ * If the meaning of the 'Configure Timeout' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Configure Timeout' attribute. + * @see #setConfigureTimeout(int) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmServiceInstance_ConfigureTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getConfigureTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getConfigureTimeout Configure Timeout}' attribute. + * + * + * @param value the new value of the 'Configure Timeout' attribute. + * @see #getConfigureTimeout() + * @generated + */ + void setConfigureTimeout(int value); + + /** + * Returns the value of the 'Test Timeout' attribute. + * The default value is "60000". + * + *

+ * If the meaning of the 'Test Timeout' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Test Timeout' attribute. + * @see #setTestTimeout(int) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmServiceInstance_TestTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getTestTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getTestTimeout Test Timeout}' attribute. + * + * + * @param value the new value of the 'Test Timeout' attribute. + * @see #getTestTimeout() + * @generated + */ + void setTestTimeout(int value); + + /** + * Returns the value of the 'Suspend Timeout' attribute. + * The default value is "60000". + * + *

+ * If the meaning of the 'Suspend Timeout' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Suspend Timeout' attribute. + * @see #setSuspendTimeout(int) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmServiceInstance_SuspendTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getSuspendTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getSuspendTimeout Suspend Timeout}' attribute. + * + * + * @param value the new value of the 'Suspend Timeout' attribute. + * @see #getSuspendTimeout() + * @generated + */ + void setSuspendTimeout(int value); + + /** + * Returns the value of the 'Resume Timeout' attribute. + * The default value is "60000". + * + *

+ * If the meaning of the 'Resume Timeout' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Resume Timeout' attribute. + * @see #setResumeTimeout(int) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmServiceInstance_ResumeTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getResumeTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getResumeTimeout Resume Timeout}' attribute. + * + * + * @param value the new value of the 'Resume Timeout' attribute. + * @see #getResumeTimeout() + * @generated + */ + void setResumeTimeout(int value); + + /** + * Returns the value of the 'Vm Configuration' containment reference. + * + *

+ * If the meaning of the 'Vm Configuration' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Vm Configuration' containment reference. + * @see #setVmConfiguration(CommonVmServiceConfiguration) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmServiceInstance_VmConfiguration() + * @model containment="true" + * @generated + */ + CommonVmServiceConfiguration getVmConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getVmConfiguration Vm Configuration}' containment reference. + * + * + * @param value the new value of the 'Vm Configuration' containment reference. + * @see #getVmConfiguration() + * @generated + */ + void setVmConfiguration(CommonVmServiceConfiguration value); + +} // CommonVmServiceInstance diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/ServiceFactory.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/ServiceFactory.java new file mode 100644 index 0000000..33d7669 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/ServiceFactory.java @@ -0,0 +1,90 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.service; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage + * @generated + */ +public interface ServiceFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ServiceFactory eINSTANCE = org.openecomp.dcae.controller.service.common.vm.service.impl.ServiceFactoryImpl.init(); + + /** + * Returns a new object of class 'Common Vm Service'. + * + * + * @return a new object of class 'Common Vm Service'. + * @generated + */ + CommonVmService createCommonVmService(); + + /** + * Returns a new object of class 'Common Vm Service Instance'. + * + * + * @return a new object of class 'Common Vm Service Instance'. + * @generated + */ + CommonVmServiceInstance createCommonVmServiceInstance(); + + /** + * Returns a new object of class 'Common Vm Service Configuration'. + * + * + * @return a new object of class 'Common Vm Service Configuration'. + * @generated + */ + CommonVmServiceConfiguration createCommonVmServiceConfiguration(); + + /** + * Returns a new object of class 'Tommy Vm Service Configuration'. + * + * + * @return a new object of class 'Tommy Vm Service Configuration'. + * @generated + */ + TommyVmServiceConfiguration createTommyVmServiceConfiguration(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ServicePackage getServicePackage(); + +} //ServiceFactory diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/ServicePackage.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/ServicePackage.java new file mode 100644 index 0000000..69d6117 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/ServicePackage.java @@ -0,0 +1,1003 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.service; + +import org.openecomp.dcae.controller.service.vm.VmPackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-common-vm-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.common.vm'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org'" + * @generated + */ +public interface ServicePackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "service"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.common.vm.service"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "service"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ServicePackage eINSTANCE = org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceImpl Common Vm Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceImpl + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl#getCommonVmService() + * @generated + */ + int COMMON_VM_SERVICE = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE__NAME = VmPackage.VIRTUAL_MACHINE_SERVICE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE__LAST_POLLED = VmPackage.VIRTUAL_MACHINE_SERVICE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE__LAST_CHANGED = VmPackage.VIRTUAL_MACHINE_SERVICE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE__CREATED = VmPackage.VIRTUAL_MACHINE_SERVICE__CREATED; + + /** + * The feature id for the 'Instances' containment reference list. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE__INSTANCES = VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE__MANAGER_PORT_NUMBER = VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER; + + /** + * The number of structural features of the 'Common Vm Service' class. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_FEATURE_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_FEATURE_COUNT + 0; + + /** + * The operation id for the 'Deploy' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE___DEPLOY__STRING_STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___DEPLOY__STRING_STRING; + + /** + * The operation id for the 'Undeploy' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE___UNDEPLOY__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___UNDEPLOY__STRING; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE___TEST__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___TEST__STRING; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE___SUSPEND__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___SUSPEND__STRING; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE___RESUME__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___RESUME__STRING; + + /** + * The operation id for the 'Push Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Poll Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE___POLL_MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___POLL_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE___MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Operation' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT = VmPackage.VIRTUAL_MACHINE_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT; + + /** + * The operation id for the 'Update Configuration From Policy' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING; + + /** + * The operation id for the 'Run Health Tests' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE___RUN_HEALTH_TESTS = VmPackage.VIRTUAL_MACHINE_SERVICE___RUN_HEALTH_TESTS; + + /** + * The operation id for the 'Update Deployment Status' operation. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE___UPDATE_DEPLOYMENT_STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS; + + /** + * The number of operations of the 'Common Vm Service' class. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_OPERATION_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl Common Vm Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl#getCommonVmServiceInstance() + * @generated + */ + int COMMON_VM_SERVICE_INSTANCE = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__NAME = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__LAST_POLLED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__LAST_CHANGED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__CREATED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CREATED; + + /** + * The feature id for the 'Service Container' reference. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__SERVICE_CONTAINER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_CONTAINER; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STATUS; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__INPUT_STREAMS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__OUTPUT_STREAMS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OUTPUT_STREAMS; + + /** + * The feature id for the 'Last Health Test' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__LAST_HEALTH_TEST = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_HEALTH_TEST; + + /** + * The feature id for the 'Health Test Status' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__HEALTH_TEST_STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__HEALTH_TEST_STATUS; + + /** + * The feature id for the 'Health Test Message Code' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE; + + /** + * The feature id for the 'Configuration' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__CONFIGURATION = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION; + + /** + * The feature id for the 'Location' reference. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__LOCATION = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION; + + /** + * The feature id for the 'Vm Type' reference. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__VM_TYPE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE; + + /** + * The feature id for the 'Users' reference list. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__USERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS; + + /** + * The feature id for the 'Admin Users' reference list. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__ADMIN_USERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS; + + /** + * The feature id for the 'Application Ids' attribute list. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__APPLICATION_IDS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS; + + /** + * The feature id for the 'Admin Id' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__ADMIN_ID = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID; + + /** + * The feature id for the 'Number Of Servers' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__NUMBER_OF_SERVERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS; + + /** + * The feature id for the 'Availability Zone' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__AVAILABILITY_ZONE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__MANAGER_PORT_NUMBER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER; + + /** + * The feature id for the 'Servers' containment reference list. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__SERVERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS; + + /** + * The feature id for the 'Leader Server' reference. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__LEADER_SERVER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER; + + /** + * The feature id for the 'Service' container reference. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__SERVICE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE; + + /** + * The feature id for the 'Ieds Admin' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__IEDS_ADMIN = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN; + + /** + * The feature id for the 'Chef User' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__CHEF_USER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER; + + /** + * The feature id for the 'Chef Org' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__CHEF_ORG = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG; + + /** + * The feature id for the 'Chef Topology' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__CHEF_TOPOLOGY = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY; + + /** + * The feature id for the 'Openstack Flavor' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__OPENSTACK_FLAVOR = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR; + + /** + * The feature id for the 'Service Fqdn' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__SERVICE_FQDN = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN; + + /** + * The feature id for the 'Deployment Timeout Minutes' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES; + + /** + * The feature id for the 'Steps' containment reference list. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__STEPS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS; + + /** + * The feature id for the 'Script' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__SCRIPT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Configure Timeout' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__CONFIGURE_TIMEOUT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Test Timeout' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__TEST_TIMEOUT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Suspend Timeout' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__SUSPEND_TIMEOUT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Resume Timeout' attribute. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__RESUME_TIMEOUT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Vm Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 5; + + /** + * The number of structural features of the 'Common Vm Service Instance' class. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE_FEATURE_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 6; + + /** + * The number of operations of the 'Common Vm Service Instance' class. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE_OPERATION_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceConfigurationImpl Common Vm Service Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl#getCommonVmServiceConfiguration() + * @generated + */ + int COMMON_VM_SERVICE_CONFIGURATION = 2; + + /** + * The number of structural features of the 'Common Vm Service Configuration' class. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_CONFIGURATION_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Common Vm Service Configuration' class. + * + * + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_CONFIGURATION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.common.vm.service.impl.TommyVmServiceConfigurationImpl Tommy Vm Service Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.TommyVmServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl#getTommyVmServiceConfiguration() + * @generated + */ + int TOMMY_VM_SERVICE_CONFIGURATION = 3; + + /** + * The feature id for the 'Postgres User Name' attribute. + * + * + * @generated + * @ordered + */ + int TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_USER_NAME = COMMON_VM_SERVICE_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Postgres Password' attribute. + * + * + * @generated + * @ordered + */ + int TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_PASSWORD = COMMON_VM_SERVICE_CONFIGURATION_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Portgres Jdbc' attribute. + * + * + * @generated + * @ordered + */ + int TOMMY_VM_SERVICE_CONFIGURATION__PORTGRES_JDBC = COMMON_VM_SERVICE_CONFIGURATION_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Tommy Vm Service Configuration' class. + * + * + * @generated + * @ordered + */ + int TOMMY_VM_SERVICE_CONFIGURATION_FEATURE_COUNT = COMMON_VM_SERVICE_CONFIGURATION_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Tommy Vm Service Configuration' class. + * + * + * @generated + * @ordered + */ + int TOMMY_VM_SERVICE_CONFIGURATION_OPERATION_COUNT = COMMON_VM_SERVICE_CONFIGURATION_OPERATION_COUNT + 0; + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmService Common Vm Service}'. + * + * + * @return the meta object for class 'Common Vm Service'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmService + * @generated + */ + EClass getCommonVmService(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance Common Vm Service Instance}'. + * + * + * @return the meta object for class 'Common Vm Service Instance'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance + * @generated + */ + EClass getCommonVmServiceInstance(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getScript Script}'. + * + * + * @return the meta object for the attribute 'Script'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getScript() + * @see #getCommonVmServiceInstance() + * @generated + */ + EAttribute getCommonVmServiceInstance_Script(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getConfigureTimeout Configure Timeout}'. + * + * + * @return the meta object for the attribute 'Configure Timeout'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getConfigureTimeout() + * @see #getCommonVmServiceInstance() + * @generated + */ + EAttribute getCommonVmServiceInstance_ConfigureTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getTestTimeout Test Timeout}'. + * + * + * @return the meta object for the attribute 'Test Timeout'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getTestTimeout() + * @see #getCommonVmServiceInstance() + * @generated + */ + EAttribute getCommonVmServiceInstance_TestTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getSuspendTimeout Suspend Timeout}'. + * + * + * @return the meta object for the attribute 'Suspend Timeout'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getSuspendTimeout() + * @see #getCommonVmServiceInstance() + * @generated + */ + EAttribute getCommonVmServiceInstance_SuspendTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getResumeTimeout Resume Timeout}'. + * + * + * @return the meta object for the attribute 'Resume Timeout'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getResumeTimeout() + * @see #getCommonVmServiceInstance() + * @generated + */ + EAttribute getCommonVmServiceInstance_ResumeTimeout(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getVmConfiguration Vm Configuration}'. + * + * + * @return the meta object for the containment reference 'Vm Configuration'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getVmConfiguration() + * @see #getCommonVmServiceInstance() + * @generated + */ + EReference getCommonVmServiceInstance_VmConfiguration(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration Common Vm Service Configuration}'. + * + * + * @return the meta object for class 'Common Vm Service Configuration'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration + * @generated + */ + EClass getCommonVmServiceConfiguration(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration Tommy Vm Service Configuration}'. + * + * + * @return the meta object for class 'Tommy Vm Service Configuration'. + * @see org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration + * @generated + */ + EClass getTommyVmServiceConfiguration(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPostgresUserName Postgres User Name}'. + * + * + * @return the meta object for the attribute 'Postgres User Name'. + * @see org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPostgresUserName() + * @see #getTommyVmServiceConfiguration() + * @generated + */ + EAttribute getTommyVmServiceConfiguration_PostgresUserName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPostgresPassword Postgres Password}'. + * + * + * @return the meta object for the attribute 'Postgres Password'. + * @see org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPostgresPassword() + * @see #getTommyVmServiceConfiguration() + * @generated + */ + EAttribute getTommyVmServiceConfiguration_PostgresPassword(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPortgresJdbc Portgres Jdbc}'. + * + * + * @return the meta object for the attribute 'Portgres Jdbc'. + * @see org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPortgresJdbc() + * @see #getTommyVmServiceConfiguration() + * @generated + */ + EAttribute getTommyVmServiceConfiguration_PortgresJdbc(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ServiceFactory getServiceFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceImpl Common Vm Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceImpl + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl#getCommonVmService() + * @generated + */ + EClass COMMON_VM_SERVICE = eINSTANCE.getCommonVmService(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl Common Vm Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl#getCommonVmServiceInstance() + * @generated + */ + EClass COMMON_VM_SERVICE_INSTANCE = eINSTANCE.getCommonVmServiceInstance(); + + /** + * The meta object literal for the 'Script' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_VM_SERVICE_INSTANCE__SCRIPT = eINSTANCE.getCommonVmServiceInstance_Script(); + + /** + * The meta object literal for the 'Configure Timeout' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_VM_SERVICE_INSTANCE__CONFIGURE_TIMEOUT = eINSTANCE.getCommonVmServiceInstance_ConfigureTimeout(); + + /** + * The meta object literal for the 'Test Timeout' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_VM_SERVICE_INSTANCE__TEST_TIMEOUT = eINSTANCE.getCommonVmServiceInstance_TestTimeout(); + + /** + * The meta object literal for the 'Suspend Timeout' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_VM_SERVICE_INSTANCE__SUSPEND_TIMEOUT = eINSTANCE.getCommonVmServiceInstance_SuspendTimeout(); + + /** + * The meta object literal for the 'Resume Timeout' attribute feature. + * + * + * @generated + */ + EAttribute COMMON_VM_SERVICE_INSTANCE__RESUME_TIMEOUT = eINSTANCE.getCommonVmServiceInstance_ResumeTimeout(); + + /** + * The meta object literal for the 'Vm Configuration' containment reference feature. + * + * + * @generated + */ + EReference COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION = eINSTANCE.getCommonVmServiceInstance_VmConfiguration(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceConfigurationImpl Common Vm Service Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl#getCommonVmServiceConfiguration() + * @generated + */ + EClass COMMON_VM_SERVICE_CONFIGURATION = eINSTANCE.getCommonVmServiceConfiguration(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.common.vm.service.impl.TommyVmServiceConfigurationImpl Tommy Vm Service Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.TommyVmServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl#getTommyVmServiceConfiguration() + * @generated + */ + EClass TOMMY_VM_SERVICE_CONFIGURATION = eINSTANCE.getTommyVmServiceConfiguration(); + + /** + * The meta object literal for the 'Postgres User Name' attribute feature. + * + * + * @generated + */ + EAttribute TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_USER_NAME = eINSTANCE.getTommyVmServiceConfiguration_PostgresUserName(); + + /** + * The meta object literal for the 'Postgres Password' attribute feature. + * + * + * @generated + */ + EAttribute TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_PASSWORD = eINSTANCE.getTommyVmServiceConfiguration_PostgresPassword(); + + /** + * The meta object literal for the 'Portgres Jdbc' attribute feature. + * + * + * @generated + */ + EAttribute TOMMY_VM_SERVICE_CONFIGURATION__PORTGRES_JDBC = eINSTANCE.getTommyVmServiceConfiguration_PortgresJdbc(); + + } + +} //ServicePackage diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/TommyVmService.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/TommyVmService.java new file mode 100644 index 0000000..65ae689 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/TommyVmService.java @@ -0,0 +1,124 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.service; + + +/** + * + * A representation of the model object 'Tommy Vm Service'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmService#getPostgresUserName Postgres User Name}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmService#getPostgresPassword Postgres Password}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmService#getPortgresJdbc Portgres Jdbc}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getTommyVmService() + * @model + * @generated + */ +public interface TommyVmService extends CommonVmServiceConfiguration { + /** + * Returns the value of the 'Postgres User Name' attribute. + * + *

+ * If the meaning of the 'Postgres User Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Postgres User Name' attribute. + * @see #setPostgresUserName(String) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getTommyVmService_PostgresUserName() + * @model unique="false" + * @generated + */ + String getPostgresUserName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmService#getPostgresUserName Postgres User Name}' attribute. + * + * + * @param value the new value of the 'Postgres User Name' attribute. + * @see #getPostgresUserName() + * @generated + */ + void setPostgresUserName(String value); + + /** + * Returns the value of the 'Postgres Password' attribute. + * + *

+ * If the meaning of the 'Postgres Password' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Postgres Password' attribute. + * @see #setPostgresPassword(String) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getTommyVmService_PostgresPassword() + * @model unique="false" + * @generated + */ + String getPostgresPassword(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmService#getPostgresPassword Postgres Password}' attribute. + * + * + * @param value the new value of the 'Postgres Password' attribute. + * @see #getPostgresPassword() + * @generated + */ + void setPostgresPassword(String value); + + /** + * Returns the value of the 'Portgres Jdbc' attribute. + * + *

+ * If the meaning of the 'Portgres Jdbc' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Portgres Jdbc' attribute. + * @see #setPortgresJdbc(String) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getTommyVmService_PortgresJdbc() + * @model unique="false" + * @generated + */ + String getPortgresJdbc(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmService#getPortgresJdbc Portgres Jdbc}' attribute. + * + * + * @param value the new value of the 'Portgres Jdbc' attribute. + * @see #getPortgresJdbc() + * @generated + */ + void setPortgresJdbc(String value); + +} // TommyVmService diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/TommyVmServiceConfiguration.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/TommyVmServiceConfiguration.java new file mode 100644 index 0000000..de22b61 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/TommyVmServiceConfiguration.java @@ -0,0 +1,124 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.service; + + +/** + * + * A representation of the model object 'Tommy Vm Service Configuration'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPostgresUserName Postgres User Name}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPostgresPassword Postgres Password}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPortgresJdbc Portgres Jdbc}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getTommyVmServiceConfiguration() + * @model + * @generated + */ +public interface TommyVmServiceConfiguration extends CommonVmServiceConfiguration { + /** + * Returns the value of the 'Postgres User Name' attribute. + * + *

+ * If the meaning of the 'Postgres User Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Postgres User Name' attribute. + * @see #setPostgresUserName(String) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getTommyVmServiceConfiguration_PostgresUserName() + * @model unique="false" + * @generated + */ + String getPostgresUserName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPostgresUserName Postgres User Name}' attribute. + * + * + * @param value the new value of the 'Postgres User Name' attribute. + * @see #getPostgresUserName() + * @generated + */ + void setPostgresUserName(String value); + + /** + * Returns the value of the 'Postgres Password' attribute. + * + *

+ * If the meaning of the 'Postgres Password' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Postgres Password' attribute. + * @see #setPostgresPassword(String) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getTommyVmServiceConfiguration_PostgresPassword() + * @model unique="false" + * @generated + */ + String getPostgresPassword(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPostgresPassword Postgres Password}' attribute. + * + * + * @param value the new value of the 'Postgres Password' attribute. + * @see #getPostgresPassword() + * @generated + */ + void setPostgresPassword(String value); + + /** + * Returns the value of the 'Portgres Jdbc' attribute. + * + *

+ * If the meaning of the 'Portgres Jdbc' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Portgres Jdbc' attribute. + * @see #setPortgresJdbc(String) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getTommyVmServiceConfiguration_PortgresJdbc() + * @model unique="false" + * @generated + */ + String getPortgresJdbc(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPortgresJdbc Portgres Jdbc}' attribute. + * + * + * @param value the new value of the 'Portgres Jdbc' attribute. + * @see #getPortgresJdbc() + * @generated + */ + void setPortgresJdbc(String value); + +} // TommyVmServiceConfiguration diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceConfigurationImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceConfigurationImpl.java new file mode 100644 index 0000000..9995f1e --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceConfigurationImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.service.impl; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; +import org.openecomp.dcae.controller.service.common.vm.service.ServicePackage; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Common Vm Service Configuration'. + * + *

+ *

+ * + * @generated + */ +public class CommonVmServiceConfigurationImpl extends MinimalEObjectImpl.Container implements CommonVmServiceConfiguration { + /** + * + * + * @generated + */ + protected CommonVmServiceConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.COMMON_VM_SERVICE_CONFIGURATION; + } + +} //CommonVmServiceConfigurationImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceImpl.java new file mode 100644 index 0000000..0df2d08 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.service.impl; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmService; +import org.openecomp.dcae.controller.service.common.vm.service.ServicePackage; + +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Common Vm Service'. + * + *

+ *

+ * + * @generated + */ +public class CommonVmServiceImpl extends VirtualMachineServiceImpl implements CommonVmService { + /** + * + * + * @generated + */ + protected CommonVmServiceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.COMMON_VM_SERVICE; + } + +} //CommonVmServiceImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceInstanceImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceInstanceImpl.java new file mode 100644 index 0000000..a097cbf --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceInstanceImpl.java @@ -0,0 +1,472 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.service.impl; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance; +import org.openecomp.dcae.controller.service.common.vm.service.ServicePackage; + +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Common Vm Service Instance'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl#getScript Script}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl#getConfigureTimeout Configure Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl#getTestTimeout Test Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl#getSuspendTimeout Suspend Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl#getResumeTimeout Resume Timeout}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl#getVmConfiguration Vm Configuration}
  • + *
+ *

+ * + * @generated + */ +public class CommonVmServiceInstanceImpl extends VirtualMachineServiceInstanceImpl implements CommonVmServiceInstance { + /** + * The default value of the '{@link #getScript() Script}' attribute. + * + * + * @see #getScript() + * @generated + * @ordered + */ + protected static final String SCRIPT_EDEFAULT = null; + /** + * The cached value of the '{@link #getScript() Script}' attribute. + * + * + * @see #getScript() + * @generated + * @ordered + */ + protected String script = SCRIPT_EDEFAULT; + /** + * The default value of the '{@link #getConfigureTimeout() Configure Timeout}' attribute. + * + * + * @see #getConfigureTimeout() + * @generated + * @ordered + */ + protected static final int CONFIGURE_TIMEOUT_EDEFAULT = 60000; + /** + * The cached value of the '{@link #getConfigureTimeout() Configure Timeout}' attribute. + * + * + * @see #getConfigureTimeout() + * @generated + * @ordered + */ + protected int configureTimeout = CONFIGURE_TIMEOUT_EDEFAULT; + /** + * The default value of the '{@link #getTestTimeout() Test Timeout}' attribute. + * + * + * @see #getTestTimeout() + * @generated + * @ordered + */ + protected static final int TEST_TIMEOUT_EDEFAULT = 60000; + /** + * The cached value of the '{@link #getTestTimeout() Test Timeout}' attribute. + * + * + * @see #getTestTimeout() + * @generated + * @ordered + */ + protected int testTimeout = TEST_TIMEOUT_EDEFAULT; + /** + * The default value of the '{@link #getSuspendTimeout() Suspend Timeout}' attribute. + * + * + * @see #getSuspendTimeout() + * @generated + * @ordered + */ + protected static final int SUSPEND_TIMEOUT_EDEFAULT = 60000; + /** + * The cached value of the '{@link #getSuspendTimeout() Suspend Timeout}' attribute. + * + * + * @see #getSuspendTimeout() + * @generated + * @ordered + */ + protected int suspendTimeout = SUSPEND_TIMEOUT_EDEFAULT; + /** + * The default value of the '{@link #getResumeTimeout() Resume Timeout}' attribute. + * + * + * @see #getResumeTimeout() + * @generated + * @ordered + */ + protected static final int RESUME_TIMEOUT_EDEFAULT = 60000; + /** + * The cached value of the '{@link #getResumeTimeout() Resume Timeout}' attribute. + * + * + * @see #getResumeTimeout() + * @generated + * @ordered + */ + protected int resumeTimeout = RESUME_TIMEOUT_EDEFAULT; + /** + * The cached value of the '{@link #getVmConfiguration() Vm Configuration}' containment reference. + * + * + * @see #getVmConfiguration() + * @generated + * @ordered + */ + protected CommonVmServiceConfiguration vmConfiguration; + + /** + * + * + * @generated + */ + protected CommonVmServiceInstanceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.COMMON_VM_SERVICE_INSTANCE; + } + + /** + * + * + * @generated + */ + public String getScript() { + return script; + } + + /** + * + * + * @generated + */ + public void setScript(String newScript) { + String oldScript = script; + script = newScript; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_VM_SERVICE_INSTANCE__SCRIPT, oldScript, script)); + } + + /** + * + * + * @generated + */ + public int getConfigureTimeout() { + return configureTimeout; + } + + /** + * + * + * @generated + */ + public void setConfigureTimeout(int newConfigureTimeout) { + int oldConfigureTimeout = configureTimeout; + configureTimeout = newConfigureTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_VM_SERVICE_INSTANCE__CONFIGURE_TIMEOUT, oldConfigureTimeout, configureTimeout)); + } + + /** + * + * + * @generated + */ + public int getTestTimeout() { + return testTimeout; + } + + /** + * + * + * @generated + */ + public void setTestTimeout(int newTestTimeout) { + int oldTestTimeout = testTimeout; + testTimeout = newTestTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_VM_SERVICE_INSTANCE__TEST_TIMEOUT, oldTestTimeout, testTimeout)); + } + + /** + * + * + * @generated + */ + public int getSuspendTimeout() { + return suspendTimeout; + } + + /** + * + * + * @generated + */ + public void setSuspendTimeout(int newSuspendTimeout) { + int oldSuspendTimeout = suspendTimeout; + suspendTimeout = newSuspendTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_VM_SERVICE_INSTANCE__SUSPEND_TIMEOUT, oldSuspendTimeout, suspendTimeout)); + } + + /** + * + * + * @generated + */ + public int getResumeTimeout() { + return resumeTimeout; + } + + /** + * + * + * @generated + */ + public void setResumeTimeout(int newResumeTimeout) { + int oldResumeTimeout = resumeTimeout; + resumeTimeout = newResumeTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_VM_SERVICE_INSTANCE__RESUME_TIMEOUT, oldResumeTimeout, resumeTimeout)); + } + + /** + * + * + * @generated + */ + public CommonVmServiceConfiguration getVmConfiguration() { + return vmConfiguration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetVmConfiguration(CommonVmServiceConfiguration newVmConfiguration, NotificationChain msgs) { + CommonVmServiceConfiguration oldVmConfiguration = vmConfiguration; + vmConfiguration = newVmConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION, oldVmConfiguration, newVmConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setVmConfiguration(CommonVmServiceConfiguration newVmConfiguration) { + if (newVmConfiguration != vmConfiguration) { + NotificationChain msgs = null; + if (vmConfiguration != null) + msgs = ((InternalEObject)vmConfiguration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION, null, msgs); + if (newVmConfiguration != null) + msgs = ((InternalEObject)newVmConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION, null, msgs); + msgs = basicSetVmConfiguration(newVmConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION, newVmConfiguration, newVmConfiguration)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION: + return basicSetVmConfiguration(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__SCRIPT: + return getScript(); + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__CONFIGURE_TIMEOUT: + return getConfigureTimeout(); + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__TEST_TIMEOUT: + return getTestTimeout(); + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__SUSPEND_TIMEOUT: + return getSuspendTimeout(); + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__RESUME_TIMEOUT: + return getResumeTimeout(); + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION: + return getVmConfiguration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__SCRIPT: + setScript((String)newValue); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__CONFIGURE_TIMEOUT: + setConfigureTimeout((Integer)newValue); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__TEST_TIMEOUT: + setTestTimeout((Integer)newValue); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__SUSPEND_TIMEOUT: + setSuspendTimeout((Integer)newValue); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__RESUME_TIMEOUT: + setResumeTimeout((Integer)newValue); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION: + setVmConfiguration((CommonVmServiceConfiguration)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__SCRIPT: + setScript(SCRIPT_EDEFAULT); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__CONFIGURE_TIMEOUT: + setConfigureTimeout(CONFIGURE_TIMEOUT_EDEFAULT); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__TEST_TIMEOUT: + setTestTimeout(TEST_TIMEOUT_EDEFAULT); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__SUSPEND_TIMEOUT: + setSuspendTimeout(SUSPEND_TIMEOUT_EDEFAULT); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__RESUME_TIMEOUT: + setResumeTimeout(RESUME_TIMEOUT_EDEFAULT); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION: + setVmConfiguration((CommonVmServiceConfiguration)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__SCRIPT: + return SCRIPT_EDEFAULT == null ? script != null : !SCRIPT_EDEFAULT.equals(script); + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__CONFIGURE_TIMEOUT: + return configureTimeout != CONFIGURE_TIMEOUT_EDEFAULT; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__TEST_TIMEOUT: + return testTimeout != TEST_TIMEOUT_EDEFAULT; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__SUSPEND_TIMEOUT: + return suspendTimeout != SUSPEND_TIMEOUT_EDEFAULT; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__RESUME_TIMEOUT: + return resumeTimeout != RESUME_TIMEOUT_EDEFAULT; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION: + return vmConfiguration != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (script: "); + result.append(script); + result.append(", configureTimeout: "); + result.append(configureTimeout); + result.append(", testTimeout: "); + result.append(testTimeout); + result.append(", suspendTimeout: "); + result.append(suspendTimeout); + result.append(", resumeTimeout: "); + result.append(resumeTimeout); + result.append(')'); + return result.toString(); + } + +} //CommonVmServiceInstanceImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/ServiceFactoryImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/ServiceFactoryImpl.java new file mode 100644 index 0000000..f6e7c35 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/ServiceFactoryImpl.java @@ -0,0 +1,149 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.service.impl; + +import org.openecomp.dcae.controller.service.common.vm.service.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ServiceFactoryImpl extends EFactoryImpl implements ServiceFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ServiceFactory init() { + try { + ServiceFactory theServiceFactory = (ServiceFactory)EPackage.Registry.INSTANCE.getEFactory(ServicePackage.eNS_URI); + if (theServiceFactory != null) { + return theServiceFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ServiceFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ServiceFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ServicePackage.COMMON_VM_SERVICE: return createCommonVmService(); + case ServicePackage.COMMON_VM_SERVICE_INSTANCE: return createCommonVmServiceInstance(); + case ServicePackage.COMMON_VM_SERVICE_CONFIGURATION: return createCommonVmServiceConfiguration(); + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION: return createTommyVmServiceConfiguration(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public CommonVmService createCommonVmService() { + CommonVmServiceImpl commonVmService = new CommonVmServiceImpl(); + return commonVmService; + } + + /** + * + * + * @generated + */ + public CommonVmServiceInstance createCommonVmServiceInstance() { + CommonVmServiceInstanceImpl commonVmServiceInstance = new CommonVmServiceInstanceImpl(); + return commonVmServiceInstance; + } + + /** + * + * + * @generated + */ + public CommonVmServiceConfiguration createCommonVmServiceConfiguration() { + CommonVmServiceConfigurationImpl commonVmServiceConfiguration = new CommonVmServiceConfigurationImpl(); + return commonVmServiceConfiguration; + } + + /** + * + * + * @generated + */ + public TommyVmServiceConfiguration createTommyVmServiceConfiguration() { + TommyVmServiceConfigurationImpl tommyVmServiceConfiguration = new TommyVmServiceConfigurationImpl(); + return tommyVmServiceConfiguration; + } + + /** + * + * + * @generated + */ + public ServicePackage getServicePackage() { + return (ServicePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ServicePackage getPackage() { + return ServicePackage.eINSTANCE; + } + +} //ServiceFactoryImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/ServicePackageImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/ServicePackageImpl.java new file mode 100644 index 0000000..b3eaa40 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/ServicePackageImpl.java @@ -0,0 +1,380 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.service.impl; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmService; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance; +import org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory; +import org.openecomp.dcae.controller.service.common.vm.service.ServicePackage; +import org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ServicePackageImpl extends EPackageImpl implements ServicePackage { + /** + * + * + * @generated + */ + private EClass commonVmServiceEClass = null; + + /** + * + * + * @generated + */ + private EClass commonVmServiceInstanceEClass = null; + + /** + * + * + * @generated + */ + private EClass commonVmServiceConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass tommyVmServiceConfigurationEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#eNS_URI + * @see #init() + * @generated + */ + private ServicePackageImpl() { + super(eNS_URI, ServiceFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ServicePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ServicePackage init() { + if (isInited) return (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + + // Obtain or create and register package + ServicePackageImpl theServicePackage = (ServicePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ServicePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ServicePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + VmPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theServicePackage.createPackageContents(); + + // Initialize created meta-data + theServicePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theServicePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ServicePackage.eNS_URI, theServicePackage); + return theServicePackage; + } + + /** + * + * + * @generated + */ + public EClass getCommonVmService() { + return commonVmServiceEClass; + } + + /** + * + * + * @generated + */ + public EClass getCommonVmServiceInstance() { + return commonVmServiceInstanceEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCommonVmServiceInstance_Script() { + return (EAttribute)commonVmServiceInstanceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCommonVmServiceInstance_ConfigureTimeout() { + return (EAttribute)commonVmServiceInstanceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCommonVmServiceInstance_TestTimeout() { + return (EAttribute)commonVmServiceInstanceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCommonVmServiceInstance_SuspendTimeout() { + return (EAttribute)commonVmServiceInstanceEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getCommonVmServiceInstance_ResumeTimeout() { + return (EAttribute)commonVmServiceInstanceEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getCommonVmServiceInstance_VmConfiguration() { + return (EReference)commonVmServiceInstanceEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EClass getCommonVmServiceConfiguration() { + return commonVmServiceConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EClass getTommyVmServiceConfiguration() { + return tommyVmServiceConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getTommyVmServiceConfiguration_PostgresUserName() { + return (EAttribute)tommyVmServiceConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getTommyVmServiceConfiguration_PostgresPassword() { + return (EAttribute)tommyVmServiceConfigurationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getTommyVmServiceConfiguration_PortgresJdbc() { + return (EAttribute)tommyVmServiceConfigurationEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public ServiceFactory getServiceFactory() { + return (ServiceFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + commonVmServiceEClass = createEClass(COMMON_VM_SERVICE); + + commonVmServiceInstanceEClass = createEClass(COMMON_VM_SERVICE_INSTANCE); + createEAttribute(commonVmServiceInstanceEClass, COMMON_VM_SERVICE_INSTANCE__SCRIPT); + createEAttribute(commonVmServiceInstanceEClass, COMMON_VM_SERVICE_INSTANCE__CONFIGURE_TIMEOUT); + createEAttribute(commonVmServiceInstanceEClass, COMMON_VM_SERVICE_INSTANCE__TEST_TIMEOUT); + createEAttribute(commonVmServiceInstanceEClass, COMMON_VM_SERVICE_INSTANCE__SUSPEND_TIMEOUT); + createEAttribute(commonVmServiceInstanceEClass, COMMON_VM_SERVICE_INSTANCE__RESUME_TIMEOUT); + createEReference(commonVmServiceInstanceEClass, COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION); + + commonVmServiceConfigurationEClass = createEClass(COMMON_VM_SERVICE_CONFIGURATION); + + tommyVmServiceConfigurationEClass = createEClass(TOMMY_VM_SERVICE_CONFIGURATION); + createEAttribute(tommyVmServiceConfigurationEClass, TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_USER_NAME); + createEAttribute(tommyVmServiceConfigurationEClass, TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_PASSWORD); + createEAttribute(tommyVmServiceConfigurationEClass, TOMMY_VM_SERVICE_CONFIGURATION__PORTGRES_JDBC); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + VmPackage theVmPackage = (VmPackage)EPackage.Registry.INSTANCE.getEPackage(VmPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + commonVmServiceEClass.getESuperTypes().add(theVmPackage.getVirtualMachineService()); + commonVmServiceInstanceEClass.getESuperTypes().add(theVmPackage.getVirtualMachineServiceInstance()); + tommyVmServiceConfigurationEClass.getESuperTypes().add(this.getCommonVmServiceConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(commonVmServiceEClass, CommonVmService.class, "CommonVmService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(commonVmServiceInstanceEClass, CommonVmServiceInstance.class, "CommonVmServiceInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCommonVmServiceInstance_Script(), theEcorePackage.getEString(), "script", null, 0, 1, CommonVmServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonVmServiceInstance_ConfigureTimeout(), theEcorePackage.getEInt(), "configureTimeout", "60000", 0, 1, CommonVmServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonVmServiceInstance_TestTimeout(), theEcorePackage.getEInt(), "testTimeout", "60000", 0, 1, CommonVmServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonVmServiceInstance_SuspendTimeout(), theEcorePackage.getEInt(), "suspendTimeout", "60000", 0, 1, CommonVmServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonVmServiceInstance_ResumeTimeout(), theEcorePackage.getEInt(), "resumeTimeout", "60000", 0, 1, CommonVmServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCommonVmServiceInstance_VmConfiguration(), this.getCommonVmServiceConfiguration(), null, "vmConfiguration", null, 0, 1, CommonVmServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(commonVmServiceConfigurationEClass, CommonVmServiceConfiguration.class, "CommonVmServiceConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(tommyVmServiceConfigurationEClass, TommyVmServiceConfiguration.class, "TommyVmServiceConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getTommyVmServiceConfiguration_PostgresUserName(), theEcorePackage.getEString(), "postgresUserName", null, 0, 1, TommyVmServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTommyVmServiceConfiguration_PostgresPassword(), theEcorePackage.getEString(), "postgresPassword", null, 0, 1, TommyVmServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTommyVmServiceConfiguration_PortgresJdbc(), theEcorePackage.getEString(), "portgresJdbc", null, 0, 1, TommyVmServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "ecomp", "http://openecomp.org" + }); + } + +} //ServicePackageImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/TommyVmServiceConfigurationImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/TommyVmServiceConfigurationImpl.java new file mode 100644 index 0000000..ff3f913 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/TommyVmServiceConfigurationImpl.java @@ -0,0 +1,291 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.service.impl; + +import org.openecomp.dcae.controller.service.common.vm.service.ServicePackage; +import org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Tommy Vm Service Configuration'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.impl.TommyVmServiceConfigurationImpl#getPostgresUserName Postgres User Name}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.impl.TommyVmServiceConfigurationImpl#getPostgresPassword Postgres Password}
  • + *
  • {@link org.openecomp.dcae.controller.service.common.vm.service.impl.TommyVmServiceConfigurationImpl#getPortgresJdbc Portgres Jdbc}
  • + *
+ *

+ * + * @generated + */ +public class TommyVmServiceConfigurationImpl extends CommonVmServiceConfigurationImpl implements TommyVmServiceConfiguration { + /** + * The default value of the '{@link #getPostgresUserName() Postgres User Name}' attribute. + * + * + * @see #getPostgresUserName() + * @generated + * @ordered + */ + protected static final String POSTGRES_USER_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPostgresUserName() Postgres User Name}' attribute. + * + * + * @see #getPostgresUserName() + * @generated + * @ordered + */ + protected String postgresUserName = POSTGRES_USER_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getPostgresPassword() Postgres Password}' attribute. + * + * + * @see #getPostgresPassword() + * @generated + * @ordered + */ + protected static final String POSTGRES_PASSWORD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPostgresPassword() Postgres Password}' attribute. + * + * + * @see #getPostgresPassword() + * @generated + * @ordered + */ + protected String postgresPassword = POSTGRES_PASSWORD_EDEFAULT; + + /** + * The default value of the '{@link #getPortgresJdbc() Portgres Jdbc}' attribute. + * + * + * @see #getPortgresJdbc() + * @generated + * @ordered + */ + protected static final String PORTGRES_JDBC_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPortgresJdbc() Portgres Jdbc}' attribute. + * + * + * @see #getPortgresJdbc() + * @generated + * @ordered + */ + protected String portgresJdbc = PORTGRES_JDBC_EDEFAULT; + + /** + * + * + * @generated + */ + protected TommyVmServiceConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.TOMMY_VM_SERVICE_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public String getPostgresUserName() { + return postgresUserName; + } + + /** + * + * + * @generated + */ + public void setPostgresUserName(String newPostgresUserName) { + String oldPostgresUserName = postgresUserName; + postgresUserName = newPostgresUserName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_USER_NAME, oldPostgresUserName, postgresUserName)); + } + + /** + * + * + * @generated + */ + public String getPostgresPassword() { + return postgresPassword; + } + + /** + * + * + * @generated + */ + public void setPostgresPassword(String newPostgresPassword) { + String oldPostgresPassword = postgresPassword; + postgresPassword = newPostgresPassword; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_PASSWORD, oldPostgresPassword, postgresPassword)); + } + + /** + * + * + * @generated + */ + public String getPortgresJdbc() { + return portgresJdbc; + } + + /** + * + * + * @generated + */ + public void setPortgresJdbc(String newPortgresJdbc) { + String oldPortgresJdbc = portgresJdbc; + portgresJdbc = newPortgresJdbc; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__PORTGRES_JDBC, oldPortgresJdbc, portgresJdbc)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_USER_NAME: + return getPostgresUserName(); + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_PASSWORD: + return getPostgresPassword(); + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__PORTGRES_JDBC: + return getPortgresJdbc(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_USER_NAME: + setPostgresUserName((String)newValue); + return; + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_PASSWORD: + setPostgresPassword((String)newValue); + return; + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__PORTGRES_JDBC: + setPortgresJdbc((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_USER_NAME: + setPostgresUserName(POSTGRES_USER_NAME_EDEFAULT); + return; + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_PASSWORD: + setPostgresPassword(POSTGRES_PASSWORD_EDEFAULT); + return; + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__PORTGRES_JDBC: + setPortgresJdbc(PORTGRES_JDBC_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_USER_NAME: + return POSTGRES_USER_NAME_EDEFAULT == null ? postgresUserName != null : !POSTGRES_USER_NAME_EDEFAULT.equals(postgresUserName); + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_PASSWORD: + return POSTGRES_PASSWORD_EDEFAULT == null ? postgresPassword != null : !POSTGRES_PASSWORD_EDEFAULT.equals(postgresPassword); + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__PORTGRES_JDBC: + return PORTGRES_JDBC_EDEFAULT == null ? portgresJdbc != null : !PORTGRES_JDBC_EDEFAULT.equals(portgresJdbc); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (postgresUserName: "); + result.append(postgresUserName); + result.append(", postgresPassword: "); + result.append(postgresPassword); + result.append(", portgresJdbc: "); + result.append(portgresJdbc); + result.append(')'); + return result.toString(); + } + +} //TommyVmServiceConfigurationImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/util/ServiceAdapterFactory.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/util/ServiceAdapterFactory.java new file mode 100644 index 0000000..2b5fae8 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/util/ServiceAdapterFactory.java @@ -0,0 +1,312 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.common.vm.service.*; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage + * @generated + */ +public class ServiceAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ServiceAdapterFactory() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ServiceSwitch modelSwitch = + new ServiceSwitch() { + @Override + public Adapter caseCommonVmService(CommonVmService object) { + return createCommonVmServiceAdapter(); + } + @Override + public Adapter caseCommonVmServiceInstance(CommonVmServiceInstance object) { + return createCommonVmServiceInstanceAdapter(); + } + @Override + public Adapter caseCommonVmServiceConfiguration(CommonVmServiceConfiguration object) { + return createCommonVmServiceConfigurationAdapter(); + } + @Override + public Adapter caseTommyVmServiceConfiguration(TommyVmServiceConfiguration object) { + return createTommyVmServiceConfigurationAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseDcaeService(DcaeService object) { + return createDcaeServiceAdapter(); + } + @Override + public Adapter caseVirtualMachineService(VirtualMachineService object) { + return createVirtualMachineServiceAdapter(); + } + @Override + public Adapter caseDcaeServiceInstance(DcaeServiceInstance object) { + return createDcaeServiceInstanceAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceConfiguration(VirtualMachineServiceConfiguration object) { + return createVirtualMachineServiceConfigurationAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceInstance(VirtualMachineServiceInstance object) { + return createVirtualMachineServiceInstanceAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmService Common Vm Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmService + * @generated + */ + public Adapter createCommonVmServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance Common Vm Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance + * @generated + */ + public Adapter createCommonVmServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration Common Vm Service Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration + * @generated + */ + public Adapter createCommonVmServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration Tommy Vm Service Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration + * @generated + */ + public Adapter createTommyVmServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeService Dcae Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeService + * @generated + */ + public Adapter createDcaeServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService Virtual Machine Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService + * @generated + */ + public Adapter createVirtualMachineServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance Dcae Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance + * @generated + */ + public Adapter createDcaeServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration Virtual Machine Service Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration + * @generated + */ + public Adapter createVirtualMachineServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance Virtual Machine Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance + * @generated + */ + public Adapter createVirtualMachineServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ServiceAdapterFactory diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/util/ServiceSwitch.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/util/ServiceSwitch.java new file mode 100644 index 0000000..4edc31c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/util/ServiceSwitch.java @@ -0,0 +1,301 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.common.vm.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.common.vm.service.*; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage + * @generated + */ +public class ServiceSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ServiceSwitch() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ServicePackage.COMMON_VM_SERVICE: { + CommonVmService commonVmService = (CommonVmService)theEObject; + T result = caseCommonVmService(commonVmService); + if (result == null) result = caseVirtualMachineService(commonVmService); + if (result == null) result = caseDcaeService(commonVmService); + if (result == null) result = caseNamedEntity(commonVmService); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.COMMON_VM_SERVICE_INSTANCE: { + CommonVmServiceInstance commonVmServiceInstance = (CommonVmServiceInstance)theEObject; + T result = caseCommonVmServiceInstance(commonVmServiceInstance); + if (result == null) result = caseVirtualMachineServiceInstance(commonVmServiceInstance); + if (result == null) result = caseDcaeServiceInstance(commonVmServiceInstance); + if (result == null) result = caseVirtualMachineServiceConfiguration(commonVmServiceInstance); + if (result == null) result = caseNamedEntity(commonVmServiceInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.COMMON_VM_SERVICE_CONFIGURATION: { + CommonVmServiceConfiguration commonVmServiceConfiguration = (CommonVmServiceConfiguration)theEObject; + T result = caseCommonVmServiceConfiguration(commonVmServiceConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION: { + TommyVmServiceConfiguration tommyVmServiceConfiguration = (TommyVmServiceConfiguration)theEObject; + T result = caseTommyVmServiceConfiguration(tommyVmServiceConfiguration); + if (result == null) result = caseCommonVmServiceConfiguration(tommyVmServiceConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Common Vm Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Common Vm Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCommonVmService(CommonVmService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Common Vm Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Common Vm Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCommonVmServiceInstance(CommonVmServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Common Vm Service Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Common Vm Service Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCommonVmServiceConfiguration(CommonVmServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Tommy Vm Service Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Tommy Vm Service Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTommyVmServiceConfiguration(TommyVmServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeService(DcaeService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineService(VirtualMachineService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceInstance(DcaeServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineServiceConfiguration(VirtualMachineServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineServiceInstance(VirtualMachineServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ServiceSwitch diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore/manager.xcore b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore/manager.xcore new file mode 100644 index 0000000..65a84b2 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore/manager.xcore @@ -0,0 +1,40 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-common-vm-model/src/main/xcore-gen") + + +package org.openecomp.dcae.controller.service.common.vm.manager + + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager + +// state of manager +class CommonVmManager extends VirtualMachineManager { + String script + int configureTimeout = "60000" + int testTimeout = "60000" + int suspendTimeout = "60000" + int resumeTimeout = "60000" + contains CommonVmServiceConfiguration vmConfiguration +} + diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore/service.xcore b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore/service.xcore new file mode 100644 index 0000000..12dcf27 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore/service.xcore @@ -0,0 +1,53 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-common-vm-model/src/main/xcore-gen") + + +package org.openecomp.dcae.controller.service.common.vm.service + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance + +annotation "http://openecomp.org" as ecomp + +class CommonVmService extends VirtualMachineService { +} + +// state in the controller +class CommonVmServiceInstance extends VirtualMachineServiceInstance { + String script + int configureTimeout = "60000" + int testTimeout = "60000" + int suspendTimeout = "60000" + int resumeTimeout = "60000" + contains CommonVmServiceConfiguration vmConfiguration +} + +// state in both controller and manager +class CommonVmServiceConfiguration { +} + +class TommyVmServiceConfiguration extends CommonVmServiceConfiguration { + String postgresUserName + String postgresPassword + String portgresJdbc +} \ No newline at end of file diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/pom.xml b/dcae-controller-service-vm/dcae-controller-service-common-vm/pom.xml new file mode 100644 index 0000000..436eee2 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/pom.xml @@ -0,0 +1,82 @@ + + 4.0.0 + + org.openecomp.dcae.controller + dcae-controller-service-common-vm + 0.1.0-SNAPSHOT + pom + dcae-controller-service-common-vm + + + UTF-8 + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + + dcae-controller-service-common-vm-manager + dcae-controller-service-common-vm-model + + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.classpath b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.classpath new file mode 100644 index 0000000..04e20b5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.classpath @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.gitignore b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.project b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.project new file mode 100644 index 0000000..b3e3df1 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.project @@ -0,0 +1,35 @@ + + + dcae-controller-service-vm-adaptor + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.core.resources.prefs b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/LICENSE.txt b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/META-INF/MANIFEST.MF b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/META-INF/MANIFEST.MF new file mode 100644 index 0000000..35ec7f2 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/META-INF/MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: dcae-controller-service-vm-adaptor +Bundle-SymbolicName: dcae-controller-service-vm-adaptor +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.dcae.controller.service.vm.adaptor.tools, + org.openecomp.dcae.controller.service.servers.vm +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + dcae-controller-service-vm-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/build.properties b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/build.properties new file mode 100644 index 0000000..a1ec8c4 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/build.properties @@ -0,0 +1,3 @@ +source.. = src/main/java/ +bin.includes = META-INF/,\ + . diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/pom.xml b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/pom.xml new file mode 100644 index 0000000..830692f --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/pom.xml @@ -0,0 +1,188 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-vm-adaptor + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-base + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-base + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-assembly-plugin + 2.6 + + + zipfile + + single + + package + + false + ${project.artifactId}-${project.version} + + src/assembly/assemble_zip.xml + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/lib + false + true + true + false + false + false + org.opendaylight,com.brocade.odl,ch.qos.logback + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/versions + + + src/main/resources/versions + + version.properties + + true + + + + + + copy-resources + + copy-resources + + validate + + ${basedir}/target/etc/bvc-extensions + + + src/main/resources/etc/bvc-extensions + + feature_config_template.cfg + feature_custom.install + + true + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + attach-artifacts + package + + attach-artifact + + + + + target/${project.artifactId}-${project.version}-runtime.zip + zip + runtime + + + + + + + + + + + + org.openecomp.dcae.controller + dcae-controller-service-vm-model + ${project.version} + + + diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/assembly/assemble_zip.xml b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..b716317 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/assembly/assemble_zip.xml @@ -0,0 +1,61 @@ + + + + runtime + + zip + + + + false + + + + target + lib + + dcae-controller-service-vm-adaptor-${project.version}.jar + + + + target/assembly/ + . + + + + + . + lib + + *.jar + + + + src/main/server-gen/bin + bin + 0744 + + + + + src/main/server/bin + bin + 0744 + + + + + src/main/server-gen/scripts + scripts + + + src/main/server/scripts + scripts + + + + diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/CLOUDINIT.userdata b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/CLOUDINIT.userdata new file mode 100644 index 0000000..ade0065 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/CLOUDINIT.userdata @@ -0,0 +1,13 @@ + +############################################################## +##################### CLOUDINIT ############################## +############################################################## + +## need to fix cloudinit in Centos. + +CLOUDHOSTCFG=/etc/cloud/cloud.cfg.d/99_hostname.cfg +if [ -f /etc/redhat-release ]; then + # CentOS/RHEL + ( echo "hostname: \$(hostname)"; echo "fqdn: \$(hostname -f)" ) > \$CLOUDHOSTCFG +fi + diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/HttpInstallationStep.userdata b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/HttpInstallationStep.userdata new file mode 100644 index 0000000..9f1ea4f --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/HttpInstallationStep.userdata @@ -0,0 +1,23 @@ + +if [ ! -e /home/%{applicationId} ]; then useradd -m -s /bin/bash %{applicationId}; fi + +OUT=/tmp/`basename %{url}` + +curl -k -f --user '%{userName}:%{password}' -o \$OUT %{url} + +case %{type} in + deb) + dpkg --install \$OUT + ;; + jar) + mkdir -p /opt/app/%{artifactId}/lib + mv \$OUT /opt/app/%{artifactId}/lib + chown -R %{applicationId}:%{applicationId} /opt/app/%{artifactId} + ;; + zip) + mkdir -p /opt/app/%{artifactId}/lib + ( cd /opt/app/%{artifactId} ; cp -p \$OUT . ; unzip -o \$OUT ) + chown -R %{applicationId}:%{applicationId} /opt/app/%{artifactId} + ;; +esac + diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/MavenArtifactInstallationStep.userdata b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/MavenArtifactInstallationStep.userdata new file mode 100644 index 0000000..016bf66 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/MavenArtifactInstallationStep.userdata @@ -0,0 +1,29 @@ + +if [ ! -e /home/%{applicationId} ]; then useradd -m -s /bin/bash %{applicationId}; fi + +case %{assemblyId} in + %*) + A1=%{groupId}:%{artifactId}:%{version}:%{type} + ;; + *) + A1=%{groupId}:%{artifactId}:%{version}:%{type}:%{assemblyId} + ;; +esac + +mvn -s /tmp/settings.xml org.apache.maven.plugins:maven-dependency-plugin:2.10:copy \ + -Dartifact=\$A1 \ + -Dmaven.wagon.http.ssl.insecure=true \ + -Dmaven.wagon.http.ssl.allowall=true \ + -DoutputDirectory=/opt/app/%{artifactId} + +case %{type} in + jar) + mkdir /opt/app/%{artifactId}/lib + mv /opt/app/%{artifactId}/*.jar /opt/app/%{artifactId}/lib + ;; + zip) + ( cd /opt/app/%{artifactId} ; unzip -o %{artifactId}*.zip ) + ;; +esac + +chown -R %{applicationId}:%{applicationId} /opt/app/%{artifactId} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/ShellInstallationStep.userdata b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/ShellInstallationStep.userdata new file mode 100644 index 0000000..b067968 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/ShellInstallationStep.userdata @@ -0,0 +1,2 @@ + +%{command} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceProvider.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceProvider.java new file mode 100644 index 0000000..9dee540 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceProvider.java @@ -0,0 +1,872 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.vm; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jetty.util.B64Code; +import org.json.JSONObject; +import org.yaml.snakeyaml.Yaml; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; +import org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork; +import org.openecomp.dcae.controller.core.service.DcaeLocation; +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.service.HealthTestStatus; +import org.openecomp.dcae.controller.core.service.ServiceFactory; +import org.openecomp.dcae.controller.core.stream.DcaeStream; +import org.openecomp.dcae.controller.service.servers.vmmanager.DcaeVirtualMachineManagerConsole; +import org.openecomp.dcae.controller.service.vm.InstallationStep; +import org.openecomp.dcae.controller.service.vm.PhysicalMachine; +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; +import org.openecomp.dcae.controller.service.vm.VmFactory; +import org.openecomp.ncomp.core.DeploymentStatus; +import org.openecomp.ncomp.core.User; +import org.openecomp.ncomp.openstack.compute.Address; +import org.openecomp.ncomp.openstack.compute.Addresses; +import org.openecomp.ncomp.openstack.compute.ComputeFactory; +import org.openecomp.ncomp.openstack.compute.OpenstackRequestNewServer; +import org.openecomp.ncomp.openstack.compute.Server; +import org.openecomp.ncomp.openstack.location.OpenStackLocation; +import org.openecomp.ncomp.openstack.location.OpenStackProject; +import org.openecomp.ncomp.openstack.neutron.CreatePortRequest; +import org.openecomp.ncomp.openstack.neutron.FixedIp; +import org.openecomp.ncomp.openstack.neutron.Network; +import org.openecomp.ncomp.openstack.neutron.NeutronFactory; +import org.openecomp.ncomp.openstack.neutron.NeutronFloatingIp; +import org.openecomp.ncomp.openstack.neutron.Port; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.JavaHttpClient; +import org.openecomp.ncomp.sirius.manager.Jetty8Client; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; +import org.openecomp.ncomp.sirius.manager.Subject; +import org.openecomp.ncomp.sirius.manager.console.Utils; +import org.openecomp.ncomp.sirius.manager.metrics.MetricStore; +import org.openecomp.ncomp.sirius.manager.server.Response; +import org.openecomp.ncomp.sirius.manager.server.ResponseStatus; +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; +import org.openecomp.ncomp.utils.CryptoUtils; +import org.openecomp.ncomp.utils.StringUtil; + +public class DcaeVirtualMachineServiceProvider extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeVirtualMachineServiceProvider.class); + VirtualMachineService o; + private String privateKey = CryptoUtils.getKey("config/server.private"); + + public DcaeVirtualMachineServiceProvider(ISiriusServer controller, VirtualMachineService o) { + super(controller, o); + this.o = o; + } + + public void deploy(String instanceName, String containerPath) { + System.err.println("XXX deploy server: " + instanceName + " " + containerPath); + Response res = ServerFactory.eINSTANCE.createResponse(); + VirtualMachineServiceInstance i = findInstance(instanceName); + if (containerPath != null && !containerPath.equals("")) { + Subject s = controller.getServer().find(containerPath); + if (i == null) { + throw new RuntimeException("Unable to find instance: " + instanceName); + } + if (s == null || s.o == null) { + throw new RuntimeException("Unable to find container object: " + containerPath); + } + if (!(s.o instanceof DcaeLocation)) + throw new RuntimeException("Unable to deploy to this container: " + containerPath + " " + s.o); + i.setLocation((DcaeLocation) s.o); + } + DcaeLocation location = i.getLocation(); + if (location == null) + throw new RuntimeException("Unable to deploy no location specified: " + ManagementServer.object2ref(i)); + String networkId = null; + String networkName = location.getOpenstackProject().getPrivateNetwork(); + String subnetId = null; + for (Network network : location.getOpenstackProject().getNetworks()) { + if (network.getName().equals(networkName)) { + networkId = network.getId(); + subnetId = network.getSubnets().get(0); + } + } + if (networkId == null) { + throw new RuntimeException("Unable to find network: " + networkName); + } + HashMap portMap = new LinkedHashMap(); + OpenStackLocation loc = (OpenStackLocation) location.getOpenstackProject().eContainer(); + for (int j = 0; j < i.getNumberOfServers(); j++) { + DcaeBasicServer server = i.getServers().get(j); + if (i.getVmType().isNeedPublicIp() && server.getNetworks().get(0).getIp() == null) { + throw new RuntimeException("Deployment issue: server not assigned IP: " + server.getName()); + } + for (Port port : location.getOpenstackProject().getPorts()) { + if (port.getName().equals(server.getName())) { + portMap.put(server, port); + } + } + if (portMap.get(server) == null) { + CreatePortRequest portReq = NeutronFactory.eINSTANCE.createCreatePortRequest(); + portReq.setName(server.getName()); + portReq.setProjectName(location.getOpenstackProject().getName()); + portReq.setNetwork_id(networkId); + // if assigned ip but no public network, assume IP is on private and available + String ip2 = server.getNetworks().get(0).getIp(); + if (ip2 != null && ! loc.isSupportsFloatingIps()) { + FixedIp fip = NeutronFactory.eINSTANCE.createFixedIp(); + fip.setIp_address(ip2); + fip.setSubnet_id(subnetId); + portReq.getFixed_ips().add(fip ); + } + // create port in Openstack + Port port = loc.createPort(portReq); + portMap.put(server, port); + } + } + for (int j = 0; j < i.getNumberOfServers(); j++) { + OpenstackRequestNewServer r = ComputeFactory.eINSTANCE.createOpenstackRequestNewServer(); + r.setVmType(EcoreUtil.copy(i.getVmType())); + r.setName(vmName(i, j)); + r.setProjectName(location.getOpenstackProject().getName()); + if (i.getAvailabilityZone() != null) + r.setHypervisor(i.getAvailabilityZone()); + if (i.getUsers().size() > 0) { + r.setUser(i.getUsers().get(0).getName()); + } + r.setUser_data(B64Code.encode(userdata(i, j, portMap))); + DcaeBasicServer server = i.getServers().get(j); + if (o.getName().equals("vm-controller")) { + if (server.getServer() != null) { + // Existing Controller VM. ignore it + continue; + } + } + boolean floatingIpDone = false; + String ip2 = server.getNetworks().get(0).getIp(); + for (NeutronFloatingIp fip : location.getOpenstackProject().getFloatingips()) { + if (ip2 != null && ip2.equals(fip.getFloating_ip_address())) { + if (fip.getFixed_ip_address() != null) { + floatingIpDone = true; + } + } + } + if (!floatingIpDone && loc.isSupportsFloatingIps()) + r.setFloatingIp(ip2); + else + r.getVmType().setNeedPublicIp(false); + r.getPorts().add(portMap.get(server).getId()); + if (! loc.isSupportsFloatingIps() && location.getOpenstackProject().getPublicNetwork() != null) { + // find external network. + String networkId2 = null; + String networkName2 = location.getOpenstackProject().getPublicNetwork(); + if (networkName2.matches("........-....-....-....-............")) { + networkId2 = networkName2; + } + else { + for (Network network : location.getOpenstackProject().getNetworks()) { + if (network.getName().equals(networkName)) { + networkId2 = network.getId(); + } + } + } + if (networkId2 == null) { + throw new RuntimeException("Unable to find public network: " + networkName2); + } + r.getNetworks().add(networkId2); + } + if (i.getOpenstackFlavor() != null) + r.getVmType().setFlavorName(i.getOpenstackFlavor()); + System.out.println("loc.isSupportsFloatingIps(): " + loc.isSupportsFloatingIps()); + System.out.println("location.getOpenstackProject().getPublicNetwork(): " + location.getOpenstackProject().getPublicNetwork()); + System.out.println(ManagementServer.ecore2json(r, 100, null, true).toString(2)); + loc.createServer(r); + logger.info("created server: " + r.getName()); + } + controller.getServer().save(); + long toolate = System.currentTimeMillis() + i.getDeploymentTimeoutMinutes() * 60 * 1000; + while (i.getStatus() != DeploymentStatus.DEPLOYED) { + if (System.currentTimeMillis() > toolate) { + throw new RuntimeException("Deployment timeout: VM did not show up"); + } + try { + Thread.sleep(1000); + } catch (InterruptedException ie) { + } + } + if (i.getManagerPortNumber() > 0) { + while (System.currentTimeMillis() < toolate) { + try { + o.pushManagerConfiguration(instanceName); + break; + } catch (Exception e) { + try { + Thread.sleep(10000); + } catch (InterruptedException e1) { + throw new RuntimeException("Deployment timeout: Deployment interrupted"); + } + } + if (System.currentTimeMillis() >= toolate) + throw new RuntimeException("Unable to configure VM"); + } + } + res.setStatus(ResponseStatus.OK); + // return res; + } + + // used for testing only + static String userdataStatic(VirtualMachineServiceInstance i, int j, HashMap portMap) { + DcaeVirtualMachineServiceProvider pp = new DcaeVirtualMachineServiceProvider(null, null); + return pp.userdata(i, j, portMap); + } + + @SuppressWarnings("unchecked") + protected String userdata(VirtualMachineServiceInstance i, int j, HashMap portMap) { + StringBuffer buf = new StringBuffer(); + HashMap configMap = new HashMap(); + buf.append(userdataInitial()); + String resourceName = "instances/" + i.getService().getName() + "/" + i.getName() + ".yaml"; + String x = null; + try { + x = getTemplate(resourceName); + } catch (Exception e1) { + buf.append("#### No special configuration resource: " + resourceName); + buf.append("\n"); + } + if (x != null) { + Yaml yaml = new Yaml(); + configMap = (HashMap) yaml.load(x); + buf.append("#### Using special configuration resource: " + resourceName); + buf.append("\n"); + } + DcaeBasicServer s = i.getServers().get(j); + if (configMap.containsKey("configuration-files")) + buf.append(userdataConfig(configMap.get("configuration-files"), s)); + if (configMap.containsKey("init-script")) + buf.append(configMap.get("init-script")).append("\n"); + buf.append(userdataHosts(s, portMap)); + buf.append(userdataCertificate(s)); +// buf.append(userdataUam(i, s)).append("\n"); +// buf.append(userdataIeds(i, s)).append("\n"); + buf.append(userdataFromFile("CLOUDINIT",i, s)).append("\n"); + for (User u : i.getAdminUsers()) { + buf.append(userdataSshKey(i.getAdminId(), u.getPublicKey())); + } + buf.append(userdataSteps(i, s, portMap)).append("\n"); + for (String id : i.getApplicationIds()) { + buf.append(userdataSshSetup(id)); + for (User u : i.getUsers()) { + buf.append(userdataSshKey(id, u.getPublicKey())); + } + } + try { + buf.append(getTemplate(i.getService().getName() + ".userdata")); + } catch (Exception e) { + buf.append("#no final script: " + i.getService().getName() + ".userdata").append("\n"); + } + if (configMap.containsKey("final-script")) + buf.append(configMap.get("final-script")).append("\n"); + buf.append(userdataFinal(i,s)); + System.err.println("USER DATA: " + ManagementServer.object2ref(i) + "\n" + buf); + return buf.toString(); + } + + private String userdataSteps(VirtualMachineServiceInstance i, DcaeBasicServer s, + HashMap portMap) { + StringBuffer buf = new StringBuffer(); + for (InstallationStep step : i.getSteps()) { + buf.append("######### ").append(step.getName()).append("\n"); + String str = null, str1 = null; + try { + str = getTemplate(step.eClass().getName() + ".userdata"); + JSONObject json = ManagementServer.ecore2json(step, 100, null, true); + str1 = StringUtil.expandUsingJson(str, json, "%"); + buf.append(str1).append("\n"); + } catch (Exception e) { + System.err.println("userdataSteps error: str=" + str + " str1=" + str1 + " e=" + e); + e.printStackTrace(); + } + } + return buf.toString(); + } + + private String userdataConfig(Object o, DcaeBasicServer s) { + StringBuffer buf = new StringBuffer(); + @SuppressWarnings("unchecked") + HashMap> m1 = (HashMap>) o; + for (String k : m1.keySet()) { + HashMap m2 = m1.get(k); + buf.append("## Adding configuration file: ").append(k).append("\n"); + String decode = "cat"; + if (m2.containsKey("encoding") && "base64".equals(m2.get("encoding"))) { + decode = "base64 --decode"; + } + buf.append("cat | ").append(decode).append(" > ").append(m2.get("destination")).append(" << EOF_CONFIG\n"); + String content = m2.get("content"); + if (m2.containsKey("encrypted-password")) { + String pw = CryptoUtils.decryptPrivate(privateKey, m2.get("encrypted-password")); + content = CryptoUtils.decrypt(pw, content); + } + JSONObject json = new JSONObject(); + String pw = JavaHttpClient.decryptPassword(s.getCertificatePassword()); + json.put("certPassword", pw == null ? "No Certificate" : pw); + if (content.contains("%{")) { + System.err.print("CONTENT" + content + " " + json); + } + content = StringUtil.expandUsingJson(content, json, "%"); + if (content.contains("%{")) { + System.err.print("CONTENT 2" + content); + } + content = decryptString(content); + buf.append(content).append("\n"); + buf.append("EOF_CONFIG").append("\n"); + if (m2.containsKey("owner")) + buf.append("chown ").append(m2.get("owner")).append(" ").append(m2.get("destination")).append("\n"); + } + return buf.toString(); + } + + private String decryptString(String content) { + Pattern p = Pattern.compile("(rsa:[A-Za-z0-9+/]+ *[A-Za-z0-9+/]+ *[A-Za-z0-9+/]+=*)"); + Matcher m = p.matcher(content); + StringBuffer s = new StringBuffer(); + while (m.find()) { + String k = m.group(1); + m.appendReplacement(s, JavaHttpClient.decryptPassword(k)); + } + m.appendTail(s); + return s.toString(); + } + + protected String userdataSshSetup(String id) { + StringBuffer buf = new StringBuffer(); + if (id == null) { + buf.append("### userdataSshSetup null ID: ").append("\n"); + return buf.toString(); + } + buf.append("mkdir /home/ID/.ssh\n".replace("ID", id)); + buf.append("chmod og-rwx /home/ID/.ssh\n".replace("ID", id)); + buf.append("chown -R ID:ID /home/ID/.ssh\n".replace("ID", id)); + buf.append("touch /home/ID/.ssh/authorized_keys\n".replace("ID", id)); + buf.append("chmod og-rwx /home/ID/.ssh/authorized_keys\n".replace("ID", id)); + buf.append("chown -R ID:ID /home/ID/.ssh/authorized_keys\n".replace("ID", id)); + return buf.toString(); + } + + protected String userdataSshKey(String id, String publicKey) { + StringBuffer buf = new StringBuffer(); + if (id == null) { + return ""; + } + if (publicKey == null) { + buf.append("### null key: ").append(id).append("\n"); + return buf.toString(); + } + buf.append("echo ").append(publicKey.trim()).append(" >> /home/").append(id).append("/.ssh/authorized_keys\n"); + return buf.toString(); + } + + protected Object userdataCertificate(DcaeBasicServer s) { + StringBuffer buf = new StringBuffer(); + byte[] cert; + try { + cert = getTemplateBinary(s.getName() + ".pkcs12"); + // buf.append("### check sum: " + + // MD5Checksum.createChecksum(cert)).append("\n"); + buf.append("cat > /tmp/certificate.pkcs12.b64code << EOF_CERT").append("\n"); + buf.append(B64Code.encode(cert)).append("\n"); + buf.append("EOF_CERT").append("\n"); + } catch (Exception e) { + // TODO Auto-generated catch block + buf.append("## UNABLE TO FIND CERTIFICATE FOR: " + s.getName()).append("\n"); + } + return buf.toString(); + } + + protected Object userdataCertificatePassword(DcaeBasicServer s) { + StringBuffer buf = new StringBuffer(); + buf.append("echo ").append(JavaHttpClient.decryptPassword(s.getCertificatePassword())) + .append(" > /tmp/.password\n"); + return buf.toString(); + } + + protected String userdataHosts(DcaeBasicServer s, HashMap portMap) { + StringBuffer buf = new StringBuffer(); + buf.append("cat >> /etc/hosts << HOSTS_EOF").append("\n"); + for (DcaeBasicServer s1 : portMap.keySet()) { + if (s1 == s) { + for (FixedIp x : portMap.get(s1).getFixed_ips()) { + buf.append(x.getIp_address() + " " + dnsName(s) + " " + s1.getName()).append("\n"); + } + } else { + for (FixedIp x : portMap.get(s1).getFixed_ips()) { + buf.append(x.getIp_address() + " " + s1.getName()).append("\n"); + } + } + } + buf.append("HOSTS_EOF").append("\n"); + buf.append("echo ").append(s.getName()).append(" > /etc/hostname\n"); + int index = 0; + for (DcaeBasicServer s1 : portMap.keySet()) { + for (FixedIp x : portMap.get(s1).getFixed_ips()) { + buf.append("IP" + index + "=").append(x.getIp_address()).append("\n"); + } + index++; + } + return buf.toString(); + } + + static String getTemplate(String resource) throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + byte[] data = new byte[65536]; + InputStream is = DcaeVirtualMachineServiceProvider.class.getClassLoader().getResourceAsStream(resource); + if (is == null) { + throw new RuntimeException("Unable to find resource: " + resource); + } + int i; + try { + while ((i = is.read(data)) > 0) { + baos.write(data, 0, i); + } + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + } finally { + if (is != null) + is.close(); + } + return (new String(baos.toByteArray())); + } + + static byte[] getTemplateBinary(String rnm) throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + byte[] data = new byte[65536]; + InputStream is = DcaeVirtualMachineServiceProvider.class.getClassLoader().getResourceAsStream(rnm); + int i; + try { + while ((i = is.read(data)) > 0) { + baos.write(data, 0, i); + } + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + } finally { + if (is != null) + is.close(); + } + return baos.toByteArray(); + } + + protected Object userdataFromFile(String name, VirtualMachineServiceInstance i, DcaeBasicServer s2) { + try { + String s = getTemplate(name + ".userdata"); + JSONObject json = new JSONObject(); + DcaeBasicServerNetwork n = s2.getNetworks().get(0); + String dns = n.getDnsName(); + json.put("dnsDomain", dns.substring(dns.indexOf(".") + 1)); + json.put("admin", i.getIedsAdmin()); + return StringUtil.expandUsingJson(s, json, "%"); + } catch (Exception e) { + return "#error " + name + ".userdata: " + e; + } + } + + + protected String userdataInitial() { + StringBuffer buf = new StringBuffer(); + buf.append("#!/bin/bash").append("\n"); + buf.append("cat > /tmp/dcae_install.sh << EOF_DCAE_INSTALL").append("\n"); + buf.append("#!/bin/bash").append("\n"); + buf.append("set -x").append("\n"); + buf.append("cd /tmp").append("\n"); + return buf.toString(); + } + + protected String userdataFinal(VirtualMachineServiceInstance i, DcaeBasicServer s) { + StringBuffer buf = new StringBuffer(); + buf.append("EOF_DCAE_INSTALL").append("\n"); + buf.append(userdataCertificatePassword(s)); + buf.append("bash /tmp/dcae_install.sh 2>&1 | tee /tmp/dcae_install.log").append("\n"); + return buf.toString(); + } + + public void undeploy(java.lang.String instanceName) { + if (o.getName().equals("vm-controller")) + throw new RuntimeException("Cannot undeploy vm-controller, please use Horizon"); + VirtualMachineServiceInstance i = findInstance(instanceName); + for (int j = 0; j < i.getNumberOfServers(); j++) { + // System.out.println("HHHH: " + i.getServers().get(j).getName()); + if (i.getLocation() == null) + continue; + OpenStackLocation loc = (OpenStackLocation) i.getLocation().getOpenstackProject().eContainer(); + String tname = i.getLocation().getOpenstackProject().getName(); + loc.deleteServer(tname, vmName(i, j)); + // System.out.println("HHHH deleted: " + vmName(i, j)); + } + } + + private String dnsName(DcaeBasicServer s) { + return s.getNetworks().get(0).getDnsName(); + } + + public void updateDeploymentStatus() { +// System.out.println("XXXX updateDeploymentStatus: " + o.getName()); + for (VirtualMachineServiceInstance instance : o.getInstances()) { +// System.out.println("XXXX updateDeploymentStatus: " + o.getName() + " " + instance.getName() + " " +// + instance.getServers().size()); + if (instance.getServers().size() == 0) { + setStatus(instance,DeploymentStatus.UNDEPLOYED,"no servers"); + continue; + } + if (instance.getServers().size() != instance.getNumberOfServers()) { + setStatus(instance,DeploymentStatus.DEPLOYED_ERRORS,"not the right number of servers"); + continue; + } + if (instance.getVmType() == null) { + logger.warn("virtual machine instance without vmType: " + ManagementServer.object2ref(instance)); + setStatus(instance,DeploymentStatus.DEPLOYED_ERRORS,"vm type is null"); + continue; + } + boolean allPhysical = true; + for (int j = 0; j < instance.getNumberOfServers(); j++) { + DcaeBasicServer s1 = instance.getServers().get(j); + // check if server is non Openstack managed VM. + if (s1 instanceof PhysicalMachine) { + continue; + } + allPhysical = false; + } + if (allPhysical) { + setStatus(instance,DeploymentStatus.DEPLOYED,"all physical"); + continue; + } + if (instance.getLocation() == null) { + setStatus(instance,DeploymentStatus.UNDEPLOYED,"no location"); + continue; + } + boolean needPubIp = instance.getVmType().isNeedPublicIp(); + boolean errors = false; + String incomplete = null; + int numDeployed = 0; + for (int j = 0; j < instance.getNumberOfServers(); j++) { + DcaeBasicServer s1 = instance.getServers().get(j); + // check if server is non Openstack managed VM. + if (s1 instanceof PhysicalMachine) { + numDeployed++; + continue; + } + // VirtualMachine vm = (VirtualMachine) s1; + String n = vmName(instance, j); + if (!s1.getName().equals(n)) { + errors = true; + } + Server svr = null; + String privateip = null; + String publicip = null; + s1.setServer(null); + s1.setPrivateIp(null); + s1.setPublicIp(null); + OpenStackProject project = instance.getLocation().getOpenstackProject(); + for (Server s : project.getServers()) { + if (n.equals(s.getName())) { + svr = s; + for (Addresses a : s.getAddresses()) { +// System.out.println("RRRR: " + o.getName() + " " + instance.getName() + " " + s.getName() +// + " " + a.getName()); + for (Address ip : a.getIps()) { + if (ip.getOS_EXT_IPS_type() == null || ip.getOS_EXT_IPS_type().equals("fixed")) { + if (a.getName().equals(project.getPrivateNetwork())) + privateip = ip.getAddr(); + if (a.getName().equals("public") && ip.getVersion() == 4) + publicip = ip.getAddr(); + } + if (ip.getOS_EXT_IPS_type() != null && ip.getOS_EXT_IPS_type().equals("floating")) { + publicip = ip.getAddr(); + } + } + } + } + } + s1.setPrivateIp(privateip); + s1.setPublicIp(publicip); + s1.setServer(svr); + if (svr != null) + numDeployed++; + if (publicip == null && needPubIp && project.getPublicNetwork() != null) { + incomplete = s1.getName() + " has not public IP"; + } + if (privateip == null) { + incomplete = s1.getName() + " has not private IP"; + } + if (svr == null) { + incomplete = s1.getName() + " has null openstack server"; + } + } +// System.out.println("XXXX updateDeploymentStatus: " + o.getName() + " " + instance.getName() + " " + errors +// + " " + numDeployed + " " + incomplete); + if (errors) { + setStatus(instance,DeploymentStatus.DEPLOYED_ERRORS,"errors"); + } else if (numDeployed == 0) { + setStatus(instance,DeploymentStatus.UNDEPLOYED,"numDeployed == 0"); + } else if (incomplete != null) { + setStatus(instance,DeploymentStatus.DEPLOYED_PARTIALLY,incomplete); + } else { + setStatus(instance,DeploymentStatus.DEPLOYED,"all okay"); + } + } + + }; + + private void setStatus(VirtualMachineServiceInstance instance, DeploymentStatus newStatus,String reason) { + if (instance.getStatus() != newStatus) { + String msg = "deployment status changed: " + ManagementServer.object2ref(instance) + + " " + instance.getStatus() + " -> " + newStatus + " " + reason; + System.err.println("VMDEPLOYMENTSTATUS: " + new Date() + " " + msg); + logger.info(msg); + } + instance.setStatus(newStatus); + } + + public HealthTestResponse test(String instance) { + VirtualMachineServiceInstance i = findInstance(instance); + if (i.getStatus() != DeploymentStatus.DEPLOYED) { + HealthTestResponse s = ServiceFactory.eINSTANCE.createHealthTestResponse(); + s = ServiceFactory.eINSTANCE.createHealthTestResponse(); + s.setMessageCode("Not deployed"); + s.setStatus(HealthTestStatus.YELLOW); + return s; + } + if (i.getManagerPortNumber() < 0) { + HealthTestResponse s = ServiceFactory.eINSTANCE.createHealthTestResponse(); + s.setMessageCode("Health Check undefined"); + s.setStatus(HealthTestStatus.YELLOW); + return s; + } + AbstractClient c = getClient(i); + DcaeVirtualMachineManagerConsole console = new DcaeVirtualMachineManagerConsole(c); + return console.test(); + } + + public void suspend(String instance) { + VirtualMachineServiceInstance i = findInstance(instance); + for (DcaeBasicServer s : getServers(i)) { + AbstractClient c = getClient(i, s); + DcaeVirtualMachineManagerConsole console = new DcaeVirtualMachineManagerConsole(c); + console.suspend(); + } + } + + public void resume(String instance) { + VirtualMachineServiceInstance i = findInstance(instance); + for (DcaeBasicServer s : getServers(i)) { + AbstractClient c = getClient(i,s); + DcaeVirtualMachineManagerConsole console = new DcaeVirtualMachineManagerConsole(c); + console.resume(); + } + } + + public void pushManagerConfiguration(String instance) { + VirtualMachineServiceInstance i = findInstance(instance); + for (DcaeBasicServer s : getServers(i)) { + AbstractClient c = getClient(i, s); + DcaeVirtualMachineManagerConsole console = new DcaeVirtualMachineManagerConsole(c); + EObject config = o.managerConfiguration(instance); + console.update("/", ManagementServer.ensureHardUpdate(config, 1)); + EList l1 = new BasicEList(); + l1.addAll(EcoreUtil.copyAll(i.getInputStreams())); + EList l2 = new BasicEList(); + l2.addAll(EcoreUtil.copyAll(i.getOutputStreams())); + console.updateStreams(l1, l2); + console.configurationChanged(); + } + } + + protected EList getServers(VirtualMachineServiceInstance i) { + return i.getServers(); + } + + protected EObject convertToManagerConfiguration(VirtualMachineServiceInstance i) { + VirtualMachineServiceConfiguration c = VmFactory.eINSTANCE.createVirtualMachineServiceConfiguration(); + c.setConfiguration(i.getConfiguration()); + return c; + } + + public void pollManagerConfiguration(String instance) { + // TODO Auto-generated method stub + + } + + public void start() { + Thread t = new Thread("vm service: " + o.getName()) { + @Override + public void run() { + while (true) { + try { + if (!controller.getServer().isSlave) + updateDeploymentStatus(); + Thread.sleep(10000); // sleep 10 seconds + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("vm service: " + o.getName() + " : " + e); + try { + Thread.sleep(30000); + } catch (InterruptedException e1) { + } + } + } + } + + }; + t.start(); + } + + public AbstractClient getClient(VirtualMachineServiceInstance i, DcaeBasicServer s) { + Jetty8Client c = new Jetty8Client("managers.properties", i.eClass().getInstanceClassName()); + if (c.getBaseAddress() == null) { + throw new RuntimeException("unable to determine baseaddress in managers.properties for: " + + i.eClass().getInstanceClassName()); + } + if (i.getServers().size() == 0) { + throw new RuntimeException("service instances is not deployed (has no servers): " + + ManagementServer.object2ref(i)); + } + int port = i.getService().getManagerPortNumber(); + if (i.getManagerPortNumber() != null) + port = i.getManagerPortNumber(); + if (s instanceof PhysicalMachine) { + PhysicalMachine p = (PhysicalMachine) s; + if (p.getManagerPortNumber() != null) + port = p.getManagerPortNumber(); + } + String b = c.getBaseAddress(); + b = b.replaceFirst("PORT", Integer.toString(port)); + b = b.replaceFirst("IP", dnsName(s)); + if (s.getCertificatePassword() != null) + b = b.replaceFirst("http", "https"); + c.setBaseAddress(b); + logger.info("using baseAdress: " + c.getBaseAddress() + " for " + ManagementServer.object2ref(i)); + return c; + } + + public AbstractClient getClient(VirtualMachineServiceInstance i) { + if (i.getLeaderServer() == null) { + EList l = getServers(i); + if (l.size() == 0) { + throw new RuntimeException("No servers for vm instance: " + ManagementServer.object2ref(i)); + } + i.setLeaderServer(l.get(0)); + } + return getClient(i, i.getLeaderServer()); + } + + private String vmName(VirtualMachineServiceInstance i, int index) { + return i.getServers().get(index).getName(); + // return "dcae:" + o.getName() + ":" + i.getName() + ":" + index; + } + + protected VirtualMachineServiceInstance findInstance(String instanceName) { + for (VirtualMachineServiceInstance ii : o.getInstances()) { + if (ii.getName().equals(instanceName)) { + return ii; + } + } + throw new RuntimeException("Unable to find instance: " + instanceName); + } + + public static void ecoreSetup() { + // TODO Auto-generated method stub + + } + + public EObject managerConfiguration(String instanceName) { + VirtualMachineServiceInstance i = findInstance(instanceName); + AbstractClient c = getClient(i); + DcaeVirtualMachineManagerConsole console = new DcaeVirtualMachineManagerConsole(c); + Object oo = console.list("/", 100); + JSONObject json = (JSONObject) Utils.object2json(oo); + // System.err.println("XXXXX" + json.toString(2)); + return controller.getServer().json2ecore(EcorePackage.eINSTANCE.getEObject(), json); + } + + public JSONObject managerOperation(String instanceName, String operation, JSONObject parameters) { + VirtualMachineServiceInstance i = findInstance(instanceName); + AbstractClient c = getClient(i); + DcaeVirtualMachineManagerConsole console = new DcaeVirtualMachineManagerConsole(c); + if (operation == null) + throw new RuntimeException("no operation: " + instanceName); + if (parameters == null) + throw new RuntimeException("no parameters: " + instanceName + "@" + operation); + Object oo = console.operation("/", operation, parameters); + if (oo == null) + return null; + JSONObject json = (JSONObject) Utils.object2json(oo); + // System.err.println("XXXXX" + json.toString(2)); + return json; + } + + public void updateConfigurationFromPolicy(String instanceName) { + VirtualMachineServiceInstance i = findInstance(instanceName); + JavaHttpClient client = new JavaHttpClient("controller.properties", "policy"); + HashMap headers = new HashMap(); + JSONObject json = new JSONObject(); + headers.put("ClientAuth", "xxx"); + JSONObject json2 = new JSONObject(); + json.put("configAttributes", json2); + json2.put("uuid", "xxx"); + json2.put("service", "ControllerServiceCollectorSdnlService"); + json2.put("location", "Edge"); + json.put("configName", "xxxx.sdn-l"); + json.put("ecompcomponentName", "DCAE"); + client.httpJsonTransaction("/PyPDPServer/getConfig", "POST", headers, json); + } + + public void runHealthTests() { + for (VirtualMachineServiceInstance i : o.getInstances()) { + HealthTestResponse s = null; + try { + s = o.test(i.getName()); + } catch (Exception e) { + s = ServiceFactory.eINSTANCE.createHealthTestResponse(); + s.setMessageCode("Health check failed: " + e); + s.setStatus(HealthTestStatus.RED); + } + i.setHealthTestStatus(s.getStatus()); + i.setHealthTestMessageCode(s.getMessageCode()); + MetricStore store = controller.getServer().metrics.getStore(i); + Date now = new Date(); + String path = "/lastHealthTest"; + store.addLongValue(path, now, now.getTime(), "DateMetricAttribute", false); + } + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerProvider.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerProvider.java new file mode 100644 index 0000000..d65b6a3 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerProvider.java @@ -0,0 +1,164 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.servers.vmmanager; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.util.Date; + +import org.openecomp.ncomp.sirius.manager.BasicManagementServerProvider; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; +import org.openecomp.ncomp.webservice.utils.FileUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import org.openecomp.dcae.controller.core.manager.ManagerFactory; +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.service.HealthTestStatus; +import org.openecomp.dcae.controller.core.service.ServiceFactory; +import org.openecomp.dcae.controller.core.stream.DcaeStream; +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; + +public class DcaeVirtualMachineManagerProvider extends BasicManagementServerProvider { + private static final Logger logger = Logger.getLogger(DcaeVirtualMachineManagerProvider.class); + VirtualMachineManager o; + private boolean suspended; + private String file = "/etc/dcae/dmaap.conf"; + + public DcaeVirtualMachineManagerProvider(ISiriusServer controller, VirtualMachineManager o) { + super(controller, o); + this.o = o; + } + + public HealthTestResponse test() { + HealthTestResponse res = ServiceFactory.eINSTANCE.createHealthTestResponse(); + res.setStatus(HealthTestStatus.GREEN); + return res; + } + + public void suspend() { + suspended = true; + } + + public void resume() { + suspended = false; + } + + public java.lang.String publicKey() { + throw new UnsupportedOperationException(); + } + + // US618656 + public void configurationChanged() { + updateDMaapConfig(); + } + + // US618665 + private void updateDMaapConfig() { + JSONArray a = new JSONArray(); + for (DcaeStream s : o.getInputStreams()) { + JSONObject json = ManagementServer.ecore2json(s, 100, null, true); + json.put("dmaapStreamId", s.getName()); + a.put(json); + } + for (DcaeStream s : o.getOutputStreams()) { + JSONObject json = ManagementServer.ecore2json(s, 100, null, true); + json.put("dmaapStreamId", s.getName()); + a.put(json); + } + write2file(a,"/tmp/dmaap.conf2"); + write2file(a,file ); + + } + + private void write2file(JSONArray a, String fileName) { + try { + OutputStreamWriter w = FileUtils.filename2writer(fileName); + w.write(a.toString(2)); + w.close(); + } catch (Exception e) { + logger.warn("Unable to write file: " + fileName); + ManagementServerUtils.printStackTrace(e); + } + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + o.getInputStreams().clear(); + o.getInputStreams().addAll(inputStreams); + o.getOutputStreams().clear(); + o.getOutputStreams().addAll(outputStreams); + } + + public void scheduleCronjob(final String cmd, final long frequency) { + Thread t = new Thread("crontab: " + cmd) { + @Override + public void run() { + while (true) { + try { + Date now = new Date(); + long wait = frequency - (now.getTime() % frequency); + Thread.sleep(wait); + if (suspended) continue; + Runtime runtime = Runtime.getRuntime(); + Process proc; + try { + now = new Date(); + proc = runtime.exec(cmd); + ByteArrayOutputStream o = new ByteArrayOutputStream(); + ByteArrayOutputStream e = new ByteArrayOutputStream(); + FileUtils.copyStream(proc.getInputStream(), o); + FileUtils.copyStream(proc.getErrorStream(), e); + int i = proc.waitFor(); + if (i != 0) + logger.warn("crontab return error: " + cmd + " " + i); + long duration = new Date().getTime()-now.getTime(); + if (duration > frequency) + logger.warn("crontab took too long: " + cmd + " " + duration); + } catch (Exception e) { + e.printStackTrace(); + logger.warn("ERROR: " + e); + } + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("crontab: " + cmd + " " + e); + try { + Thread.sleep(30000); + } catch (InterruptedException e1) { + } + } + } + }; + }; + t.start(); + } + + protected void setDmaapConfigurationFile(String dmaapConfFile) { + file = dmaapConfFile; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/vm/adaptor/tools/Generator.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/vm/adaptor/tools/Generator.java new file mode 100644 index 0000000..3d7c1c5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/vm/adaptor/tools/Generator.java @@ -0,0 +1,91 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.vm.adaptor.tools; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.openecomp.ncomp.gwt.siriusportal.model.ModelFactory; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelFactory; +import org.openecomp.ncomp.sirius.manager.generator.ControllerGenerator; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import org.openecomp.dcae.controller.service.vm.VmFactory; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerFactory; +import org.openecomp.utils.YamlToJava; + + +public class Generator { + + public static void main(String[] args) { + @SuppressWarnings("unused") + ServerPackage f = ServerPackage.eINSTANCE; + genManager(); + genService(); + } + + private static void genManager() { + EObject o = VmmanagerFactory.eINSTANCE.createVirtualMachineManager(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix(); + dir = "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceVmManager"); + m.setTitle("ControllerServiceVmManager"); + ControllerGenerator g = new ControllerGenerator(o, m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(false); + // TODO Unclear why this fails. +// g.addFactory(VmFactory.eINSTANCE); + g.generate(dir); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; + YamlToJava.convert("src/main/sirius-gen/VirtualMachineManager.yaml", dir + "/logging", pName); + } + + public static void genService() { + @SuppressWarnings("unused") + ServerPackage f = ServerPackage.eINSTANCE; + EObject o = VmFactory.eINSTANCE.createVirtualMachineService(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replace(p.getNsPrefix(),"") + "servers." + p.getNsPrefix(); + dir= "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceVm"); + m.setTitle("ControllerServiceVm"); + ControllerGenerator g = new ControllerGenerator(o,m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(true); + g.generate(dir); + g.generateScripts("src/main/server-gen/bin","controller-service-vm-adaptor"); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; +// YamlToJava.convert("src/main/resources/DcaeServiceVirtualMachineAdaptor.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/VirtualMachineService.yaml", dir + "/logging", pName); + } + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/resources/DcaeController.yaml b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/resources/DcaeController.yaml new file mode 100644 index 0000000..a6edb28 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/resources/DcaeController.yaml @@ -0,0 +1,12 @@ +operations: + HEALTHCHECK: + description: Heath Check for all DCAE service instances. +messages: + HEALTHCHECK_SERVICE_FAILED: + errorCode: DCAE-CONTROLLER-HEALTHCHECK-SERVICE-FAILED-5001W + messageFormat: '{0}' + parameters: + service-name: + description: Name of Service for which the health check fails. + resolution: Contact Tier 4. This is a software bug. + description: Heath Check on the service level fails. diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/server-gen/bin/controller-service-vm-adaptor-controller b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/server-gen/bin/controller-service-vm-adaptor-controller new file mode 100644 index 0000000..ebe6100 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/server-gen/bin/controller-service-vm-adaptor-controller @@ -0,0 +1,138 @@ +#!/bin/bash + +# setup env if needed. java 6 required +## JAVA_HOME= + +############################## DO NOT EDIT BELOW ########################## + +SNAME="Dcae Controller" +PNAME=controller-service-vm-adaptor-controller +CLASS=org.openecomp.dcae.controller.service.servers.vm.DcaeVirtualMachineServiceServer + +############################## COMMON BELOW ########################## + +check_status () +{ + if [ -f "${_PIDFILE}" ]; then + _PID=`cat "${_PIDFILE}"` + check_status_of_pid $_PID + else + _STATUS="$SNAME (no pidfile) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + +remove_pid_file () +{ + if [ -f "${_PIDFILE}" ]; then + rm "${_PIDFILE}" + fi +} + + +_DIR=`dirname "$0"` +_DIR=`dirname "$_DIR"` + +_PIDFILE=$_DIR/PID + +CMD=$1 +shift + +check_status + +CP=$(find $_DIR/lib/*/* -name \*.jar 2>/dev/null | xargs -I X printf ":%s" X) + +JVMARGS=$(grep 'server.jvmargs' $_DIR/config/vm.properties | sed -e 's/.*=//') + +case $CMD in + status) + echo $_STATUS + exit 0 + ;; + console) + $GROOVY_HOME/bin/groovysh -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP + ;; + run) + $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + groovy) + $GROOVY_HOME/bin/groovy -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + start) + if [ "$_RUNNING" = "1" ]; then + echo $_STATUS + exit 0 + fi + mkdir -p $_DIR/logs + if [ -e $_DIR/logs/$PNAME.out.1 ]; then mv $_DIR/logs/$PNAME.out.1 $_DIR/logs/$PNAME.out.2; fi + if [ -e $_DIR/logs/$PNAME.err.1 ]; then mv $_DIR/logs/$PNAME.err.1 $_DIR/logs/$PNAME.err.2; fi + if [ -e $_DIR/logs/$PNAME.out ]; then mv $_DIR/logs/$PNAME.out $_DIR/logs/$PNAME.out.1; fi + if [ -e $_DIR/logs/$PNAME.err ]; then mv $_DIR/logs/$PNAME.err $_DIR/logs/$PNAME.err.1; fi + + nohup $JAVA_HOME/bin/java $JVMARGS -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" $CLASS >> $_DIR/logs/$PNAME.out 2>> $_DIR/logs/$PNAME.err & + + _PID=$! + echo $_PID > $_PIDFILE + sleep 5 + check_status + echo $_STATUS + if [ "$_RUNNING" = "1" ]; then + exit 0 + else + echo "Failed to start - make sure the $SNAME is fully configured properly" + exit 1 + fi + ;; + stop) + if [ "$_RUNNING" = "0" ]; then + echo $_STATUS + remove_pid_file + exit 0 + fi + echo "Stopping $SNAME..." + _PID_TO_KILL=$_PID; + echo "$SNAME (pid=${_PID_TO_KILL}) is stopping..." + kill -TERM $_PID_TO_KILL + sleep 5 + check_status_of_pid $_PID_TO_KILL + if [ "$_RUNNING" = "1" ]; then + kill -TERM $_PID_TO_KILL + fi + while [ "$_RUNNING" = "1" ]; do + sleep 2 + check_status_of_pid $_PID_TO_KILL + done + remove_pid_file + echo "$SNAME has stopped." + exit 0 + ;; + *) + echo "$0 start|stop" + ;; +esac + + diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/ControllerVirtualMachineServiceInstance.yaml b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/ControllerVirtualMachineServiceInstance.yaml new file mode 100644 index 0000000..d728705 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/ControllerVirtualMachineServiceInstance.yaml @@ -0,0 +1,3 @@ +operations: {} +messages: + dummy: {} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/VirtualMachineManager.yaml b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/VirtualMachineManager.yaml new file mode 100644 index 0000000..63cb773 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/VirtualMachineManager.yaml @@ -0,0 +1,179 @@ +operations: + test: {} + suspend: {} + resume: {} + publicKey: {} + configurationChanged: {} + updateStreams: {} + logs: {} + metrics: {} + properties: {} + uploadInfo: {} + getValues: {} + getValuesAll: {} + getMessages: {} + getRequestLogger: {} + evaluate: {} + update: {} + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_publicKey: + decription: Remote call publicKey + REMOTE_configurationChanged: + decription: Remote call configurationChanged + REMOTE_updateStreams: + decription: Remote call updateStreams + REMOTE_logs: + decription: Remote call logs + REMOTE_metrics: + decription: Remote call metrics + REMOTE_properties: + decription: Remote call properties + REMOTE_uploadInfo: + decription: Remote call uploadInfo + REMOTE_getValues: + decription: Remote call getValues + REMOTE_getValuesAll: + decription: Remote call getValuesAll + REMOTE_getMessages: + decription: Remote call getMessages + REMOTE_getRequestLogger: + decription: Remote call getRequestLogger + REMOTE_evaluate: + decription: Remote call evaluate + REMOTE_update: + decription: Remote call update +messages: + dummy: {} + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + publicKey: + errorCode: publicKey-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + configurationChanged: + errorCode: configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateStreams: + errorCode: updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + logs: + errorCode: logs-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + metrics: + errorCode: metrics-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + properties: + errorCode: properties-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + uploadInfo: + errorCode: uploadInfo-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getValues: + errorCode: getValues-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getValuesAll: + errorCode: getValuesAll-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getMessages: + errorCode: getMessages-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getRequestLogger: + errorCode: getRequestLogger-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + evaluate: + errorCode: evaluate-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + update: + errorCode: update-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_publicKey: + errorCode: REMOTE-publicKey-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_configurationChanged: + errorCode: REMOTE-configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateStreams: + errorCode: REMOTE-updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_logs: + errorCode: REMOTE-logs-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_metrics: + errorCode: REMOTE-metrics-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_properties: + errorCode: REMOTE-properties-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_uploadInfo: + errorCode: REMOTE-uploadInfo-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getValues: + errorCode: REMOTE-getValues-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getValuesAll: + errorCode: REMOTE-getValuesAll-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getMessages: + errorCode: REMOTE-getMessages-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getRequestLogger: + errorCode: REMOTE-getRequestLogger-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_evaluate: + errorCode: REMOTE-evaluate-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_update: + errorCode: REMOTE-update-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/VirtualMachineService.yaml b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/VirtualMachineService.yaml new file mode 100644 index 0000000..6ac8c34 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/VirtualMachineService.yaml @@ -0,0 +1,135 @@ +operations: + deploy: {} + undeploy: {} + test: {} + suspend: {} + resume: {} + pushManagerConfiguration: {} + pollManagerConfiguration: {} + managerConfiguration: {} + managerOperation: {} + updateConfigurationFromPolicy: {} + runHealthTests: {} + updateDeploymentStatus: {} + REMOTE_deploy: + decription: Remote call deploy + REMOTE_undeploy: + decription: Remote call undeploy + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_pushManagerConfiguration: + decription: Remote call pushManagerConfiguration + REMOTE_pollManagerConfiguration: + decription: Remote call pollManagerConfiguration + REMOTE_managerConfiguration: + decription: Remote call managerConfiguration + REMOTE_managerOperation: + decription: Remote call managerOperation + REMOTE_updateConfigurationFromPolicy: + decription: Remote call updateConfigurationFromPolicy + REMOTE_runHealthTests: + decription: Remote call runHealthTests + REMOTE_updateDeploymentStatus: + decription: Remote call updateDeploymentStatus +messages: + dummy: {} + deploy: + errorCode: deploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + undeploy: + errorCode: undeploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pushManagerConfiguration: + errorCode: pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pollManagerConfiguration: + errorCode: pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerConfiguration: + errorCode: managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerOperation: + errorCode: managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateConfigurationFromPolicy: + errorCode: updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + runHealthTests: + errorCode: runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateDeploymentStatus: + errorCode: updateDeploymentStatus-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_deploy: + errorCode: REMOTE-deploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_undeploy: + errorCode: REMOTE-undeploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pushManagerConfiguration: + errorCode: REMOTE-pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pollManagerConfiguration: + errorCode: REMOTE-pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerConfiguration: + errorCode: REMOTE-managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerOperation: + errorCode: REMOTE-managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateConfigurationFromPolicy: + errorCode: REMOTE-updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_runHealthTests: + errorCode: REMOTE-runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateDeploymentStatus: + errorCode: REMOTE-updateDeploymentStatus-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineService.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineService.java new file mode 100644 index 0000000..1d8d251 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineService.java @@ -0,0 +1,408 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.vm; + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.servers.vm.logging.VirtualMachineServiceOperationEnum; +import org.openecomp.dcae.controller.service.servers.vm.logging.VirtualMachineServiceMessageEnum; + + + + +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl; + + + +public class DcaeVirtualMachineService extends VirtualMachineServiceImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeVirtualMachineService.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeVirtualMachineServiceProvider controller; + ISiriusServer server; + + public DcaeVirtualMachineService(ISiriusServer server) { + this.server = server; + this.controller = new DcaeVirtualMachineServiceProvider(server,this); + } + + public void updateDeploymentStatus() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.updateDeploymentStatus); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.updateDeploymentStatus(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineServiceMessageEnum.updateDeploymentStatus, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.OKAY, duration_); + + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.START, duration_,instanceName,containerPath); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.deploy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.deploy(instanceName,containerPath); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.ERROR, duration_,instanceName,containerPath); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineServiceMessageEnum.deploy, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.OKAY, duration_,instanceName,containerPath); + + } + + public void undeploy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.undeploy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.undeploy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineServiceMessageEnum.undeploy, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.test); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.test(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineServiceMessageEnum.test, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public void suspend(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.suspend); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.suspend(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineServiceMessageEnum.suspend, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void resume(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.resume); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.resume(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineServiceMessageEnum.resume, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.pushManagerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.pushManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineServiceMessageEnum.pushManagerConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.pollManagerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.pollManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineServiceMessageEnum.pollManagerConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.managerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.managerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineServiceMessageEnum.managerConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.START, duration_,instanceName,operation,parameters); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.managerOperation); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.ERROR, duration_,instanceName,operation,parameters); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineServiceMessageEnum.managerOperation, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.OKAY, duration_,instanceName,operation,parameters); + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.updateConfigurationFromPolicy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineServiceMessageEnum.updateConfigurationFromPolicy, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void runHealthTests() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.runHealthTests); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.runHealthTests(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineServiceMessageEnum.runHealthTests, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.OKAY, duration_); + + } + + + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + DcaeVirtualMachineServiceProvider.ecoreSetup(); + } + public DcaeVirtualMachineServiceProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceClient.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceClient.java new file mode 100644 index 0000000..65cdc1b --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceClient.java @@ -0,0 +1,276 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.vm; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl; +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.openecomp.dcae.controller.service.servers.vm.logging.VirtualMachineServiceOperationEnum; +import org.openecomp.dcae.controller.service.servers.vm.logging.VirtualMachineServiceMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeVirtualMachineServiceClient extends VirtualMachineServiceImpl { + public static final Logger logger = Logger.getLogger(DcaeVirtualMachineServiceClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeVirtualMachineServiceClient(String file, String name) { + DcaeVirtualMachineService.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeVirtualMachineServiceClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeVirtualMachineServiceClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public void updateDeploymentStatus() { + EClass c = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_updateDeploymentStatus); + + try { + client.operationPath("/resources", c, "updateDeploymentStatus", null); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.REMOTE_updateDeploymentStatus, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateDeploymentStatus: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + EClass c = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_deploy); + + try { + client.operationPath("/resources", c, "deploy", null, instanceName,containerPath); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.REMOTE_deploy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@deploy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void undeploy(java.lang.String instanceName) { + EClass c = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_undeploy); + + try { + client.operationPath("/resources", c, "undeploy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.REMOTE_undeploy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@undeploy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + EClass c = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@test: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend(java.lang.String instanceName) { + EClass c = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspend: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume(java.lang.String instanceName) { + EClass c = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@resume: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pushManagerConfiguration(java.lang.String instanceName) { + EClass c = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_pushManagerConfiguration); + + try { + client.operationPath("/resources", c, "pushManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.REMOTE_pushManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@pushManagerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pollManagerConfiguration(java.lang.String instanceName) { + EClass c = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_pollManagerConfiguration); + + try { + client.operationPath("/resources", c, "pollManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.REMOTE_pollManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@pollManagerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + EClass c = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_managerConfiguration); + org.eclipse.emf.ecore.EObject res; + try { + res = (org.eclipse.emf.ecore.EObject) client.operationPath("/resources", c, "managerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.REMOTE_managerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@managerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + EClass c = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_managerOperation); + org.json.JSONObject res; + try { + res = (org.json.JSONObject) client.operationPath("/resources", c, "managerOperation", null, instanceName,operation,parameters); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.REMOTE_managerOperation, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@managerOperation: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + EClass c = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_updateConfigurationFromPolicy); + + try { + client.operationPath("/resources", c, "updateConfigurationFromPolicy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateConfigurationFromPolicy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void runHealthTests() { + EClass c = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_runHealthTests); + + try { + client.operationPath("/resources", c, "runHealthTests", null); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.REMOTE_runHealthTests, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@runHealthTests: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceConsole.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceConsole.java new file mode 100644 index 0000000..aa306e0 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceConsole.java @@ -0,0 +1,189 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.servers.vm; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeVirtualMachineServiceConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeVirtualMachineServiceConsole.class); + protected DcaeVirtualMachineServiceClient controller; + + + + + public DcaeVirtualMachineServiceConsole(String filename, String name) { + super(filename, name); + controller = new DcaeVirtualMachineServiceClient(filename,name); + client = controller.client; + + } + + public DcaeVirtualMachineServiceConsole(AbstractClient c) { + controller = new DcaeVirtualMachineServiceClient(c); + client = controller.client; + } + + + public void updateDeploymentStatus() { + + try { + controller.updateDeploymentStatus(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + try { + controller.deploy(instanceName,containerPath); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void undeploy(java.lang.String instanceName) { + + try { + controller.undeploy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend(java.lang.String instanceName) { + + try { + controller.suspend(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume(java.lang.String instanceName) { + + try { + controller.resume(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pushManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pollManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + try { + res = controller.managerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void runHealthTests() { + + try { + controller.runHealthTests(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceProviderTemplate.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceProviderTemplate.java new file mode 100644 index 0000000..5aa1a26 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceProviderTemplate.java @@ -0,0 +1,137 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.vm; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; + + +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl; +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; + + +public class DcaeVirtualMachineServiceProviderTemplate extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeVirtualMachineServiceProviderTemplate.class); + VirtualMachineService o; + + public DcaeVirtualMachineServiceProviderTemplate(ISiriusServer controller, VirtualMachineService o) { + super(controller, o); + this.o = o; + } + + public void updateDeploymentStatus() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void undeploy(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void suspend(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void resume(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void runHealthTests() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + + + + + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceServer.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceServer.java new file mode 100644 index 0000000..56173b7 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceServer.java @@ -0,0 +1,98 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.servers.vm; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; + + + + + + +public class DcaeVirtualMachineServiceServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeVirtualMachineServiceServer.class); + String serverPath; + ManagementServer server; + DcaeVirtualMachineService controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeVmFactory f = new DcaeVmFactory(this); + + + + public DcaeVirtualMachineServiceServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeVirtualMachineService.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "VirtualMachineService", serverPath, filename); + server.addFactory(f); + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeVirtualMachineService) server.find("/").o; + webServer = new Jetty8Server("vm.properties"); + webServer.add("/resources",server); + + + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeVirtualMachineServiceServer s = new DcaeVirtualMachineServiceServer("vm.properties"); + s.runWebserver(); + } + public VirtualMachineService getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVmFactory.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVmFactory.java new file mode 100644 index 0000000..0e24bee --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVmFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.vm; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.openecomp.dcae.controller.service.vm.impl.VmFactoryImpl; + + + + + +public class DcaeVmFactory extends VmFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeVmFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return VmPackage.eINSTANCE; } + public DcaeVmFactory(ISiriusServer server) { + this.server = server; + } + @Override + public VirtualMachineService createVirtualMachineService() { + return new DcaeVirtualMachineService(server); + } + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineService.properties b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineService.properties new file mode 100644 index 0000000..d32cf07 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineService.properties @@ -0,0 +1,150 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +deploy=\ + deploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +undeploy=\ + undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pushManagerConfiguration=\ + pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pollManagerConfiguration=\ + pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerConfiguration=\ + managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerOperation=\ + managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateConfigurationFromPolicy=\ + updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +runHealthTests=\ + runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateDeploymentStatus=\ + updateDeploymentStatus-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_deploy=\ + REMOTE-deploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_undeploy=\ + REMOTE-undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pushManagerConfiguration=\ + REMOTE-pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pollManagerConfiguration=\ + REMOTE-pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerConfiguration=\ + REMOTE-managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerOperation=\ + REMOTE-managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateConfigurationFromPolicy=\ + REMOTE-updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_runHealthTests=\ + REMOTE-runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateDeploymentStatus=\ + REMOTE-updateDeploymentStatus-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineServiceMessageEnum.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineServiceMessageEnum.java new file mode 100644 index 0000000..d0f7bf2 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineServiceMessageEnum.java @@ -0,0 +1,59 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.vm.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum VirtualMachineServiceMessageEnum implements EcompMessageEnum { + + dummy, + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateDeploymentStatus, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateDeploymentStatus; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.servers.vm.logging.VirtualMachineService"); + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineServiceOperationEnum.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineServiceOperationEnum.java new file mode 100644 index 0000000..52d420c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineServiceOperationEnum.java @@ -0,0 +1,53 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.vm.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum VirtualMachineServiceOperationEnum implements EcompOperationEnum { + + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateDeploymentStatus, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateDeploymentStatus; +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManager.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManager.java new file mode 100644 index 0000000..889b01c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManager.java @@ -0,0 +1,529 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.vmmanager; + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.servers.vmmanager.logging.VirtualMachineManagerOperationEnum; +import org.openecomp.dcae.controller.service.servers.vmmanager.logging.VirtualMachineManagerMessageEnum; + + + + + + + +import java.util.Date; + + + + + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; + + + + + +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + + +import org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl; + + + +public class DcaeVirtualMachineManager extends VirtualMachineManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeVirtualMachineManager.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeVirtualMachineManagerProvider controller; + ISiriusServer server; + + public DcaeVirtualMachineManager(ISiriusServer server) { + this.server = server; + this.controller = new DcaeVirtualMachineManagerProvider(server,this); + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.test); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.test(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineManagerMessageEnum.test, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void suspend() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.suspend); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.suspend(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineManagerMessageEnum.suspend, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_); + + } + + public void resume() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.resume); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.resume(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineManagerMessageEnum.resume, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_); + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.publicKey); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.publicKey(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineManagerMessageEnum.publicKey, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void configurationChanged() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.configurationChanged); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.configurationChanged(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineManagerMessageEnum.configurationChanged, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.OKAY, duration_); + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.START, duration_,inputStreams,outputStreams); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.updateStreams); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.ERROR, duration_,inputStreams,outputStreams); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineManagerMessageEnum.updateStreams, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.OKAY, duration_,inputStreams,outputStreams); + + } + + public void logs(org.json.JSONObject cx, EList logs) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.START, duration_,cx,logs); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.logs); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.logs(cx,logs); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.ERROR, duration_,cx,logs); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineManagerMessageEnum.logs, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.OKAY, duration_,cx,logs); + + } + + public void metrics(org.json.JSONObject cx, EList metrics) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.START, duration_,cx,metrics); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.metrics); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.metrics(cx,metrics); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.ERROR, duration_,cx,metrics); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineManagerMessageEnum.metrics, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.OKAY, duration_,cx,metrics); + + } + + public void properties(org.json.JSONObject cx, EList l) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.START, duration_,cx,l); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.properties); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.properties(cx,l); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.ERROR, duration_,cx,l); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineManagerMessageEnum.properties, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.OKAY, duration_,cx,l); + + } + + public void uploadInfo(org.json.JSONObject cx, EList info) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.START, duration_,cx,info); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.uploadInfo); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.uploadInfo(cx,info); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.ERROR, duration_,cx,info); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineManagerMessageEnum.uploadInfo, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.OKAY, duration_,cx,info); + + } + + public EList getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.START, duration_,cx,path,start,end,option,relativeInterval); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.getValues); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getValues(cx,path,start,end,option,relativeInterval); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.ERROR, duration_,cx,path,start,end,option,relativeInterval); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineManagerMessageEnum.getValues, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.OKAY, duration_,cx,path,start,end,option,relativeInterval); + return res; + } + + public EList getValuesAll(org.json.JSONObject cx, java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.START, duration_,cx,path,metrics,start,end,option,relativeInterval); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.getValuesAll); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getValuesAll(cx,path,metrics,start,end,option,relativeInterval); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.ERROR, duration_,cx,path,metrics,start,end,option,relativeInterval); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineManagerMessageEnum.getValuesAll, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.OKAY, duration_,cx,path,metrics,start,end,option,relativeInterval); + return res; + } + + public EList getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.START, duration_,cx,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.getMessages); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getMessages(cx,path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.ERROR, duration_,cx,path,start,end); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineManagerMessageEnum.getMessages, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.OKAY, duration_,cx,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.START, duration_,userName,action,resourcePath,context); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.getRequestLogger); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.getRequestLogger(userName,action,resourcePath,context); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.ERROR, duration_,userName,action,resourcePath,context); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineManagerMessageEnum.getRequestLogger, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.OKAY, duration_,userName,action,resourcePath,context); + return res; + } + + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.START, duration_,path,function); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.evaluate); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + res = controller.evaluate(path,function); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.ERROR, duration_,path,function); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineManagerMessageEnum.evaluate, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.OKAY, duration_,path,function); + return res; + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.START, duration_,path,function); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.update); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.update(path,function); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.ERROR, duration_,path,function); + System.err.println("ERROR: " + e); + ecomplogger.warn(VirtualMachineManagerMessageEnum.update, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.OKAY, duration_,path,function); + + } + + + + + + + public static void ecoreSetup() { + DcaeVirtualMachineManagerProvider.ecoreSetup(); + } + public DcaeVirtualMachineManagerProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerClient.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerClient.java new file mode 100644 index 0000000..1030b1c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerClient.java @@ -0,0 +1,344 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.vmmanager; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; +import org.openecomp.dcae.controller.service.servers.vmmanager.logging.VirtualMachineManagerOperationEnum; +import org.openecomp.dcae.controller.service.servers.vmmanager.logging.VirtualMachineManagerMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeVirtualMachineManagerClient extends VirtualMachineManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeVirtualMachineManagerClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeVirtualMachineManagerClient(String file, String name) { + DcaeVirtualMachineManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeVirtualMachineManagerClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeVirtualMachineManagerClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@test: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend() { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspend: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume() { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@resume: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public java.lang.String publicKey() { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_publicKey); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "publicKey", null); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_publicKey, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@publicKey: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void configurationChanged() { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_configurationChanged); + + try { + client.operationPath("/resources", c, "configurationChanged", null); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_configurationChanged, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@configurationChanged: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void updateStreams(EList inputStreams, EList outputStreams) { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_updateStreams); + + try { + client.operationPath("/resources", c, "updateStreams", null, inputStreams,outputStreams); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_updateStreams, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateStreams: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void logs(org.json.JSONObject cx, EList logs) { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_logs); + + try { + client.operationPath("/resources", c, "logs", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,logs); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_logs, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@logs: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void metrics(org.json.JSONObject cx, EList metrics) { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_metrics); + + try { + client.operationPath("/resources", c, "metrics", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,metrics); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_metrics, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@metrics: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void properties(org.json.JSONObject cx, EList l) { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_properties); + + try { + client.operationPath("/resources", c, "properties", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,l); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_properties, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@properties: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void uploadInfo(org.json.JSONObject cx, EList info) { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_uploadInfo); + + try { + client.operationPath("/resources", c, "uploadInfo", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,info); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_uploadInfo, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@uploadInfo: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public EList getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_getValues); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getValues", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end,option,relativeInterval); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_getValues, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getValues: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList getValuesAll(org.json.JSONObject cx, java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_getValuesAll); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getValuesAll", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,metrics,start,end,option,relativeInterval); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_getValuesAll, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getValuesAll: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_getMessages); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getMessages", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_getMessages, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getMessages: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_getRequestLogger); + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res; + try { + res = (org.openecomp.ncomp.sirius.manager.server.LoggerInfo) client.operationPath("/resources", c, "getRequestLogger", null, userName,action,resourcePath,context); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_getRequestLogger, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@getRequestLogger: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_evaluate); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "evaluate", null, path,function); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_evaluate, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@evaluate: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_update); + + try { + client.operationPath("/resources", c, "update", null, path,function); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_update, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@update: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerConsole.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerConsole.java new file mode 100644 index 0000000..585fcec --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerConsole.java @@ -0,0 +1,233 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.servers.vmmanager; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeVirtualMachineManagerConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeVirtualMachineManagerConsole.class); + protected DcaeVirtualMachineManagerClient controller; + + + + + public DcaeVirtualMachineManagerConsole(String filename, String name) { + super(filename, name); + controller = new DcaeVirtualMachineManagerClient(filename,name); + client = controller.client; + + } + + public DcaeVirtualMachineManagerConsole(AbstractClient c) { + controller = new DcaeVirtualMachineManagerClient(c); + client = controller.client; + } + + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend() { + + try { + controller.suspend(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume() { + + try { + controller.resume(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + try { + res = controller.publicKey(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void configurationChanged() { + + try { + controller.configurationChanged(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void logs(EList logs) { + + try { + controller.logs(null,logs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void metrics(EList metrics) { + + try { + controller.metrics(null,metrics); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void properties(EList l) { + + try { + controller.properties(null,l); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void uploadInfo(EList info) { + + try { + controller.uploadInfo(null,info); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public EList getValues(java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + try { + res = controller.getValues(null,path,start,end,option,relativeInterval); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getValuesAll(java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + try { + res = controller.getValuesAll(null,path,metrics,start,end,option,relativeInterval); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getMessages(java.lang.String path, java.lang.Long start, java.lang.Long end) { + EList res = null; + try { + res = controller.getMessages(null,path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res = null; + try { + res = controller.getRequestLogger(userName,action,resourcePath,context); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EList res = null; + try { + res = controller.evaluate(path,function); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + + try { + controller.update(path,function); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerProviderTemplate.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerProviderTemplate.java new file mode 100644 index 0000000..bc197dd --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerProviderTemplate.java @@ -0,0 +1,108 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.vmmanager; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import java.util.Date; + + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; + + +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + + +import org.openecomp.ncomp.sirius.manager.BasicManagementServerProvider; + + +import org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl; +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; + + +public class DcaeVirtualMachineManagerProviderTemplate extends BasicManagementServerProvider { + private static final Logger logger = Logger.getLogger(DcaeVirtualMachineManagerProviderTemplate.class); + VirtualMachineManager o; + + public DcaeVirtualMachineManagerProviderTemplate(ISiriusServer controller, VirtualMachineManager o) { + super(controller, o); + this.o = o; + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void suspend() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void resume() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String publicKey() { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void configurationChanged() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + + + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerServer.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerServer.java new file mode 100644 index 0000000..b769ee8 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerServer.java @@ -0,0 +1,98 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.servers.vmmanager; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; + + + + + + +public class DcaeVirtualMachineManagerServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeVirtualMachineManagerServer.class); + String serverPath; + ManagementServer server; + DcaeVirtualMachineManager controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeVmmanagerFactory f = new DcaeVmmanagerFactory(this); + + + + public DcaeVirtualMachineManagerServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeVirtualMachineManager.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "VirtualMachineManager", serverPath, filename); + server.addFactory(f); + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeVirtualMachineManager) server.find("/").o; + webServer = new Jetty8Server("vmmanager.properties"); + webServer.add("/resources",server); + + + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeVirtualMachineManagerServer s = new DcaeVirtualMachineManagerServer("vmmanager.properties"); + s.runWebserver(); + } + public VirtualMachineManager getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVmmanagerFactory.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVmmanagerFactory.java new file mode 100644 index 0000000..99d954b --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVmmanagerFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.servers.vmmanager; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; +import org.openecomp.dcae.controller.service.vmmanager.impl.VmmanagerFactoryImpl; + + + + + +public class DcaeVmmanagerFactory extends VmmanagerFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeVmmanagerFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return VmmanagerPackage.eINSTANCE; } + public DcaeVmmanagerFactory(ISiriusServer server) { + this.server = server; + } + @Override + public VirtualMachineManager createVirtualMachineManager() { + return new DcaeVirtualMachineManager(server); + } + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManager.properties b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManager.properties new file mode 100644 index 0000000..9eb6331 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManager.properties @@ -0,0 +1,198 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +publicKey=\ + publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +configurationChanged=\ + configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateStreams=\ + updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +logs=\ + logs-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +metrics=\ + metrics-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +properties=\ + properties-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +uploadInfo=\ + uploadInfo-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getValues=\ + getValues-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getValuesAll=\ + getValuesAll-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getMessages=\ + getMessages-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getRequestLogger=\ + getRequestLogger-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +evaluate=\ + evaluate-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +update=\ + update-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_publicKey=\ + REMOTE-publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_configurationChanged=\ + REMOTE-configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateStreams=\ + REMOTE-updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_logs=\ + REMOTE-logs-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_metrics=\ + REMOTE-metrics-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_properties=\ + REMOTE-properties-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_uploadInfo=\ + REMOTE-uploadInfo-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getValues=\ + REMOTE-getValues-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getValuesAll=\ + REMOTE-getValuesAll-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getMessages=\ + REMOTE-getMessages-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getRequestLogger=\ + REMOTE-getRequestLogger-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_evaluate=\ + REMOTE-evaluate-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_update=\ + REMOTE-update-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManagerMessageEnum.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManagerMessageEnum.java new file mode 100644 index 0000000..f8087ef --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManagerMessageEnum.java @@ -0,0 +1,67 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.vmmanager.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum VirtualMachineManagerMessageEnum implements EcompMessageEnum { + + dummy, + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams, + REMOTE_logs, + REMOTE_metrics, + REMOTE_properties, + REMOTE_uploadInfo, + REMOTE_getValues, + REMOTE_getValuesAll, + REMOTE_getMessages, + REMOTE_getRequestLogger, + REMOTE_evaluate, + REMOTE_update; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.servers.vmmanager.logging.VirtualMachineManager"); + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManagerOperationEnum.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManagerOperationEnum.java new file mode 100644 index 0000000..71aeeda --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManagerOperationEnum.java @@ -0,0 +1,61 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.servers.vmmanager.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum VirtualMachineManagerOperationEnum implements EcompOperationEnum { + + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams, + REMOTE_logs, + REMOTE_metrics, + REMOTE_properties, + REMOTE_uploadInfo, + REMOTE_getValues, + REMOTE_getValuesAll, + REMOTE_getMessages, + REMOTE_getRequestLogger, + REMOTE_evaluate, + REMOTE_update; +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/.classpath b/dcae-controller-service-vm/dcae-controller-service-vm-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/.gitignore b/dcae-controller-service-vm/dcae-controller-service-vm-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/.project b/dcae-controller-service-vm/dcae-controller-service-vm-model/.project new file mode 100644 index 0000000..c4817ae --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/.project @@ -0,0 +1,34 @@ + + + dcae-controller-service-vm-model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-vm/dcae-controller-service-vm-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-vm/dcae-controller-service-vm-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/LICENSE.txt b/dcae-controller-service-vm/dcae-controller-service-vm-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/META-INF/MANIFEST.MF b/dcae-controller-service-vm/dcae-controller-service-vm-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..7994e26 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/META-INF/MANIFEST.MF @@ -0,0 +1,27 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: dcae-controller-service-vm-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.openecomp.dcae.controller.service.vm, + org.openecomp.dcae.controller.service.vm.impl, + org.openecomp.dcae.controller.service.vm.util, + org.openecomp.dcae.controller.service.vmmanager, + org.openecomp.dcae.controller.service.vmmanager.impl, + org.openecomp.dcae.controller.service.vmmanager.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-agent-model;visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + ncomp-openstack-model;bundle-version="0.1.0";visibility:=reexport, + dcae-controller-core-model;bundle-version="0.1.0";visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/build.properties b/dcae-controller-service-vm/dcae-controller-service-vm-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/build.properties @@ -0,0 +1,11 @@ +# + +bin.includes = .,\ + src/main/xcore/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/xcore-gen/,\ + src/main/xcore/ +output.. = target/classes/ diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/plugin.properties b/dcae-controller-service-vm/dcae-controller-service-vm-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/plugin.xml b/dcae-controller-service-vm/dcae-controller-service-vm-model/plugin.xml new file mode 100644 index 0000000..4b6bfc6 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/plugin.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/pom.xml b/dcae-controller-service-vm/dcae-controller-service-vm-model/pom.xml new file mode 100644 index 0000000..ae32ddd --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/pom.xml @@ -0,0 +1,28 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-vm-model + + org.openecomp.ncomp.maven + ncomp-maven-xcore + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore + + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + ${project.version} + + + org.openecomp.ncomp.openstack + ncomp-openstack-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-core-model + ${project.version} + + + diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ControllerVirtualMachineService.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ControllerVirtualMachineService.java new file mode 100644 index 0000000..8763179 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ControllerVirtualMachineService.java @@ -0,0 +1,38 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm; + + +/** + * + * A representation of the model object 'Controller Virtual Machine Service'. + * + * + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getControllerVirtualMachineService() + * @model + * @generated + */ +public interface ControllerVirtualMachineService extends VirtualMachineService { +} // ControllerVirtualMachineService diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ControllerVirtualMachineServiceInstance.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ControllerVirtualMachineServiceInstance.java new file mode 100644 index 0000000..7535c5d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ControllerVirtualMachineServiceInstance.java @@ -0,0 +1,38 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm; + + +/** + * + * A representation of the model object 'Controller Virtual Machine Service Instance'. + * + * + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getControllerVirtualMachineServiceInstance() + * @model + * @generated + */ +public interface ControllerVirtualMachineServiceInstance extends VirtualMachineServiceInstance { +} // ControllerVirtualMachineServiceInstance diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/HttpInstallationStep.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/HttpInstallationStep.java new file mode 100644 index 0000000..24fe60c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/HttpInstallationStep.java @@ -0,0 +1,178 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm; + + +/** + * + * A representation of the model object 'Http Installation Step'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getUrl Url}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getUserName User Name}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getPassword Password}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getType Type}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getArtifactId Artifact Id}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getHttpInstallationStep() + * @model + * @generated + */ +public interface HttpInstallationStep extends InstallationStep { + /** + * Returns the value of the 'Url' attribute. + * + *

+ * If the meaning of the 'Url' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Url' attribute. + * @see #setUrl(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getHttpInstallationStep_Url() + * @model unique="false" + * @generated + */ + String getUrl(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getUrl Url}' attribute. + * + * + * @param value the new value of the 'Url' attribute. + * @see #getUrl() + * @generated + */ + void setUrl(String value); + + /** + * Returns the value of the 'User Name' attribute. + * + *

+ * If the meaning of the 'User Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'User Name' attribute. + * @see #setUserName(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getHttpInstallationStep_UserName() + * @model unique="false" + * @generated + */ + String getUserName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getUserName User Name}' attribute. + * + * + * @param value the new value of the 'User Name' attribute. + * @see #getUserName() + * @generated + */ + void setUserName(String value); + + /** + * Returns the value of the 'Password' attribute. + * + *

+ * If the meaning of the 'Password' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Password' attribute. + * @see #setPassword(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getHttpInstallationStep_Password() + * @model unique="false" + * @generated + */ + String getPassword(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getPassword Password}' attribute. + * + * + * @param value the new value of the 'Password' attribute. + * @see #getPassword() + * @generated + */ + void setPassword(String value); + + /** + * Returns the value of the 'Type' attribute. + * + *

+ * If the meaning of the 'Type' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Type' attribute. + * @see #setType(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getHttpInstallationStep_Type() + * @model unique="false" + * @generated + */ + String getType(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getType Type}' attribute. + * + * + * @param value the new value of the 'Type' attribute. + * @see #getType() + * @generated + */ + void setType(String value); + + /** + * Returns the value of the 'Artifact Id' attribute. + * + *

+ * If the meaning of the 'Artifact Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Artifact Id' attribute. + * @see #setArtifactId(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getHttpInstallationStep_ArtifactId() + * @model unique="false" + * @generated + */ + String getArtifactId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getArtifactId Artifact Id}' attribute. + * + * + * @param value the new value of the 'Artifact Id' attribute. + * @see #getArtifactId() + * @generated + */ + void setArtifactId(String value); + +} // HttpInstallationStep diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/InstallationStep.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/InstallationStep.java new file mode 100644 index 0000000..7af4aad --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/InstallationStep.java @@ -0,0 +1,72 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Installation Step'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.InstallationStep#getApplicationId Application Id}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getInstallationStep() + * @model abstract="true" + * @generated + */ +public interface InstallationStep extends NamedEntity { + + /** + * Returns the value of the 'Application Id' attribute. + * The default value is "dcae". + * + *

+ * If the meaning of the 'Application Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Application Id' attribute. + * @see #setApplicationId(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getInstallationStep_ApplicationId() + * @model default="dcae" unique="false" + * @generated + */ + String getApplicationId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.InstallationStep#getApplicationId Application Id}' attribute. + * + * + * @param value the new value of the 'Application Id' attribute. + * @see #getApplicationId() + * @generated + */ + void setApplicationId(String value); +} // InstallationStep diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/MavenArtifactInstallationStep.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/MavenArtifactInstallationStep.java new file mode 100644 index 0000000..6b01696 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/MavenArtifactInstallationStep.java @@ -0,0 +1,178 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm; + + +/** + * + * A representation of the model object 'Maven Artifact Installation Step'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getGroupId Group Id}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getArtifactId Artifact Id}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getVersion Version}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getType Type}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getAssemblyId Assembly Id}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getMavenArtifactInstallationStep() + * @model + * @generated + */ +public interface MavenArtifactInstallationStep extends InstallationStep { + /** + * Returns the value of the 'Group Id' attribute. + * + *

+ * If the meaning of the 'Group Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Group Id' attribute. + * @see #setGroupId(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getMavenArtifactInstallationStep_GroupId() + * @model unique="false" + * @generated + */ + String getGroupId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getGroupId Group Id}' attribute. + * + * + * @param value the new value of the 'Group Id' attribute. + * @see #getGroupId() + * @generated + */ + void setGroupId(String value); + + /** + * Returns the value of the 'Artifact Id' attribute. + * + *

+ * If the meaning of the 'Artifact Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Artifact Id' attribute. + * @see #setArtifactId(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getMavenArtifactInstallationStep_ArtifactId() + * @model unique="false" + * @generated + */ + String getArtifactId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getArtifactId Artifact Id}' attribute. + * + * + * @param value the new value of the 'Artifact Id' attribute. + * @see #getArtifactId() + * @generated + */ + void setArtifactId(String value); + + /** + * Returns the value of the 'Version' attribute. + * + *

+ * If the meaning of the 'Version' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Version' attribute. + * @see #setVersion(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getMavenArtifactInstallationStep_Version() + * @model unique="false" + * @generated + */ + String getVersion(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getVersion Version}' attribute. + * + * + * @param value the new value of the 'Version' attribute. + * @see #getVersion() + * @generated + */ + void setVersion(String value); + + /** + * Returns the value of the 'Type' attribute. + * + *

+ * If the meaning of the 'Type' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Type' attribute. + * @see #setType(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getMavenArtifactInstallationStep_Type() + * @model unique="false" + * @generated + */ + String getType(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getType Type}' attribute. + * + * + * @param value the new value of the 'Type' attribute. + * @see #getType() + * @generated + */ + void setType(String value); + + /** + * Returns the value of the 'Assembly Id' attribute. + * + *

+ * If the meaning of the 'Assembly Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Assembly Id' attribute. + * @see #setAssemblyId(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getMavenArtifactInstallationStep_AssemblyId() + * @model unique="false" + * @generated + */ + String getAssemblyId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getAssemblyId Assembly Id}' attribute. + * + * + * @param value the new value of the 'Assembly Id' attribute. + * @see #getAssemblyId() + * @generated + */ + void setAssemblyId(String value); + +} // MavenArtifactInstallationStep diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/PhysicalMachine.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/PhysicalMachine.java new file mode 100644 index 0000000..f2ea0ed --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/PhysicalMachine.java @@ -0,0 +1,72 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; + +/** + * + * A representation of the model object 'Physical Machine'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.PhysicalMachine#getManagerPortNumber Manager Port Number}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getPhysicalMachine() + * @model + * @generated + */ +public interface PhysicalMachine extends DcaeBasicServer { + + /** + * Returns the value of the 'Manager Port Number' attribute. + * + *

+ * If the meaning of the 'Manager Port Number' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Manager Port Number' attribute. + * @see #setManagerPortNumber(Integer) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getPhysicalMachine_ManagerPortNumber() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + Integer getManagerPortNumber(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.PhysicalMachine#getManagerPortNumber Manager Port Number}' attribute. + * + * + * @param value the new value of the 'Manager Port Number' attribute. + * @see #getManagerPortNumber() + * @generated + */ + void setManagerPortNumber(Integer value); +} // PhysicalMachine diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ShellInstallationStep.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ShellInstallationStep.java new file mode 100644 index 0000000..85a6b2c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ShellInstallationStep.java @@ -0,0 +1,70 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm; + + +/** + * + * A representation of the model object 'Shell Installation Step'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.ShellInstallationStep#getCommand Command}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getShellInstallationStep() + * @model + * @generated + */ +public interface ShellInstallationStep extends InstallationStep { + /** + * Returns the value of the 'Command' attribute. + * + *

+ * If the meaning of the 'Command' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Command' attribute. + * @see #setCommand(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getShellInstallationStep_Command() + * @model unique="false" + * @generated + */ + String getCommand(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.ShellInstallationStep#getCommand Command}' attribute. + * + * + * @param value the new value of the 'Command' attribute. + * @see #getCommand() + * @generated + */ + void setCommand(String value); + +} // ShellInstallationStep diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachine.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachine.java new file mode 100644 index 0000000..5a96915 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachine.java @@ -0,0 +1,152 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; + +/** + * + * A representation of the model object 'Virtual Machine'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getFunctionIndex Function Index}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getKvmName Kvm Name}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getVnc Vnc}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getGateway Gateway}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachine() + * @model + * @generated + */ +public interface VirtualMachine extends DcaeBasicServer { + /** + * Returns the value of the 'Function Index' attribute. + * + *

+ * If the meaning of the 'Function Index' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Function Index' attribute. + * @see #setFunctionIndex(int) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachine_FunctionIndex() + * @model unique="false" + * @generated + */ + int getFunctionIndex(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getFunctionIndex Function Index}' attribute. + * + * + * @param value the new value of the 'Function Index' attribute. + * @see #getFunctionIndex() + * @generated + */ + void setFunctionIndex(int value); + + /** + * Returns the value of the 'Kvm Name' attribute. + * + *

+ * If the meaning of the 'Kvm Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Kvm Name' attribute. + * @see #setKvmName(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachine_KvmName() + * @model unique="false" + * @generated + */ + String getKvmName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getKvmName Kvm Name}' attribute. + * + * + * @param value the new value of the 'Kvm Name' attribute. + * @see #getKvmName() + * @generated + */ + void setKvmName(String value); + + /** + * Returns the value of the 'Vnc' attribute. + * + *

+ * If the meaning of the 'Vnc' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Vnc' attribute. + * @see #setVnc(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachine_Vnc() + * @model unique="false" + * @generated + */ + String getVnc(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getVnc Vnc}' attribute. + * + * + * @param value the new value of the 'Vnc' attribute. + * @see #getVnc() + * @generated + */ + void setVnc(String value); + + /** + * Returns the value of the 'Gateway' attribute. + * + *

+ * If the meaning of the 'Gateway' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Gateway' attribute. + * @see #setGateway(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachine_Gateway() + * @model unique="false" + * @generated + */ + String getGateway(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getGateway Gateway}' attribute. + * + * + * @param value the new value of the 'Gateway' attribute. + * @see #getGateway() + * @generated + */ + void setGateway(String value); + +} // VirtualMachine diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineService.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineService.java new file mode 100644 index 0000000..9c73ebd --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineService.java @@ -0,0 +1,102 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm; + +import org.openecomp.dcae.controller.core.service.DcaeService; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Virtual Machine Service'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineService#getInstances Instances}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineService#getManagerPortNumber Manager Port Number}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineService() + * @model + * @generated + */ +public interface VirtualMachineService extends DcaeService { + /** + * Returns the value of the 'Instances' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance}. + * It is bidirectional and its opposite is '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getService Service}'. + * + *

+ * If the meaning of the 'Instances' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Instances' containment reference list. + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineService_Instances() + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getService + * @model opposite="service" containment="true" + * @generated + */ + EList getInstances(); + + /** + * Returns the value of the 'Manager Port Number' attribute. + * The default value is "9999". + * + *

+ * If the meaning of the 'Manager Port Number' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Manager Port Number' attribute. + * @see #setManagerPortNumber(int) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineService_ManagerPortNumber() + * @model default="9999" unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + int getManagerPortNumber(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService#getManagerPortNumber Manager Port Number}' attribute. + * + * + * @param value the new value of the 'Manager Port Number' attribute. + * @see #getManagerPortNumber() + * @generated + */ + void setManagerPortNumber(int value); + + /** + * + * + * @model + * @generated + */ + void updateDeploymentStatus(); + +} // VirtualMachineService diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceConfiguration.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceConfiguration.java new file mode 100644 index 0000000..001bded --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceConfiguration.java @@ -0,0 +1,72 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Virtual Machine Service Configuration'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration#getConfiguration Configuration}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceConfiguration() + * @model + * @generated + */ +public interface VirtualMachineServiceConfiguration extends EObject { + /** + * Returns the value of the 'Configuration' attribute. + * + *

+ * If the meaning of the 'Configuration' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Configuration' attribute. + * @see #setConfiguration(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceConfiguration_Configuration() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration#getConfiguration Configuration}' attribute. + * + * + * @param value the new value of the 'Configuration' attribute. + * @see #getConfiguration() + * @generated + */ + void setConfiguration(String value); + +} // VirtualMachineServiceConfiguration diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceDescriptor.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceDescriptor.java new file mode 100644 index 0000000..5968258 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceDescriptor.java @@ -0,0 +1,268 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm; + +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Virtual Machine Service Descriptor'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getServicePackage Service Package}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getServiceClass Service Class}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getServiceInstanceClass Service Instance Class}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getVmType Vm Type}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getManagerPortNumber Manager Port Number}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getManagerUser Manager User}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getEncryptedPassword Encrypted Password}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getUsers Users}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getAdminUsers Admin Users}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor() + * @model + * @generated + */ +public interface VirtualMachineServiceDescriptor extends DcaeServiceDescriptor { + /** + * Returns the value of the 'Service Package' attribute. + * + *

+ * If the meaning of the 'Service Package' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Service Package' attribute. + * @see #setServicePackage(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor_ServicePackage() + * @model unique="false" + * @generated + */ + String getServicePackage(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getServicePackage Service Package}' attribute. + * + * + * @param value the new value of the 'Service Package' attribute. + * @see #getServicePackage() + * @generated + */ + void setServicePackage(String value); + + /** + * Returns the value of the 'Service Class' attribute. + * + *

+ * If the meaning of the 'Service Class' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Service Class' attribute. + * @see #setServiceClass(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor_ServiceClass() + * @model unique="false" + * @generated + */ + String getServiceClass(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getServiceClass Service Class}' attribute. + * + * + * @param value the new value of the 'Service Class' attribute. + * @see #getServiceClass() + * @generated + */ + void setServiceClass(String value); + + /** + * Returns the value of the 'Service Instance Class' attribute. + * + *

+ * If the meaning of the 'Service Instance Class' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Service Instance Class' attribute. + * @see #setServiceInstanceClass(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor_ServiceInstanceClass() + * @model unique="false" + * @generated + */ + String getServiceInstanceClass(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getServiceInstanceClass Service Instance Class}' attribute. + * + * + * @param value the new value of the 'Service Instance Class' attribute. + * @see #getServiceInstanceClass() + * @generated + */ + void setServiceInstanceClass(String value); + + /** + * Returns the value of the 'Vm Type' attribute. + * + *

+ * If the meaning of the 'Vm Type' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Vm Type' attribute. + * @see #setVmType(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor_VmType() + * @model unique="false" + * @generated + */ + String getVmType(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getVmType Vm Type}' attribute. + * + * + * @param value the new value of the 'Vm Type' attribute. + * @see #getVmType() + * @generated + */ + void setVmType(String value); + + /** + * Returns the value of the 'Manager Port Number' attribute. + * + *

+ * If the meaning of the 'Manager Port Number' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Manager Port Number' attribute. + * @see #setManagerPortNumber(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor_ManagerPortNumber() + * @model unique="false" + * @generated + */ + String getManagerPortNumber(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getManagerPortNumber Manager Port Number}' attribute. + * + * + * @param value the new value of the 'Manager Port Number' attribute. + * @see #getManagerPortNumber() + * @generated + */ + void setManagerPortNumber(String value); + + /** + * Returns the value of the 'Manager User' attribute. + * + *

+ * If the meaning of the 'Manager User' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Manager User' attribute. + * @see #setManagerUser(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor_ManagerUser() + * @model unique="false" + * @generated + */ + String getManagerUser(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getManagerUser Manager User}' attribute. + * + * + * @param value the new value of the 'Manager User' attribute. + * @see #getManagerUser() + * @generated + */ + void setManagerUser(String value); + + /** + * Returns the value of the 'Encrypted Password' attribute. + * + *

+ * If the meaning of the 'Encrypted Password' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Encrypted Password' attribute. + * @see #setEncryptedPassword(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor_EncryptedPassword() + * @model unique="false" + * @generated + */ + String getEncryptedPassword(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getEncryptedPassword Encrypted Password}' attribute. + * + * + * @param value the new value of the 'Encrypted Password' attribute. + * @see #getEncryptedPassword() + * @generated + */ + void setEncryptedPassword(String value); + + /** + * Returns the value of the 'Users' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

+ * If the meaning of the 'Users' attribute list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Users' attribute list. + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor_Users() + * @model unique="false" + * @generated + */ + EList getUsers(); + + /** + * Returns the value of the 'Admin Users' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

+ * If the meaning of the 'Admin Users' attribute list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Admin Users' attribute list. + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor_AdminUsers() + * @model unique="false" + * @generated + */ + EList getAdminUsers(); + +} // VirtualMachineServiceDescriptor diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceInstance.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceInstance.java new file mode 100644 index 0000000..f095eb8 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceInstance.java @@ -0,0 +1,548 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; +import org.openecomp.dcae.controller.core.service.DcaeLocation; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; +import org.openecomp.ncomp.core.User; +import org.openecomp.ncomp.openstack.core.VirtualMachineType; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Virtual Machine Service Instance'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getLocation Location}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getVmType Vm Type}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getUsers Users}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAdminUsers Admin Users}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getApplicationIds Application Ids}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAdminId Admin Id}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getNumberOfServers Number Of Servers}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAvailabilityZone Availability Zone}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getManagerPortNumber Manager Port Number}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getServers Servers}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getLeaderServer Leader Server}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getService Service}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getIedsAdmin Ieds Admin}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefUser Chef User}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefOrg Chef Org}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefTopology Chef Topology}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getOpenstackFlavor Openstack Flavor}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getServiceFqdn Service Fqdn}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getDeploymentTimeoutMinutes Deployment Timeout Minutes}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getSteps Steps}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance() + * @model + * @generated + */ +public interface VirtualMachineServiceInstance extends DcaeServiceInstance, VirtualMachineServiceConfiguration { + /** + * Returns the value of the 'Location' reference. + * + *

+ * If the meaning of the 'Location' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Location' reference. + * @see #setLocation(DcaeLocation) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_Location() + * @model + * @generated + */ + DcaeLocation getLocation(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getLocation Location}' reference. + * + * + * @param value the new value of the 'Location' reference. + * @see #getLocation() + * @generated + */ + void setLocation(DcaeLocation value); + + /** + * Returns the value of the 'Vm Type' reference. + * + *

+ * If the meaning of the 'Vm Type' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Vm Type' reference. + * @see #setVmType(VirtualMachineType) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_VmType() + * @model annotation="http://openecomp.org type='service'" + * @generated + */ + VirtualMachineType getVmType(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getVmType Vm Type}' reference. + * + * + * @param value the new value of the 'Vm Type' reference. + * @see #getVmType() + * @generated + */ + void setVmType(VirtualMachineType value); + + /** + * Returns the value of the 'Users' reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.User}. + * + *

+ * If the meaning of the 'Users' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Users' reference list. + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_Users() + * @model annotation="http://openecomp.org type='service'" + * @generated + */ + EList getUsers(); + + /** + * Returns the value of the 'Admin Users' reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.User}. + * + *

+ * If the meaning of the 'Admin Users' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Admin Users' reference list. + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_AdminUsers() + * @model annotation="http://openecomp.org type='service'" + * @generated + */ + EList getAdminUsers(); + + /** + * Returns the value of the 'Application Ids' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

+ * If the meaning of the 'Application Ids' attribute list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Application Ids' attribute list. + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_ApplicationIds() + * @model unique="false" + * @generated + */ + EList getApplicationIds(); + + /** + * Returns the value of the 'Admin Id' attribute. + * + *

+ * If the meaning of the 'Admin Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Admin Id' attribute. + * @see #setAdminId(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_AdminId() + * @model unique="false" + * @generated + */ + String getAdminId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAdminId Admin Id}' attribute. + * + * + * @param value the new value of the 'Admin Id' attribute. + * @see #getAdminId() + * @generated + */ + void setAdminId(String value); + + /** + * Returns the value of the 'Number Of Servers' attribute. + * The default value is "1". + * + *

+ * If the meaning of the 'Number Of Servers' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Servers' attribute. + * @see #setNumberOfServers(int) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_NumberOfServers() + * @model default="1" unique="false" + * annotation="http://openecomp.org type='service'" + * @generated + */ + int getNumberOfServers(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getNumberOfServers Number Of Servers}' attribute. + * + * + * @param value the new value of the 'Number Of Servers' attribute. + * @see #getNumberOfServers() + * @generated + */ + void setNumberOfServers(int value); + + /** + * Returns the value of the 'Availability Zone' attribute. + * + *

+ * If the meaning of the 'Availability Zone' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Availability Zone' attribute. + * @see #setAvailabilityZone(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_AvailabilityZone() + * @model unique="false" + * annotation="http://openecomp.org type='service'" + * @generated + */ + String getAvailabilityZone(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAvailabilityZone Availability Zone}' attribute. + * + * + * @param value the new value of the 'Availability Zone' attribute. + * @see #getAvailabilityZone() + * @generated + */ + void setAvailabilityZone(String value); + + /** + * Returns the value of the 'Manager Port Number' attribute. + * + *

+ * If the meaning of the 'Manager Port Number' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Manager Port Number' attribute. + * @see #setManagerPortNumber(Integer) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_ManagerPortNumber() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + Integer getManagerPortNumber(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getManagerPortNumber Manager Port Number}' attribute. + * + * + * @param value the new value of the 'Manager Port Number' attribute. + * @see #getManagerPortNumber() + * @generated + */ + void setManagerPortNumber(Integer value); + + /** + * Returns the value of the 'Servers' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.server.DcaeBasicServer}. + * + *

+ * If the meaning of the 'Servers' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Servers' containment reference list. + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_Servers() + * @model containment="true" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + EList getServers(); + + /** + * Returns the value of the 'Leader Server' reference. + * + *

+ * If the meaning of the 'Leader Server' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Leader Server' reference. + * @see #setLeaderServer(DcaeBasicServer) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_LeaderServer() + * @model + * @generated + */ + DcaeBasicServer getLeaderServer(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getLeaderServer Leader Server}' reference. + * + * + * @param value the new value of the 'Leader Server' reference. + * @see #getLeaderServer() + * @generated + */ + void setLeaderServer(DcaeBasicServer value); + + /** + * Returns the value of the 'Service' container reference. + * It is bidirectional and its opposite is '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService#getInstances Instances}'. + * + *

+ * If the meaning of the 'Service' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Service' container reference. + * @see #setService(VirtualMachineService) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_Service() + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService#getInstances + * @model opposite="instances" transient="false" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + VirtualMachineService getService(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getService Service}' container reference. + * + * + * @param value the new value of the 'Service' container reference. + * @see #getService() + * @generated + */ + void setService(VirtualMachineService value); + + /** + * Returns the value of the 'Ieds Admin' attribute. + * + *

+ * If the meaning of the 'Ieds Admin' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Ieds Admin' attribute. + * @see #setIedsAdmin(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_IedsAdmin() + * @model unique="false" + * @generated + */ + String getIedsAdmin(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getIedsAdmin Ieds Admin}' attribute. + * + * + * @param value the new value of the 'Ieds Admin' attribute. + * @see #getIedsAdmin() + * @generated + */ + void setIedsAdmin(String value); + + /** + * Returns the value of the 'Chef User' attribute. + * + *

+ * If the meaning of the 'Chef User' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Chef User' attribute. + * @see #setChefUser(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_ChefUser() + * @model unique="false" + * @generated + */ + String getChefUser(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefUser Chef User}' attribute. + * + * + * @param value the new value of the 'Chef User' attribute. + * @see #getChefUser() + * @generated + */ + void setChefUser(String value); + + /** + * Returns the value of the 'Chef Org' attribute. + * + *

+ * If the meaning of the 'Chef Org' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Chef Org' attribute. + * @see #setChefOrg(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_ChefOrg() + * @model unique="false" + * @generated + */ + String getChefOrg(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefOrg Chef Org}' attribute. + * + * + * @param value the new value of the 'Chef Org' attribute. + * @see #getChefOrg() + * @generated + */ + void setChefOrg(String value); + + /** + * Returns the value of the 'Chef Topology' attribute. + * + *

+ * If the meaning of the 'Chef Topology' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Chef Topology' attribute. + * @see #setChefTopology(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_ChefTopology() + * @model unique="false" + * @generated + */ + String getChefTopology(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefTopology Chef Topology}' attribute. + * + * + * @param value the new value of the 'Chef Topology' attribute. + * @see #getChefTopology() + * @generated + */ + void setChefTopology(String value); + + /** + * Returns the value of the 'Openstack Flavor' attribute. + * + *

+ * If the meaning of the 'Openstack Flavor' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Openstack Flavor' attribute. + * @see #setOpenstackFlavor(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_OpenstackFlavor() + * @model unique="false" + * @generated + */ + String getOpenstackFlavor(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getOpenstackFlavor Openstack Flavor}' attribute. + * + * + * @param value the new value of the 'Openstack Flavor' attribute. + * @see #getOpenstackFlavor() + * @generated + */ + void setOpenstackFlavor(String value); + + /** + * Returns the value of the 'Service Fqdn' attribute. + * + *

+ * If the meaning of the 'Service Fqdn' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Service Fqdn' attribute. + * @see #setServiceFqdn(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_ServiceFqdn() + * @model unique="false" + * @generated + */ + String getServiceFqdn(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getServiceFqdn Service Fqdn}' attribute. + * + * + * @param value the new value of the 'Service Fqdn' attribute. + * @see #getServiceFqdn() + * @generated + */ + void setServiceFqdn(String value); + + /** + * Returns the value of the 'Deployment Timeout Minutes' attribute. + * The default value is "90". + * + *

+ * If the meaning of the 'Deployment Timeout Minutes' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Deployment Timeout Minutes' attribute. + * @see #setDeploymentTimeoutMinutes(int) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_DeploymentTimeoutMinutes() + * @model default="90" unique="false" + * @generated + */ + int getDeploymentTimeoutMinutes(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getDeploymentTimeoutMinutes Deployment Timeout Minutes}' attribute. + * + * + * @param value the new value of the 'Deployment Timeout Minutes' attribute. + * @see #getDeploymentTimeoutMinutes() + * @generated + */ + void setDeploymentTimeoutMinutes(int value); + + /** + * Returns the value of the 'Steps' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.service.vm.InstallationStep}. + * + *

+ * If the meaning of the 'Steps' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Steps' containment reference list. + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_Steps() + * @model containment="true" + * @generated + */ + EList getSteps(); + +} // VirtualMachineServiceInstance diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VmFactory.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VmFactory.java new file mode 100644 index 0000000..6670a28 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VmFactory.java @@ -0,0 +1,135 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage + * @generated + */ +public interface VmFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + VmFactory eINSTANCE = org.openecomp.dcae.controller.service.vm.impl.VmFactoryImpl.init(); + + /** + * Returns a new object of class 'Virtual Machine Service'. + * + * + * @return a new object of class 'Virtual Machine Service'. + * @generated + */ + VirtualMachineService createVirtualMachineService(); + + /** + * Returns a new object of class 'Virtual Machine Service Instance'. + * + * + * @return a new object of class 'Virtual Machine Service Instance'. + * @generated + */ + VirtualMachineServiceInstance createVirtualMachineServiceInstance(); + + /** + * Returns a new object of class 'Virtual Machine Service Configuration'. + * + * + * @return a new object of class 'Virtual Machine Service Configuration'. + * @generated + */ + VirtualMachineServiceConfiguration createVirtualMachineServiceConfiguration(); + + /** + * Returns a new object of class 'Virtual Machine Service Descriptor'. + * + * + * @return a new object of class 'Virtual Machine Service Descriptor'. + * @generated + */ + VirtualMachineServiceDescriptor createVirtualMachineServiceDescriptor(); + + /** + * Returns a new object of class 'Physical Machine'. + * + * + * @return a new object of class 'Physical Machine'. + * @generated + */ + PhysicalMachine createPhysicalMachine(); + + /** + * Returns a new object of class 'Virtual Machine'. + * + * + * @return a new object of class 'Virtual Machine'. + * @generated + */ + VirtualMachine createVirtualMachine(); + + /** + * Returns a new object of class 'Shell Installation Step'. + * + * + * @return a new object of class 'Shell Installation Step'. + * @generated + */ + ShellInstallationStep createShellInstallationStep(); + + /** + * Returns a new object of class 'Maven Artifact Installation Step'. + * + * + * @return a new object of class 'Maven Artifact Installation Step'. + * @generated + */ + MavenArtifactInstallationStep createMavenArtifactInstallationStep(); + + /** + * Returns a new object of class 'Http Installation Step'. + * + * + * @return a new object of class 'Http Installation Step'. + * @generated + */ + HttpInstallationStep createHttpInstallationStep(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + VmPackage getVmPackage(); + +} //VmFactory diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VmPackage.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VmPackage.java new file mode 100644 index 0000000..cd04405 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VmPackage.java @@ -0,0 +1,2813 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm; + +import org.openecomp.dcae.controller.core.server.ServerPackage; +import org.openecomp.dcae.controller.core.service.ServicePackage; +import org.openecomp.ncomp.core.CorePackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.vm.VmFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-vm-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org'" + * @generated + */ +public interface VmPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "vm"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.vm"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "vm"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + VmPackage eINSTANCE = org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl Virtual Machine Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachineService() + * @generated + */ + int VIRTUAL_MACHINE_SERVICE = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE__NAME = ServicePackage.DCAE_SERVICE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE__LAST_POLLED = ServicePackage.DCAE_SERVICE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE__LAST_CHANGED = ServicePackage.DCAE_SERVICE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE__CREATED = ServicePackage.DCAE_SERVICE__CREATED; + + /** + * The feature id for the 'Instances' containment reference list. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE__INSTANCES = ServicePackage.DCAE_SERVICE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER = ServicePackage.DCAE_SERVICE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Virtual Machine Service' class. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_FEATURE_COUNT = ServicePackage.DCAE_SERVICE_FEATURE_COUNT + 2; + + /** + * The operation id for the 'Deploy' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE___DEPLOY__STRING_STRING = ServicePackage.DCAE_SERVICE___DEPLOY__STRING_STRING; + + /** + * The operation id for the 'Undeploy' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE___UNDEPLOY__STRING = ServicePackage.DCAE_SERVICE___UNDEPLOY__STRING; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE___TEST__STRING = ServicePackage.DCAE_SERVICE___TEST__STRING; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE___SUSPEND__STRING = ServicePackage.DCAE_SERVICE___SUSPEND__STRING; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE___RESUME__STRING = ServicePackage.DCAE_SERVICE___RESUME__STRING; + + /** + * The operation id for the 'Push Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING = ServicePackage.DCAE_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Poll Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE___POLL_MANAGER_CONFIGURATION__STRING = ServicePackage.DCAE_SERVICE___POLL_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE___MANAGER_CONFIGURATION__STRING = ServicePackage.DCAE_SERVICE___MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Operation' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT = ServicePackage.DCAE_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT; + + /** + * The operation id for the 'Update Configuration From Policy' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING = ServicePackage.DCAE_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING; + + /** + * The operation id for the 'Run Health Tests' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE___RUN_HEALTH_TESTS = ServicePackage.DCAE_SERVICE___RUN_HEALTH_TESTS; + + /** + * The operation id for the 'Update Deployment Status' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS = ServicePackage.DCAE_SERVICE_OPERATION_COUNT + 0; + + /** + * The number of operations of the 'Virtual Machine Service' class. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_OPERATION_COUNT = ServicePackage.DCAE_SERVICE_OPERATION_COUNT + 1; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl Virtual Machine Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachineServiceInstance() + * @generated + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__NAME = ServicePackage.DCAE_SERVICE_INSTANCE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_POLLED = ServicePackage.DCAE_SERVICE_INSTANCE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_CHANGED = ServicePackage.DCAE_SERVICE_INSTANCE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__CREATED = ServicePackage.DCAE_SERVICE_INSTANCE__CREATED; + + /** + * The feature id for the 'Service Container' reference. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_CONTAINER = ServicePackage.DCAE_SERVICE_INSTANCE__SERVICE_CONTAINER; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__STATUS = ServicePackage.DCAE_SERVICE_INSTANCE__STATUS; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__INPUT_STREAMS = ServicePackage.DCAE_SERVICE_INSTANCE__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__OUTPUT_STREAMS = ServicePackage.DCAE_SERVICE_INSTANCE__OUTPUT_STREAMS; + + /** + * The feature id for the 'Last Health Test' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_HEALTH_TEST = ServicePackage.DCAE_SERVICE_INSTANCE__LAST_HEALTH_TEST; + + /** + * The feature id for the 'Health Test Status' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__HEALTH_TEST_STATUS = ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_STATUS; + + /** + * The feature id for the 'Health Test Message Code' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE = ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE; + + /** + * The feature id for the 'Configuration' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Location' reference. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Vm Type' reference. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Users' reference list. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Admin Users' reference list. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Application Ids' attribute list. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Admin Id' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Number Of Servers' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Availability Zone' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 8; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 9; + + /** + * The feature id for the 'Servers' containment reference list. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 10; + + /** + * The feature id for the 'Leader Server' reference. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 11; + + /** + * The feature id for the 'Service' container reference. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 12; + + /** + * The feature id for the 'Ieds Admin' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 13; + + /** + * The feature id for the 'Chef User' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 14; + + /** + * The feature id for the 'Chef Org' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 15; + + /** + * The feature id for the 'Chef Topology' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 16; + + /** + * The feature id for the 'Openstack Flavor' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 17; + + /** + * The feature id for the 'Service Fqdn' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 18; + + /** + * The feature id for the 'Deployment Timeout Minutes' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 19; + + /** + * The feature id for the 'Steps' containment reference list. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 20; + + /** + * The number of structural features of the 'Virtual Machine Service Instance' class. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 21; + + /** + * The number of operations of the 'Virtual Machine Service Instance' class. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE_OPERATION_COUNT = ServicePackage.DCAE_SERVICE_INSTANCE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceConfigurationImpl Virtual Machine Service Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachineServiceConfiguration() + * @generated + */ + int VIRTUAL_MACHINE_SERVICE_CONFIGURATION = 2; + + /** + * The feature id for the 'Configuration' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION = 0; + + /** + * The number of structural features of the 'Virtual Machine Service Configuration' class. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_CONFIGURATION_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Virtual Machine Service Configuration' class. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_CONFIGURATION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl Virtual Machine Service Descriptor}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachineServiceDescriptor() + * @generated + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__NAME = ServicePackage.DCAE_SERVICE_DESCRIPTOR__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__LAST_POLLED = ServicePackage.DCAE_SERVICE_DESCRIPTOR__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__LAST_CHANGED = ServicePackage.DCAE_SERVICE_DESCRIPTOR__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__CREATED = ServicePackage.DCAE_SERVICE_DESCRIPTOR__CREATED; + + /** + * The feature id for the 'Group Id' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__GROUP_ID = ServicePackage.DCAE_SERVICE_DESCRIPTOR__GROUP_ID; + + /** + * The feature id for the 'Artifact' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ARTIFACT = ServicePackage.DCAE_SERVICE_DESCRIPTOR__ARTIFACT; + + /** + * The feature id for the 'Version' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VERSION = ServicePackage.DCAE_SERVICE_DESCRIPTOR__VERSION; + + /** + * The feature id for the 'Service Package' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_PACKAGE = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Service Class' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_CLASS = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Service Instance Class' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Vm Type' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VM_TYPE = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Manager User' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_USER = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Encrypted Password' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Users' attribute list. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__USERS = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Admin Users' attribute list. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ADMIN_USERS = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 8; + + /** + * The number of structural features of the 'Virtual Machine Service Descriptor' class. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR_FEATURE_COUNT = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 9; + + /** + * The number of operations of the 'Virtual Machine Service Descriptor' class. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR_OPERATION_COUNT = ServicePackage.DCAE_SERVICE_DESCRIPTOR_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.PhysicalMachineImpl Physical Machine}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.PhysicalMachineImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getPhysicalMachine() + * @generated + */ + int PHYSICAL_MACHINE = 4; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__NAME = ServerPackage.DCAE_BASIC_SERVER__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__LAST_POLLED = ServerPackage.DCAE_BASIC_SERVER__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__LAST_CHANGED = ServerPackage.DCAE_BASIC_SERVER__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__CREATED = ServerPackage.DCAE_BASIC_SERVER__CREATED; + + /** + * The feature id for the 'Operational State' attribute. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__OPERATIONAL_STATE = ServerPackage.DCAE_BASIC_SERVER__OPERATIONAL_STATE; + + /** + * The feature id for the 'Log Message Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__LOG_MESSAGE_CONFIGURATION = ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CONFIGURATION; + + /** + * The feature id for the 'Log Message Categories' containment reference list. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__LOG_MESSAGE_CATEGORIES = ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CATEGORIES; + + /** + * The feature id for the 'Log Message Stats' containment reference list. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__LOG_MESSAGE_STATS = ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_STATS; + + /** + * The feature id for the 'Private Ip' attribute. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__PRIVATE_IP = ServerPackage.DCAE_BASIC_SERVER__PRIVATE_IP; + + /** + * The feature id for the 'Public Ip' attribute. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__PUBLIC_IP = ServerPackage.DCAE_BASIC_SERVER__PUBLIC_IP; + + /** + * The feature id for the 'Collectd' containment reference. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__COLLECTD = ServerPackage.DCAE_BASIC_SERVER__COLLECTD; + + /** + * The feature id for the 'Modules' containment reference list. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__MODULES = ServerPackage.DCAE_BASIC_SERVER__MODULES; + + /** + * The feature id for the 'Networks' containment reference list. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__NETWORKS = ServerPackage.DCAE_BASIC_SERVER__NETWORKS; + + /** + * The feature id for the 'Last Update' attribute. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__LAST_UPDATE = ServerPackage.DCAE_BASIC_SERVER__LAST_UPDATE; + + /** + * The feature id for the 'Using Monitoring Agent' attribute. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__USING_MONITORING_AGENT = ServerPackage.DCAE_BASIC_SERVER__USING_MONITORING_AGENT; + + /** + * The feature id for the 'Server' reference. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__SERVER = ServerPackage.DCAE_BASIC_SERVER__SERVER; + + /** + * The feature id for the 'Hypervisor' reference. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__HYPERVISOR = ServerPackage.DCAE_BASIC_SERVER__HYPERVISOR; + + /** + * The feature id for the 'Vm Type' reference. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__VM_TYPE = ServerPackage.DCAE_BASIC_SERVER__VM_TYPE; + + /** + * The feature id for the 'Certificate Password' attribute. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__CERTIFICATE_PASSWORD = ServerPackage.DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__MANAGER_PORT_NUMBER = ServerPackage.DCAE_BASIC_SERVER_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Physical Machine' class. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE_FEATURE_COUNT = ServerPackage.DCAE_BASIC_SERVER_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Physical Machine' class. + * + * + * @generated + * @ordered + */ + int PHYSICAL_MACHINE_OPERATION_COUNT = ServerPackage.DCAE_BASIC_SERVER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineImpl Virtual Machine}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachine() + * @generated + */ + int VIRTUAL_MACHINE = 5; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__NAME = ServerPackage.DCAE_BASIC_SERVER__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__LAST_POLLED = ServerPackage.DCAE_BASIC_SERVER__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__LAST_CHANGED = ServerPackage.DCAE_BASIC_SERVER__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__CREATED = ServerPackage.DCAE_BASIC_SERVER__CREATED; + + /** + * The feature id for the 'Operational State' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__OPERATIONAL_STATE = ServerPackage.DCAE_BASIC_SERVER__OPERATIONAL_STATE; + + /** + * The feature id for the 'Log Message Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__LOG_MESSAGE_CONFIGURATION = ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CONFIGURATION; + + /** + * The feature id for the 'Log Message Categories' containment reference list. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__LOG_MESSAGE_CATEGORIES = ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CATEGORIES; + + /** + * The feature id for the 'Log Message Stats' containment reference list. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__LOG_MESSAGE_STATS = ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_STATS; + + /** + * The feature id for the 'Private Ip' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__PRIVATE_IP = ServerPackage.DCAE_BASIC_SERVER__PRIVATE_IP; + + /** + * The feature id for the 'Public Ip' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__PUBLIC_IP = ServerPackage.DCAE_BASIC_SERVER__PUBLIC_IP; + + /** + * The feature id for the 'Collectd' containment reference. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__COLLECTD = ServerPackage.DCAE_BASIC_SERVER__COLLECTD; + + /** + * The feature id for the 'Modules' containment reference list. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__MODULES = ServerPackage.DCAE_BASIC_SERVER__MODULES; + + /** + * The feature id for the 'Networks' containment reference list. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__NETWORKS = ServerPackage.DCAE_BASIC_SERVER__NETWORKS; + + /** + * The feature id for the 'Last Update' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__LAST_UPDATE = ServerPackage.DCAE_BASIC_SERVER__LAST_UPDATE; + + /** + * The feature id for the 'Using Monitoring Agent' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__USING_MONITORING_AGENT = ServerPackage.DCAE_BASIC_SERVER__USING_MONITORING_AGENT; + + /** + * The feature id for the 'Server' reference. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__SERVER = ServerPackage.DCAE_BASIC_SERVER__SERVER; + + /** + * The feature id for the 'Hypervisor' reference. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__HYPERVISOR = ServerPackage.DCAE_BASIC_SERVER__HYPERVISOR; + + /** + * The feature id for the 'Vm Type' reference. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__VM_TYPE = ServerPackage.DCAE_BASIC_SERVER__VM_TYPE; + + /** + * The feature id for the 'Certificate Password' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__CERTIFICATE_PASSWORD = ServerPackage.DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD; + + /** + * The feature id for the 'Function Index' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__FUNCTION_INDEX = ServerPackage.DCAE_BASIC_SERVER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Kvm Name' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__KVM_NAME = ServerPackage.DCAE_BASIC_SERVER_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Vnc' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__VNC = ServerPackage.DCAE_BASIC_SERVER_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Gateway' attribute. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__GATEWAY = ServerPackage.DCAE_BASIC_SERVER_FEATURE_COUNT + 3; + + /** + * The number of structural features of the 'Virtual Machine' class. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_FEATURE_COUNT = ServerPackage.DCAE_BASIC_SERVER_FEATURE_COUNT + 4; + + /** + * The number of operations of the 'Virtual Machine' class. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_OPERATION_COUNT = ServerPackage.DCAE_BASIC_SERVER_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.InstallationStepImpl Installation Step}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.InstallationStepImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getInstallationStep() + * @generated + */ + int INSTALLATION_STEP = 6; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int INSTALLATION_STEP__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int INSTALLATION_STEP__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int INSTALLATION_STEP__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int INSTALLATION_STEP__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Application Id' attribute. + * + * + * @generated + * @ordered + */ + int INSTALLATION_STEP__APPLICATION_ID = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Installation Step' class. + * + * + * @generated + * @ordered + */ + int INSTALLATION_STEP_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Installation Step' class. + * + * + * @generated + * @ordered + */ + int INSTALLATION_STEP_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.ShellInstallationStepImpl Shell Installation Step}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.ShellInstallationStepImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getShellInstallationStep() + * @generated + */ + int SHELL_INSTALLATION_STEP = 7; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SHELL_INSTALLATION_STEP__NAME = INSTALLATION_STEP__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int SHELL_INSTALLATION_STEP__LAST_POLLED = INSTALLATION_STEP__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int SHELL_INSTALLATION_STEP__LAST_CHANGED = INSTALLATION_STEP__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int SHELL_INSTALLATION_STEP__CREATED = INSTALLATION_STEP__CREATED; + + /** + * The feature id for the 'Application Id' attribute. + * + * + * @generated + * @ordered + */ + int SHELL_INSTALLATION_STEP__APPLICATION_ID = INSTALLATION_STEP__APPLICATION_ID; + + /** + * The feature id for the 'Command' attribute. + * + * + * @generated + * @ordered + */ + int SHELL_INSTALLATION_STEP__COMMAND = INSTALLATION_STEP_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Shell Installation Step' class. + * + * + * @generated + * @ordered + */ + int SHELL_INSTALLATION_STEP_FEATURE_COUNT = INSTALLATION_STEP_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Shell Installation Step' class. + * + * + * @generated + * @ordered + */ + int SHELL_INSTALLATION_STEP_OPERATION_COUNT = INSTALLATION_STEP_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl Maven Artifact Installation Step}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getMavenArtifactInstallationStep() + * @generated + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP = 8; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__NAME = INSTALLATION_STEP__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__LAST_POLLED = INSTALLATION_STEP__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__LAST_CHANGED = INSTALLATION_STEP__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__CREATED = INSTALLATION_STEP__CREATED; + + /** + * The feature id for the 'Application Id' attribute. + * + * + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__APPLICATION_ID = INSTALLATION_STEP__APPLICATION_ID; + + /** + * The feature id for the 'Group Id' attribute. + * + * + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__GROUP_ID = INSTALLATION_STEP_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Artifact Id' attribute. + * + * + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__ARTIFACT_ID = INSTALLATION_STEP_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Version' attribute. + * + * + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__VERSION = INSTALLATION_STEP_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__TYPE = INSTALLATION_STEP_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Assembly Id' attribute. + * + * + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__ASSEMBLY_ID = INSTALLATION_STEP_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Maven Artifact Installation Step' class. + * + * + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP_FEATURE_COUNT = INSTALLATION_STEP_FEATURE_COUNT + 5; + + /** + * The number of operations of the 'Maven Artifact Installation Step' class. + * + * + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP_OPERATION_COUNT = INSTALLATION_STEP_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl Http Installation Step}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getHttpInstallationStep() + * @generated + */ + int HTTP_INSTALLATION_STEP = 9; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__NAME = INSTALLATION_STEP__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__LAST_POLLED = INSTALLATION_STEP__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__LAST_CHANGED = INSTALLATION_STEP__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__CREATED = INSTALLATION_STEP__CREATED; + + /** + * The feature id for the 'Application Id' attribute. + * + * + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__APPLICATION_ID = INSTALLATION_STEP__APPLICATION_ID; + + /** + * The feature id for the 'Url' attribute. + * + * + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__URL = INSTALLATION_STEP_FEATURE_COUNT + 0; + + /** + * The feature id for the 'User Name' attribute. + * + * + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__USER_NAME = INSTALLATION_STEP_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Password' attribute. + * + * + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__PASSWORD = INSTALLATION_STEP_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__TYPE = INSTALLATION_STEP_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Artifact Id' attribute. + * + * + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__ARTIFACT_ID = INSTALLATION_STEP_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Http Installation Step' class. + * + * + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP_FEATURE_COUNT = INSTALLATION_STEP_FEATURE_COUNT + 5; + + /** + * The number of operations of the 'Http Installation Step' class. + * + * + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP_OPERATION_COUNT = INSTALLATION_STEP_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService Virtual Machine Service}'. + * + * + * @return the meta object for class 'Virtual Machine Service'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService + * @generated + */ + EClass getVirtualMachineService(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService#getInstances Instances}'. + * + * + * @return the meta object for the containment reference list 'Instances'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService#getInstances() + * @see #getVirtualMachineService() + * @generated + */ + EReference getVirtualMachineService_Instances(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService#getManagerPortNumber Manager Port Number}'. + * + * + * @return the meta object for the attribute 'Manager Port Number'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService#getManagerPortNumber() + * @see #getVirtualMachineService() + * @generated + */ + EAttribute getVirtualMachineService_ManagerPortNumber(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService#updateDeploymentStatus() Update Deployment Status}' operation. + * + * + * @return the meta object for the 'Update Deployment Status' operation. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService#updateDeploymentStatus() + * @generated + */ + EOperation getVirtualMachineService__UpdateDeploymentStatus(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance Virtual Machine Service Instance}'. + * + * + * @return the meta object for class 'Virtual Machine Service Instance'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance + * @generated + */ + EClass getVirtualMachineServiceInstance(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getLocation Location}'. + * + * + * @return the meta object for the reference 'Location'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getLocation() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EReference getVirtualMachineServiceInstance_Location(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getVmType Vm Type}'. + * + * + * @return the meta object for the reference 'Vm Type'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getVmType() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EReference getVirtualMachineServiceInstance_VmType(); + + /** + * Returns the meta object for the reference list '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getUsers Users}'. + * + * + * @return the meta object for the reference list 'Users'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getUsers() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EReference getVirtualMachineServiceInstance_Users(); + + /** + * Returns the meta object for the reference list '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAdminUsers Admin Users}'. + * + * + * @return the meta object for the reference list 'Admin Users'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAdminUsers() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EReference getVirtualMachineServiceInstance_AdminUsers(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getApplicationIds Application Ids}'. + * + * + * @return the meta object for the attribute list 'Application Ids'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getApplicationIds() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_ApplicationIds(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAdminId Admin Id}'. + * + * + * @return the meta object for the attribute 'Admin Id'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAdminId() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_AdminId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getNumberOfServers Number Of Servers}'. + * + * + * @return the meta object for the attribute 'Number Of Servers'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getNumberOfServers() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_NumberOfServers(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAvailabilityZone Availability Zone}'. + * + * + * @return the meta object for the attribute 'Availability Zone'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAvailabilityZone() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_AvailabilityZone(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getManagerPortNumber Manager Port Number}'. + * + * + * @return the meta object for the attribute 'Manager Port Number'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getManagerPortNumber() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_ManagerPortNumber(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getServers Servers}'. + * + * + * @return the meta object for the containment reference list 'Servers'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getServers() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EReference getVirtualMachineServiceInstance_Servers(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getLeaderServer Leader Server}'. + * + * + * @return the meta object for the reference 'Leader Server'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getLeaderServer() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EReference getVirtualMachineServiceInstance_LeaderServer(); + + /** + * Returns the meta object for the container reference '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getService Service}'. + * + * + * @return the meta object for the container reference 'Service'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getService() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EReference getVirtualMachineServiceInstance_Service(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getIedsAdmin Ieds Admin}'. + * + * + * @return the meta object for the attribute 'Ieds Admin'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getIedsAdmin() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_IedsAdmin(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefUser Chef User}'. + * + * + * @return the meta object for the attribute 'Chef User'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefUser() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_ChefUser(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefOrg Chef Org}'. + * + * + * @return the meta object for the attribute 'Chef Org'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefOrg() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_ChefOrg(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefTopology Chef Topology}'. + * + * + * @return the meta object for the attribute 'Chef Topology'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefTopology() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_ChefTopology(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getOpenstackFlavor Openstack Flavor}'. + * + * + * @return the meta object for the attribute 'Openstack Flavor'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getOpenstackFlavor() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_OpenstackFlavor(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getServiceFqdn Service Fqdn}'. + * + * + * @return the meta object for the attribute 'Service Fqdn'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getServiceFqdn() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_ServiceFqdn(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getDeploymentTimeoutMinutes Deployment Timeout Minutes}'. + * + * + * @return the meta object for the attribute 'Deployment Timeout Minutes'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getDeploymentTimeoutMinutes() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_DeploymentTimeoutMinutes(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getSteps Steps}'. + * + * + * @return the meta object for the containment reference list 'Steps'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getSteps() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EReference getVirtualMachineServiceInstance_Steps(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration Virtual Machine Service Configuration}'. + * + * + * @return the meta object for class 'Virtual Machine Service Configuration'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration + * @generated + */ + EClass getVirtualMachineServiceConfiguration(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration#getConfiguration Configuration}'. + * + * + * @return the meta object for the attribute 'Configuration'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration#getConfiguration() + * @see #getVirtualMachineServiceConfiguration() + * @generated + */ + EAttribute getVirtualMachineServiceConfiguration_Configuration(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor Virtual Machine Service Descriptor}'. + * + * + * @return the meta object for class 'Virtual Machine Service Descriptor'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor + * @generated + */ + EClass getVirtualMachineServiceDescriptor(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getServicePackage Service Package}'. + * + * + * @return the meta object for the attribute 'Service Package'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getServicePackage() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_ServicePackage(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getServiceClass Service Class}'. + * + * + * @return the meta object for the attribute 'Service Class'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getServiceClass() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_ServiceClass(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getServiceInstanceClass Service Instance Class}'. + * + * + * @return the meta object for the attribute 'Service Instance Class'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getServiceInstanceClass() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_ServiceInstanceClass(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getVmType Vm Type}'. + * + * + * @return the meta object for the attribute 'Vm Type'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getVmType() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_VmType(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getManagerPortNumber Manager Port Number}'. + * + * + * @return the meta object for the attribute 'Manager Port Number'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getManagerPortNumber() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_ManagerPortNumber(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getManagerUser Manager User}'. + * + * + * @return the meta object for the attribute 'Manager User'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getManagerUser() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_ManagerUser(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getEncryptedPassword Encrypted Password}'. + * + * + * @return the meta object for the attribute 'Encrypted Password'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getEncryptedPassword() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_EncryptedPassword(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getUsers Users}'. + * + * + * @return the meta object for the attribute list 'Users'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getUsers() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_Users(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getAdminUsers Admin Users}'. + * + * + * @return the meta object for the attribute list 'Admin Users'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getAdminUsers() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_AdminUsers(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.PhysicalMachine Physical Machine}'. + * + * + * @return the meta object for class 'Physical Machine'. + * @see org.openecomp.dcae.controller.service.vm.PhysicalMachine + * @generated + */ + EClass getPhysicalMachine(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.PhysicalMachine#getManagerPortNumber Manager Port Number}'. + * + * + * @return the meta object for the attribute 'Manager Port Number'. + * @see org.openecomp.dcae.controller.service.vm.PhysicalMachine#getManagerPortNumber() + * @see #getPhysicalMachine() + * @generated + */ + EAttribute getPhysicalMachine_ManagerPortNumber(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine Virtual Machine}'. + * + * + * @return the meta object for class 'Virtual Machine'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachine + * @generated + */ + EClass getVirtualMachine(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getFunctionIndex Function Index}'. + * + * + * @return the meta object for the attribute 'Function Index'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachine#getFunctionIndex() + * @see #getVirtualMachine() + * @generated + */ + EAttribute getVirtualMachine_FunctionIndex(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getKvmName Kvm Name}'. + * + * + * @return the meta object for the attribute 'Kvm Name'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachine#getKvmName() + * @see #getVirtualMachine() + * @generated + */ + EAttribute getVirtualMachine_KvmName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getVnc Vnc}'. + * + * + * @return the meta object for the attribute 'Vnc'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachine#getVnc() + * @see #getVirtualMachine() + * @generated + */ + EAttribute getVirtualMachine_Vnc(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getGateway Gateway}'. + * + * + * @return the meta object for the attribute 'Gateway'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachine#getGateway() + * @see #getVirtualMachine() + * @generated + */ + EAttribute getVirtualMachine_Gateway(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.InstallationStep Installation Step}'. + * + * + * @return the meta object for class 'Installation Step'. + * @see org.openecomp.dcae.controller.service.vm.InstallationStep + * @generated + */ + EClass getInstallationStep(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.InstallationStep#getApplicationId Application Id}'. + * + * + * @return the meta object for the attribute 'Application Id'. + * @see org.openecomp.dcae.controller.service.vm.InstallationStep#getApplicationId() + * @see #getInstallationStep() + * @generated + */ + EAttribute getInstallationStep_ApplicationId(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.ShellInstallationStep Shell Installation Step}'. + * + * + * @return the meta object for class 'Shell Installation Step'. + * @see org.openecomp.dcae.controller.service.vm.ShellInstallationStep + * @generated + */ + EClass getShellInstallationStep(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.ShellInstallationStep#getCommand Command}'. + * + * + * @return the meta object for the attribute 'Command'. + * @see org.openecomp.dcae.controller.service.vm.ShellInstallationStep#getCommand() + * @see #getShellInstallationStep() + * @generated + */ + EAttribute getShellInstallationStep_Command(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep Maven Artifact Installation Step}'. + * + * + * @return the meta object for class 'Maven Artifact Installation Step'. + * @see org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep + * @generated + */ + EClass getMavenArtifactInstallationStep(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getGroupId Group Id}'. + * + * + * @return the meta object for the attribute 'Group Id'. + * @see org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getGroupId() + * @see #getMavenArtifactInstallationStep() + * @generated + */ + EAttribute getMavenArtifactInstallationStep_GroupId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getArtifactId Artifact Id}'. + * + * + * @return the meta object for the attribute 'Artifact Id'. + * @see org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getArtifactId() + * @see #getMavenArtifactInstallationStep() + * @generated + */ + EAttribute getMavenArtifactInstallationStep_ArtifactId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getVersion Version}'. + * + * + * @return the meta object for the attribute 'Version'. + * @see org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getVersion() + * @see #getMavenArtifactInstallationStep() + * @generated + */ + EAttribute getMavenArtifactInstallationStep_Version(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getType Type}'. + * + * + * @return the meta object for the attribute 'Type'. + * @see org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getType() + * @see #getMavenArtifactInstallationStep() + * @generated + */ + EAttribute getMavenArtifactInstallationStep_Type(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getAssemblyId Assembly Id}'. + * + * + * @return the meta object for the attribute 'Assembly Id'. + * @see org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getAssemblyId() + * @see #getMavenArtifactInstallationStep() + * @generated + */ + EAttribute getMavenArtifactInstallationStep_AssemblyId(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep Http Installation Step}'. + * + * + * @return the meta object for class 'Http Installation Step'. + * @see org.openecomp.dcae.controller.service.vm.HttpInstallationStep + * @generated + */ + EClass getHttpInstallationStep(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getUrl Url}'. + * + * + * @return the meta object for the attribute 'Url'. + * @see org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getUrl() + * @see #getHttpInstallationStep() + * @generated + */ + EAttribute getHttpInstallationStep_Url(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getUserName User Name}'. + * + * + * @return the meta object for the attribute 'User Name'. + * @see org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getUserName() + * @see #getHttpInstallationStep() + * @generated + */ + EAttribute getHttpInstallationStep_UserName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getPassword Password}'. + * + * + * @return the meta object for the attribute 'Password'. + * @see org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getPassword() + * @see #getHttpInstallationStep() + * @generated + */ + EAttribute getHttpInstallationStep_Password(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getType Type}'. + * + * + * @return the meta object for the attribute 'Type'. + * @see org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getType() + * @see #getHttpInstallationStep() + * @generated + */ + EAttribute getHttpInstallationStep_Type(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getArtifactId Artifact Id}'. + * + * + * @return the meta object for the attribute 'Artifact Id'. + * @see org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getArtifactId() + * @see #getHttpInstallationStep() + * @generated + */ + EAttribute getHttpInstallationStep_ArtifactId(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + VmFactory getVmFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl Virtual Machine Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachineService() + * @generated + */ + EClass VIRTUAL_MACHINE_SERVICE = eINSTANCE.getVirtualMachineService(); + + /** + * The meta object literal for the 'Instances' containment reference list feature. + * + * + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE__INSTANCES = eINSTANCE.getVirtualMachineService_Instances(); + + /** + * The meta object literal for the 'Manager Port Number' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER = eINSTANCE.getVirtualMachineService_ManagerPortNumber(); + + /** + * The meta object literal for the 'Update Deployment Status' operation. + * + * + * @generated + */ + EOperation VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS = eINSTANCE.getVirtualMachineService__UpdateDeploymentStatus(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl Virtual Machine Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachineServiceInstance() + * @generated + */ + EClass VIRTUAL_MACHINE_SERVICE_INSTANCE = eINSTANCE.getVirtualMachineServiceInstance(); + + /** + * The meta object literal for the 'Location' reference feature. + * + * + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION = eINSTANCE.getVirtualMachineServiceInstance_Location(); + + /** + * The meta object literal for the 'Vm Type' reference feature. + * + * + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE = eINSTANCE.getVirtualMachineServiceInstance_VmType(); + + /** + * The meta object literal for the 'Users' reference list feature. + * + * + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS = eINSTANCE.getVirtualMachineServiceInstance_Users(); + + /** + * The meta object literal for the 'Admin Users' reference list feature. + * + * + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS = eINSTANCE.getVirtualMachineServiceInstance_AdminUsers(); + + /** + * The meta object literal for the 'Application Ids' attribute list feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS = eINSTANCE.getVirtualMachineServiceInstance_ApplicationIds(); + + /** + * The meta object literal for the 'Admin Id' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID = eINSTANCE.getVirtualMachineServiceInstance_AdminId(); + + /** + * The meta object literal for the 'Number Of Servers' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS = eINSTANCE.getVirtualMachineServiceInstance_NumberOfServers(); + + /** + * The meta object literal for the 'Availability Zone' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE = eINSTANCE.getVirtualMachineServiceInstance_AvailabilityZone(); + + /** + * The meta object literal for the 'Manager Port Number' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER = eINSTANCE.getVirtualMachineServiceInstance_ManagerPortNumber(); + + /** + * The meta object literal for the 'Servers' containment reference list feature. + * + * + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS = eINSTANCE.getVirtualMachineServiceInstance_Servers(); + + /** + * The meta object literal for the 'Leader Server' reference feature. + * + * + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER = eINSTANCE.getVirtualMachineServiceInstance_LeaderServer(); + + /** + * The meta object literal for the 'Service' container reference feature. + * + * + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE = eINSTANCE.getVirtualMachineServiceInstance_Service(); + + /** + * The meta object literal for the 'Ieds Admin' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN = eINSTANCE.getVirtualMachineServiceInstance_IedsAdmin(); + + /** + * The meta object literal for the 'Chef User' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER = eINSTANCE.getVirtualMachineServiceInstance_ChefUser(); + + /** + * The meta object literal for the 'Chef Org' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG = eINSTANCE.getVirtualMachineServiceInstance_ChefOrg(); + + /** + * The meta object literal for the 'Chef Topology' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY = eINSTANCE.getVirtualMachineServiceInstance_ChefTopology(); + + /** + * The meta object literal for the 'Openstack Flavor' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR = eINSTANCE.getVirtualMachineServiceInstance_OpenstackFlavor(); + + /** + * The meta object literal for the 'Service Fqdn' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN = eINSTANCE.getVirtualMachineServiceInstance_ServiceFqdn(); + + /** + * The meta object literal for the 'Deployment Timeout Minutes' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES = eINSTANCE.getVirtualMachineServiceInstance_DeploymentTimeoutMinutes(); + + /** + * The meta object literal for the 'Steps' containment reference list feature. + * + * + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS = eINSTANCE.getVirtualMachineServiceInstance_Steps(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceConfigurationImpl Virtual Machine Service Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachineServiceConfiguration() + * @generated + */ + EClass VIRTUAL_MACHINE_SERVICE_CONFIGURATION = eINSTANCE.getVirtualMachineServiceConfiguration(); + + /** + * The meta object literal for the 'Configuration' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION = eINSTANCE.getVirtualMachineServiceConfiguration_Configuration(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl Virtual Machine Service Descriptor}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachineServiceDescriptor() + * @generated + */ + EClass VIRTUAL_MACHINE_SERVICE_DESCRIPTOR = eINSTANCE.getVirtualMachineServiceDescriptor(); + + /** + * The meta object literal for the 'Service Package' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_PACKAGE = eINSTANCE.getVirtualMachineServiceDescriptor_ServicePackage(); + + /** + * The meta object literal for the 'Service Class' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_CLASS = eINSTANCE.getVirtualMachineServiceDescriptor_ServiceClass(); + + /** + * The meta object literal for the 'Service Instance Class' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS = eINSTANCE.getVirtualMachineServiceDescriptor_ServiceInstanceClass(); + + /** + * The meta object literal for the 'Vm Type' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VM_TYPE = eINSTANCE.getVirtualMachineServiceDescriptor_VmType(); + + /** + * The meta object literal for the 'Manager Port Number' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER = eINSTANCE.getVirtualMachineServiceDescriptor_ManagerPortNumber(); + + /** + * The meta object literal for the 'Manager User' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_USER = eINSTANCE.getVirtualMachineServiceDescriptor_ManagerUser(); + + /** + * The meta object literal for the 'Encrypted Password' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD = eINSTANCE.getVirtualMachineServiceDescriptor_EncryptedPassword(); + + /** + * The meta object literal for the 'Users' attribute list feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__USERS = eINSTANCE.getVirtualMachineServiceDescriptor_Users(); + + /** + * The meta object literal for the 'Admin Users' attribute list feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ADMIN_USERS = eINSTANCE.getVirtualMachineServiceDescriptor_AdminUsers(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.PhysicalMachineImpl Physical Machine}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.PhysicalMachineImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getPhysicalMachine() + * @generated + */ + EClass PHYSICAL_MACHINE = eINSTANCE.getPhysicalMachine(); + + /** + * The meta object literal for the 'Manager Port Number' attribute feature. + * + * + * @generated + */ + EAttribute PHYSICAL_MACHINE__MANAGER_PORT_NUMBER = eINSTANCE.getPhysicalMachine_ManagerPortNumber(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineImpl Virtual Machine}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachine() + * @generated + */ + EClass VIRTUAL_MACHINE = eINSTANCE.getVirtualMachine(); + + /** + * The meta object literal for the 'Function Index' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE__FUNCTION_INDEX = eINSTANCE.getVirtualMachine_FunctionIndex(); + + /** + * The meta object literal for the 'Kvm Name' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE__KVM_NAME = eINSTANCE.getVirtualMachine_KvmName(); + + /** + * The meta object literal for the 'Vnc' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE__VNC = eINSTANCE.getVirtualMachine_Vnc(); + + /** + * The meta object literal for the 'Gateway' attribute feature. + * + * + * @generated + */ + EAttribute VIRTUAL_MACHINE__GATEWAY = eINSTANCE.getVirtualMachine_Gateway(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.InstallationStepImpl Installation Step}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.InstallationStepImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getInstallationStep() + * @generated + */ + EClass INSTALLATION_STEP = eINSTANCE.getInstallationStep(); + + /** + * The meta object literal for the 'Application Id' attribute feature. + * + * + * @generated + */ + EAttribute INSTALLATION_STEP__APPLICATION_ID = eINSTANCE.getInstallationStep_ApplicationId(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.ShellInstallationStepImpl Shell Installation Step}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.ShellInstallationStepImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getShellInstallationStep() + * @generated + */ + EClass SHELL_INSTALLATION_STEP = eINSTANCE.getShellInstallationStep(); + + /** + * The meta object literal for the 'Command' attribute feature. + * + * + * @generated + */ + EAttribute SHELL_INSTALLATION_STEP__COMMAND = eINSTANCE.getShellInstallationStep_Command(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl Maven Artifact Installation Step}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getMavenArtifactInstallationStep() + * @generated + */ + EClass MAVEN_ARTIFACT_INSTALLATION_STEP = eINSTANCE.getMavenArtifactInstallationStep(); + + /** + * The meta object literal for the 'Group Id' attribute feature. + * + * + * @generated + */ + EAttribute MAVEN_ARTIFACT_INSTALLATION_STEP__GROUP_ID = eINSTANCE.getMavenArtifactInstallationStep_GroupId(); + + /** + * The meta object literal for the 'Artifact Id' attribute feature. + * + * + * @generated + */ + EAttribute MAVEN_ARTIFACT_INSTALLATION_STEP__ARTIFACT_ID = eINSTANCE.getMavenArtifactInstallationStep_ArtifactId(); + + /** + * The meta object literal for the 'Version' attribute feature. + * + * + * @generated + */ + EAttribute MAVEN_ARTIFACT_INSTALLATION_STEP__VERSION = eINSTANCE.getMavenArtifactInstallationStep_Version(); + + /** + * The meta object literal for the 'Type' attribute feature. + * + * + * @generated + */ + EAttribute MAVEN_ARTIFACT_INSTALLATION_STEP__TYPE = eINSTANCE.getMavenArtifactInstallationStep_Type(); + + /** + * The meta object literal for the 'Assembly Id' attribute feature. + * + * + * @generated + */ + EAttribute MAVEN_ARTIFACT_INSTALLATION_STEP__ASSEMBLY_ID = eINSTANCE.getMavenArtifactInstallationStep_AssemblyId(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl Http Installation Step}' class. + * + * + * @see org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getHttpInstallationStep() + * @generated + */ + EClass HTTP_INSTALLATION_STEP = eINSTANCE.getHttpInstallationStep(); + + /** + * The meta object literal for the 'Url' attribute feature. + * + * + * @generated + */ + EAttribute HTTP_INSTALLATION_STEP__URL = eINSTANCE.getHttpInstallationStep_Url(); + + /** + * The meta object literal for the 'User Name' attribute feature. + * + * + * @generated + */ + EAttribute HTTP_INSTALLATION_STEP__USER_NAME = eINSTANCE.getHttpInstallationStep_UserName(); + + /** + * The meta object literal for the 'Password' attribute feature. + * + * + * @generated + */ + EAttribute HTTP_INSTALLATION_STEP__PASSWORD = eINSTANCE.getHttpInstallationStep_Password(); + + /** + * The meta object literal for the 'Type' attribute feature. + * + * + * @generated + */ + EAttribute HTTP_INSTALLATION_STEP__TYPE = eINSTANCE.getHttpInstallationStep_Type(); + + /** + * The meta object literal for the 'Artifact Id' attribute feature. + * + * + * @generated + */ + EAttribute HTTP_INSTALLATION_STEP__ARTIFACT_ID = eINSTANCE.getHttpInstallationStep_ArtifactId(); + + } + +} //VmPackage diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/HttpInstallationStepImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/HttpInstallationStepImpl.java new file mode 100644 index 0000000..8e38498 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/HttpInstallationStepImpl.java @@ -0,0 +1,399 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm.impl; + +import org.openecomp.dcae.controller.service.vm.HttpInstallationStep; +import org.openecomp.dcae.controller.service.vm.VmPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Http Installation Step'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl#getUrl Url}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl#getUserName User Name}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl#getPassword Password}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl#getType Type}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl#getArtifactId Artifact Id}
  • + *
+ *

+ * + * @generated + */ +public class HttpInstallationStepImpl extends InstallationStepImpl implements HttpInstallationStep { + /** + * The default value of the '{@link #getUrl() Url}' attribute. + * + * + * @see #getUrl() + * @generated + * @ordered + */ + protected static final String URL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUrl() Url}' attribute. + * + * + * @see #getUrl() + * @generated + * @ordered + */ + protected String url = URL_EDEFAULT; + + /** + * The default value of the '{@link #getUserName() User Name}' attribute. + * + * + * @see #getUserName() + * @generated + * @ordered + */ + protected static final String USER_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUserName() User Name}' attribute. + * + * + * @see #getUserName() + * @generated + * @ordered + */ + protected String userName = USER_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getPassword() Password}' attribute. + * + * + * @see #getPassword() + * @generated + * @ordered + */ + protected static final String PASSWORD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPassword() Password}' attribute. + * + * + * @see #getPassword() + * @generated + * @ordered + */ + protected String password = PASSWORD_EDEFAULT; + + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected String type = TYPE_EDEFAULT; + + /** + * The default value of the '{@link #getArtifactId() Artifact Id}' attribute. + * + * + * @see #getArtifactId() + * @generated + * @ordered + */ + protected static final String ARTIFACT_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getArtifactId() Artifact Id}' attribute. + * + * + * @see #getArtifactId() + * @generated + * @ordered + */ + protected String artifactId = ARTIFACT_ID_EDEFAULT; + + /** + * + * + * @generated + */ + protected HttpInstallationStepImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.HTTP_INSTALLATION_STEP; + } + + /** + * + * + * @generated + */ + public String getUrl() { + return url; + } + + /** + * + * + * @generated + */ + public void setUrl(String newUrl) { + String oldUrl = url; + url = newUrl; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.HTTP_INSTALLATION_STEP__URL, oldUrl, url)); + } + + /** + * + * + * @generated + */ + public String getUserName() { + return userName; + } + + /** + * + * + * @generated + */ + public void setUserName(String newUserName) { + String oldUserName = userName; + userName = newUserName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.HTTP_INSTALLATION_STEP__USER_NAME, oldUserName, userName)); + } + + /** + * + * + * @generated + */ + public String getPassword() { + return password; + } + + /** + * + * + * @generated + */ + public void setPassword(String newPassword) { + String oldPassword = password; + password = newPassword; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.HTTP_INSTALLATION_STEP__PASSWORD, oldPassword, password)); + } + + /** + * + * + * @generated + */ + public String getType() { + return type; + } + + /** + * + * + * @generated + */ + public void setType(String newType) { + String oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.HTTP_INSTALLATION_STEP__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + public String getArtifactId() { + return artifactId; + } + + /** + * + * + * @generated + */ + public void setArtifactId(String newArtifactId) { + String oldArtifactId = artifactId; + artifactId = newArtifactId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.HTTP_INSTALLATION_STEP__ARTIFACT_ID, oldArtifactId, artifactId)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.HTTP_INSTALLATION_STEP__URL: + return getUrl(); + case VmPackage.HTTP_INSTALLATION_STEP__USER_NAME: + return getUserName(); + case VmPackage.HTTP_INSTALLATION_STEP__PASSWORD: + return getPassword(); + case VmPackage.HTTP_INSTALLATION_STEP__TYPE: + return getType(); + case VmPackage.HTTP_INSTALLATION_STEP__ARTIFACT_ID: + return getArtifactId(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmPackage.HTTP_INSTALLATION_STEP__URL: + setUrl((String)newValue); + return; + case VmPackage.HTTP_INSTALLATION_STEP__USER_NAME: + setUserName((String)newValue); + return; + case VmPackage.HTTP_INSTALLATION_STEP__PASSWORD: + setPassword((String)newValue); + return; + case VmPackage.HTTP_INSTALLATION_STEP__TYPE: + setType((String)newValue); + return; + case VmPackage.HTTP_INSTALLATION_STEP__ARTIFACT_ID: + setArtifactId((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.HTTP_INSTALLATION_STEP__URL: + setUrl(URL_EDEFAULT); + return; + case VmPackage.HTTP_INSTALLATION_STEP__USER_NAME: + setUserName(USER_NAME_EDEFAULT); + return; + case VmPackage.HTTP_INSTALLATION_STEP__PASSWORD: + setPassword(PASSWORD_EDEFAULT); + return; + case VmPackage.HTTP_INSTALLATION_STEP__TYPE: + setType(TYPE_EDEFAULT); + return; + case VmPackage.HTTP_INSTALLATION_STEP__ARTIFACT_ID: + setArtifactId(ARTIFACT_ID_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.HTTP_INSTALLATION_STEP__URL: + return URL_EDEFAULT == null ? url != null : !URL_EDEFAULT.equals(url); + case VmPackage.HTTP_INSTALLATION_STEP__USER_NAME: + return USER_NAME_EDEFAULT == null ? userName != null : !USER_NAME_EDEFAULT.equals(userName); + case VmPackage.HTTP_INSTALLATION_STEP__PASSWORD: + return PASSWORD_EDEFAULT == null ? password != null : !PASSWORD_EDEFAULT.equals(password); + case VmPackage.HTTP_INSTALLATION_STEP__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + case VmPackage.HTTP_INSTALLATION_STEP__ARTIFACT_ID: + return ARTIFACT_ID_EDEFAULT == null ? artifactId != null : !ARTIFACT_ID_EDEFAULT.equals(artifactId); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (url: "); + result.append(url); + result.append(", userName: "); + result.append(userName); + result.append(", password: "); + result.append(password); + result.append(", type: "); + result.append(type); + result.append(", artifactId: "); + result.append(artifactId); + result.append(')'); + return result.toString(); + } + +} //HttpInstallationStepImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/InstallationStepImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/InstallationStepImpl.java new file mode 100644 index 0000000..f7d6ea8 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/InstallationStepImpl.java @@ -0,0 +1,182 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm.impl; + +import org.openecomp.dcae.controller.service.vm.InstallationStep; +import org.openecomp.dcae.controller.service.vm.VmPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Installation Step'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.InstallationStepImpl#getApplicationId Application Id}
  • + *
+ *

+ * + * @generated + */ +public abstract class InstallationStepImpl extends NamedEntityImpl implements InstallationStep { + /** + * The default value of the '{@link #getApplicationId() Application Id}' attribute. + * + * + * @see #getApplicationId() + * @generated + * @ordered + */ + protected static final String APPLICATION_ID_EDEFAULT = "dcae"; + /** + * The cached value of the '{@link #getApplicationId() Application Id}' attribute. + * + * + * @see #getApplicationId() + * @generated + * @ordered + */ + protected String applicationId = APPLICATION_ID_EDEFAULT; + + /** + * + * + * @generated + */ + protected InstallationStepImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.INSTALLATION_STEP; + } + + /** + * + * + * @generated + */ + public String getApplicationId() { + return applicationId; + } + + /** + * + * + * @generated + */ + public void setApplicationId(String newApplicationId) { + String oldApplicationId = applicationId; + applicationId = newApplicationId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.INSTALLATION_STEP__APPLICATION_ID, oldApplicationId, applicationId)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.INSTALLATION_STEP__APPLICATION_ID: + return getApplicationId(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmPackage.INSTALLATION_STEP__APPLICATION_ID: + setApplicationId((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.INSTALLATION_STEP__APPLICATION_ID: + setApplicationId(APPLICATION_ID_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.INSTALLATION_STEP__APPLICATION_ID: + return APPLICATION_ID_EDEFAULT == null ? applicationId != null : !APPLICATION_ID_EDEFAULT.equals(applicationId); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (applicationId: "); + result.append(applicationId); + result.append(')'); + return result.toString(); + } + +} //InstallationStepImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/MavenArtifactInstallationStepImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/MavenArtifactInstallationStepImpl.java new file mode 100644 index 0000000..9f6d24c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/MavenArtifactInstallationStepImpl.java @@ -0,0 +1,399 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm.impl; + +import org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep; +import org.openecomp.dcae.controller.service.vm.VmPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Maven Artifact Installation Step'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl#getGroupId Group Id}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl#getArtifactId Artifact Id}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl#getVersion Version}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl#getType Type}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl#getAssemblyId Assembly Id}
  • + *
+ *

+ * + * @generated + */ +public class MavenArtifactInstallationStepImpl extends InstallationStepImpl implements MavenArtifactInstallationStep { + /** + * The default value of the '{@link #getGroupId() Group Id}' attribute. + * + * + * @see #getGroupId() + * @generated + * @ordered + */ + protected static final String GROUP_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getGroupId() Group Id}' attribute. + * + * + * @see #getGroupId() + * @generated + * @ordered + */ + protected String groupId = GROUP_ID_EDEFAULT; + + /** + * The default value of the '{@link #getArtifactId() Artifact Id}' attribute. + * + * + * @see #getArtifactId() + * @generated + * @ordered + */ + protected static final String ARTIFACT_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getArtifactId() Artifact Id}' attribute. + * + * + * @see #getArtifactId() + * @generated + * @ordered + */ + protected String artifactId = ARTIFACT_ID_EDEFAULT; + + /** + * The default value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected String type = TYPE_EDEFAULT; + + /** + * The default value of the '{@link #getAssemblyId() Assembly Id}' attribute. + * + * + * @see #getAssemblyId() + * @generated + * @ordered + */ + protected static final String ASSEMBLY_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAssemblyId() Assembly Id}' attribute. + * + * + * @see #getAssemblyId() + * @generated + * @ordered + */ + protected String assemblyId = ASSEMBLY_ID_EDEFAULT; + + /** + * + * + * @generated + */ + protected MavenArtifactInstallationStepImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.MAVEN_ARTIFACT_INSTALLATION_STEP; + } + + /** + * + * + * @generated + */ + public String getGroupId() { + return groupId; + } + + /** + * + * + * @generated + */ + public void setGroupId(String newGroupId) { + String oldGroupId = groupId; + groupId = newGroupId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__GROUP_ID, oldGroupId, groupId)); + } + + /** + * + * + * @generated + */ + public String getArtifactId() { + return artifactId; + } + + /** + * + * + * @generated + */ + public void setArtifactId(String newArtifactId) { + String oldArtifactId = artifactId; + artifactId = newArtifactId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ARTIFACT_ID, oldArtifactId, artifactId)); + } + + /** + * + * + * @generated + */ + public String getVersion() { + return version; + } + + /** + * + * + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__VERSION, oldVersion, version)); + } + + /** + * + * + * @generated + */ + public String getType() { + return type; + } + + /** + * + * + * @generated + */ + public void setType(String newType) { + String oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + public String getAssemblyId() { + return assemblyId; + } + + /** + * + * + * @generated + */ + public void setAssemblyId(String newAssemblyId) { + String oldAssemblyId = assemblyId; + assemblyId = newAssemblyId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ASSEMBLY_ID, oldAssemblyId, assemblyId)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__GROUP_ID: + return getGroupId(); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ARTIFACT_ID: + return getArtifactId(); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__VERSION: + return getVersion(); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__TYPE: + return getType(); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ASSEMBLY_ID: + return getAssemblyId(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__GROUP_ID: + setGroupId((String)newValue); + return; + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ARTIFACT_ID: + setArtifactId((String)newValue); + return; + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__VERSION: + setVersion((String)newValue); + return; + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__TYPE: + setType((String)newValue); + return; + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ASSEMBLY_ID: + setAssemblyId((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__GROUP_ID: + setGroupId(GROUP_ID_EDEFAULT); + return; + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ARTIFACT_ID: + setArtifactId(ARTIFACT_ID_EDEFAULT); + return; + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__VERSION: + setVersion(VERSION_EDEFAULT); + return; + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__TYPE: + setType(TYPE_EDEFAULT); + return; + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ASSEMBLY_ID: + setAssemblyId(ASSEMBLY_ID_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__GROUP_ID: + return GROUP_ID_EDEFAULT == null ? groupId != null : !GROUP_ID_EDEFAULT.equals(groupId); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ARTIFACT_ID: + return ARTIFACT_ID_EDEFAULT == null ? artifactId != null : !ARTIFACT_ID_EDEFAULT.equals(artifactId); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ASSEMBLY_ID: + return ASSEMBLY_ID_EDEFAULT == null ? assemblyId != null : !ASSEMBLY_ID_EDEFAULT.equals(assemblyId); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (groupId: "); + result.append(groupId); + result.append(", artifactId: "); + result.append(artifactId); + result.append(", version: "); + result.append(version); + result.append(", type: "); + result.append(type); + result.append(", assemblyId: "); + result.append(assemblyId); + result.append(')'); + return result.toString(); + } + +} //MavenArtifactInstallationStepImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/PhysicalMachineImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/PhysicalMachineImpl.java new file mode 100644 index 0000000..1cdc009 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/PhysicalMachineImpl.java @@ -0,0 +1,182 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm.impl; + +import org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl; + +import org.openecomp.dcae.controller.service.vm.PhysicalMachine; +import org.openecomp.dcae.controller.service.vm.VmPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Physical Machine'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.PhysicalMachineImpl#getManagerPortNumber Manager Port Number}
  • + *
+ *

+ * + * @generated + */ +public class PhysicalMachineImpl extends DcaeBasicServerImpl implements PhysicalMachine { + /** + * The default value of the '{@link #getManagerPortNumber() Manager Port Number}' attribute. + * + * + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected static final Integer MANAGER_PORT_NUMBER_EDEFAULT = null; + /** + * The cached value of the '{@link #getManagerPortNumber() Manager Port Number}' attribute. + * + * + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected Integer managerPortNumber = MANAGER_PORT_NUMBER_EDEFAULT; + + /** + * + * + * @generated + */ + protected PhysicalMachineImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.PHYSICAL_MACHINE; + } + + /** + * + * + * @generated + */ + public Integer getManagerPortNumber() { + return managerPortNumber; + } + + /** + * + * + * @generated + */ + public void setManagerPortNumber(Integer newManagerPortNumber) { + Integer oldManagerPortNumber = managerPortNumber; + managerPortNumber = newManagerPortNumber; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.PHYSICAL_MACHINE__MANAGER_PORT_NUMBER, oldManagerPortNumber, managerPortNumber)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.PHYSICAL_MACHINE__MANAGER_PORT_NUMBER: + return getManagerPortNumber(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmPackage.PHYSICAL_MACHINE__MANAGER_PORT_NUMBER: + setManagerPortNumber((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.PHYSICAL_MACHINE__MANAGER_PORT_NUMBER: + setManagerPortNumber(MANAGER_PORT_NUMBER_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.PHYSICAL_MACHINE__MANAGER_PORT_NUMBER: + return MANAGER_PORT_NUMBER_EDEFAULT == null ? managerPortNumber != null : !MANAGER_PORT_NUMBER_EDEFAULT.equals(managerPortNumber); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (managerPortNumber: "); + result.append(managerPortNumber); + result.append(')'); + return result.toString(); + } + +} //PhysicalMachineImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/ShellInstallationStepImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/ShellInstallationStepImpl.java new file mode 100644 index 0000000..14ddec6 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/ShellInstallationStepImpl.java @@ -0,0 +1,183 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm.impl; + +import org.openecomp.dcae.controller.service.vm.ShellInstallationStep; +import org.openecomp.dcae.controller.service.vm.VmPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Shell Installation Step'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.ShellInstallationStepImpl#getCommand Command}
  • + *
+ *

+ * + * @generated + */ +public class ShellInstallationStepImpl extends InstallationStepImpl implements ShellInstallationStep { + /** + * The default value of the '{@link #getCommand() Command}' attribute. + * + * + * @see #getCommand() + * @generated + * @ordered + */ + protected static final String COMMAND_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCommand() Command}' attribute. + * + * + * @see #getCommand() + * @generated + * @ordered + */ + protected String command = COMMAND_EDEFAULT; + + /** + * + * + * @generated + */ + protected ShellInstallationStepImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.SHELL_INSTALLATION_STEP; + } + + /** + * + * + * @generated + */ + public String getCommand() { + return command; + } + + /** + * + * + * @generated + */ + public void setCommand(String newCommand) { + String oldCommand = command; + command = newCommand; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.SHELL_INSTALLATION_STEP__COMMAND, oldCommand, command)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.SHELL_INSTALLATION_STEP__COMMAND: + return getCommand(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmPackage.SHELL_INSTALLATION_STEP__COMMAND: + setCommand((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.SHELL_INSTALLATION_STEP__COMMAND: + setCommand(COMMAND_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.SHELL_INSTALLATION_STEP__COMMAND: + return COMMAND_EDEFAULT == null ? command != null : !COMMAND_EDEFAULT.equals(command); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (command: "); + result.append(command); + result.append(')'); + return result.toString(); + } + +} //ShellInstallationStepImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineImpl.java new file mode 100644 index 0000000..c9d588b --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineImpl.java @@ -0,0 +1,343 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm.impl; + +import org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl; +import org.openecomp.dcae.controller.service.vm.VirtualMachine; +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Virtual Machine'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineImpl#getFunctionIndex Function Index}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineImpl#getKvmName Kvm Name}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineImpl#getVnc Vnc}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineImpl#getGateway Gateway}
  • + *
+ *

+ * + * @generated + */ +public class VirtualMachineImpl extends DcaeBasicServerImpl implements VirtualMachine { + /** + * The default value of the '{@link #getFunctionIndex() Function Index}' attribute. + * + * + * @see #getFunctionIndex() + * @generated + * @ordered + */ + protected static final int FUNCTION_INDEX_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getFunctionIndex() Function Index}' attribute. + * + * + * @see #getFunctionIndex() + * @generated + * @ordered + */ + protected int functionIndex = FUNCTION_INDEX_EDEFAULT; + + /** + * The default value of the '{@link #getKvmName() Kvm Name}' attribute. + * + * + * @see #getKvmName() + * @generated + * @ordered + */ + protected static final String KVM_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getKvmName() Kvm Name}' attribute. + * + * + * @see #getKvmName() + * @generated + * @ordered + */ + protected String kvmName = KVM_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getVnc() Vnc}' attribute. + * + * + * @see #getVnc() + * @generated + * @ordered + */ + protected static final String VNC_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVnc() Vnc}' attribute. + * + * + * @see #getVnc() + * @generated + * @ordered + */ + protected String vnc = VNC_EDEFAULT; + + /** + * The default value of the '{@link #getGateway() Gateway}' attribute. + * + * + * @see #getGateway() + * @generated + * @ordered + */ + protected static final String GATEWAY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getGateway() Gateway}' attribute. + * + * + * @see #getGateway() + * @generated + * @ordered + */ + protected String gateway = GATEWAY_EDEFAULT; + + /** + * + * + * @generated + */ + protected VirtualMachineImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.VIRTUAL_MACHINE; + } + + /** + * + * + * @generated + */ + public int getFunctionIndex() { + return functionIndex; + } + + /** + * + * + * @generated + */ + public void setFunctionIndex(int newFunctionIndex) { + int oldFunctionIndex = functionIndex; + functionIndex = newFunctionIndex; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE__FUNCTION_INDEX, oldFunctionIndex, functionIndex)); + } + + /** + * + * + * @generated + */ + public String getKvmName() { + return kvmName; + } + + /** + * + * + * @generated + */ + public void setKvmName(String newKvmName) { + String oldKvmName = kvmName; + kvmName = newKvmName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE__KVM_NAME, oldKvmName, kvmName)); + } + + /** + * + * + * @generated + */ + public String getVnc() { + return vnc; + } + + /** + * + * + * @generated + */ + public void setVnc(String newVnc) { + String oldVnc = vnc; + vnc = newVnc; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE__VNC, oldVnc, vnc)); + } + + /** + * + * + * @generated + */ + public String getGateway() { + return gateway; + } + + /** + * + * + * @generated + */ + public void setGateway(String newGateway) { + String oldGateway = gateway; + gateway = newGateway; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE__GATEWAY, oldGateway, gateway)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE__FUNCTION_INDEX: + return getFunctionIndex(); + case VmPackage.VIRTUAL_MACHINE__KVM_NAME: + return getKvmName(); + case VmPackage.VIRTUAL_MACHINE__VNC: + return getVnc(); + case VmPackage.VIRTUAL_MACHINE__GATEWAY: + return getGateway(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE__FUNCTION_INDEX: + setFunctionIndex((Integer)newValue); + return; + case VmPackage.VIRTUAL_MACHINE__KVM_NAME: + setKvmName((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE__VNC: + setVnc((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE__GATEWAY: + setGateway((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE__FUNCTION_INDEX: + setFunctionIndex(FUNCTION_INDEX_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE__KVM_NAME: + setKvmName(KVM_NAME_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE__VNC: + setVnc(VNC_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE__GATEWAY: + setGateway(GATEWAY_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE__FUNCTION_INDEX: + return functionIndex != FUNCTION_INDEX_EDEFAULT; + case VmPackage.VIRTUAL_MACHINE__KVM_NAME: + return KVM_NAME_EDEFAULT == null ? kvmName != null : !KVM_NAME_EDEFAULT.equals(kvmName); + case VmPackage.VIRTUAL_MACHINE__VNC: + return VNC_EDEFAULT == null ? vnc != null : !VNC_EDEFAULT.equals(vnc); + case VmPackage.VIRTUAL_MACHINE__GATEWAY: + return GATEWAY_EDEFAULT == null ? gateway != null : !GATEWAY_EDEFAULT.equals(gateway); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (functionIndex: "); + result.append(functionIndex); + result.append(", kvmName: "); + result.append(kvmName); + result.append(", vnc: "); + result.append(vnc); + result.append(", gateway: "); + result.append(gateway); + result.append(')'); + return result.toString(); + } + +} //VirtualMachineImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceConfigurationImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceConfigurationImpl.java new file mode 100644 index 0000000..ea132d9 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceConfigurationImpl.java @@ -0,0 +1,184 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm.impl; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VmPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Virtual Machine Service Configuration'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceConfigurationImpl#getConfiguration Configuration}
  • + *
+ *

+ * + * @generated + */ +public class VirtualMachineServiceConfigurationImpl extends MinimalEObjectImpl.Container implements VirtualMachineServiceConfiguration { + /** + * The default value of the '{@link #getConfiguration() Configuration}' attribute. + * + * + * @see #getConfiguration() + * @generated + * @ordered + */ + protected static final String CONFIGURATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getConfiguration() Configuration}' attribute. + * + * + * @see #getConfiguration() + * @generated + * @ordered + */ + protected String configuration = CONFIGURATION_EDEFAULT; + + /** + * + * + * @generated + */ + protected VirtualMachineServiceConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.VIRTUAL_MACHINE_SERVICE_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public String getConfiguration() { + return configuration; + } + + /** + * + * + * @generated + */ + public void setConfiguration(String newConfiguration) { + String oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION, oldConfiguration, configuration)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION: + return getConfiguration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION: + setConfiguration((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION: + setConfiguration(CONFIGURATION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION: + return CONFIGURATION_EDEFAULT == null ? configuration != null : !CONFIGURATION_EDEFAULT.equals(configuration); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (configuration: "); + result.append(configuration); + result.append(')'); + return result.toString(); + } + +} //VirtualMachineServiceConfigurationImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceDescriptorImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceDescriptorImpl.java new file mode 100644 index 0000000..4858bbe --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceDescriptorImpl.java @@ -0,0 +1,585 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm.impl; + +import org.openecomp.dcae.controller.core.service.impl.DcaeServiceDescriptorImpl; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor; +import org.openecomp.dcae.controller.service.vm.VmPackage; + +import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EDataTypeEList; + +/** + * + * An implementation of the model object 'Virtual Machine Service Descriptor'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getServicePackage Service Package}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getServiceClass Service Class}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getServiceInstanceClass Service Instance Class}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getVmType Vm Type}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getManagerPortNumber Manager Port Number}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getManagerUser Manager User}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getEncryptedPassword Encrypted Password}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getUsers Users}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getAdminUsers Admin Users}
  • + *
+ *

+ * + * @generated + */ +public class VirtualMachineServiceDescriptorImpl extends DcaeServiceDescriptorImpl implements VirtualMachineServiceDescriptor { + /** + * The default value of the '{@link #getServicePackage() Service Package}' attribute. + * + * + * @see #getServicePackage() + * @generated + * @ordered + */ + protected static final String SERVICE_PACKAGE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServicePackage() Service Package}' attribute. + * + * + * @see #getServicePackage() + * @generated + * @ordered + */ + protected String servicePackage = SERVICE_PACKAGE_EDEFAULT; + + /** + * The default value of the '{@link #getServiceClass() Service Class}' attribute. + * + * + * @see #getServiceClass() + * @generated + * @ordered + */ + protected static final String SERVICE_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServiceClass() Service Class}' attribute. + * + * + * @see #getServiceClass() + * @generated + * @ordered + */ + protected String serviceClass = SERVICE_CLASS_EDEFAULT; + + /** + * The default value of the '{@link #getServiceInstanceClass() Service Instance Class}' attribute. + * + * + * @see #getServiceInstanceClass() + * @generated + * @ordered + */ + protected static final String SERVICE_INSTANCE_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServiceInstanceClass() Service Instance Class}' attribute. + * + * + * @see #getServiceInstanceClass() + * @generated + * @ordered + */ + protected String serviceInstanceClass = SERVICE_INSTANCE_CLASS_EDEFAULT; + + /** + * The default value of the '{@link #getVmType() Vm Type}' attribute. + * + * + * @see #getVmType() + * @generated + * @ordered + */ + protected static final String VM_TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVmType() Vm Type}' attribute. + * + * + * @see #getVmType() + * @generated + * @ordered + */ + protected String vmType = VM_TYPE_EDEFAULT; + + /** + * The default value of the '{@link #getManagerPortNumber() Manager Port Number}' attribute. + * + * + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected static final String MANAGER_PORT_NUMBER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getManagerPortNumber() Manager Port Number}' attribute. + * + * + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected String managerPortNumber = MANAGER_PORT_NUMBER_EDEFAULT; + + /** + * The default value of the '{@link #getManagerUser() Manager User}' attribute. + * + * + * @see #getManagerUser() + * @generated + * @ordered + */ + protected static final String MANAGER_USER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getManagerUser() Manager User}' attribute. + * + * + * @see #getManagerUser() + * @generated + * @ordered + */ + protected String managerUser = MANAGER_USER_EDEFAULT; + + /** + * The default value of the '{@link #getEncryptedPassword() Encrypted Password}' attribute. + * + * + * @see #getEncryptedPassword() + * @generated + * @ordered + */ + protected static final String ENCRYPTED_PASSWORD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getEncryptedPassword() Encrypted Password}' attribute. + * + * + * @see #getEncryptedPassword() + * @generated + * @ordered + */ + protected String encryptedPassword = ENCRYPTED_PASSWORD_EDEFAULT; + + /** + * The cached value of the '{@link #getUsers() Users}' attribute list. + * + * + * @see #getUsers() + * @generated + * @ordered + */ + protected EList users; + + /** + * The cached value of the '{@link #getAdminUsers() Admin Users}' attribute list. + * + * + * @see #getAdminUsers() + * @generated + * @ordered + */ + protected EList adminUsers; + + /** + * + * + * @generated + */ + protected VirtualMachineServiceDescriptorImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR; + } + + /** + * + * + * @generated + */ + public String getServicePackage() { + return servicePackage; + } + + /** + * + * + * @generated + */ + public void setServicePackage(String newServicePackage) { + String oldServicePackage = servicePackage; + servicePackage = newServicePackage; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_PACKAGE, oldServicePackage, servicePackage)); + } + + /** + * + * + * @generated + */ + public String getServiceClass() { + return serviceClass; + } + + /** + * + * + * @generated + */ + public void setServiceClass(String newServiceClass) { + String oldServiceClass = serviceClass; + serviceClass = newServiceClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_CLASS, oldServiceClass, serviceClass)); + } + + /** + * + * + * @generated + */ + public String getServiceInstanceClass() { + return serviceInstanceClass; + } + + /** + * + * + * @generated + */ + public void setServiceInstanceClass(String newServiceInstanceClass) { + String oldServiceInstanceClass = serviceInstanceClass; + serviceInstanceClass = newServiceInstanceClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS, oldServiceInstanceClass, serviceInstanceClass)); + } + + /** + * + * + * @generated + */ + public String getVmType() { + return vmType; + } + + /** + * + * + * @generated + */ + public void setVmType(String newVmType) { + String oldVmType = vmType; + vmType = newVmType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VM_TYPE, oldVmType, vmType)); + } + + /** + * + * + * @generated + */ + public String getManagerPortNumber() { + return managerPortNumber; + } + + /** + * + * + * @generated + */ + public void setManagerPortNumber(String newManagerPortNumber) { + String oldManagerPortNumber = managerPortNumber; + managerPortNumber = newManagerPortNumber; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER, oldManagerPortNumber, managerPortNumber)); + } + + /** + * + * + * @generated + */ + public String getManagerUser() { + return managerUser; + } + + /** + * + * + * @generated + */ + public void setManagerUser(String newManagerUser) { + String oldManagerUser = managerUser; + managerUser = newManagerUser; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_USER, oldManagerUser, managerUser)); + } + + /** + * + * + * @generated + */ + public String getEncryptedPassword() { + return encryptedPassword; + } + + /** + * + * + * @generated + */ + public void setEncryptedPassword(String newEncryptedPassword) { + String oldEncryptedPassword = encryptedPassword; + encryptedPassword = newEncryptedPassword; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD, oldEncryptedPassword, encryptedPassword)); + } + + /** + * + * + * @generated + */ + public EList getUsers() { + if (users == null) { + users = new EDataTypeEList(String.class, this, VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__USERS); + } + return users; + } + + /** + * + * + * @generated + */ + public EList getAdminUsers() { + if (adminUsers == null) { + adminUsers = new EDataTypeEList(String.class, this, VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ADMIN_USERS); + } + return adminUsers; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + return getServicePackage(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_CLASS: + return getServiceClass(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + return getServiceInstanceClass(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VM_TYPE: + return getVmType(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER: + return getManagerPortNumber(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_USER: + return getManagerUser(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD: + return getEncryptedPassword(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__USERS: + return getUsers(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ADMIN_USERS: + return getAdminUsers(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + setServicePackage((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_CLASS: + setServiceClass((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + setServiceInstanceClass((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VM_TYPE: + setVmType((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER: + setManagerPortNumber((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_USER: + setManagerUser((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD: + setEncryptedPassword((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__USERS: + getUsers().clear(); + getUsers().addAll((Collection)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ADMIN_USERS: + getAdminUsers().clear(); + getAdminUsers().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + setServicePackage(SERVICE_PACKAGE_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_CLASS: + setServiceClass(SERVICE_CLASS_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + setServiceInstanceClass(SERVICE_INSTANCE_CLASS_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VM_TYPE: + setVmType(VM_TYPE_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER: + setManagerPortNumber(MANAGER_PORT_NUMBER_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_USER: + setManagerUser(MANAGER_USER_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD: + setEncryptedPassword(ENCRYPTED_PASSWORD_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__USERS: + getUsers().clear(); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ADMIN_USERS: + getAdminUsers().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + return SERVICE_PACKAGE_EDEFAULT == null ? servicePackage != null : !SERVICE_PACKAGE_EDEFAULT.equals(servicePackage); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_CLASS: + return SERVICE_CLASS_EDEFAULT == null ? serviceClass != null : !SERVICE_CLASS_EDEFAULT.equals(serviceClass); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + return SERVICE_INSTANCE_CLASS_EDEFAULT == null ? serviceInstanceClass != null : !SERVICE_INSTANCE_CLASS_EDEFAULT.equals(serviceInstanceClass); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VM_TYPE: + return VM_TYPE_EDEFAULT == null ? vmType != null : !VM_TYPE_EDEFAULT.equals(vmType); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER: + return MANAGER_PORT_NUMBER_EDEFAULT == null ? managerPortNumber != null : !MANAGER_PORT_NUMBER_EDEFAULT.equals(managerPortNumber); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_USER: + return MANAGER_USER_EDEFAULT == null ? managerUser != null : !MANAGER_USER_EDEFAULT.equals(managerUser); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD: + return ENCRYPTED_PASSWORD_EDEFAULT == null ? encryptedPassword != null : !ENCRYPTED_PASSWORD_EDEFAULT.equals(encryptedPassword); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__USERS: + return users != null && !users.isEmpty(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ADMIN_USERS: + return adminUsers != null && !adminUsers.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (servicePackage: "); + result.append(servicePackage); + result.append(", serviceClass: "); + result.append(serviceClass); + result.append(", serviceInstanceClass: "); + result.append(serviceInstanceClass); + result.append(", vmType: "); + result.append(vmType); + result.append(", managerPortNumber: "); + result.append(managerPortNumber); + result.append(", managerUser: "); + result.append(managerUser); + result.append(", encryptedPassword: "); + result.append(encryptedPassword); + result.append(", users: "); + result.append(users); + result.append(", adminUsers: "); + result.append(adminUsers); + result.append(')'); + return result.toString(); + } + +} //VirtualMachineServiceDescriptorImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceImpl.java new file mode 100644 index 0000000..f94bdb4 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceImpl.java @@ -0,0 +1,285 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm.impl; + +import org.openecomp.dcae.controller.core.service.impl.DcaeServiceImpl; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; +import org.openecomp.dcae.controller.service.vm.VmPackage; + +import java.lang.reflect.InvocationTargetException; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Virtual Machine Service'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl#getInstances Instances}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl#getManagerPortNumber Manager Port Number}
  • + *
+ *

+ * + * @generated + */ +public class VirtualMachineServiceImpl extends DcaeServiceImpl implements VirtualMachineService { + /** + * The cached value of the '{@link #getInstances() Instances}' containment reference list. + * + * + * @see #getInstances() + * @generated + * @ordered + */ + protected EList instances; + + /** + * The default value of the '{@link #getManagerPortNumber() Manager Port Number}' attribute. + * + * + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected static final int MANAGER_PORT_NUMBER_EDEFAULT = 9999; + /** + * The cached value of the '{@link #getManagerPortNumber() Manager Port Number}' attribute. + * + * + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected int managerPortNumber = MANAGER_PORT_NUMBER_EDEFAULT; + + /** + * + * + * @generated + */ + protected VirtualMachineServiceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.VIRTUAL_MACHINE_SERVICE; + } + + /** + * + * + * @generated + */ + public EList getInstances() { + if (instances == null) { + instances = new EObjectContainmentWithInverseEList(VirtualMachineServiceInstance.class, this, VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE); + } + return instances; + } + + /** + * + * + * @generated + */ + public int getManagerPortNumber() { + return managerPortNumber; + } + + /** + * + * + * @generated + */ + public void setManagerPortNumber(int newManagerPortNumber) { + int oldManagerPortNumber = managerPortNumber; + managerPortNumber = newManagerPortNumber; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER, oldManagerPortNumber, managerPortNumber)); + } + + /** + * + * + * @generated + */ + public void updateDeploymentStatus() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES: + return ((InternalEList)(InternalEList)getInstances()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES: + return ((InternalEList)getInstances()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES: + return getInstances(); + case VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER: + return getManagerPortNumber(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES: + getInstances().clear(); + getInstances().addAll((Collection)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER: + setManagerPortNumber((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES: + getInstances().clear(); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER: + setManagerPortNumber(MANAGER_PORT_NUMBER_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES: + return instances != null && !instances.isEmpty(); + case VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER: + return managerPortNumber != MANAGER_PORT_NUMBER_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS: + updateDeploymentStatus(); + return null; + } + return super.eInvoke(operationID, arguments); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (managerPortNumber: "); + result.append(managerPortNumber); + result.append(')'); + return result.toString(); + } + +} //VirtualMachineServiceImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceInstanceImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceInstanceImpl.java new file mode 100644 index 0000000..d5c5706 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceInstanceImpl.java @@ -0,0 +1,1288 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm.impl; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; +import org.openecomp.dcae.controller.core.service.DcaeLocation; +import org.openecomp.dcae.controller.core.service.impl.DcaeServiceInstanceImpl; +import org.openecomp.dcae.controller.service.vm.InstallationStep; +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.openecomp.ncomp.core.User; +import org.openecomp.ncomp.openstack.core.VirtualMachineType; +import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EDataTypeEList; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Virtual Machine Service Instance'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getConfiguration Configuration}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getLocation Location}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getVmType Vm Type}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getUsers Users}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getAdminUsers Admin Users}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getApplicationIds Application Ids}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getAdminId Admin Id}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getNumberOfServers Number Of Servers}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getAvailabilityZone Availability Zone}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getManagerPortNumber Manager Port Number}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getServers Servers}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getLeaderServer Leader Server}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getService Service}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getIedsAdmin Ieds Admin}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getChefUser Chef User}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getChefOrg Chef Org}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getChefTopology Chef Topology}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getOpenstackFlavor Openstack Flavor}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getServiceFqdn Service Fqdn}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getDeploymentTimeoutMinutes Deployment Timeout Minutes}
  • + *
  • {@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getSteps Steps}
  • + *
+ *

+ * + * @generated + */ +public class VirtualMachineServiceInstanceImpl extends DcaeServiceInstanceImpl implements VirtualMachineServiceInstance { + /** + * The default value of the '{@link #getConfiguration() Configuration}' attribute. + * + * + * @see #getConfiguration() + * @generated + * @ordered + */ + protected static final String CONFIGURATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getConfiguration() Configuration}' attribute. + * + * + * @see #getConfiguration() + * @generated + * @ordered + */ + protected String configuration = CONFIGURATION_EDEFAULT; + + /** + * The cached value of the '{@link #getLocation() Location}' reference. + * + * + * @see #getLocation() + * @generated + * @ordered + */ + protected DcaeLocation location; + + /** + * The cached value of the '{@link #getVmType() Vm Type}' reference. + * + * + * @see #getVmType() + * @generated + * @ordered + */ + protected VirtualMachineType vmType; + + /** + * The cached value of the '{@link #getUsers() Users}' reference list. + * + * + * @see #getUsers() + * @generated + * @ordered + */ + protected EList users; + + /** + * The cached value of the '{@link #getAdminUsers() Admin Users}' reference list. + * + * + * @see #getAdminUsers() + * @generated + * @ordered + */ + protected EList adminUsers; + + /** + * The cached value of the '{@link #getApplicationIds() Application Ids}' attribute list. + * + * + * @see #getApplicationIds() + * @generated + * @ordered + */ + protected EList applicationIds; + + /** + * The default value of the '{@link #getAdminId() Admin Id}' attribute. + * + * + * @see #getAdminId() + * @generated + * @ordered + */ + protected static final String ADMIN_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAdminId() Admin Id}' attribute. + * + * + * @see #getAdminId() + * @generated + * @ordered + */ + protected String adminId = ADMIN_ID_EDEFAULT; + + /** + * The default value of the '{@link #getNumberOfServers() Number Of Servers}' attribute. + * + * + * @see #getNumberOfServers() + * @generated + * @ordered + */ + protected static final int NUMBER_OF_SERVERS_EDEFAULT = 1; + + /** + * The cached value of the '{@link #getNumberOfServers() Number Of Servers}' attribute. + * + * + * @see #getNumberOfServers() + * @generated + * @ordered + */ + protected int numberOfServers = NUMBER_OF_SERVERS_EDEFAULT; + + /** + * The default value of the '{@link #getAvailabilityZone() Availability Zone}' attribute. + * + * + * @see #getAvailabilityZone() + * @generated + * @ordered + */ + protected static final String AVAILABILITY_ZONE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAvailabilityZone() Availability Zone}' attribute. + * + * + * @see #getAvailabilityZone() + * @generated + * @ordered + */ + protected String availabilityZone = AVAILABILITY_ZONE_EDEFAULT; + + /** + * The default value of the '{@link #getManagerPortNumber() Manager Port Number}' attribute. + * + * + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected static final Integer MANAGER_PORT_NUMBER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getManagerPortNumber() Manager Port Number}' attribute. + * + * + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected Integer managerPortNumber = MANAGER_PORT_NUMBER_EDEFAULT; + + /** + * The cached value of the '{@link #getServers() Servers}' containment reference list. + * + * + * @see #getServers() + * @generated + * @ordered + */ + protected EList servers; + + /** + * The cached value of the '{@link #getLeaderServer() Leader Server}' reference. + * + * + * @see #getLeaderServer() + * @generated + * @ordered + */ + protected DcaeBasicServer leaderServer; + + /** + * The default value of the '{@link #getIedsAdmin() Ieds Admin}' attribute. + * + * + * @see #getIedsAdmin() + * @generated + * @ordered + */ + protected static final String IEDS_ADMIN_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIedsAdmin() Ieds Admin}' attribute. + * + * + * @see #getIedsAdmin() + * @generated + * @ordered + */ + protected String iedsAdmin = IEDS_ADMIN_EDEFAULT; + + /** + * The default value of the '{@link #getChefUser() Chef User}' attribute. + * + * + * @see #getChefUser() + * @generated + * @ordered + */ + protected static final String CHEF_USER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getChefUser() Chef User}' attribute. + * + * + * @see #getChefUser() + * @generated + * @ordered + */ + protected String chefUser = CHEF_USER_EDEFAULT; + + /** + * The default value of the '{@link #getChefOrg() Chef Org}' attribute. + * + * + * @see #getChefOrg() + * @generated + * @ordered + */ + protected static final String CHEF_ORG_EDEFAULT = null; + + /** + * The cached value of the '{@link #getChefOrg() Chef Org}' attribute. + * + * + * @see #getChefOrg() + * @generated + * @ordered + */ + protected String chefOrg = CHEF_ORG_EDEFAULT; + + /** + * The default value of the '{@link #getChefTopology() Chef Topology}' attribute. + * + * + * @see #getChefTopology() + * @generated + * @ordered + */ + protected static final String CHEF_TOPOLOGY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getChefTopology() Chef Topology}' attribute. + * + * + * @see #getChefTopology() + * @generated + * @ordered + */ + protected String chefTopology = CHEF_TOPOLOGY_EDEFAULT; + + /** + * The default value of the '{@link #getOpenstackFlavor() Openstack Flavor}' attribute. + * + * + * @see #getOpenstackFlavor() + * @generated + * @ordered + */ + protected static final String OPENSTACK_FLAVOR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getOpenstackFlavor() Openstack Flavor}' attribute. + * + * + * @see #getOpenstackFlavor() + * @generated + * @ordered + */ + protected String openstackFlavor = OPENSTACK_FLAVOR_EDEFAULT; + + /** + * The default value of the '{@link #getServiceFqdn() Service Fqdn}' attribute. + * + * + * @see #getServiceFqdn() + * @generated + * @ordered + */ + protected static final String SERVICE_FQDN_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServiceFqdn() Service Fqdn}' attribute. + * + * + * @see #getServiceFqdn() + * @generated + * @ordered + */ + protected String serviceFqdn = SERVICE_FQDN_EDEFAULT; + + /** + * The default value of the '{@link #getDeploymentTimeoutMinutes() Deployment Timeout Minutes}' attribute. + * + * + * @see #getDeploymentTimeoutMinutes() + * @generated + * @ordered + */ + protected static final int DEPLOYMENT_TIMEOUT_MINUTES_EDEFAULT = 90; + + /** + * The cached value of the '{@link #getDeploymentTimeoutMinutes() Deployment Timeout Minutes}' attribute. + * + * + * @see #getDeploymentTimeoutMinutes() + * @generated + * @ordered + */ + protected int deploymentTimeoutMinutes = DEPLOYMENT_TIMEOUT_MINUTES_EDEFAULT; + + /** + * The cached value of the '{@link #getSteps() Steps}' containment reference list. + * + * + * @see #getSteps() + * @generated + * @ordered + */ + protected EList steps; + + /** + * + * + * @generated + */ + protected VirtualMachineServiceInstanceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.VIRTUAL_MACHINE_SERVICE_INSTANCE; + } + + /** + * + * + * @generated + */ + public DcaeLocation getLocation() { + if (location != null && location.eIsProxy()) { + InternalEObject oldLocation = (InternalEObject)location; + location = (DcaeLocation)eResolveProxy(oldLocation); + if (location != oldLocation) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION, oldLocation, location)); + } + } + return location; + } + + /** + * + * + * @generated + */ + public DcaeLocation basicGetLocation() { + return location; + } + + /** + * + * + * @generated + */ + public void setLocation(DcaeLocation newLocation) { + DcaeLocation oldLocation = location; + location = newLocation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION, oldLocation, location)); + } + + /** + * + * + * @generated + */ + public VirtualMachineType getVmType() { + if (vmType != null && vmType.eIsProxy()) { + InternalEObject oldVmType = (InternalEObject)vmType; + vmType = (VirtualMachineType)eResolveProxy(oldVmType); + if (vmType != oldVmType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE, oldVmType, vmType)); + } + } + return vmType; + } + + /** + * + * + * @generated + */ + public VirtualMachineType basicGetVmType() { + return vmType; + } + + /** + * + * + * @generated + */ + public void setVmType(VirtualMachineType newVmType) { + VirtualMachineType oldVmType = vmType; + vmType = newVmType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE, oldVmType, vmType)); + } + + /** + * + * + * @generated + */ + public EList getUsers() { + if (users == null) { + users = new EObjectResolvingEList(User.class, this, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS); + } + return users; + } + + /** + * + * + * @generated + */ + public EList getAdminUsers() { + if (adminUsers == null) { + adminUsers = new EObjectResolvingEList(User.class, this, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS); + } + return adminUsers; + } + + /** + * + * + * @generated + */ + public EList getApplicationIds() { + if (applicationIds == null) { + applicationIds = new EDataTypeEList(String.class, this, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS); + } + return applicationIds; + } + + /** + * + * + * @generated + */ + public String getAdminId() { + return adminId; + } + + /** + * + * + * @generated + */ + public void setAdminId(String newAdminId) { + String oldAdminId = adminId; + adminId = newAdminId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID, oldAdminId, adminId)); + } + + /** + * + * + * @generated + */ + public String getConfiguration() { + return configuration; + } + + /** + * + * + * @generated + */ + public void setConfiguration(String newConfiguration) { + String oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION, oldConfiguration, configuration)); + } + + /** + * + * + * @generated + */ + public int getNumberOfServers() { + return numberOfServers; + } + + /** + * + * + * @generated + */ + public void setNumberOfServers(int newNumberOfServers) { + int oldNumberOfServers = numberOfServers; + numberOfServers = newNumberOfServers; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS, oldNumberOfServers, numberOfServers)); + } + + /** + * + * + * @generated + */ + public String getAvailabilityZone() { + return availabilityZone; + } + + /** + * + * + * @generated + */ + public void setAvailabilityZone(String newAvailabilityZone) { + String oldAvailabilityZone = availabilityZone; + availabilityZone = newAvailabilityZone; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE, oldAvailabilityZone, availabilityZone)); + } + + /** + * + * + * @generated + */ + public Integer getManagerPortNumber() { + return managerPortNumber; + } + + /** + * + * + * @generated + */ + public void setManagerPortNumber(Integer newManagerPortNumber) { + Integer oldManagerPortNumber = managerPortNumber; + managerPortNumber = newManagerPortNumber; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER, oldManagerPortNumber, managerPortNumber)); + } + + /** + * + * + * @generated + */ + public EList getServers() { + if (servers == null) { + servers = new EObjectContainmentEList(DcaeBasicServer.class, this, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS); + } + return servers; + } + + /** + * + * + * @generated + */ + public DcaeBasicServer getLeaderServer() { + if (leaderServer != null && leaderServer.eIsProxy()) { + InternalEObject oldLeaderServer = (InternalEObject)leaderServer; + leaderServer = (DcaeBasicServer)eResolveProxy(oldLeaderServer); + if (leaderServer != oldLeaderServer) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER, oldLeaderServer, leaderServer)); + } + } + return leaderServer; + } + + /** + * + * + * @generated + */ + public DcaeBasicServer basicGetLeaderServer() { + return leaderServer; + } + + /** + * + * + * @generated + */ + public void setLeaderServer(DcaeBasicServer newLeaderServer) { + DcaeBasicServer oldLeaderServer = leaderServer; + leaderServer = newLeaderServer; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER, oldLeaderServer, leaderServer)); + } + + /** + * + * + * @generated + */ + public VirtualMachineService getService() { + if (eContainerFeatureID() != VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE) return null; + return (VirtualMachineService)eContainer(); + } + + /** + * + * + * @generated + */ + public VirtualMachineService basicGetService() { + if (eContainerFeatureID() != VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE) return null; + return (VirtualMachineService)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetService(VirtualMachineService newService, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newService, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setService(VirtualMachineService newService) { + if (newService != eInternalContainer() || (eContainerFeatureID() != VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE && newService != null)) { + if (EcoreUtil.isAncestor(this, newService)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newService != null) + msgs = ((InternalEObject)newService).eInverseAdd(this, VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES, VirtualMachineService.class, msgs); + msgs = basicSetService(newService, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE, newService, newService)); + } + + /** + * + * + * @generated + */ + public String getIedsAdmin() { + return iedsAdmin; + } + + /** + * + * + * @generated + */ + public void setIedsAdmin(String newIedsAdmin) { + String oldIedsAdmin = iedsAdmin; + iedsAdmin = newIedsAdmin; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN, oldIedsAdmin, iedsAdmin)); + } + + /** + * + * + * @generated + */ + public String getChefUser() { + return chefUser; + } + + /** + * + * + * @generated + */ + public void setChefUser(String newChefUser) { + String oldChefUser = chefUser; + chefUser = newChefUser; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER, oldChefUser, chefUser)); + } + + /** + * + * + * @generated + */ + public String getChefOrg() { + return chefOrg; + } + + /** + * + * + * @generated + */ + public void setChefOrg(String newChefOrg) { + String oldChefOrg = chefOrg; + chefOrg = newChefOrg; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG, oldChefOrg, chefOrg)); + } + + /** + * + * + * @generated + */ + public String getChefTopology() { + return chefTopology; + } + + /** + * + * + * @generated + */ + public void setChefTopology(String newChefTopology) { + String oldChefTopology = chefTopology; + chefTopology = newChefTopology; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY, oldChefTopology, chefTopology)); + } + + /** + * + * + * @generated + */ + public String getOpenstackFlavor() { + return openstackFlavor; + } + + /** + * + * + * @generated + */ + public void setOpenstackFlavor(String newOpenstackFlavor) { + String oldOpenstackFlavor = openstackFlavor; + openstackFlavor = newOpenstackFlavor; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR, oldOpenstackFlavor, openstackFlavor)); + } + + /** + * + * + * @generated + */ + public String getServiceFqdn() { + return serviceFqdn; + } + + /** + * + * + * @generated + */ + public void setServiceFqdn(String newServiceFqdn) { + String oldServiceFqdn = serviceFqdn; + serviceFqdn = newServiceFqdn; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN, oldServiceFqdn, serviceFqdn)); + } + + /** + * + * + * @generated + */ + public int getDeploymentTimeoutMinutes() { + return deploymentTimeoutMinutes; + } + + /** + * + * + * @generated + */ + public void setDeploymentTimeoutMinutes(int newDeploymentTimeoutMinutes) { + int oldDeploymentTimeoutMinutes = deploymentTimeoutMinutes; + deploymentTimeoutMinutes = newDeploymentTimeoutMinutes; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES, oldDeploymentTimeoutMinutes, deploymentTimeoutMinutes)); + } + + /** + * + * + * @generated + */ + public EList getSteps() { + if (steps == null) { + steps = new EObjectContainmentEList(InstallationStep.class, this, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS); + } + return steps; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetService((VirtualMachineService)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS: + return ((InternalEList)getServers()).basicRemove(otherEnd, msgs); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE: + return basicSetService(null, msgs); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS: + return ((InternalEList)getSteps()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE: + return eInternalContainer().eInverseRemove(this, VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES, VirtualMachineService.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION: + return getConfiguration(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION: + if (resolve) return getLocation(); + return basicGetLocation(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE: + if (resolve) return getVmType(); + return basicGetVmType(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS: + return getUsers(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS: + return getAdminUsers(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS: + return getApplicationIds(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID: + return getAdminId(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS: + return getNumberOfServers(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE: + return getAvailabilityZone(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER: + return getManagerPortNumber(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS: + return getServers(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER: + if (resolve) return getLeaderServer(); + return basicGetLeaderServer(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE: + if (resolve) return getService(); + return basicGetService(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN: + return getIedsAdmin(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER: + return getChefUser(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG: + return getChefOrg(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY: + return getChefTopology(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR: + return getOpenstackFlavor(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN: + return getServiceFqdn(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES: + return getDeploymentTimeoutMinutes(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS: + return getSteps(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION: + setConfiguration((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION: + setLocation((DcaeLocation)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE: + setVmType((VirtualMachineType)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS: + getUsers().clear(); + getUsers().addAll((Collection)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS: + getAdminUsers().clear(); + getAdminUsers().addAll((Collection)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS: + getApplicationIds().clear(); + getApplicationIds().addAll((Collection)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID: + setAdminId((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS: + setNumberOfServers((Integer)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE: + setAvailabilityZone((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER: + setManagerPortNumber((Integer)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS: + getServers().clear(); + getServers().addAll((Collection)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER: + setLeaderServer((DcaeBasicServer)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE: + setService((VirtualMachineService)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN: + setIedsAdmin((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER: + setChefUser((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG: + setChefOrg((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY: + setChefTopology((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR: + setOpenstackFlavor((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN: + setServiceFqdn((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES: + setDeploymentTimeoutMinutes((Integer)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS: + getSteps().clear(); + getSteps().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION: + setConfiguration(CONFIGURATION_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION: + setLocation((DcaeLocation)null); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE: + setVmType((VirtualMachineType)null); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS: + getUsers().clear(); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS: + getAdminUsers().clear(); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS: + getApplicationIds().clear(); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID: + setAdminId(ADMIN_ID_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS: + setNumberOfServers(NUMBER_OF_SERVERS_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE: + setAvailabilityZone(AVAILABILITY_ZONE_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER: + setManagerPortNumber(MANAGER_PORT_NUMBER_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS: + getServers().clear(); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER: + setLeaderServer((DcaeBasicServer)null); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE: + setService((VirtualMachineService)null); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN: + setIedsAdmin(IEDS_ADMIN_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER: + setChefUser(CHEF_USER_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG: + setChefOrg(CHEF_ORG_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY: + setChefTopology(CHEF_TOPOLOGY_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR: + setOpenstackFlavor(OPENSTACK_FLAVOR_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN: + setServiceFqdn(SERVICE_FQDN_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES: + setDeploymentTimeoutMinutes(DEPLOYMENT_TIMEOUT_MINUTES_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS: + getSteps().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION: + return CONFIGURATION_EDEFAULT == null ? configuration != null : !CONFIGURATION_EDEFAULT.equals(configuration); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION: + return location != null; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE: + return vmType != null; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS: + return users != null && !users.isEmpty(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS: + return adminUsers != null && !adminUsers.isEmpty(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS: + return applicationIds != null && !applicationIds.isEmpty(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID: + return ADMIN_ID_EDEFAULT == null ? adminId != null : !ADMIN_ID_EDEFAULT.equals(adminId); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS: + return numberOfServers != NUMBER_OF_SERVERS_EDEFAULT; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE: + return AVAILABILITY_ZONE_EDEFAULT == null ? availabilityZone != null : !AVAILABILITY_ZONE_EDEFAULT.equals(availabilityZone); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER: + return MANAGER_PORT_NUMBER_EDEFAULT == null ? managerPortNumber != null : !MANAGER_PORT_NUMBER_EDEFAULT.equals(managerPortNumber); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS: + return servers != null && !servers.isEmpty(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER: + return leaderServer != null; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE: + return basicGetService() != null; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN: + return IEDS_ADMIN_EDEFAULT == null ? iedsAdmin != null : !IEDS_ADMIN_EDEFAULT.equals(iedsAdmin); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER: + return CHEF_USER_EDEFAULT == null ? chefUser != null : !CHEF_USER_EDEFAULT.equals(chefUser); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG: + return CHEF_ORG_EDEFAULT == null ? chefOrg != null : !CHEF_ORG_EDEFAULT.equals(chefOrg); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY: + return CHEF_TOPOLOGY_EDEFAULT == null ? chefTopology != null : !CHEF_TOPOLOGY_EDEFAULT.equals(chefTopology); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR: + return OPENSTACK_FLAVOR_EDEFAULT == null ? openstackFlavor != null : !OPENSTACK_FLAVOR_EDEFAULT.equals(openstackFlavor); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN: + return SERVICE_FQDN_EDEFAULT == null ? serviceFqdn != null : !SERVICE_FQDN_EDEFAULT.equals(serviceFqdn); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES: + return deploymentTimeoutMinutes != DEPLOYMENT_TIMEOUT_MINUTES_EDEFAULT; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS: + return steps != null && !steps.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == VirtualMachineServiceConfiguration.class) { + switch (derivedFeatureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION: return VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == VirtualMachineServiceConfiguration.class) { + switch (baseFeatureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION: return VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (configuration: "); + result.append(configuration); + result.append(", applicationIds: "); + result.append(applicationIds); + result.append(", adminId: "); + result.append(adminId); + result.append(", numberOfServers: "); + result.append(numberOfServers); + result.append(", availabilityZone: "); + result.append(availabilityZone); + result.append(", managerPortNumber: "); + result.append(managerPortNumber); + result.append(", iedsAdmin: "); + result.append(iedsAdmin); + result.append(", chefUser: "); + result.append(chefUser); + result.append(", chefOrg: "); + result.append(chefOrg); + result.append(", chefTopology: "); + result.append(chefTopology); + result.append(", openstackFlavor: "); + result.append(openstackFlavor); + result.append(", serviceFqdn: "); + result.append(serviceFqdn); + result.append(", deploymentTimeoutMinutes: "); + result.append(deploymentTimeoutMinutes); + result.append(')'); + return result.toString(); + } + +} //VirtualMachineServiceInstanceImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VmFactoryImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VmFactoryImpl.java new file mode 100644 index 0000000..7db3558 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VmFactoryImpl.java @@ -0,0 +1,204 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm.impl; + +import org.openecomp.dcae.controller.service.vm.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class VmFactoryImpl extends EFactoryImpl implements VmFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static VmFactory init() { + try { + VmFactory theVmFactory = (VmFactory)EPackage.Registry.INSTANCE.getEFactory(VmPackage.eNS_URI); + if (theVmFactory != null) { + return theVmFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new VmFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public VmFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case VmPackage.VIRTUAL_MACHINE_SERVICE: return createVirtualMachineService(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE: return createVirtualMachineServiceInstance(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION: return createVirtualMachineServiceConfiguration(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR: return createVirtualMachineServiceDescriptor(); + case VmPackage.PHYSICAL_MACHINE: return createPhysicalMachine(); + case VmPackage.VIRTUAL_MACHINE: return createVirtualMachine(); + case VmPackage.SHELL_INSTALLATION_STEP: return createShellInstallationStep(); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP: return createMavenArtifactInstallationStep(); + case VmPackage.HTTP_INSTALLATION_STEP: return createHttpInstallationStep(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public VirtualMachineService createVirtualMachineService() { + VirtualMachineServiceImpl virtualMachineService = new VirtualMachineServiceImpl(); + return virtualMachineService; + } + + /** + * + * + * @generated + */ + public VirtualMachineServiceInstance createVirtualMachineServiceInstance() { + VirtualMachineServiceInstanceImpl virtualMachineServiceInstance = new VirtualMachineServiceInstanceImpl(); + return virtualMachineServiceInstance; + } + + /** + * + * + * @generated + */ + public VirtualMachineServiceConfiguration createVirtualMachineServiceConfiguration() { + VirtualMachineServiceConfigurationImpl virtualMachineServiceConfiguration = new VirtualMachineServiceConfigurationImpl(); + return virtualMachineServiceConfiguration; + } + + /** + * + * + * @generated + */ + public VirtualMachineServiceDescriptor createVirtualMachineServiceDescriptor() { + VirtualMachineServiceDescriptorImpl virtualMachineServiceDescriptor = new VirtualMachineServiceDescriptorImpl(); + return virtualMachineServiceDescriptor; + } + + /** + * + * + * @generated + */ + public PhysicalMachine createPhysicalMachine() { + PhysicalMachineImpl physicalMachine = new PhysicalMachineImpl(); + return physicalMachine; + } + + /** + * + * + * @generated + */ + public VirtualMachine createVirtualMachine() { + VirtualMachineImpl virtualMachine = new VirtualMachineImpl(); + return virtualMachine; + } + + /** + * + * + * @generated + */ + public ShellInstallationStep createShellInstallationStep() { + ShellInstallationStepImpl shellInstallationStep = new ShellInstallationStepImpl(); + return shellInstallationStep; + } + + /** + * + * + * @generated + */ + public MavenArtifactInstallationStep createMavenArtifactInstallationStep() { + MavenArtifactInstallationStepImpl mavenArtifactInstallationStep = new MavenArtifactInstallationStepImpl(); + return mavenArtifactInstallationStep; + } + + /** + * + * + * @generated + */ + public HttpInstallationStep createHttpInstallationStep() { + HttpInstallationStepImpl httpInstallationStep = new HttpInstallationStepImpl(); + return httpInstallationStep; + } + + /** + * + * + * @generated + */ + public VmPackage getVmPackage() { + return (VmPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static VmPackage getPackage() { + return VmPackage.eINSTANCE; + } + +} //VmFactoryImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VmPackageImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VmPackageImpl.java new file mode 100644 index 0000000..2161eac --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VmPackageImpl.java @@ -0,0 +1,1050 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm.impl; + +import org.openecomp.dcae.controller.core.server.ServerPackage; +import org.openecomp.dcae.controller.core.service.ServicePackage; +import org.openecomp.dcae.controller.service.vm.HttpInstallationStep; +import org.openecomp.dcae.controller.service.vm.InstallationStep; +import org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep; +import org.openecomp.dcae.controller.service.vm.PhysicalMachine; +import org.openecomp.dcae.controller.service.vm.ShellInstallationStep; +import org.openecomp.dcae.controller.service.vm.VirtualMachine; +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; +import org.openecomp.dcae.controller.service.vm.VmFactory; +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.openecomp.ncomp.openstack.core.CorePackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class VmPackageImpl extends EPackageImpl implements VmPackage { + /** + * + * + * @generated + */ + private EClass virtualMachineServiceEClass = null; + + /** + * + * + * @generated + */ + private EClass virtualMachineServiceInstanceEClass = null; + + /** + * + * + * @generated + */ + private EClass virtualMachineServiceConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass virtualMachineServiceDescriptorEClass = null; + + /** + * + * + * @generated + */ + private EClass physicalMachineEClass = null; + + /** + * + * + * @generated + */ + private EClass virtualMachineEClass = null; + + /** + * + * + * @generated + */ + private EClass installationStepEClass = null; + + /** + * + * + * @generated + */ + private EClass shellInstallationStepEClass = null; + + /** + * + * + * @generated + */ + private EClass mavenArtifactInstallationStepEClass = null; + + /** + * + * + * @generated + */ + private EClass httpInstallationStepEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.vm.VmPackage#eNS_URI + * @see #init() + * @generated + */ + private VmPackageImpl() { + super(eNS_URI, VmFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link VmPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static VmPackage init() { + if (isInited) return (VmPackage)EPackage.Registry.INSTANCE.getEPackage(VmPackage.eNS_URI); + + // Obtain or create and register package + VmPackageImpl theVmPackage = (VmPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof VmPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new VmPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + ServicePackage.eINSTANCE.eClass(); + ServerPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theVmPackage.createPackageContents(); + + // Initialize created meta-data + theVmPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theVmPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(VmPackage.eNS_URI, theVmPackage); + return theVmPackage; + } + + /** + * + * + * @generated + */ + public EClass getVirtualMachineService() { + return virtualMachineServiceEClass; + } + + /** + * + * + * @generated + */ + public EReference getVirtualMachineService_Instances() { + return (EReference)virtualMachineServiceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineService_ManagerPortNumber() { + return (EAttribute)virtualMachineServiceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EOperation getVirtualMachineService__UpdateDeploymentStatus() { + return virtualMachineServiceEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EClass getVirtualMachineServiceInstance() { + return virtualMachineServiceInstanceEClass; + } + + /** + * + * + * @generated + */ + public EReference getVirtualMachineServiceInstance_Location() { + return (EReference)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getVirtualMachineServiceInstance_VmType() { + return (EReference)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getVirtualMachineServiceInstance_Users() { + return (EReference)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getVirtualMachineServiceInstance_AdminUsers() { + return (EReference)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_ApplicationIds() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_AdminId() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_NumberOfServers() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_AvailabilityZone() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_ManagerPortNumber() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EReference getVirtualMachineServiceInstance_Servers() { + return (EReference)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EReference getVirtualMachineServiceInstance_LeaderServer() { + return (EReference)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(10); + } + + /** + * + * + * @generated + */ + public EReference getVirtualMachineServiceInstance_Service() { + return (EReference)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(11); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_IedsAdmin() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(12); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_ChefUser() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(13); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_ChefOrg() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(14); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_ChefTopology() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(15); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_OpenstackFlavor() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(16); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_ServiceFqdn() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(17); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_DeploymentTimeoutMinutes() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(18); + } + + /** + * + * + * @generated + */ + public EReference getVirtualMachineServiceInstance_Steps() { + return (EReference)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(19); + } + + /** + * + * + * @generated + */ + public EClass getVirtualMachineServiceConfiguration() { + return virtualMachineServiceConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceConfiguration_Configuration() { + return (EAttribute)virtualMachineServiceConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getVirtualMachineServiceDescriptor() { + return virtualMachineServiceDescriptorEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_ServicePackage() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_ServiceClass() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_ServiceInstanceClass() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_VmType() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_ManagerPortNumber() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_ManagerUser() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_EncryptedPassword() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_Users() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_AdminUsers() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EClass getPhysicalMachine() { + return physicalMachineEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getPhysicalMachine_ManagerPortNumber() { + return (EAttribute)physicalMachineEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getVirtualMachine() { + return virtualMachineEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachine_FunctionIndex() { + return (EAttribute)virtualMachineEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachine_KvmName() { + return (EAttribute)virtualMachineEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachine_Vnc() { + return (EAttribute)virtualMachineEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getVirtualMachine_Gateway() { + return (EAttribute)virtualMachineEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getInstallationStep() { + return installationStepEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getInstallationStep_ApplicationId() { + return (EAttribute)installationStepEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getShellInstallationStep() { + return shellInstallationStepEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getShellInstallationStep_Command() { + return (EAttribute)shellInstallationStepEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getMavenArtifactInstallationStep() { + return mavenArtifactInstallationStepEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getMavenArtifactInstallationStep_GroupId() { + return (EAttribute)mavenArtifactInstallationStepEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getMavenArtifactInstallationStep_ArtifactId() { + return (EAttribute)mavenArtifactInstallationStepEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getMavenArtifactInstallationStep_Version() { + return (EAttribute)mavenArtifactInstallationStepEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getMavenArtifactInstallationStep_Type() { + return (EAttribute)mavenArtifactInstallationStepEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getMavenArtifactInstallationStep_AssemblyId() { + return (EAttribute)mavenArtifactInstallationStepEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getHttpInstallationStep() { + return httpInstallationStepEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getHttpInstallationStep_Url() { + return (EAttribute)httpInstallationStepEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getHttpInstallationStep_UserName() { + return (EAttribute)httpInstallationStepEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getHttpInstallationStep_Password() { + return (EAttribute)httpInstallationStepEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getHttpInstallationStep_Type() { + return (EAttribute)httpInstallationStepEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getHttpInstallationStep_ArtifactId() { + return (EAttribute)httpInstallationStepEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public VmFactory getVmFactory() { + return (VmFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + virtualMachineServiceEClass = createEClass(VIRTUAL_MACHINE_SERVICE); + createEReference(virtualMachineServiceEClass, VIRTUAL_MACHINE_SERVICE__INSTANCES); + createEAttribute(virtualMachineServiceEClass, VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER); + createEOperation(virtualMachineServiceEClass, VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS); + + virtualMachineServiceInstanceEClass = createEClass(VIRTUAL_MACHINE_SERVICE_INSTANCE); + createEReference(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION); + createEReference(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE); + createEReference(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS); + createEReference(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER); + createEReference(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS); + createEReference(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER); + createEReference(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES); + createEReference(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS); + + virtualMachineServiceConfigurationEClass = createEClass(VIRTUAL_MACHINE_SERVICE_CONFIGURATION); + createEAttribute(virtualMachineServiceConfigurationEClass, VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION); + + virtualMachineServiceDescriptorEClass = createEClass(VIRTUAL_MACHINE_SERVICE_DESCRIPTOR); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_PACKAGE); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_CLASS); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VM_TYPE); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_USER); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__USERS); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ADMIN_USERS); + + physicalMachineEClass = createEClass(PHYSICAL_MACHINE); + createEAttribute(physicalMachineEClass, PHYSICAL_MACHINE__MANAGER_PORT_NUMBER); + + virtualMachineEClass = createEClass(VIRTUAL_MACHINE); + createEAttribute(virtualMachineEClass, VIRTUAL_MACHINE__FUNCTION_INDEX); + createEAttribute(virtualMachineEClass, VIRTUAL_MACHINE__KVM_NAME); + createEAttribute(virtualMachineEClass, VIRTUAL_MACHINE__VNC); + createEAttribute(virtualMachineEClass, VIRTUAL_MACHINE__GATEWAY); + + installationStepEClass = createEClass(INSTALLATION_STEP); + createEAttribute(installationStepEClass, INSTALLATION_STEP__APPLICATION_ID); + + shellInstallationStepEClass = createEClass(SHELL_INSTALLATION_STEP); + createEAttribute(shellInstallationStepEClass, SHELL_INSTALLATION_STEP__COMMAND); + + mavenArtifactInstallationStepEClass = createEClass(MAVEN_ARTIFACT_INSTALLATION_STEP); + createEAttribute(mavenArtifactInstallationStepEClass, MAVEN_ARTIFACT_INSTALLATION_STEP__GROUP_ID); + createEAttribute(mavenArtifactInstallationStepEClass, MAVEN_ARTIFACT_INSTALLATION_STEP__ARTIFACT_ID); + createEAttribute(mavenArtifactInstallationStepEClass, MAVEN_ARTIFACT_INSTALLATION_STEP__VERSION); + createEAttribute(mavenArtifactInstallationStepEClass, MAVEN_ARTIFACT_INSTALLATION_STEP__TYPE); + createEAttribute(mavenArtifactInstallationStepEClass, MAVEN_ARTIFACT_INSTALLATION_STEP__ASSEMBLY_ID); + + httpInstallationStepEClass = createEClass(HTTP_INSTALLATION_STEP); + createEAttribute(httpInstallationStepEClass, HTTP_INSTALLATION_STEP__URL); + createEAttribute(httpInstallationStepEClass, HTTP_INSTALLATION_STEP__USER_NAME); + createEAttribute(httpInstallationStepEClass, HTTP_INSTALLATION_STEP__PASSWORD); + createEAttribute(httpInstallationStepEClass, HTTP_INSTALLATION_STEP__TYPE); + createEAttribute(httpInstallationStepEClass, HTTP_INSTALLATION_STEP__ARTIFACT_ID); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + ServicePackage theServicePackage = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + org.openecomp.ncomp.core.CorePackage theCorePackage_1 = (org.openecomp.ncomp.core.CorePackage)EPackage.Registry.INSTANCE.getEPackage(org.openecomp.ncomp.core.CorePackage.eNS_URI); + ServerPackage theServerPackage = (ServerPackage)EPackage.Registry.INSTANCE.getEPackage(ServerPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + virtualMachineServiceEClass.getESuperTypes().add(theServicePackage.getDcaeService()); + virtualMachineServiceInstanceEClass.getESuperTypes().add(theServicePackage.getDcaeServiceInstance()); + virtualMachineServiceInstanceEClass.getESuperTypes().add(this.getVirtualMachineServiceConfiguration()); + virtualMachineServiceDescriptorEClass.getESuperTypes().add(theServicePackage.getDcaeServiceDescriptor()); + physicalMachineEClass.getESuperTypes().add(theServerPackage.getDcaeBasicServer()); + virtualMachineEClass.getESuperTypes().add(theServerPackage.getDcaeBasicServer()); + installationStepEClass.getESuperTypes().add(theCorePackage_1.getNamedEntity()); + shellInstallationStepEClass.getESuperTypes().add(this.getInstallationStep()); + mavenArtifactInstallationStepEClass.getESuperTypes().add(this.getInstallationStep()); + httpInstallationStepEClass.getESuperTypes().add(this.getInstallationStep()); + + // Initialize classes, features, and operations; add parameters + initEClass(virtualMachineServiceEClass, VirtualMachineService.class, "VirtualMachineService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getVirtualMachineService_Instances(), this.getVirtualMachineServiceInstance(), this.getVirtualMachineServiceInstance_Service(), "instances", null, 0, -1, VirtualMachineService.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineService_ManagerPortNumber(), theEcorePackage.getEInt(), "managerPortNumber", "9999", 0, 1, VirtualMachineService.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getVirtualMachineService__UpdateDeploymentStatus(), null, "updateDeploymentStatus", 0, 1, !IS_UNIQUE, IS_ORDERED); + + initEClass(virtualMachineServiceInstanceEClass, VirtualMachineServiceInstance.class, "VirtualMachineServiceInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getVirtualMachineServiceInstance_Location(), theServicePackage.getDcaeLocation(), null, "location", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getVirtualMachineServiceInstance_VmType(), theCorePackage.getVirtualMachineType(), null, "vmType", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getVirtualMachineServiceInstance_Users(), theCorePackage_1.getUser(), null, "users", null, 0, -1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getVirtualMachineServiceInstance_AdminUsers(), theCorePackage_1.getUser(), null, "adminUsers", null, 0, -1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_ApplicationIds(), theEcorePackage.getEString(), "applicationIds", null, 0, -1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_AdminId(), theEcorePackage.getEString(), "adminId", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_NumberOfServers(), theEcorePackage.getEInt(), "numberOfServers", "1", 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_AvailabilityZone(), theEcorePackage.getEString(), "availabilityZone", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_ManagerPortNumber(), theEcorePackage.getEIntegerObject(), "managerPortNumber", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getVirtualMachineServiceInstance_Servers(), theServerPackage.getDcaeBasicServer(), null, "servers", null, 0, -1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getVirtualMachineServiceInstance_LeaderServer(), theServerPackage.getDcaeBasicServer(), null, "leaderServer", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getVirtualMachineServiceInstance_Service(), this.getVirtualMachineService(), this.getVirtualMachineService_Instances(), "service", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_IedsAdmin(), theEcorePackage.getEString(), "iedsAdmin", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_ChefUser(), theEcorePackage.getEString(), "chefUser", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_ChefOrg(), theEcorePackage.getEString(), "chefOrg", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_ChefTopology(), theEcorePackage.getEString(), "chefTopology", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_OpenstackFlavor(), theEcorePackage.getEString(), "openstackFlavor", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_ServiceFqdn(), theEcorePackage.getEString(), "serviceFqdn", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_DeploymentTimeoutMinutes(), theEcorePackage.getEInt(), "deploymentTimeoutMinutes", "90", 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getVirtualMachineServiceInstance_Steps(), this.getInstallationStep(), null, "steps", null, 0, -1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(virtualMachineServiceConfigurationEClass, VirtualMachineServiceConfiguration.class, "VirtualMachineServiceConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getVirtualMachineServiceConfiguration_Configuration(), theEcorePackage.getEString(), "configuration", null, 0, 1, VirtualMachineServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(virtualMachineServiceDescriptorEClass, VirtualMachineServiceDescriptor.class, "VirtualMachineServiceDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getVirtualMachineServiceDescriptor_ServicePackage(), theEcorePackage.getEString(), "servicePackage", null, 0, 1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceDescriptor_ServiceClass(), theEcorePackage.getEString(), "serviceClass", null, 0, 1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceDescriptor_ServiceInstanceClass(), theEcorePackage.getEString(), "serviceInstanceClass", null, 0, 1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceDescriptor_VmType(), theEcorePackage.getEString(), "vmType", null, 0, 1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceDescriptor_ManagerPortNumber(), theEcorePackage.getEString(), "managerPortNumber", null, 0, 1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceDescriptor_ManagerUser(), theEcorePackage.getEString(), "managerUser", null, 0, 1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceDescriptor_EncryptedPassword(), theEcorePackage.getEString(), "encryptedPassword", null, 0, 1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceDescriptor_Users(), theEcorePackage.getEString(), "users", null, 0, -1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceDescriptor_AdminUsers(), theEcorePackage.getEString(), "adminUsers", null, 0, -1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(physicalMachineEClass, PhysicalMachine.class, "PhysicalMachine", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getPhysicalMachine_ManagerPortNumber(), theEcorePackage.getEIntegerObject(), "managerPortNumber", null, 0, 1, PhysicalMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(virtualMachineEClass, VirtualMachine.class, "VirtualMachine", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getVirtualMachine_FunctionIndex(), theEcorePackage.getEInt(), "functionIndex", null, 0, 1, VirtualMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachine_KvmName(), theEcorePackage.getEString(), "kvmName", null, 0, 1, VirtualMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachine_Vnc(), theEcorePackage.getEString(), "vnc", null, 0, 1, VirtualMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachine_Gateway(), theEcorePackage.getEString(), "gateway", null, 0, 1, VirtualMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(installationStepEClass, InstallationStep.class, "InstallationStep", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getInstallationStep_ApplicationId(), theEcorePackage.getEString(), "applicationId", "dcae", 0, 1, InstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(shellInstallationStepEClass, ShellInstallationStep.class, "ShellInstallationStep", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getShellInstallationStep_Command(), theEcorePackage.getEString(), "command", null, 0, 1, ShellInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(mavenArtifactInstallationStepEClass, MavenArtifactInstallationStep.class, "MavenArtifactInstallationStep", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getMavenArtifactInstallationStep_GroupId(), theEcorePackage.getEString(), "groupId", null, 0, 1, MavenArtifactInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getMavenArtifactInstallationStep_ArtifactId(), theEcorePackage.getEString(), "artifactId", null, 0, 1, MavenArtifactInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getMavenArtifactInstallationStep_Version(), theEcorePackage.getEString(), "version", null, 0, 1, MavenArtifactInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getMavenArtifactInstallationStep_Type(), theEcorePackage.getEString(), "type", null, 0, 1, MavenArtifactInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getMavenArtifactInstallationStep_AssemblyId(), theEcorePackage.getEString(), "assemblyId", null, 0, 1, MavenArtifactInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(httpInstallationStepEClass, HttpInstallationStep.class, "HttpInstallationStep", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getHttpInstallationStep_Url(), theEcorePackage.getEString(), "url", null, 0, 1, HttpInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getHttpInstallationStep_UserName(), theEcorePackage.getEString(), "userName", null, 0, 1, HttpInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getHttpInstallationStep_Password(), theEcorePackage.getEString(), "password", null, 0, 1, HttpInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getHttpInstallationStep_Type(), theEcorePackage.getEString(), "type", null, 0, 1, HttpInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getHttpInstallationStep_ArtifactId(), theEcorePackage.getEString(), "artifactId", null, 0, 1, HttpInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + // http://openecomp.org + createEcompAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "ecomp", "http://openecomp.org" + }); + } + + /** + * Initializes the annotations for http://openecomp.org. + * + * + * @generated + */ + protected void createEcompAnnotations() { + String source = "http://openecomp.org"; + addAnnotation + (getVirtualMachineService_ManagerPortNumber(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getVirtualMachineServiceInstance_VmType(), + source, + new String[] { + "type", "service" + }); + addAnnotation + (getVirtualMachineServiceInstance_Users(), + source, + new String[] { + "type", "service" + }); + addAnnotation + (getVirtualMachineServiceInstance_AdminUsers(), + source, + new String[] { + "type", "service" + }); + addAnnotation + (getVirtualMachineServiceInstance_NumberOfServers(), + source, + new String[] { + "type", "service" + }); + addAnnotation + (getVirtualMachineServiceInstance_AvailabilityZone(), + source, + new String[] { + "type", "service" + }); + addAnnotation + (getVirtualMachineServiceInstance_ManagerPortNumber(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getVirtualMachineServiceInstance_Servers(), + source, + new String[] { + "type", "operational" + }); + addAnnotation + (getVirtualMachineServiceInstance_Service(), + source, + new String[] { + "type", "operational" + }); + addAnnotation + (getVirtualMachineServiceConfiguration_Configuration(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getPhysicalMachine_ManagerPortNumber(), + source, + new String[] { + "type", "configuration" + }); + } + +} //VmPackageImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/util/VmAdapterFactory.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/util/VmAdapterFactory.java new file mode 100644 index 0000000..e7818a4 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/util/VmAdapterFactory.java @@ -0,0 +1,440 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm.util; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; + +import org.openecomp.dcae.controller.core.service.DcaeService; + +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; +import org.openecomp.dcae.controller.service.vm.*; + +import org.openecomp.ncomp.core.HasOperationalState; +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.logs.LogMessageContainer; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage + * @generated + */ +public class VmAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static VmPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public VmAdapterFactory() { + if (modelPackage == null) { + modelPackage = VmPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected VmSwitch modelSwitch = + new VmSwitch() { + @Override + public Adapter caseVirtualMachineService(VirtualMachineService object) { + return createVirtualMachineServiceAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceInstance(VirtualMachineServiceInstance object) { + return createVirtualMachineServiceInstanceAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceConfiguration(VirtualMachineServiceConfiguration object) { + return createVirtualMachineServiceConfigurationAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceDescriptor(VirtualMachineServiceDescriptor object) { + return createVirtualMachineServiceDescriptorAdapter(); + } + @Override + public Adapter casePhysicalMachine(PhysicalMachine object) { + return createPhysicalMachineAdapter(); + } + @Override + public Adapter caseVirtualMachine(VirtualMachine object) { + return createVirtualMachineAdapter(); + } + @Override + public Adapter caseInstallationStep(InstallationStep object) { + return createInstallationStepAdapter(); + } + @Override + public Adapter caseShellInstallationStep(ShellInstallationStep object) { + return createShellInstallationStepAdapter(); + } + @Override + public Adapter caseMavenArtifactInstallationStep(MavenArtifactInstallationStep object) { + return createMavenArtifactInstallationStepAdapter(); + } + @Override + public Adapter caseHttpInstallationStep(HttpInstallationStep object) { + return createHttpInstallationStepAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseDcaeService(DcaeService object) { + return createDcaeServiceAdapter(); + } + @Override + public Adapter caseDcaeServiceInstance(DcaeServiceInstance object) { + return createDcaeServiceInstanceAdapter(); + } + @Override + public Adapter caseDcaeServiceDescriptor(DcaeServiceDescriptor object) { + return createDcaeServiceDescriptorAdapter(); + } + @Override + public Adapter caseHasOperationalState(HasOperationalState object) { + return createHasOperationalStateAdapter(); + } + @Override + public Adapter caseLogMessageContainer(LogMessageContainer object) { + return createLogMessageContainerAdapter(); + } + @Override + public Adapter caseDcaeBasicServer(DcaeBasicServer object) { + return createDcaeBasicServerAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService Virtual Machine Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService + * @generated + */ + public Adapter createVirtualMachineServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance Virtual Machine Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance + * @generated + */ + public Adapter createVirtualMachineServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration Virtual Machine Service Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration + * @generated + */ + public Adapter createVirtualMachineServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor Virtual Machine Service Descriptor}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor + * @generated + */ + public Adapter createVirtualMachineServiceDescriptorAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.PhysicalMachine Physical Machine}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.PhysicalMachine + * @generated + */ + public Adapter createPhysicalMachineAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine Virtual Machine}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachine + * @generated + */ + public Adapter createVirtualMachineAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.InstallationStep Installation Step}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.InstallationStep + * @generated + */ + public Adapter createInstallationStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.ShellInstallationStep Shell Installation Step}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.ShellInstallationStep + * @generated + */ + public Adapter createShellInstallationStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep Maven Artifact Installation Step}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep + * @generated + */ + public Adapter createMavenArtifactInstallationStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep Http Installation Step}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.HttpInstallationStep + * @generated + */ + public Adapter createHttpInstallationStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeService Dcae Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeService + * @generated + */ + public Adapter createDcaeServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance Dcae Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance + * @generated + */ + public Adapter createDcaeServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor Dcae Service Descriptor}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor + * @generated + */ + public Adapter createDcaeServiceDescriptorAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.HasOperationalState Has Operational State}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.HasOperationalState + * @generated + */ + public Adapter createHasOperationalStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.logs.LogMessageContainer Log Message Container}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.logs.LogMessageContainer + * @generated + */ + public Adapter createLogMessageContainerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer Dcae Basic Server}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer + * @generated + */ + public Adapter createDcaeBasicServerAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //VmAdapterFactory diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/util/VmSwitch.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/util/VmSwitch.java new file mode 100644 index 0000000..a8baa5a --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/util/VmSwitch.java @@ -0,0 +1,458 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vm.util; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; + +import org.openecomp.dcae.controller.core.service.DcaeService; + +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; +import org.openecomp.dcae.controller.service.vm.*; + +import org.openecomp.ncomp.core.HasOperationalState; +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.logs.LogMessageContainer; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage + * @generated + */ +public class VmSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static VmPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public VmSwitch() { + if (modelPackage == null) { + modelPackage = VmPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE: { + VirtualMachineService virtualMachineService = (VirtualMachineService)theEObject; + T result = caseVirtualMachineService(virtualMachineService); + if (result == null) result = caseDcaeService(virtualMachineService); + if (result == null) result = caseNamedEntity(virtualMachineService); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE: { + VirtualMachineServiceInstance virtualMachineServiceInstance = (VirtualMachineServiceInstance)theEObject; + T result = caseVirtualMachineServiceInstance(virtualMachineServiceInstance); + if (result == null) result = caseDcaeServiceInstance(virtualMachineServiceInstance); + if (result == null) result = caseVirtualMachineServiceConfiguration(virtualMachineServiceInstance); + if (result == null) result = caseNamedEntity(virtualMachineServiceInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION: { + VirtualMachineServiceConfiguration virtualMachineServiceConfiguration = (VirtualMachineServiceConfiguration)theEObject; + T result = caseVirtualMachineServiceConfiguration(virtualMachineServiceConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR: { + VirtualMachineServiceDescriptor virtualMachineServiceDescriptor = (VirtualMachineServiceDescriptor)theEObject; + T result = caseVirtualMachineServiceDescriptor(virtualMachineServiceDescriptor); + if (result == null) result = caseDcaeServiceDescriptor(virtualMachineServiceDescriptor); + if (result == null) result = caseNamedEntity(virtualMachineServiceDescriptor); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.PHYSICAL_MACHINE: { + PhysicalMachine physicalMachine = (PhysicalMachine)theEObject; + T result = casePhysicalMachine(physicalMachine); + if (result == null) result = caseDcaeBasicServer(physicalMachine); + if (result == null) result = caseNamedEntity(physicalMachine); + if (result == null) result = caseHasOperationalState(physicalMachine); + if (result == null) result = caseLogMessageContainer(physicalMachine); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.VIRTUAL_MACHINE: { + VirtualMachine virtualMachine = (VirtualMachine)theEObject; + T result = caseVirtualMachine(virtualMachine); + if (result == null) result = caseDcaeBasicServer(virtualMachine); + if (result == null) result = caseNamedEntity(virtualMachine); + if (result == null) result = caseHasOperationalState(virtualMachine); + if (result == null) result = caseLogMessageContainer(virtualMachine); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.INSTALLATION_STEP: { + InstallationStep installationStep = (InstallationStep)theEObject; + T result = caseInstallationStep(installationStep); + if (result == null) result = caseNamedEntity(installationStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.SHELL_INSTALLATION_STEP: { + ShellInstallationStep shellInstallationStep = (ShellInstallationStep)theEObject; + T result = caseShellInstallationStep(shellInstallationStep); + if (result == null) result = caseInstallationStep(shellInstallationStep); + if (result == null) result = caseNamedEntity(shellInstallationStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP: { + MavenArtifactInstallationStep mavenArtifactInstallationStep = (MavenArtifactInstallationStep)theEObject; + T result = caseMavenArtifactInstallationStep(mavenArtifactInstallationStep); + if (result == null) result = caseInstallationStep(mavenArtifactInstallationStep); + if (result == null) result = caseNamedEntity(mavenArtifactInstallationStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.HTTP_INSTALLATION_STEP: { + HttpInstallationStep httpInstallationStep = (HttpInstallationStep)theEObject; + T result = caseHttpInstallationStep(httpInstallationStep); + if (result == null) result = caseInstallationStep(httpInstallationStep); + if (result == null) result = caseNamedEntity(httpInstallationStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineService(VirtualMachineService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineServiceInstance(VirtualMachineServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineServiceConfiguration(VirtualMachineServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service Descriptor'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service Descriptor'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineServiceDescriptor(VirtualMachineServiceDescriptor object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Physical Machine'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Physical Machine'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePhysicalMachine(PhysicalMachine object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachine(VirtualMachine object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Installation Step'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Installation Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseInstallationStep(InstallationStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Shell Installation Step'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Shell Installation Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseShellInstallationStep(ShellInstallationStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Maven Artifact Installation Step'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Maven Artifact Installation Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMavenArtifactInstallationStep(MavenArtifactInstallationStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Http Installation Step'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Http Installation Step'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseHttpInstallationStep(HttpInstallationStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeService(DcaeService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceInstance(DcaeServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service Descriptor'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service Descriptor'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceDescriptor(DcaeServiceDescriptor object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Has Operational State'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Has Operational State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseHasOperationalState(HasOperationalState object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Log Message Container'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Log Message Container'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLogMessageContainer(LogMessageContainer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Basic Server'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Basic Server'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeBasicServer(DcaeBasicServer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //VmSwitch diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VirtualMachineManager.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VirtualMachineManager.java new file mode 100644 index 0000000..ec06281 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VirtualMachineManager.java @@ -0,0 +1,40 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vmmanager; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + +/** + * + * A representation of the model object 'Virtual Machine Manager'. + * + * + * + * @see org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage#getVirtualMachineManager() + * @model + * @generated + */ +public interface VirtualMachineManager extends DcaeManager, AbstractManagementServer { +} // VirtualMachineManager diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VmmanagerFactory.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VmmanagerFactory.java new file mode 100644 index 0000000..823a4b1 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VmmanagerFactory.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vmmanager; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage + * @generated + */ +public interface VmmanagerFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + VmmanagerFactory eINSTANCE = org.openecomp.dcae.controller.service.vmmanager.impl.VmmanagerFactoryImpl.init(); + + /** + * Returns a new object of class 'Virtual Machine Manager'. + * + * + * @return a new object of class 'Virtual Machine Manager'. + * @generated + */ + VirtualMachineManager createVirtualMachineManager(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + VmmanagerPackage getVmmanagerPackage(); + +} //VmmanagerFactory diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VmmanagerPackage.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VmmanagerPackage.java new file mode 100644 index 0000000..ebb15f5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VmmanagerPackage.java @@ -0,0 +1,336 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vmmanager; + +import org.openecomp.dcae.controller.core.manager.ManagerPackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *

    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.vmmanager.VmmanagerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-vm-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org'" + * @generated + */ +public interface VmmanagerPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "vmmanager"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.vmmanager"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "vmmanager"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + VmmanagerPackage eINSTANCE = org.openecomp.dcae.controller.service.vmmanager.impl.VmmanagerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl Virtual Machine Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl + * @see org.openecomp.dcae.controller.service.vmmanager.impl.VmmanagerPackageImpl#getVirtualMachineManager() + * @generated + */ + int VIRTUAL_MACHINE_MANAGER = 0; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER__INPUT_STREAMS = ManagerPackage.DCAE_MANAGER__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER__OUTPUT_STREAMS = ManagerPackage.DCAE_MANAGER__OUTPUT_STREAMS; + + /** + * The feature id for the 'Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER__CONFIGURATION = ManagerPackage.DCAE_MANAGER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Component' containment reference. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER__COMPONENT = ManagerPackage.DCAE_MANAGER_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Virtual Machine Manager' class. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT = ManagerPackage.DCAE_MANAGER_FEATURE_COUNT + 2; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___TEST = ManagerPackage.DCAE_MANAGER___TEST; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___SUSPEND = ManagerPackage.DCAE_MANAGER___SUSPEND; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___RESUME = ManagerPackage.DCAE_MANAGER___RESUME; + + /** + * The operation id for the 'Public Key' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___PUBLIC_KEY = ManagerPackage.DCAE_MANAGER___PUBLIC_KEY; + + /** + * The operation id for the 'Configuration Changed' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___CONFIGURATION_CHANGED = ManagerPackage.DCAE_MANAGER___CONFIGURATION_CHANGED; + + /** + * The operation id for the 'Update Streams' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___UPDATE_STREAMS__ELIST_ELIST = ManagerPackage.DCAE_MANAGER___UPDATE_STREAMS__ELIST_ELIST; + + /** + * The operation id for the 'Logs' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___LOGS__JSONOBJECT_ELIST = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 0; + + /** + * The operation id for the 'Metrics' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___METRICS__JSONOBJECT_ELIST = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 1; + + /** + * The operation id for the 'Properties' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___PROPERTIES__JSONOBJECT_ELIST = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 2; + + /** + * The operation id for the 'Upload Info' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 3; + + /** + * The operation id for the 'Get Values' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 4; + + /** + * The operation id for the 'Get Values All' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 5; + + /** + * The operation id for the 'Get Messages' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 6; + + /** + * The operation id for the 'Get Request Logger' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 7; + + /** + * The operation id for the 'Evaluate' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___EVALUATE__STRING_FUNCTION = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 8; + + /** + * The operation id for the 'Update' operation. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___UPDATE__STRING_FUNCTION = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 9; + + /** + * The number of operations of the 'Virtual Machine Manager' class. + * + * + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 10; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager Virtual Machine Manager}'. + * + * + * @return the meta object for class 'Virtual Machine Manager'. + * @see org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager + * @generated + */ + EClass getVirtualMachineManager(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + VmmanagerFactory getVmmanagerFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl Virtual Machine Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl + * @see org.openecomp.dcae.controller.service.vmmanager.impl.VmmanagerPackageImpl#getVirtualMachineManager() + * @generated + */ + EClass VIRTUAL_MACHINE_MANAGER = eINSTANCE.getVirtualMachineManager(); + + } + +} //VmmanagerPackage diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VirtualMachineManagerImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VirtualMachineManagerImpl.java new file mode 100644 index 0000000..0eef01d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VirtualMachineManagerImpl.java @@ -0,0 +1,515 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vmmanager.impl; + +import org.openecomp.dcae.controller.core.manager.impl.DcaeManagerImpl; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; + +import org.openecomp.ncomp.component.Component; +import org.openecomp.ncomp.core.function.Function; +import org.openecomp.ncomp.core.function.ValuePair; +import org.openecomp.ncomp.core.logs.LogMessage; +import org.openecomp.ncomp.core.metrics.DoubleMetric; +import org.openecomp.ncomp.core.metrics.Metric; +import org.openecomp.ncomp.core.metrics.MetricValueOption; +import org.openecomp.ncomp.sirius.manager.properties.AbstractProperty; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration; +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; +import org.openecomp.ncomp.sirius.manager.server.ManagementInfo; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; +import java.lang.reflect.InvocationTargetException; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.json.JSONObject; + +/** + * + * An implementation of the model object 'Virtual Machine Manager'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl#getConfiguration Configuration}
  • + *
  • {@link org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl#getComponent Component}
  • + *
+ *

+ * + * @generated + */ +public class VirtualMachineManagerImpl extends DcaeManagerImpl implements VirtualMachineManager { + /** + * The cached value of the '{@link #getConfiguration() Configuration}' containment reference. + * + * + * @see #getConfiguration() + * @generated + * @ordered + */ + protected AbstractManagementServerConfiguration configuration; + /** + * The cached value of the '{@link #getComponent() Component}' containment reference. + * + * + * @see #getComponent() + * @generated + * @ordered + */ + protected Component component; + + /** + * + * + * @generated + */ + protected VirtualMachineManagerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmmanagerPackage.Literals.VIRTUAL_MACHINE_MANAGER; + } + + /** + * + * + * @generated + */ + public AbstractManagementServerConfiguration getConfiguration() { + return configuration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetConfiguration(AbstractManagementServerConfiguration newConfiguration, NotificationChain msgs) { + AbstractManagementServerConfiguration oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION, oldConfiguration, newConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setConfiguration(AbstractManagementServerConfiguration newConfiguration) { + if (newConfiguration != configuration) { + NotificationChain msgs = null; + if (configuration != null) + msgs = ((InternalEObject)configuration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION, null, msgs); + if (newConfiguration != null) + msgs = ((InternalEObject)newConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION, null, msgs); + msgs = basicSetConfiguration(newConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION, newConfiguration, newConfiguration)); + } + + /** + * + * + * @generated + */ + public Component getComponent() { + return component; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetComponent(Component newComponent, NotificationChain msgs) { + Component oldComponent = component; + component = newComponent; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT, oldComponent, newComponent); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setComponent(Component newComponent) { + if (newComponent != component) { + NotificationChain msgs = null; + if (component != null) + msgs = ((InternalEObject)component).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT, null, msgs); + if (newComponent != null) + msgs = ((InternalEObject)newComponent).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT, null, msgs); + msgs = basicSetComponent(newComponent, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT, newComponent, newComponent)); + } + + /** + * + * + * @generated + */ + public EList getValues(JSONObject cx, String path, Long start, Long end, MetricValueOption option, boolean relativeInterval) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EList getValuesAll(JSONObject cx, String path, EList metrics, Long start, Long end, MetricValueOption option, boolean relativeInterval) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EList getMessages(JSONObject cx, String path, Long start, Long end) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public LoggerInfo getRequestLogger(String userName, String action, String resourcePath, JSONObject context) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EList evaluate(String path, Function function) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void update(String path, Function function) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void uploadInfo(JSONObject cx, EList info) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void logs(JSONObject cx, EList logs) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void metrics(JSONObject cx, EList metrics) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void properties(JSONObject cx, EList l) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION: + return basicSetConfiguration(null, msgs); + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT: + return basicSetComponent(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION: + return getConfiguration(); + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT: + return getComponent(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION: + setConfiguration((AbstractManagementServerConfiguration)newValue); + return; + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT: + setComponent((Component)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION: + setConfiguration((AbstractManagementServerConfiguration)null); + return; + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT: + setComponent((Component)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION: + return configuration != null; + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT: + return component != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == SouthBoundApi.class) { + switch (derivedFeatureID) { + default: return -1; + } + } + if (baseClass == SouthBoundApiWithProxy.class) { + switch (derivedFeatureID) { + default: return -1; + } + } + if (baseClass == AbstractManagementServer.class) { + switch (derivedFeatureID) { + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION: return ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION; + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT: return ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == SouthBoundApi.class) { + switch (baseFeatureID) { + default: return -1; + } + } + if (baseClass == SouthBoundApiWithProxy.class) { + switch (baseFeatureID) { + default: return -1; + } + } + if (baseClass == AbstractManagementServer.class) { + switch (baseFeatureID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedOperationID(int baseOperationID, Class baseClass) { + if (baseClass == SouthBoundApi.class) { + switch (baseOperationID) { + case ServerPackage.SOUTH_BOUND_API___LOGS__JSONOBJECT_ELIST: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___LOGS__JSONOBJECT_ELIST; + case ServerPackage.SOUTH_BOUND_API___METRICS__JSONOBJECT_ELIST: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___METRICS__JSONOBJECT_ELIST; + case ServerPackage.SOUTH_BOUND_API___PROPERTIES__JSONOBJECT_ELIST: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___PROPERTIES__JSONOBJECT_ELIST; + default: return -1; + } + } + if (baseClass == SouthBoundApiWithProxy.class) { + switch (baseOperationID) { + case ServerPackage.SOUTH_BOUND_API_WITH_PROXY___UPLOAD_INFO__JSONOBJECT_ELIST: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST; + default: return -1; + } + } + if (baseClass == AbstractManagementServer.class) { + switch (baseOperationID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___EVALUATE__STRING_FUNCTION: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___EVALUATE__STRING_FUNCTION; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___UPDATE__STRING_FUNCTION: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE__STRING_FUNCTION; + default: return -1; + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + @SuppressWarnings("unchecked") + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN: + return getValues((JSONObject)arguments.get(0), (String)arguments.get(1), (Long)arguments.get(2), (Long)arguments.get(3), (MetricValueOption)arguments.get(4), (Boolean)arguments.get(5)); + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN: + return getValuesAll((JSONObject)arguments.get(0), (String)arguments.get(1), (EList)arguments.get(2), (Long)arguments.get(3), (Long)arguments.get(4), (MetricValueOption)arguments.get(5), (Boolean)arguments.get(6)); + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG: + return getMessages((JSONObject)arguments.get(0), (String)arguments.get(1), (Long)arguments.get(2), (Long)arguments.get(3)); + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT: + return getRequestLogger((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (JSONObject)arguments.get(3)); + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___EVALUATE__STRING_FUNCTION: + return evaluate((String)arguments.get(0), (Function)arguments.get(1)); + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE__STRING_FUNCTION: + update((String)arguments.get(0), (Function)arguments.get(1)); + return null; + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST: + uploadInfo((JSONObject)arguments.get(0), (EList)arguments.get(1)); + return null; + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___LOGS__JSONOBJECT_ELIST: + logs((JSONObject)arguments.get(0), (EList)arguments.get(1)); + return null; + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___METRICS__JSONOBJECT_ELIST: + metrics((JSONObject)arguments.get(0), (EList)arguments.get(1)); + return null; + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___PROPERTIES__JSONOBJECT_ELIST: + properties((JSONObject)arguments.get(0), (EList)arguments.get(1)); + return null; + } + return super.eInvoke(operationID, arguments); + } + +} //VirtualMachineManagerImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VmmanagerFactoryImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VmmanagerFactoryImpl.java new file mode 100644 index 0000000..6c457f2 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VmmanagerFactoryImpl.java @@ -0,0 +1,116 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vmmanager.impl; + +import org.openecomp.dcae.controller.service.vmmanager.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class VmmanagerFactoryImpl extends EFactoryImpl implements VmmanagerFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static VmmanagerFactory init() { + try { + VmmanagerFactory theVmmanagerFactory = (VmmanagerFactory)EPackage.Registry.INSTANCE.getEFactory(VmmanagerPackage.eNS_URI); + if (theVmmanagerFactory != null) { + return theVmmanagerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new VmmanagerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public VmmanagerFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER: return createVirtualMachineManager(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public VirtualMachineManager createVirtualMachineManager() { + VirtualMachineManagerImpl virtualMachineManager = new VirtualMachineManagerImpl(); + return virtualMachineManager; + } + + /** + * + * + * @generated + */ + public VmmanagerPackage getVmmanagerPackage() { + return (VmmanagerPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static VmmanagerPackage getPackage() { + return VmmanagerPackage.eINSTANCE; + } + +} //VmmanagerFactoryImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VmmanagerPackageImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VmmanagerPackageImpl.java new file mode 100644 index 0000000..3c01a4e --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VmmanagerPackageImpl.java @@ -0,0 +1,219 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vmmanager.impl; + +import org.openecomp.dcae.controller.core.manager.ManagerPackage; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerFactory; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; + +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class VmmanagerPackageImpl extends EPackageImpl implements VmmanagerPackage { + /** + * + * + * @generated + */ + private EClass virtualMachineManagerEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage#eNS_URI + * @see #init() + * @generated + */ + private VmmanagerPackageImpl() { + super(eNS_URI, VmmanagerFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link VmmanagerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static VmmanagerPackage init() { + if (isInited) return (VmmanagerPackage)EPackage.Registry.INSTANCE.getEPackage(VmmanagerPackage.eNS_URI); + + // Obtain or create and register package + VmmanagerPackageImpl theVmmanagerPackage = (VmmanagerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof VmmanagerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new VmmanagerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + ServerPackage.eINSTANCE.eClass(); + ManagerPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theVmmanagerPackage.createPackageContents(); + + // Initialize created meta-data + theVmmanagerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theVmmanagerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(VmmanagerPackage.eNS_URI, theVmmanagerPackage); + return theVmmanagerPackage; + } + + /** + * + * + * @generated + */ + public EClass getVirtualMachineManager() { + return virtualMachineManagerEClass; + } + + /** + * + * + * @generated + */ + public VmmanagerFactory getVmmanagerFactory() { + return (VmmanagerFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + virtualMachineManagerEClass = createEClass(VIRTUAL_MACHINE_MANAGER); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + ManagerPackage theManagerPackage = (ManagerPackage)EPackage.Registry.INSTANCE.getEPackage(ManagerPackage.eNS_URI); + ServerPackage theServerPackage = (ServerPackage)EPackage.Registry.INSTANCE.getEPackage(ServerPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + virtualMachineManagerEClass.getESuperTypes().add(theManagerPackage.getDcaeManager()); + virtualMachineManagerEClass.getESuperTypes().add(theServerPackage.getAbstractManagementServer()); + + // Initialize classes, features, and operations; add parameters + initEClass(virtualMachineManagerEClass, VirtualMachineManager.class, "VirtualMachineManager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "ecomp", "http://openecomp.org" + }); + } + +} //VmmanagerPackageImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/util/VmmanagerAdapterFactory.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/util/VmmanagerAdapterFactory.java new file mode 100644 index 0000000..2be21cd --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/util/VmmanagerAdapterFactory.java @@ -0,0 +1,218 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vmmanager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.vmmanager.*; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage + * @generated + */ +public class VmmanagerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static VmmanagerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public VmmanagerAdapterFactory() { + if (modelPackage == null) { + modelPackage = VmmanagerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected VmmanagerSwitch modelSwitch = + new VmmanagerSwitch() { + @Override + public Adapter caseVirtualMachineManager(VirtualMachineManager object) { + return createVirtualMachineManagerAdapter(); + } + @Override + public Adapter caseDcaeManager(DcaeManager object) { + return createDcaeManagerAdapter(); + } + @Override + public Adapter caseSouthBoundApi(SouthBoundApi object) { + return createSouthBoundApiAdapter(); + } + @Override + public Adapter caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return createSouthBoundApiWithProxyAdapter(); + } + @Override + public Adapter caseAbstractManagementServer(AbstractManagementServer object) { + return createAbstractManagementServerAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager Virtual Machine Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager + * @generated + */ + public Adapter createVirtualMachineManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.manager.DcaeManager Dcae Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager + * @generated + */ + public Adapter createDcaeManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApi South Bound Api}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApi + * @generated + */ + public Adapter createSouthBoundApiAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy South Bound Api With Proxy}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy + * @generated + */ + public Adapter createSouthBoundApiWithProxyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer Abstract Management Server}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer + * @generated + */ + public Adapter createAbstractManagementServerAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //VmmanagerAdapterFactory diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/util/VmmanagerSwitch.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/util/VmmanagerSwitch.java new file mode 100644 index 0000000..afcc7b5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/util/VmmanagerSwitch.java @@ -0,0 +1,200 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.vmmanager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.vmmanager.*; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage + * @generated + */ +public class VmmanagerSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static VmmanagerPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public VmmanagerSwitch() { + if (modelPackage == null) { + modelPackage = VmmanagerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER: { + VirtualMachineManager virtualMachineManager = (VirtualMachineManager)theEObject; + T result = caseVirtualMachineManager(virtualMachineManager); + if (result == null) result = caseDcaeManager(virtualMachineManager); + if (result == null) result = caseAbstractManagementServer(virtualMachineManager); + if (result == null) result = caseSouthBoundApiWithProxy(virtualMachineManager); + if (result == null) result = caseSouthBoundApi(virtualMachineManager); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineManager(VirtualMachineManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeManager(DcaeManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'South Bound Api'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'South Bound Api'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApi(SouthBoundApi object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'South Bound Api With Proxy'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'South Bound Api With Proxy'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Abstract Management Server'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Abstract Management Server'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAbstractManagementServer(AbstractManagementServer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //VmmanagerSwitch diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore/manager.xcore b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore/manager.xcore new file mode 100644 index 0000000..5306afe --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore/manager.xcore @@ -0,0 +1,34 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +@GenModel(modelDirectory="/dcae-controller-service-vm-model/src/main/xcore-gen") +package org.openecomp.dcae.controller.service.vmmanager + +import org.openecomp.dcae.controller.core.manager.DcaeManager +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer + +annotation "http://openecomp.org" as ecomp + +// correspond to a BsaApplication +class VirtualMachineManager extends DcaeManager, AbstractManagementServer { +} + diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore/service.xcore b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore/service.xcore new file mode 100644 index 0000000..44dea74 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore/service.xcore @@ -0,0 +1,132 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +@GenModel(modelDirectory="/dcae-controller-service-vm-model/src/main/xcore-gen") +package org.openecomp.dcae.controller.service.vm + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer +import org.openecomp.dcae.controller.core.service.DcaeLocation +import org.openecomp.dcae.controller.core.service.DcaeService +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance +import org.openecomp.ncomp.core.User +import org.openecomp.ncomp.openstack.core.VirtualMachineType +import org.openecomp.ncomp.core.NamedEntity + +annotation "http://openecomp.org" as ecomp + +// correspond to a BsaApplication +class VirtualMachineService extends DcaeService { + contains VirtualMachineServiceInstance[] instances opposite service + @ecomp(^type = "configuration") + int managerPortNumber = "9999" + op void updateDeploymentStatus() +} + +class VirtualMachineServiceInstance extends DcaeServiceInstance, VirtualMachineServiceConfiguration { + refers DcaeLocation location + @ecomp(^type = "service") + refers VirtualMachineType vmType + @ecomp(^type = "service") + refers User[] users + @ecomp(^type = "service") + refers User[] adminUsers + String[] applicationIds + String adminId + @ecomp(^type = "service") + int numberOfServers = "1" + @ecomp(^type = "service") + String availabilityZone + @ecomp(^type = "configuration") + Integer managerPortNumber + // @ecomp(^type = "operational") + // contains SecurityRule[] incomingSecurityRules + // @ecomp(^type = "operational") + // contains SecurityRule[] outboundSecurityRules + @ecomp(^type = "operational") + contains DcaeBasicServer[] servers + refers DcaeBasicServer leaderServer + @ecomp(^type = "operational") + refers VirtualMachineService service opposite instances + String iedsAdmin + String chefUser + String chefOrg + String chefTopology + String openstackFlavor + String serviceFqdn + int deploymentTimeoutMinutes = "90" + contains InstallationStep[] steps +} + +class VirtualMachineServiceConfiguration { + @ecomp(^type = "configuration") + String configuration +} + +class VirtualMachineServiceDescriptor extends DcaeServiceDescriptor { + String servicePackage // "org.openecomp.dcae.controller.service.sample.sdnl.service", + String serviceClass // "ControllerServiceSampleSdnlService", + String serviceInstanceClass // "ControllerServiceSampleSdnlServiceInstance", + String vmType // "sample-sdnl", + String managerPortNumber // "9996", + String managerUser // "console", + String encryptedPassword // "rsa:asfdsf" + String[] users + String[] adminUsers +} + +class PhysicalMachine extends DcaeBasicServer { + @ecomp(^type = "configuration") + Integer managerPortNumber +} + +class VirtualMachine extends DcaeBasicServer { + int functionIndex + String kvmName + String vnc // 1.2.3.4:4005 IP:PORT + String gateway +} + +abstract class InstallationStep extends NamedEntity { + String applicationId = "dcae" +} + +class ShellInstallationStep extends InstallationStep { + String command +} + +class MavenArtifactInstallationStep extends InstallationStep { + String groupId + String artifactId + String version + String ^type + String assemblyId +} + +class HttpInstallationStep extends InstallationStep { + String url + String userName + String password + String ^type + String artifactId +} + diff --git a/dcae-controller-service-vm/pom.xml b/dcae-controller-service-vm/pom.xml new file mode 100644 index 0000000..fd6822c --- /dev/null +++ b/dcae-controller-service-vm/pom.xml @@ -0,0 +1,86 @@ + + 4.0.0 + + org.openecomp.dcae.controller + dcae-controller-service-vm + 0.1.0-SNAPSHOT + pom + + + UTF-8 + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + + + + + dcae-controller-service-vm-model + dcae-controller-service-vm-adaptor + + dcae-controller-service-common-vm + + dcae-controller-service-vm + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + diff --git a/dcae-controller-service/.gitignore b/dcae-controller-service/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service/LICENSE.txt b/dcae-controller-service/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/.gitignore b/dcae-controller-service/dcae-controller-service-dmaap-drsub/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/LICENSE.txt b/dcae-controller-service/dcae-controller-service-dmaap-drsub/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.classpath b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.classpath new file mode 100644 index 0000000..d2d34b3 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.gitignore b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.project b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.project new file mode 100644 index 0000000..d41de87 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.project @@ -0,0 +1,35 @@ + + + dcae-controller-service-dmaap-drsub-manager + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.settings/org.eclipse.core.resources.prefs b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.settings/org.eclipse.jdt.groovy.core.prefs b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/LICENSE.txt b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/META-INF/MANIFEST.MF b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/META-INF/MANIFEST.MF new file mode 100644 index 0000000..0256ddd --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: dcae-controller-service-dmaap-drsub-manager +Bundle-SymbolicName: dcae-controller-service-dmaap-drsub-manager +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.dcae.controller.service.dmaap.drsub.manager.tools, + org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + dcae-controller-service-dmaap-drsub-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + operation-utils;bundle-version="0.1.0" diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/build.properties b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/build.properties new file mode 100644 index 0000000..80bc250 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/build.properties @@ -0,0 +1,6 @@ +source.. = src/main/java/,\ + src/main/resources/,\ + src/test/java/,\ + src/test/resources/ +bin.includes = META-INF/,\ + . diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/pom.xml b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/pom.xml new file mode 100644 index 0000000..87c9d98 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/pom.xml @@ -0,0 +1,193 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-dmaap-drsub-manager + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-base + 0.1.0-SNAPSHOT + ../../../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-base + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-assembly-plugin + 2.6 + + + zipfile + + single + + package + + false + ${project.artifactId}-${project.version} + + src/assembly/assemble_zip.xml + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/lib + false + true + true + false + false + false + org.opendaylight,com.brocade.odl + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/versions + + + src/main/resources/versions + + version.properties + + true + + + + + + copy-resources + + copy-resources + + validate + + ${basedir}/target/etc/bvc-extensions + + + src/main/resources/etc/bvc-extensions + + feature_config_template.cfg + feature_custom.install + + true + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + attach-artifacts + package + + attach-artifact + + + + + target/${project.artifactId}-${project.version}-runtime.zip + zip + runtime + + + + + + + + + + + + org.openecomp.dcae.controller + dcae-controller-service-dmaap-drsub-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-vm-adaptor + ${project.version} + + + diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/assembly/assemble_zip.xml b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..59638ef --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/assembly/assemble_zip.xml @@ -0,0 +1,61 @@ + + + + runtime + + zip + + + + false + + + + target + lib + + dcae-controller-service-dmaap-drsub-manager-${project.version}.jar + + + + target/assembly/ + . + + + + + . + lib + + *.jar + + + + src/main/server-gen/bin + bin + 0744 + + + + + src/main/server/bin + bin + 0744 + + + + + src/main/server-gen/scripts + scripts + + + src/main/server/scripts + scripts + + + + diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/java/org/openecomp/dcae/controller/service/dmaap/drsub/manager/tools/Generator.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/java/org/openecomp/dcae/controller/service/dmaap/drsub/manager/tools/Generator.java new file mode 100644 index 0000000..c05b8eb --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/java/org/openecomp/dcae/controller/service/dmaap/drsub/manager/tools/Generator.java @@ -0,0 +1,99 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.dmaap.drsub.manager.tools; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.openecomp.dcae.controller.service.vm.VmFactory; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelFactory; +import org.openecomp.ncomp.sirius.manager.generator.ControllerGenerator; +import org.openecomp.ncomp.gwt.siriusportal.model.*; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerFactory; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ServiceFactory; +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.ManagerFactory; +import org.openecomp.utils.YamlToJava; + +public class Generator { + + /** + * @param args + */ + public static void main(String[] args) { + @SuppressWarnings("unused") + ServerPackage f = ServerPackage.eINSTANCE; + genManager(); + genService(); + } + + public static void genManager() { + EObject o = ManagerFactory.eINSTANCE.createControllerServiceDmaapDrsubManager(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix(); + dir = "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceDmaapDrsubManager"); + m.setTitle("ControllerServiceDmaapDrsubManager"); + ControllerGenerator g = new ControllerGenerator(o, m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(false); + g.addFactory(ServiceFactory.eINSTANCE); + EObject gui = ModelFactory.eINSTANCE.createGuiClientApi(); + g.addObject("gui", gui, m); + g.setProvider(VmmanagerFactory.eINSTANCE.createVirtualMachineManager(), "Dcae"); + g.generate(dir); + g.generateScripts("src/main/server-gen/bin", "controller-service-dmaap-drsub-manager"); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; +// YamlToJava.convert("src/main/resources/DcaeServiceDockerHost.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/ControllerServiceDmaapDrsubManager.yaml", dir + "/logging", pName); + String pName1 = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".gui.logging"; + YamlToJava.convert("src/main/sirius-gen/GuiClientApi.yaml", dir + "/gui/logging", pName1); + } + + public static void genService() { + EObject o = ServiceFactory.eINSTANCE.createControllerServiceDmaapDrsubService(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+"$", "") + "servers." + p.getNsPrefix(); + dir = "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceDmaapDrsubService"); + m.setTitle("ControllerServiceDmaapDrsubService"); + ControllerGenerator g = new ControllerGenerator(o, m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(true); + g.addFactory(ServiceFactory.eINSTANCE); + g.setProvider(VmFactory.eINSTANCE.createVirtualMachineService(), "Dcae"); + g.generate(dir); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; +// YamlToJava.convert("src/main/resources/DcaeServiceDockerHost.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/ControllerServiceDmaapDrsubService.yaml", dir + "/logging", pName); + } + +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/java/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerProvider.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/java/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerProvider.java new file mode 100644 index 0000000..79401dd --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/java/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerProvider.java @@ -0,0 +1,203 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +/* +Copyright (c) 2015-16 AT&T Intellectual Property. All rights reserved. +THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T +The copyright notice above does not evidence any +actual or intended publication of such source code. + */ + +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; +import java.io.StringWriter; +import java.io.Writer; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import java.util.ArrayList; +import java.util.List; + +import org.apache.log4j.Logger; +import org.json.JSONObject; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.servers.vmmanager.DcaeVirtualMachineManagerProvider; +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.ControllerServiceDmaapDrsubManager; + +/** + * Service Manager for DMaaP Data Router Subscriber. + * + */ +public class DcaeControllerServiceDmaapDrsubManagerProvider extends DcaeVirtualMachineManagerProvider { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceDmaapDrsubManagerProvider.class); + ControllerServiceDmaapDrsubManager o; + + private static final String APP_HOME_ENV = System.getenv("APP_DRSUB_HOME"); + private static final String APP_HOME = "/opt/app/dcae-analytics-dmaap-drsub"; + private static final String CTL_SCRIPT = "dmaapAfSub.sh"; // Subscriber control script + private static final int JSON_INDENT_FACTOR = 0; + + public DcaeControllerServiceDmaapDrsubManagerProvider(ISiriusServer controller, ControllerServiceDmaapDrsubManager o) { + super(controller, o); + this.o = o; + } + + @Override + public void configurationChanged() { + // important to call the super methods for handling DMaaP setup. + setDmaapConfigurationFile(o.getDmaapConfFile()); + super.configurationChanged(); + + // we expect all configuration to be available at once + // there is no support for individual parameter changes + JSONObject json = new JSONObject(); + json.put("hdfs.uri", o.getHdfsUri()); + json.put("hdfs.uri_descr", o.getHdfsUriDescr()); + json.put("hdfs.persist.loc", o.getHdfsPersistLoc()); + json.put("hdfs.persist.loc_descr", o.getHdfsPersistLocDescr()); + json.put("dmaap.conf.file", o.getDmaapConfFile()); + json.put("dmaap.conf.file_descr", o.getDmaapConfFileDescr()); + json.put("dmaap.streamid", o.getDmaapStreamid()); + json.put("dmaap.streamid_descr", o.getDmaapStreamidDescr()); + + String jsonStr = json.toString(JSON_INDENT_FACTOR); + logger.info("JSON: " + jsonStr); + + String confFile = APP_HOME_ENV == null || APP_HOME_ENV == "" ? + APP_HOME + "/conf/conf.json" : + APP_HOME_ENV + "/conf/conf.json"; + logger.info("confFile: " + confFile); + + // save backup copy of configuration file + try { + Path confFilePath = Paths.get(confFile); + if (Files.exists(confFilePath)) { + Files.move(confFilePath, Paths.get(confFile + ".bak"), StandardCopyOption.REPLACE_EXISTING); + } + } catch (IOException e) { + logger.warn("Couldn't rename " + confFile + " to " + confFile + ".bak"); + e.printStackTrace(); + } + + // write new configuration + Writer w = null; + try { + w = new BufferedWriter(new FileWriter(confFile)); + w.write(jsonStr); + } catch (IOException e) { + logger.error("Error writing " + confFile); + e.printStackTrace(); + } finally { + if (w != null) { + try { + w.close(); + } catch (IOException ee) { + ee.printStackTrace(); + } + } + } + + // restart controlled process for config changes to take effect + resume(); + } + + @Override + public void suspend() { + super.suspend(); + + List command = new ArrayList(); + logger.info("stopping"); + command.add(CTL_SCRIPT); + command.add("stop"); + runScript(command); + } + + @Override + public void resume() { + super.resume(); + + List command = new ArrayList(); + logger.info("(re)starting"); + command.add(CTL_SCRIPT); + command.add("restart"); + runScript(command); } + + private void runScript(List command) { + String appBin = APP_HOME_ENV; + + if (appBin == null || appBin.equals("")) { + appBin=APP_HOME; + } + appBin += "/bin"; + if (command.size() == 2) { + File cmdFile = new File(appBin+"/"+command.get(0)); + if (cmdFile.exists()) { + try { + ProcessBuilder builder = new ProcessBuilder(appBin+"/"+command.get(0),command.get(1)); + logger.info("command: ["+appBin+"/"+command.get(0)+" "+command.get(1)+"]"); + System.out.println("command: ["+appBin+"/"+command.get(0)+" "+command.get(1)+"]"); + Process process = builder.start(); + InputStream inStream = process.getInputStream(); + process.waitFor(); + System.out.println(convertStreamToStr(inStream)); + } catch (InterruptedException|IOException e) { + e.printStackTrace(); + } + } else { + logger.error("\""+appBin+"/"+command.get(0)+"\" does not exist."); + } + } + } + + public static String convertStreamToStr(InputStream is) throws IOException { + + if (is != null) { + Writer writer = new StringWriter(); + + char[] buffer = new char[1024]; + try { + Reader reader = new BufferedReader(new InputStreamReader(is,"UTF-8")); + int n; + while ((n = reader.read(buffer)) != -1) { + writer.write(buffer, 0, n); + } + } finally { + is.close(); + } + return writer.toString(); + } else { + return ""; + } + } + +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/java/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApiProvider.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/java/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApiProvider.java new file mode 100644 index 0000000..74b91fd --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/java/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApiProvider.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProvider extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProvider.class); + GuiClientApi o; + + public DcaeGuiClientApiProvider(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/java/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceProvider.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/java/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceProvider.java new file mode 100644 index 0000000..5e0588a --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/java/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceProvider.java @@ -0,0 +1,121 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.service; + +import org.openecomp.ncomp.core.DeploymentStatus; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.JavaHttpClient; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.Subject; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; +import org.openecomp.dcae.controller.service.servers.vm.DcaeVirtualMachineServiceProvider; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubService; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceInstance; + +public class DcaeControllerServiceDmaapDrsubServiceProvider extends DcaeVirtualMachineServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeControllerServiceDmaapDrsubServiceProvider.class); + ControllerServiceDmaapDrsubService o; + + public DcaeControllerServiceDmaapDrsubServiceProvider(ISiriusServer controller, ControllerServiceDmaapDrsubService o) { + super(controller, o); + this.o = o; + } + + @Override + public void deploy(String instanceName, String containerPath) { + logger.info("entering deploy"); + executeCmd(instanceName, "pushManagerConfiguration"); + } + + @Override + public void undeploy(String instanceName) { + logger.info("entering undeploy"); + executeCmd(instanceName, "undeploy"); + } + + private void executeCmd(String instanceName, String cmd) { + ControllerServiceDmaapDrsubServiceInstance i = (ControllerServiceDmaapDrsubServiceInstance) findInstance(instanceName); + String cdapServiceName = i.getCdapServiceName(); + logger.info("cdapServiceName: " + cdapServiceName); + + if (cdapServiceName != null) { + String path = "/services/" + cdapServiceName + "/instances/" + instanceName; + Subject s = controller.getServer().find(path); + if (s != null && s.o != null + && ((CdapClusterServiceInstance) s.o).getStatus() == DeploymentStatus.DEPLOYED) { + i.setCdapClusterInstance((CdapClusterServiceInstance) s.o); + switch (cmd) { + case "pushManagerConfiguration": + o.pushManagerConfiguration(instanceName); + break; + case "undeploy": + // for 1610 undeploy is defined as "stop the DR Subscriber" + o.suspend(instanceName); + break; + } + } else { + logger.error("Couldn't find deployed CDAP service"); + throw new RuntimeException("Couldn't find deployed CDAP service"); + } + } + } + + @Override + public EObject managerConfiguration(String instanceName) { + EObject o1 = ManagerFactory.eINSTANCE.createControllerServiceDmaapDrsubManager(); + ManagementServer.copy(findInstance(instanceName), o1); + return o1; + } + + @Override + public AbstractClient getClient(VirtualMachineServiceInstance i, DcaeBasicServer s) { + ControllerServiceDmaapDrsubServiceInstance i1 = (ControllerServiceDmaapDrsubServiceInstance) i; + CdapClusterServiceInstance ii = i1.getCdapClusterInstance(); + JavaHttpClient c = (JavaHttpClient) super.getClient(ii, s); + String str = c.getBaseAddress().replace(ii.getManagerPortNumber().toString(), + i.getManagerPortNumber().toString()); + c.setBaseAddress(str); + System.err.println("QQQQQ: other-af-dr-sub: baseaddress: " + c.getBaseAddress()); + return c; + } + + @Override + protected EList getServers(VirtualMachineServiceInstance i) { + ControllerServiceDmaapDrsubServiceInstance i1 = (ControllerServiceDmaapDrsubServiceInstance) i; + CdapClusterServiceInstance ii = i1.getCdapClusterInstance(); + if (ii.getStatus() != DeploymentStatus.DEPLOYED) { + logger.error("CDAP service is not deployed - NOT calling getServers()"); + throw new RuntimeException("CDAP service is not deployed"); + } + return ii.getServers(); + } +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server-gen/bin/controller-service-dmaap-drsub-manager-controller b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server-gen/bin/controller-service-dmaap-drsub-manager-controller new file mode 100644 index 0000000..6c007b9 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server-gen/bin/controller-service-dmaap-drsub-manager-controller @@ -0,0 +1,138 @@ +#!/bin/bash + +# setup env if needed. java 6 required +## JAVA_HOME= + +############################## DO NOT EDIT BELOW ########################## + +SNAME="Dcae Controller" +PNAME=controller-service-dmaap-drsub-manager-controller +CLASS=org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.DcaeControllerServiceDmaapDrsubManagerServer + +############################## COMMON BELOW ########################## + +check_status () +{ + if [ -f "${_PIDFILE}" ]; then + _PID=`cat "${_PIDFILE}"` + check_status_of_pid $_PID + else + _STATUS="$SNAME (no pidfile) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + +remove_pid_file () +{ + if [ -f "${_PIDFILE}" ]; then + rm "${_PIDFILE}" + fi +} + + +_DIR=`dirname "$0"` +_DIR=`dirname "$_DIR"` + +_PIDFILE=$_DIR/PID + +CMD=$1 +shift + +check_status + +CP=$(find $_DIR/lib/*/* -name \*.jar 2>/dev/null | xargs -I X printf ":%s" X) + +JVMARGS=$(grep 'server.jvmargs' $_DIR/config/manager.properties | sed -e 's/.*=//') + +case $CMD in + status) + echo $_STATUS + exit 0 + ;; + console) + $GROOVY_HOME/bin/groovysh -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP + ;; + run) + $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + groovy) + $GROOVY_HOME/bin/groovy -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + start) + if [ "$_RUNNING" = "1" ]; then + echo $_STATUS + exit 0 + fi + mkdir -p $_DIR/logs + if [ -e $_DIR/logs/$PNAME.out.1 ]; then mv $_DIR/logs/$PNAME.out.1 $_DIR/logs/$PNAME.out.2; fi + if [ -e $_DIR/logs/$PNAME.err.1 ]; then mv $_DIR/logs/$PNAME.err.1 $_DIR/logs/$PNAME.err.2; fi + if [ -e $_DIR/logs/$PNAME.out ]; then mv $_DIR/logs/$PNAME.out $_DIR/logs/$PNAME.out.1; fi + if [ -e $_DIR/logs/$PNAME.err ]; then mv $_DIR/logs/$PNAME.err $_DIR/logs/$PNAME.err.1; fi + + nohup $JAVA_HOME/bin/java $JVMARGS -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" $CLASS >> $_DIR/logs/$PNAME.out 2>> $_DIR/logs/$PNAME.err & + + _PID=$! + echo $_PID > $_PIDFILE + sleep 5 + check_status + echo $_STATUS + if [ "$_RUNNING" = "1" ]; then + exit 0 + else + echo "Failed to start - make sure the $SNAME is fully configured properly" + exit 1 + fi + ;; + stop) + if [ "$_RUNNING" = "0" ]; then + echo $_STATUS + remove_pid_file + exit 0 + fi + echo "Stopping $SNAME..." + _PID_TO_KILL=$_PID; + echo "$SNAME (pid=${_PID_TO_KILL}) is stopping..." + kill -TERM $_PID_TO_KILL + sleep 5 + check_status_of_pid $_PID_TO_KILL + if [ "$_RUNNING" = "1" ]; then + kill -TERM $_PID_TO_KILL + fi + while [ "$_RUNNING" = "1" ]; do + sleep 2 + check_status_of_pid $_PID_TO_KILL + done + remove_pid_file + echo "$SNAME has stopped." + exit 0 + ;; + *) + echo "$0 start|stop" + ;; +esac + + diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/bin/manager.sh b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/bin/manager.sh new file mode 100644 index 0000000..a1735c0 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/bin/manager.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +export JAVA_HOME=/opt/app/java/jdk/jdk170 +export GROOVY_HOME=/opt/app/groovy/246 + +PATH=$JAVA_HOME/bin:$GROOVY_HOME/bin:$PATH + +cd $(dirname $(dirname $0)) + +ROOT=$(pwd) +CMD=$ROOT/bin/controller-service-dmaap-drsub-manager-controller + +mkdir -p logs/ +echo $(date) bin/manager.sh "$@" >> logs/manager.sh.log + +CMD1=$1 +shift + +VMTYPE=other-af-dr-subscriber + +case $CMD1 in + start) + JVMARGS=$(cat config/manager.properties | grep JVMARGS | sed 's/[^=]*=//') + $CMD $CMD1 $JVMARGS + ;; + stop|console) + $CMD $CMD1 + ;; + config) + CONFIGDIR=/var/config/DCAE/chef + if [ ! -e $CONFIGDIR/$VMTYPE-manager.properties ]; then CONFIGDIR=/tmp; fi + mkdir -p config + for FILE in $CONFIGDIR/$VMTYPE-*; do + FILE2=$(echo $FILE | sed s/.*$VMTYPE-//) + cp $FILE config/$FILE2 + done + /opt/app/dcae-controller-core-utils/bin/setup_https.sh config/manager.properties + ;; + restore|clean) + ;; + restart) + $0 stop + $0 start + ;; + restart2) + $CMD stop + JVMARGS=$(cat config/manager.properties | grep JVMARGS | sed 's/[^=]*=//') + $CMD start $JVMARGS + ;; + *) + echo unknown command: $CMD1 + ;; +esac + diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/console.properties b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/console.properties new file mode 100644 index 0000000..4b63607 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:PORT +localhost.user=console +localhost.password=CONSOLE_PW diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/gui.properties b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/gui.properties new file mode 100644 index 0000000..e69de29 diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/log4j.properties b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/log4j.properties new file mode 100644 index 0000000..676ae11 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/log4j.properties @@ -0,0 +1,26 @@ +#log4j.debug=0 +log4j.rootLogger=warn, file +log4j.logger.org.openecomp.ncomp=info, file +log4j.additivity.org.openecomp.ncomp=false +log4j.logger.org.openecomp.ncomp.datarouter=warn, file +log4j.additivity.org.openecomp.ncomp.datarouter=false +log4j.logger.org.apache.http.headers=debug, file +log4j.logger.org.apache.http.wire=debug, file +log4j.logger.org.openecomp.dcae.controller.service=info,file +log4j.additivity.org.openecomp.dcae.controller.service=false + +## uploaded logger +log4j.logger.org.openecomp.ncomp.sirius.manager.uploaded=info, uploaded +log4j.additivity.org.openecomp.ncomp.sirius.manager.uploaded=false +## request logging +log4j.logger.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=info, requests +log4j.additivity.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=false + + +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=logs/BBBB.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n +log4j.appender.file.MaxFileSize=50MB +log4j.appender.file.MaxBackupIndex=5 + diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/makefile b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/makefile new file mode 100644 index 0000000..e272181 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/makefile @@ -0,0 +1,9 @@ + +restart: stop start + +start: + M2_HOME=$(HOME)/.m2 bin/BBBB-controller start +stop: + bin/BBBB-controller stop +console: + bin/BBBB-controller console diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/manager.properties b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/manager.properties new file mode 100644 index 0000000..4605389 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/manager.properties @@ -0,0 +1,7 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = PORT +server.user.console = CONSOLE_PW +server.user.gui = GUI_PW +server.user.client = CLIENT_PW diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/pw.sh.sh b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/pw.sh.sh new file mode 100644 index 0000000..cd022ae --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/config/pw.sh.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +### used to generate random passwords + + +echo '#!/bin/bash' +echo "" + +echo 'cat \' + +for i in CONSOLE GUI CLIENT +do + echo ' |' sed s/${i}_PW/$(echo $i:$(date +%s) | sha256sum | base64 | head -c 20 ; echo)/ \\ +done + \ No newline at end of file diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/scripts/console.groovy b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/scripts/console.groovy new file mode 100644 index 0000000..bce2031 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/server/scripts/console.groovy @@ -0,0 +1,27 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.DcaeControllerServiceDmaapDrsubManagerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +manager = new DcaeControllerServiceDmaapDrsubManagerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/ControllerServiceDmaapDrsubManager.yaml b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/ControllerServiceDmaapDrsubManager.yaml new file mode 100644 index 0000000..63cb773 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/ControllerServiceDmaapDrsubManager.yaml @@ -0,0 +1,179 @@ +operations: + test: {} + suspend: {} + resume: {} + publicKey: {} + configurationChanged: {} + updateStreams: {} + logs: {} + metrics: {} + properties: {} + uploadInfo: {} + getValues: {} + getValuesAll: {} + getMessages: {} + getRequestLogger: {} + evaluate: {} + update: {} + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_publicKey: + decription: Remote call publicKey + REMOTE_configurationChanged: + decription: Remote call configurationChanged + REMOTE_updateStreams: + decription: Remote call updateStreams + REMOTE_logs: + decription: Remote call logs + REMOTE_metrics: + decription: Remote call metrics + REMOTE_properties: + decription: Remote call properties + REMOTE_uploadInfo: + decription: Remote call uploadInfo + REMOTE_getValues: + decription: Remote call getValues + REMOTE_getValuesAll: + decription: Remote call getValuesAll + REMOTE_getMessages: + decription: Remote call getMessages + REMOTE_getRequestLogger: + decription: Remote call getRequestLogger + REMOTE_evaluate: + decription: Remote call evaluate + REMOTE_update: + decription: Remote call update +messages: + dummy: {} + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + publicKey: + errorCode: publicKey-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + configurationChanged: + errorCode: configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateStreams: + errorCode: updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + logs: + errorCode: logs-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + metrics: + errorCode: metrics-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + properties: + errorCode: properties-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + uploadInfo: + errorCode: uploadInfo-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getValues: + errorCode: getValues-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getValuesAll: + errorCode: getValuesAll-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getMessages: + errorCode: getMessages-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getRequestLogger: + errorCode: getRequestLogger-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + evaluate: + errorCode: evaluate-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + update: + errorCode: update-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_publicKey: + errorCode: REMOTE-publicKey-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_configurationChanged: + errorCode: REMOTE-configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateStreams: + errorCode: REMOTE-updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_logs: + errorCode: REMOTE-logs-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_metrics: + errorCode: REMOTE-metrics-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_properties: + errorCode: REMOTE-properties-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_uploadInfo: + errorCode: REMOTE-uploadInfo-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getValues: + errorCode: REMOTE-getValues-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getValuesAll: + errorCode: REMOTE-getValuesAll-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getMessages: + errorCode: REMOTE-getMessages-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getRequestLogger: + errorCode: REMOTE-getRequestLogger-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_evaluate: + errorCode: REMOTE-evaluate-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_update: + errorCode: REMOTE-update-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/ControllerServiceDmaapDrsubService.yaml b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/ControllerServiceDmaapDrsubService.yaml new file mode 100644 index 0000000..6ac8c34 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/ControllerServiceDmaapDrsubService.yaml @@ -0,0 +1,135 @@ +operations: + deploy: {} + undeploy: {} + test: {} + suspend: {} + resume: {} + pushManagerConfiguration: {} + pollManagerConfiguration: {} + managerConfiguration: {} + managerOperation: {} + updateConfigurationFromPolicy: {} + runHealthTests: {} + updateDeploymentStatus: {} + REMOTE_deploy: + decription: Remote call deploy + REMOTE_undeploy: + decription: Remote call undeploy + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_pushManagerConfiguration: + decription: Remote call pushManagerConfiguration + REMOTE_pollManagerConfiguration: + decription: Remote call pollManagerConfiguration + REMOTE_managerConfiguration: + decription: Remote call managerConfiguration + REMOTE_managerOperation: + decription: Remote call managerOperation + REMOTE_updateConfigurationFromPolicy: + decription: Remote call updateConfigurationFromPolicy + REMOTE_runHealthTests: + decription: Remote call runHealthTests + REMOTE_updateDeploymentStatus: + decription: Remote call updateDeploymentStatus +messages: + dummy: {} + deploy: + errorCode: deploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + undeploy: + errorCode: undeploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pushManagerConfiguration: + errorCode: pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pollManagerConfiguration: + errorCode: pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerConfiguration: + errorCode: managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerOperation: + errorCode: managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateConfigurationFromPolicy: + errorCode: updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + runHealthTests: + errorCode: runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateDeploymentStatus: + errorCode: updateDeploymentStatus-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_deploy: + errorCode: REMOTE-deploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_undeploy: + errorCode: REMOTE-undeploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pushManagerConfiguration: + errorCode: REMOTE-pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pollManagerConfiguration: + errorCode: REMOTE-pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerConfiguration: + errorCode: REMOTE-managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerOperation: + errorCode: REMOTE-managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateConfigurationFromPolicy: + errorCode: REMOTE-updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_runHealthTests: + errorCode: REMOTE-runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateDeploymentStatus: + errorCode: REMOTE-updateDeploymentStatus-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/GuiClientApi.yaml b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/GuiClientApi.yaml new file mode 100644 index 0000000..bf3d69d --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/GuiClientApi.yaml @@ -0,0 +1,69 @@ +operations: + getTree: {} + getObject: {} + getTimeSerie: {} + getTable: {} + getHtml: {} + getGraph: {} + REMOTE_getTree: + decription: Remote call getTree + REMOTE_getObject: + decription: Remote call getObject + REMOTE_getTimeSerie: + decription: Remote call getTimeSerie + REMOTE_getTable: + decription: Remote call getTable + REMOTE_getHtml: + decription: Remote call getHtml + REMOTE_getGraph: + decription: Remote call getGraph +messages: + dummy: {} + getTree: + errorCode: getTree-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getObject: + errorCode: getObject-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTimeSerie: + errorCode: getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTable: + errorCode: getTable-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getHtml: + errorCode: getHtml-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getGraph: + errorCode: getGraph-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_getTree: + errorCode: REMOTE-getTree-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getObject: + errorCode: REMOTE-getObject-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTimeSerie: + errorCode: REMOTE-getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTable: + errorCode: REMOTE-getTable-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getHtml: + errorCode: REMOTE-getHtml-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getGraph: + errorCode: REMOTE-getGraph-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManager.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManager.java new file mode 100644 index 0000000..bdf2fe4 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManager.java @@ -0,0 +1,494 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.logging.ControllerServiceDmaapDrsubManagerOperationEnum; + + + + + + + +import java.util.Date; + + + + + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; + + + + + +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + + +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl; + + + +public class DcaeControllerServiceDmaapDrsubManager extends ControllerServiceDmaapDrsubManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceDmaapDrsubManager.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeControllerServiceDmaapDrsubManagerProvider controller; + ISiriusServer server; + + public DcaeControllerServiceDmaapDrsubManager(ISiriusServer server) { + this.server = server; + this.controller = new DcaeControllerServiceDmaapDrsubManagerProvider(server,this); + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.test); + try { + res = controller.test(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void suspend() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.suspend); + try { + controller.suspend(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_); + + } + + public void resume() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.resume); + try { + controller.resume(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_); + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.publicKey); + try { + res = controller.publicKey(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void configurationChanged() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.configurationChanged); + try { + controller.configurationChanged(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.OKAY, duration_); + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.START, duration_,inputStreams,outputStreams); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.updateStreams); + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.ERROR, duration_,inputStreams,outputStreams); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.OKAY, duration_,inputStreams,outputStreams); + + } + + public void logs(org.json.JSONObject cx, EList logs) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.START, duration_,cx,logs); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.logs); + try { + controller.logs(cx,logs); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.ERROR, duration_,cx,logs); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.OKAY, duration_,cx,logs); + + } + + public void metrics(org.json.JSONObject cx, EList metrics) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.START, duration_,cx,metrics); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.metrics); + try { + controller.metrics(cx,metrics); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.ERROR, duration_,cx,metrics); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.OKAY, duration_,cx,metrics); + + } + + public void properties(org.json.JSONObject cx, EList l) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.START, duration_,cx,l); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.properties); + try { + controller.properties(cx,l); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.ERROR, duration_,cx,l); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.OKAY, duration_,cx,l); + + } + + public void uploadInfo(org.json.JSONObject cx, EList info) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.START, duration_,cx,info); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.uploadInfo); + try { + controller.uploadInfo(cx,info); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.ERROR, duration_,cx,info); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.OKAY, duration_,cx,info); + + } + + public EList getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.START, duration_,cx,path,start,end,option,relativeInterval); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.getValues); + try { + res = controller.getValues(cx,path,start,end,option,relativeInterval); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.ERROR, duration_,cx,path,start,end,option,relativeInterval); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.OKAY, duration_,cx,path,start,end,option,relativeInterval); + return res; + } + + public EList getValuesAll(org.json.JSONObject cx, java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.START, duration_,cx,path,metrics,start,end,option,relativeInterval); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.getValuesAll); + try { + res = controller.getValuesAll(cx,path,metrics,start,end,option,relativeInterval); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.ERROR, duration_,cx,path,metrics,start,end,option,relativeInterval); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.OKAY, duration_,cx,path,metrics,start,end,option,relativeInterval); + return res; + } + + public EList getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.START, duration_,cx,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.getMessages); + try { + res = controller.getMessages(cx,path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.ERROR, duration_,cx,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.OKAY, duration_,cx,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.START, duration_,userName,action,resourcePath,context); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.getRequestLogger); + try { + res = controller.getRequestLogger(userName,action,resourcePath,context); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.ERROR, duration_,userName,action,resourcePath,context); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.OKAY, duration_,userName,action,resourcePath,context); + return res; + } + + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.START, duration_,path,function); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.evaluate); + try { + res = controller.evaluate(path,function); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.ERROR, duration_,path,function); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.OKAY, duration_,path,function); + return res; + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.START, duration_,path,function); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.update); + try { + controller.update(path,function); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.ERROR, duration_,path,function); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.OKAY, duration_,path,function); + + } + + + + + + + public static void ecoreSetup() { + DcaeControllerServiceDmaapDrsubManagerProvider.ecoreSetup(); + } + public DcaeControllerServiceDmaapDrsubManagerProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerClient.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerClient.java new file mode 100644 index 0000000..4b1cefa --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerClient.java @@ -0,0 +1,344 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl; +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.logging.ControllerServiceDmaapDrsubManagerOperationEnum; +import org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.logging.ControllerServiceDmaapDrsubManagerMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeControllerServiceDmaapDrsubManagerClient extends ControllerServiceDmaapDrsubManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceDmaapDrsubManagerClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeControllerServiceDmaapDrsubManagerClient(String file, String name) { + DcaeControllerServiceDmaapDrsubManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeControllerServiceDmaapDrsubManagerClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeControllerServiceDmaapDrsubManagerClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceDmaapDrsubManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubManagerMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: test", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend() { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceDmaapDrsubManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubManagerMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: suspend", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume() { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceDmaapDrsubManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubManagerMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: resume", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public java.lang.String publicKey() { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceDmaapDrsubManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.REMOTE_publicKey); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "publicKey", null); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubManagerMessageEnum.REMOTE_publicKey, e.toString()); + throw new RuntimeException("remote call failed: publicKey", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void configurationChanged() { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceDmaapDrsubManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.REMOTE_configurationChanged); + + try { + client.operationPath("/resources", c, "configurationChanged", null); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubManagerMessageEnum.REMOTE_configurationChanged, e.toString()); + throw new RuntimeException("remote call failed: configurationChanged", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void updateStreams(EList inputStreams, EList outputStreams) { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceDmaapDrsubManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.REMOTE_updateStreams); + + try { + client.operationPath("/resources", c, "updateStreams", null, inputStreams,outputStreams); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubManagerMessageEnum.REMOTE_updateStreams, e.toString()); + throw new RuntimeException("remote call failed: updateStreams", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void logs(org.json.JSONObject cx, EList logs) { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceDmaapDrsubManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.REMOTE_logs); + + try { + client.operationPath("/resources", c, "logs", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,logs); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubManagerMessageEnum.REMOTE_logs, e.toString()); + throw new RuntimeException("remote call failed: logs", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void metrics(org.json.JSONObject cx, EList metrics) { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceDmaapDrsubManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.REMOTE_metrics); + + try { + client.operationPath("/resources", c, "metrics", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,metrics); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubManagerMessageEnum.REMOTE_metrics, e.toString()); + throw new RuntimeException("remote call failed: metrics", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void properties(org.json.JSONObject cx, EList l) { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceDmaapDrsubManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.REMOTE_properties); + + try { + client.operationPath("/resources", c, "properties", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,l); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubManagerMessageEnum.REMOTE_properties, e.toString()); + throw new RuntimeException("remote call failed: properties", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void uploadInfo(org.json.JSONObject cx, EList info) { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceDmaapDrsubManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.REMOTE_uploadInfo); + + try { + client.operationPath("/resources", c, "uploadInfo", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,info); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubManagerMessageEnum.REMOTE_uploadInfo, e.toString()); + throw new RuntimeException("remote call failed: uploadInfo", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public EList getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceDmaapDrsubManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.REMOTE_getValues); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getValues", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end,option,relativeInterval); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubManagerMessageEnum.REMOTE_getValues, e.toString()); + throw new RuntimeException("remote call failed: getValues", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList getValuesAll(org.json.JSONObject cx, java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceDmaapDrsubManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.REMOTE_getValuesAll); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getValuesAll", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,metrics,start,end,option,relativeInterval); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubManagerMessageEnum.REMOTE_getValuesAll, e.toString()); + throw new RuntimeException("remote call failed: getValuesAll", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceDmaapDrsubManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.REMOTE_getMessages); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "getMessages", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubManagerMessageEnum.REMOTE_getMessages, e.toString()); + throw new RuntimeException("remote call failed: getMessages", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceDmaapDrsubManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.REMOTE_getRequestLogger); + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res; + try { + res = (org.openecomp.ncomp.sirius.manager.server.LoggerInfo) client.operationPath("/resources", c, "getRequestLogger", null, userName,action,resourcePath,context); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubManagerMessageEnum.REMOTE_getRequestLogger, e.toString()); + throw new RuntimeException("remote call failed: getRequestLogger", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceDmaapDrsubManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.REMOTE_evaluate); + EList res; + try { + res = (EList) client.operationPath("/resources", c, "evaluate", null, path,function); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubManagerMessageEnum.REMOTE_evaluate, e.toString()); + throw new RuntimeException("remote call failed: evaluate", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceDmaapDrsubManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubManagerOperationEnum.REMOTE_update); + + try { + client.operationPath("/resources", c, "update", null, path,function); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubManagerMessageEnum.REMOTE_update, e.toString()); + throw new RuntimeException("remote call failed: update", e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerConsole.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerConsole.java new file mode 100644 index 0000000..0432188 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerConsole.java @@ -0,0 +1,237 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + +import org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.gui.DcaeGuiClientApiConsole; + + +public class DcaeControllerServiceDmaapDrsubManagerConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceDmaapDrsubManagerConsole.class); + protected DcaeControllerServiceDmaapDrsubManagerClient controller; + + + DcaeGuiClientApiConsole gui; + + + public DcaeControllerServiceDmaapDrsubManagerConsole(String filename, String name) { + super(filename, name); + controller = new DcaeControllerServiceDmaapDrsubManagerClient(filename,name); + client = controller.client; + + gui = new DcaeGuiClientApiConsole(filename,name); + } + + public DcaeControllerServiceDmaapDrsubManagerConsole(AbstractClient c) { + controller = new DcaeControllerServiceDmaapDrsubManagerClient(c); + client = controller.client; + } + + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend() { + + try { + controller.suspend(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume() { + + try { + controller.resume(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + try { + res = controller.publicKey(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void configurationChanged() { + + try { + controller.configurationChanged(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void logs(EList logs) { + + try { + controller.logs(null,logs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void metrics(EList metrics) { + + try { + controller.metrics(null,metrics); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void properties(EList l) { + + try { + controller.properties(null,l); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void uploadInfo(EList info) { + + try { + controller.uploadInfo(null,info); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public EList getValues(java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + try { + res = controller.getValues(null,path,start,end,option,relativeInterval); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getValuesAll(java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + try { + res = controller.getValuesAll(null,path,metrics,start,end,option,relativeInterval); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getMessages(java.lang.String path, java.lang.Long start, java.lang.Long end) { + EList res = null; + try { + res = controller.getMessages(null,path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res = null; + try { + res = controller.getRequestLogger(userName,action,resourcePath,context); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EList res = null; + try { + res = controller.evaluate(path,function); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + + try { + controller.update(path,function); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerProviderTemplate.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerProviderTemplate.java new file mode 100644 index 0000000..2d2fe2d --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerProviderTemplate.java @@ -0,0 +1,72 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import java.util.Date; + + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; + + +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + + +import org.openecomp.dcae.controller.service.servers.vmmanager.DcaeVirtualMachineManagerProvider; + + +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl; +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.ControllerServiceDmaapDrsubManager; + + +public class DcaeControllerServiceDmaapDrsubManagerProviderTemplate extends DcaeVirtualMachineManagerProvider { + private static final Logger logger = Logger.getLogger(DcaeControllerServiceDmaapDrsubManagerProviderTemplate.class); + ControllerServiceDmaapDrsubManager o; + + public DcaeControllerServiceDmaapDrsubManagerProviderTemplate(ISiriusServer controller, ControllerServiceDmaapDrsubManager o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerServer.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerServer.java new file mode 100644 index 0000000..01b7df1 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeControllerServiceDmaapDrsubManagerServer.java @@ -0,0 +1,112 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.ControllerServiceDmaapDrsubManager; + + +import org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.gui.DcaeModelFactory; + + + + + +public class DcaeControllerServiceDmaapDrsubManagerServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceDmaapDrsubManagerServer.class); + String serverPath; + ManagementServer server; + DcaeControllerServiceDmaapDrsubManager controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeManagerFactory f = new DcaeManagerFactory(this); + + + String guiPath; + ManagementServer guiServer; + + + public DcaeControllerServiceDmaapDrsubManagerServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeControllerServiceDmaapDrsubManager.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "ControllerServiceDmaapDrsubManager", serverPath, filename); + server.addFactory(f); + + server.addFactory(org.openecomp.dcae.controller.service.dmaap.drsub.service.ServiceFactory.eINSTANCE); + + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeControllerServiceDmaapDrsubManager) server.find("/").o; + webServer = new Jetty8Server("manager.properties"); + webServer.add("/resources",server); + + + + EFactory guiFactory = new DcaeModelFactory(this); + guiPath = serverPath + "/gui"; + guiServer = new ManagementServer(guiFactory, "GuiClientApi", guiPath, "gui.properties"); + guiServer.start(); + webServer.add("/gui",guiServer); + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeControllerServiceDmaapDrsubManagerServer s = new DcaeControllerServiceDmaapDrsubManagerServer("manager.properties"); + s.runWebserver(); + } + public ControllerServiceDmaapDrsubManager getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeManagerFactory.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeManagerFactory.java new file mode 100644 index 0000000..7bf2edb --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/DcaeManagerFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.ControllerServiceDmaapDrsubManager; +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ManagerFactoryImpl; + + + + + +public class DcaeManagerFactory extends ManagerFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeManagerFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ManagerPackage.eINSTANCE; } + public DcaeManagerFactory(ISiriusServer server) { + this.server = server; + } + @Override + public ControllerServiceDmaapDrsubManager createControllerServiceDmaapDrsubManager() { + return new DcaeControllerServiceDmaapDrsubManager(server); + } + + + +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApi.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApi.java new file mode 100644 index 0000000..99b9703 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApi.java @@ -0,0 +1,256 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.gui; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.gui.logging.GuiClientApiOperationEnum; + + + + + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + + + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + + + + +import org.openecomp.ncomp.sirius.manager.Subject; + + + + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + + + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; + + + +public class DcaeGuiClientApi extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApi.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeGuiClientApiProvider controller; + ISiriusServer server; + + public DcaeGuiClientApi(ISiriusServer server) { + this.server = server; + this.controller = new DcaeGuiClientApiProvider(server,this); + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTree); + try { + res = controller.getTree(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.OKAY, duration_); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.START, duration_,path); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getObject); + try { + res = controller.getObject(path); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.ERROR, duration_,path); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.OKAY, duration_,path); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.START, duration_,path,start,end,duration); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTimeSerie); + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.ERROR, duration_,path,start,end,duration); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.OKAY, duration_,path,start,end,duration); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTable); + try { + res = controller.getTable(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getHtml); + try { + res = controller.getHtml(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getGraph); + try { + res = controller.getGraph(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + + + + + + public static void ecoreSetup() { + DcaeGuiClientApiProvider.ecoreSetup(); + } + public DcaeGuiClientApiProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApiClient.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApiClient.java new file mode 100644 index 0000000..3d5c489 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApiClient.java @@ -0,0 +1,175 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.gui; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.gui.logging.GuiClientApiMessageEnum; + + +import org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.DcaeControllerServiceDmaapDrsubManager; + + + + +@SuppressWarnings("unchecked") +public class DcaeGuiClientApiClient extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeGuiClientApiClient(String file, String name) { + DcaeControllerServiceDmaapDrsubManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTree); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTree) client.operationPath("/gui", c, "getTree", null); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTree, e.toString()); + throw new RuntimeException("remote call failed: getTree", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getObject); + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiObject) client.operationPath("/gui", c, "getObject", null, path); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getObject, e.toString()); + throw new RuntimeException("remote call failed: getObject", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTimeSerie); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie) client.operationPath("/gui", c, "getTimeSerie", null, path,start,end,duration); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTimeSerie, e.toString()); + throw new RuntimeException("remote call failed: getTimeSerie", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTable); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTable) client.operationPath("/gui", c, "getTable", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTable, e.toString()); + throw new RuntimeException("remote call failed: getTable", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getHtml); + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml) client.operationPath("/gui", c, "getHtml", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getHtml, e.toString()); + throw new RuntimeException("remote call failed: getHtml", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getGraph); + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res; + try { + res = (org.openecomp.ncomp.sirius.manager.graph.GuiGraph) client.operationPath("/gui", c, "getGraph", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getGraph, e.toString()); + throw new RuntimeException("remote call failed: getGraph", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApiConsole.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApiConsole.java new file mode 100644 index 0000000..35a9bb7 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApiConsole.java @@ -0,0 +1,123 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.gui; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeGuiClientApiConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiConsole.class); + protected DcaeGuiClientApiClient controller; + + + + + public DcaeGuiClientApiConsole(String filename, String name) { + super(filename, name); + controller = new DcaeGuiClientApiClient(filename,name); + client = controller.client; + + } + + public DcaeGuiClientApiConsole(AbstractClient c) { + controller = new DcaeGuiClientApiClient(c); + client = controller.client; + } + + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + try { + res = controller.getTree(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + try { + res = controller.getObject(path); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + try { + res = controller.getTable(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + try { + res = controller.getHtml(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + try { + res = controller.getGraph(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java new file mode 100644 index 0000000..46749ba --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProviderTemplate extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProviderTemplate.class); + GuiClientApi o; + + public DcaeGuiClientApiProviderTemplate(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeModelFactory.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeModelFactory.java new file mode 100644 index 0000000..2fb962f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/DcaeModelFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.gui; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelFactoryImpl; + +import org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.DcaeControllerServiceDmaapDrsubManagerServer; + + + +public class DcaeModelFactory extends ModelFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeModelFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ModelPackage.eINSTANCE; } + public DcaeModelFactory(ISiriusServer server) { + this.server = server; + } + @Override + public GuiClientApi createGuiClientApi() { + return new DcaeGuiClientApi(server); + } + + + +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/logging/GuiClientApi.properties b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/logging/GuiClientApi.properties new file mode 100644 index 0000000..8705ab8 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/logging/GuiClientApi.properties @@ -0,0 +1,78 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +getTree=\ + getTree-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getObject=\ + getObject-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTimeSerie=\ + getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTable=\ + getTable-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getHtml=\ + getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getGraph=\ + getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_getTree=\ + REMOTE-getTree-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getObject=\ + REMOTE-getObject-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTimeSerie=\ + REMOTE-getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTable=\ + REMOTE-getTable-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getHtml=\ + REMOTE-getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getGraph=\ + REMOTE-getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/logging/GuiClientApiMessageEnum.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/logging/GuiClientApiMessageEnum.java new file mode 100644 index 0000000..56c6b9f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/logging/GuiClientApiMessageEnum.java @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.gui.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum GuiClientApiMessageEnum implements EcompMessageEnum { + + dummy, + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.gui.logging.GuiClientApi"); + } +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/logging/GuiClientApiOperationEnum.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/logging/GuiClientApiOperationEnum.java new file mode 100644 index 0000000..0b177b6 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/gui/logging/GuiClientApiOperationEnum.java @@ -0,0 +1,41 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.gui.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum GuiClientApiOperationEnum implements EcompOperationEnum { + + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/logging/ControllerServiceDmaapDrsubManager.properties b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/logging/ControllerServiceDmaapDrsubManager.properties new file mode 100644 index 0000000..9eb6331 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/logging/ControllerServiceDmaapDrsubManager.properties @@ -0,0 +1,198 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +publicKey=\ + publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +configurationChanged=\ + configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateStreams=\ + updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +logs=\ + logs-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +metrics=\ + metrics-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +properties=\ + properties-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +uploadInfo=\ + uploadInfo-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getValues=\ + getValues-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getValuesAll=\ + getValuesAll-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getMessages=\ + getMessages-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getRequestLogger=\ + getRequestLogger-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +evaluate=\ + evaluate-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +update=\ + update-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_publicKey=\ + REMOTE-publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_configurationChanged=\ + REMOTE-configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateStreams=\ + REMOTE-updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_logs=\ + REMOTE-logs-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_metrics=\ + REMOTE-metrics-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_properties=\ + REMOTE-properties-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_uploadInfo=\ + REMOTE-uploadInfo-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getValues=\ + REMOTE-getValues-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getValuesAll=\ + REMOTE-getValuesAll-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getMessages=\ + REMOTE-getMessages-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getRequestLogger=\ + REMOTE-getRequestLogger-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_evaluate=\ + REMOTE-evaluate-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_update=\ + REMOTE-update-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/logging/ControllerServiceDmaapDrsubManagerMessageEnum.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/logging/ControllerServiceDmaapDrsubManagerMessageEnum.java new file mode 100644 index 0000000..2f98bc9 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/logging/ControllerServiceDmaapDrsubManagerMessageEnum.java @@ -0,0 +1,67 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum ControllerServiceDmaapDrsubManagerMessageEnum implements EcompMessageEnum { + + dummy, + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams, + REMOTE_logs, + REMOTE_metrics, + REMOTE_properties, + REMOTE_uploadInfo, + REMOTE_getValues, + REMOTE_getValuesAll, + REMOTE_getMessages, + REMOTE_getRequestLogger, + REMOTE_evaluate, + REMOTE_update; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.logging.ControllerServiceDmaapDrsubManager"); + } +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/logging/ControllerServiceDmaapDrsubManagerOperationEnum.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/logging/ControllerServiceDmaapDrsubManagerOperationEnum.java new file mode 100644 index 0000000..6e9b169 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/manager/logging/ControllerServiceDmaapDrsubManagerOperationEnum.java @@ -0,0 +1,61 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.manager.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum ControllerServiceDmaapDrsubManagerOperationEnum implements EcompOperationEnum { + + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams, + REMOTE_logs, + REMOTE_metrics, + REMOTE_properties, + REMOTE_uploadInfo, + REMOTE_getValues, + REMOTE_getValuesAll, + REMOTE_getMessages, + REMOTE_getRequestLogger, + REMOTE_evaluate, + REMOTE_update; +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubService.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubService.java new file mode 100644 index 0000000..5d8c902 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubService.java @@ -0,0 +1,381 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.service; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.dmaap.drsub.servers.service.logging.ControllerServiceDmaapDrsubServiceOperationEnum; + + + + +import org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceImpl; + + + +public class DcaeControllerServiceDmaapDrsubService extends ControllerServiceDmaapDrsubServiceImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceDmaapDrsubService.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeControllerServiceDmaapDrsubServiceProvider controller; + ISiriusServer server; + + public DcaeControllerServiceDmaapDrsubService(ISiriusServer server) { + this.server = server; + this.controller = new DcaeControllerServiceDmaapDrsubServiceProvider(server,this); + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.START, duration_,instanceName,containerPath); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.deploy); + try { + controller.deploy(instanceName,containerPath); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.ERROR, duration_,instanceName,containerPath); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.OKAY, duration_,instanceName,containerPath); + + } + + public void undeploy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.undeploy); + try { + controller.undeploy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.test); + try { + res = controller.test(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public void suspend(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.suspend); + try { + controller.suspend(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void resume(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.resume); + try { + controller.resume(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.pushManagerConfiguration); + try { + controller.pushManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.pollManagerConfiguration); + try { + controller.pollManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.managerConfiguration); + try { + res = controller.managerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.START, duration_,instanceName,operation,parameters); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.managerOperation); + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.ERROR, duration_,instanceName,operation,parameters); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.OKAY, duration_,instanceName,operation,parameters); + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.updateConfigurationFromPolicy); + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void runHealthTests() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.runHealthTests); + try { + controller.runHealthTests(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.OKAY, duration_); + + } + + public void updateDeploymentStatus() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.updateDeploymentStatus); + try { + controller.updateDeploymentStatus(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.OKAY, duration_); + + } + + + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + DcaeControllerServiceDmaapDrsubServiceProvider.ecoreSetup(); + } + public DcaeControllerServiceDmaapDrsubServiceProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceClient.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceClient.java new file mode 100644 index 0000000..61034f8 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceClient.java @@ -0,0 +1,276 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.service; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceImpl; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage; +import org.openecomp.dcae.controller.service.dmaap.drsub.servers.service.logging.ControllerServiceDmaapDrsubServiceOperationEnum; +import org.openecomp.dcae.controller.service.dmaap.drsub.servers.service.logging.ControllerServiceDmaapDrsubServiceMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeControllerServiceDmaapDrsubServiceClient extends ControllerServiceDmaapDrsubServiceImpl { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceDmaapDrsubServiceClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeControllerServiceDmaapDrsubServiceClient(String file, String name) { + DcaeControllerServiceDmaapDrsubService.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeControllerServiceDmaapDrsubServiceClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeControllerServiceDmaapDrsubServiceClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceDmaapDrsubService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.REMOTE_deploy); + + try { + client.operationPath("/resources", c, "deploy", null, instanceName,containerPath); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubServiceMessageEnum.REMOTE_deploy, e.toString()); + throw new RuntimeException("remote call failed: deploy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void undeploy(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceDmaapDrsubService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.REMOTE_undeploy); + + try { + client.operationPath("/resources", c, "undeploy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubServiceMessageEnum.REMOTE_undeploy, e.toString()); + throw new RuntimeException("remote call failed: undeploy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceDmaapDrsubService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubServiceMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: test", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceDmaapDrsubService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubServiceMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: suspend", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceDmaapDrsubService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubServiceMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: resume", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pushManagerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceDmaapDrsubService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.REMOTE_pushManagerConfiguration); + + try { + client.operationPath("/resources", c, "pushManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubServiceMessageEnum.REMOTE_pushManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: pushManagerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pollManagerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceDmaapDrsubService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.REMOTE_pollManagerConfiguration); + + try { + client.operationPath("/resources", c, "pollManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubServiceMessageEnum.REMOTE_pollManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: pollManagerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceDmaapDrsubService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.REMOTE_managerConfiguration); + org.eclipse.emf.ecore.EObject res; + try { + res = (org.eclipse.emf.ecore.EObject) client.operationPath("/resources", c, "managerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubServiceMessageEnum.REMOTE_managerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: managerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceDmaapDrsubService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.REMOTE_managerOperation); + org.json.JSONObject res; + try { + res = (org.json.JSONObject) client.operationPath("/resources", c, "managerOperation", null, instanceName,operation,parameters); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubServiceMessageEnum.REMOTE_managerOperation, e.toString()); + throw new RuntimeException("remote call failed: managerOperation", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceDmaapDrsubService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.REMOTE_updateConfigurationFromPolicy); + + try { + client.operationPath("/resources", c, "updateConfigurationFromPolicy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString()); + throw new RuntimeException("remote call failed: updateConfigurationFromPolicy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void runHealthTests() { + EClass c = ServicePackage.eINSTANCE.getControllerServiceDmaapDrsubService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.REMOTE_runHealthTests); + + try { + client.operationPath("/resources", c, "runHealthTests", null); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubServiceMessageEnum.REMOTE_runHealthTests, e.toString()); + throw new RuntimeException("remote call failed: runHealthTests", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void updateDeploymentStatus() { + EClass c = ServicePackage.eINSTANCE.getControllerServiceDmaapDrsubService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceDmaapDrsubServiceOperationEnum.REMOTE_updateDeploymentStatus); + + try { + client.operationPath("/resources", c, "updateDeploymentStatus", null); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceDmaapDrsubServiceMessageEnum.REMOTE_updateDeploymentStatus, e.toString()); + throw new RuntimeException("remote call failed: updateDeploymentStatus", e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceConsole.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceConsole.java new file mode 100644 index 0000000..babb1bc --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceConsole.java @@ -0,0 +1,189 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.service; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeControllerServiceDmaapDrsubServiceConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceDmaapDrsubServiceConsole.class); + protected DcaeControllerServiceDmaapDrsubServiceClient controller; + + + + + public DcaeControllerServiceDmaapDrsubServiceConsole(String filename, String name) { + super(filename, name); + controller = new DcaeControllerServiceDmaapDrsubServiceClient(filename,name); + client = controller.client; + + } + + public DcaeControllerServiceDmaapDrsubServiceConsole(AbstractClient c) { + controller = new DcaeControllerServiceDmaapDrsubServiceClient(c); + client = controller.client; + } + + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + try { + controller.deploy(instanceName,containerPath); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void undeploy(java.lang.String instanceName) { + + try { + controller.undeploy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend(java.lang.String instanceName) { + + try { + controller.suspend(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume(java.lang.String instanceName) { + + try { + controller.resume(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pushManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pollManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + try { + res = controller.managerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void runHealthTests() { + + try { + controller.runHealthTests(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void updateDeploymentStatus() { + + try { + controller.updateDeploymentStatus(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceProviderTemplate.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceProviderTemplate.java new file mode 100644 index 0000000..aaf26fe --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceProviderTemplate.java @@ -0,0 +1,65 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.service; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.dcae.controller.service.servers.vm.DcaeVirtualMachineServiceProvider; + + +import org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceImpl; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubService; + + +public class DcaeControllerServiceDmaapDrsubServiceProviderTemplate extends DcaeVirtualMachineServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeControllerServiceDmaapDrsubServiceProviderTemplate.class); + ControllerServiceDmaapDrsubService o; + + public DcaeControllerServiceDmaapDrsubServiceProviderTemplate(ISiriusServer controller, ControllerServiceDmaapDrsubService o) { + super(controller, o); + this.o = o; + } + + + + + + + + +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceServer.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceServer.java new file mode 100644 index 0000000..3732195 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeControllerServiceDmaapDrsubServiceServer.java @@ -0,0 +1,101 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.service; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubService; + + + + + + +public class DcaeControllerServiceDmaapDrsubServiceServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceDmaapDrsubServiceServer.class); + String serverPath; + ManagementServer server; + DcaeControllerServiceDmaapDrsubService controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeServiceFactory f = new DcaeServiceFactory(this); + + + + public DcaeControllerServiceDmaapDrsubServiceServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeControllerServiceDmaapDrsubService.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "ControllerServiceDmaapDrsubService", serverPath, filename); + server.addFactory(f); + + server.addFactory(org.openecomp.dcae.controller.service.dmaap.drsub.service.ServiceFactory.eINSTANCE); + + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeControllerServiceDmaapDrsubService) server.find("/").o; + webServer = new Jetty8Server("service.properties"); + webServer.add("/resources",server); + + + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeControllerServiceDmaapDrsubServiceServer s = new DcaeControllerServiceDmaapDrsubServiceServer("service.properties"); + s.runWebserver(); + } + public ControllerServiceDmaapDrsubService getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeServiceFactory.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeServiceFactory.java new file mode 100644 index 0000000..271c961 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/DcaeServiceFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.service; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubService; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ServiceFactoryImpl; + + + + + +public class DcaeServiceFactory extends ServiceFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeServiceFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ServicePackage.eINSTANCE; } + public DcaeServiceFactory(ISiriusServer server) { + this.server = server; + } + @Override + public ControllerServiceDmaapDrsubService createControllerServiceDmaapDrsubService() { + return new DcaeControllerServiceDmaapDrsubService(server); + } + + + +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/logging/ControllerServiceDmaapDrsubService.properties b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/logging/ControllerServiceDmaapDrsubService.properties new file mode 100644 index 0000000..d32cf07 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/logging/ControllerServiceDmaapDrsubService.properties @@ -0,0 +1,150 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +deploy=\ + deploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +undeploy=\ + undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pushManagerConfiguration=\ + pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pollManagerConfiguration=\ + pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerConfiguration=\ + managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerOperation=\ + managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateConfigurationFromPolicy=\ + updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +runHealthTests=\ + runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateDeploymentStatus=\ + updateDeploymentStatus-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_deploy=\ + REMOTE-deploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_undeploy=\ + REMOTE-undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pushManagerConfiguration=\ + REMOTE-pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pollManagerConfiguration=\ + REMOTE-pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerConfiguration=\ + REMOTE-managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerOperation=\ + REMOTE-managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateConfigurationFromPolicy=\ + REMOTE-updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_runHealthTests=\ + REMOTE-runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateDeploymentStatus=\ + REMOTE-updateDeploymentStatus-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/logging/ControllerServiceDmaapDrsubServiceMessageEnum.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/logging/ControllerServiceDmaapDrsubServiceMessageEnum.java new file mode 100644 index 0000000..0582cf0 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/logging/ControllerServiceDmaapDrsubServiceMessageEnum.java @@ -0,0 +1,59 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.service.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum ControllerServiceDmaapDrsubServiceMessageEnum implements EcompMessageEnum { + + dummy, + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateDeploymentStatus, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateDeploymentStatus; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.dmaap.drsub.servers.service.logging.ControllerServiceDmaapDrsubService"); + } +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/logging/ControllerServiceDmaapDrsubServiceOperationEnum.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/logging/ControllerServiceDmaapDrsubServiceOperationEnum.java new file mode 100644 index 0000000..d811721 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/dmaap/drsub/servers/service/logging/ControllerServiceDmaapDrsubServiceOperationEnum.java @@ -0,0 +1,53 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.dmaap.drsub.servers.service.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum ControllerServiceDmaapDrsubServiceOperationEnum implements EcompOperationEnum { + + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateDeploymentStatus, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateDeploymentStatus; +} diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.classpath b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.gitignore b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.project b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.project new file mode 100644 index 0000000..2fad80e --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.project @@ -0,0 +1,34 @@ + + + dcae-controller-service-dmaap-drsub-model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/LICENSE.txt b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/META-INF/MANIFEST.MF b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..cd735ac --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/META-INF/MANIFEST.MF @@ -0,0 +1,31 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: dcae-controller-service-dmaap-drsub-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.openecomp.dcae.controller.service.dmaap.drsub.manager, + org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl, + org.openecomp.dcae.controller.service.dmaap.drsub.manager.util, + org.openecomp.dcae.controller.service.dmaap.drsub.service, + org.openecomp.dcae.controller.service.dmaap.drsub.service.impl, + org.openecomp.dcae.controller.service.dmaap.drsub.service.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + dcae-controller-core-model;visibility:=reexport, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-openstack-model;visibility:=reexport, + dcae-controller-service-dmaap-drsub-model;visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + dcae-controller-service-vm-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-agent-model;visibility:=reexport, + dcae-controller-service-cdap-cluster-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-cdap-model;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/build.properties b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/build.properties @@ -0,0 +1,11 @@ +# + +bin.includes = .,\ + src/main/xcore/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/xcore-gen/,\ + src/main/xcore/ +output.. = target/classes/ diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/plugin.properties b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/plugin.xml b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/plugin.xml new file mode 100644 index 0000000..e0b86b2 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/plugin.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/pom.xml b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/pom.xml new file mode 100644 index 0000000..4892ab8 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/pom.xml @@ -0,0 +1,29 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-dmaap-drsub-model + + org.openecomp.ncomp.maven + ncomp-maven-xcore + 0.1.0-SNAPSHOT + ../../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore + + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-vm-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-cdap-cluster-model + ${project.version} + + + diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/ControllerServiceDmaapDrsubManager.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/ControllerServiceDmaapDrsubManager.java new file mode 100644 index 0000000..9cbd349 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/ControllerServiceDmaapDrsubManager.java @@ -0,0 +1,42 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.manager; + +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; + +/** + * + * A representation of the model object 'Controller Service Dmaap Drsub Manager'. + * + * + * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.manager.ManagerPackage#getControllerServiceDmaapDrsubManager() + * @model + * @generated + */ +public interface ControllerServiceDmaapDrsubManager extends VirtualMachineManager, ControllerServiceDmaapDrsubServiceConfiguration { + +} // ControllerServiceDmaapDrsubManager diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/ManagerFactory.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/ManagerFactory.java new file mode 100644 index 0000000..a15b406 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/ManagerFactory.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.manager; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.manager.ManagerPackage + * @generated + */ +public interface ManagerFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ManagerFactory eINSTANCE = org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ManagerFactoryImpl.init(); + + /** + * Returns a new object of class 'Controller Service Dmaap Drsub Manager'. + * + * + * @return a new object of class 'Controller Service Dmaap Drsub Manager'. + * @generated + */ + ControllerServiceDmaapDrsubManager createControllerServiceDmaapDrsubManager(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ManagerPackage getManagerPackage(); + +} //ManagerFactory diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/ManagerPackage.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/ManagerPackage.java new file mode 100644 index 0000000..6330d56 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/ManagerPackage.java @@ -0,0 +1,433 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.manager; + +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *

    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.manager.ManagerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.dmaap.drsub'" + * @generated + */ +public interface ManagerPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "manager"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.dmaap.drsub.manager"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "manager"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ManagerPackage eINSTANCE = org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ManagerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl Controller Service Dmaap Drsub Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl + * @see org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ManagerPackageImpl#getControllerServiceDmaapDrsubManager() + * @generated + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER = 0; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__INPUT_STREAMS = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__OUTPUT_STREAMS = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__OUTPUT_STREAMS; + + /** + * The feature id for the 'Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__CONFIGURATION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION; + + /** + * The feature id for the 'Component' containment reference. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__COMPONENT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT; + + /** + * The feature id for the 'Cdap Url' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__CDAP_URL = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Number Of Cdap Records' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__NUMBER_OF_CDAP_RECORDS = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Number Of Cdap Errors' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__NUMBER_OF_CDAP_ERRORS = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Hdfs Uri' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_URI = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Hdfs Uri Descr' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_URI_DESCR = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Hdfs Persist Loc' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_PERSIST_LOC = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Hdfs Persist Loc Descr' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_PERSIST_LOC_DESCR = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Dmaap Conf File' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_CONF_FILE = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Dmaap Conf File Descr' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_CONF_FILE_DESCR = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 8; + + /** + * The feature id for the 'Dmaap Streamid' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_STREAMID = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 9; + + /** + * The feature id for the 'Dmaap Streamid Descr' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_STREAMID_DESCR = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 10; + + /** + * The number of structural features of the 'Controller Service Dmaap Drsub Manager' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER_FEATURE_COUNT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 11; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER___TEST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___TEST; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER___SUSPEND = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___SUSPEND; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER___RESUME = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___RESUME; + + /** + * The operation id for the 'Public Key' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER___PUBLIC_KEY = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___PUBLIC_KEY; + + /** + * The operation id for the 'Configuration Changed' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER___CONFIGURATION_CHANGED = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___CONFIGURATION_CHANGED; + + /** + * The operation id for the 'Update Streams' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER___UPDATE_STREAMS__ELIST_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE_STREAMS__ELIST_ELIST; + + /** + * The operation id for the 'Logs' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER___LOGS__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___LOGS__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Metrics' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER___METRICS__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___METRICS__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Properties' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER___PROPERTIES__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___PROPERTIES__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Upload Info' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Get Values' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + + /** + * The operation id for the 'Get Values All' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + + /** + * The operation id for the 'Get Messages' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG; + + /** + * The operation id for the 'Get Request Logger' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT; + + /** + * The operation id for the 'Evaluate' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER___EVALUATE__STRING_FUNCTION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___EVALUATE__STRING_FUNCTION; + + /** + * The operation id for the 'Update' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER___UPDATE__STRING_FUNCTION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE__STRING_FUNCTION; + + /** + * The number of operations of the 'Controller Service Dmaap Drsub Manager' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER_OPERATION_COUNT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.dmaap.drsub.manager.ControllerServiceDmaapDrsubManager Controller Service Dmaap Drsub Manager}'. + * + * + * @return the meta object for class 'Controller Service Dmaap Drsub Manager'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.manager.ControllerServiceDmaapDrsubManager + * @generated + */ + EClass getControllerServiceDmaapDrsubManager(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ManagerFactory getManagerFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl Controller Service Dmaap Drsub Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl + * @see org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ManagerPackageImpl#getControllerServiceDmaapDrsubManager() + * @generated + */ + EClass CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER = eINSTANCE.getControllerServiceDmaapDrsubManager(); + + } + +} //ManagerPackage diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/impl/ControllerServiceDmaapDrsubManagerImpl.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/impl/ControllerServiceDmaapDrsubManagerImpl.java new file mode 100644 index 0000000..e5a7ffb --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/impl/ControllerServiceDmaapDrsubManagerImpl.java @@ -0,0 +1,777 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl; + +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.ControllerServiceDmaapDrsubManager; +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage; +import org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl; +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Controller Service Dmaap Drsub Manager'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl#getCdapUrl Cdap Url}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl#getNumberOfCdapRecords Number Of Cdap Records}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl#getNumberOfCdapErrors Number Of Cdap Errors}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl#getHdfsUri Hdfs Uri}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl#getHdfsUriDescr Hdfs Uri Descr}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl#getHdfsPersistLoc Hdfs Persist Loc}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl#getHdfsPersistLocDescr Hdfs Persist Loc Descr}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl#getDmaapConfFile Dmaap Conf File}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl#getDmaapConfFileDescr Dmaap Conf File Descr}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl#getDmaapStreamid Dmaap Streamid}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl.ControllerServiceDmaapDrsubManagerImpl#getDmaapStreamidDescr Dmaap Streamid Descr}
  • + *
+ *

+ * + * @generated + */ +public class ControllerServiceDmaapDrsubManagerImpl extends VirtualMachineManagerImpl implements ControllerServiceDmaapDrsubManager { + /** + * The default value of the '{@link #getCdapUrl() Cdap Url}' attribute. + * + * + * @see #getCdapUrl() + * @generated + * @ordered + */ + protected static final String CDAP_URL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCdapUrl() Cdap Url}' attribute. + * + * + * @see #getCdapUrl() + * @generated + * @ordered + */ + protected String cdapUrl = CDAP_URL_EDEFAULT; + + /** + * The default value of the '{@link #getNumberOfCdapRecords() Number Of Cdap Records}' attribute. + * + * + * @see #getNumberOfCdapRecords() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_CDAP_RECORDS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNumberOfCdapRecords() Number Of Cdap Records}' attribute. + * + * + * @see #getNumberOfCdapRecords() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfCdapRecords = NUMBER_OF_CDAP_RECORDS_EDEFAULT; + + /** + * The default value of the '{@link #getNumberOfCdapErrors() Number Of Cdap Errors}' attribute. + * + * + * @see #getNumberOfCdapErrors() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_CDAP_ERRORS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNumberOfCdapErrors() Number Of Cdap Errors}' attribute. + * + * + * @see #getNumberOfCdapErrors() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfCdapErrors = NUMBER_OF_CDAP_ERRORS_EDEFAULT; + + /** + * The default value of the '{@link #getHdfsUri() Hdfs Uri}' attribute. + * + * + * @see #getHdfsUri() + * @generated + * @ordered + */ + protected static final String HDFS_URI_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHdfsUri() Hdfs Uri}' attribute. + * + * + * @see #getHdfsUri() + * @generated + * @ordered + */ + protected String hdfsUri = HDFS_URI_EDEFAULT; + + /** + * The default value of the '{@link #getHdfsUriDescr() Hdfs Uri Descr}' attribute. + * + * + * @see #getHdfsUriDescr() + * @generated + * @ordered + */ + protected static final String HDFS_URI_DESCR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHdfsUriDescr() Hdfs Uri Descr}' attribute. + * + * + * @see #getHdfsUriDescr() + * @generated + * @ordered + */ + protected String hdfsUriDescr = HDFS_URI_DESCR_EDEFAULT; + + /** + * The default value of the '{@link #getHdfsPersistLoc() Hdfs Persist Loc}' attribute. + * + * + * @see #getHdfsPersistLoc() + * @generated + * @ordered + */ + protected static final String HDFS_PERSIST_LOC_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHdfsPersistLoc() Hdfs Persist Loc}' attribute. + * + * + * @see #getHdfsPersistLoc() + * @generated + * @ordered + */ + protected String hdfsPersistLoc = HDFS_PERSIST_LOC_EDEFAULT; + + /** + * The default value of the '{@link #getHdfsPersistLocDescr() Hdfs Persist Loc Descr}' attribute. + * + * + * @see #getHdfsPersistLocDescr() + * @generated + * @ordered + */ + protected static final String HDFS_PERSIST_LOC_DESCR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHdfsPersistLocDescr() Hdfs Persist Loc Descr}' attribute. + * + * + * @see #getHdfsPersistLocDescr() + * @generated + * @ordered + */ + protected String hdfsPersistLocDescr = HDFS_PERSIST_LOC_DESCR_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapConfFile() Dmaap Conf File}' attribute. + * + * + * @see #getDmaapConfFile() + * @generated + * @ordered + */ + protected static final String DMAAP_CONF_FILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapConfFile() Dmaap Conf File}' attribute. + * + * + * @see #getDmaapConfFile() + * @generated + * @ordered + */ + protected String dmaapConfFile = DMAAP_CONF_FILE_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapConfFileDescr() Dmaap Conf File Descr}' attribute. + * + * + * @see #getDmaapConfFileDescr() + * @generated + * @ordered + */ + protected static final String DMAAP_CONF_FILE_DESCR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapConfFileDescr() Dmaap Conf File Descr}' attribute. + * + * + * @see #getDmaapConfFileDescr() + * @generated + * @ordered + */ + protected String dmaapConfFileDescr = DMAAP_CONF_FILE_DESCR_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapStreamid() Dmaap Streamid}' attribute. + * + * + * @see #getDmaapStreamid() + * @generated + * @ordered + */ + protected static final String DMAAP_STREAMID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapStreamid() Dmaap Streamid}' attribute. + * + * + * @see #getDmaapStreamid() + * @generated + * @ordered + */ + protected String dmaapStreamid = DMAAP_STREAMID_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapStreamidDescr() Dmaap Streamid Descr}' attribute. + * + * + * @see #getDmaapStreamidDescr() + * @generated + * @ordered + */ + protected static final String DMAAP_STREAMID_DESCR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapStreamidDescr() Dmaap Streamid Descr}' attribute. + * + * + * @see #getDmaapStreamidDescr() + * @generated + * @ordered + */ + protected String dmaapStreamidDescr = DMAAP_STREAMID_DESCR_EDEFAULT; + + /** + * + * + * @generated + */ + protected ControllerServiceDmaapDrsubManagerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ManagerPackage.Literals.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER; + } + + /** + * + * + * @generated + */ + public String getCdapUrl() { + return cdapUrl; + } + + /** + * + * + * @generated + */ + public void setCdapUrl(String newCdapUrl) { + String oldCdapUrl = cdapUrl; + cdapUrl = newCdapUrl; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__CDAP_URL, oldCdapUrl, cdapUrl)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfCdapRecords() { + return numberOfCdapRecords; + } + + /** + * + * + * @generated + */ + public void setNumberOfCdapRecords(IncreasingULongMetricAttribute newNumberOfCdapRecords) { + IncreasingULongMetricAttribute oldNumberOfCdapRecords = numberOfCdapRecords; + numberOfCdapRecords = newNumberOfCdapRecords; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__NUMBER_OF_CDAP_RECORDS, oldNumberOfCdapRecords, numberOfCdapRecords)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfCdapErrors() { + return numberOfCdapErrors; + } + + /** + * + * + * @generated + */ + public void setNumberOfCdapErrors(IncreasingULongMetricAttribute newNumberOfCdapErrors) { + IncreasingULongMetricAttribute oldNumberOfCdapErrors = numberOfCdapErrors; + numberOfCdapErrors = newNumberOfCdapErrors; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__NUMBER_OF_CDAP_ERRORS, oldNumberOfCdapErrors, numberOfCdapErrors)); + } + + /** + * + * + * @generated + */ + public String getHdfsUri() { + return hdfsUri; + } + + /** + * + * + * @generated + */ + public void setHdfsUri(String newHdfsUri) { + String oldHdfsUri = hdfsUri; + hdfsUri = newHdfsUri; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_URI, oldHdfsUri, hdfsUri)); + } + + /** + * + * + * @generated + */ + public String getHdfsUriDescr() { + return hdfsUriDescr; + } + + /** + * + * + * @generated + */ + public void setHdfsUriDescr(String newHdfsUriDescr) { + String oldHdfsUriDescr = hdfsUriDescr; + hdfsUriDescr = newHdfsUriDescr; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_URI_DESCR, oldHdfsUriDescr, hdfsUriDescr)); + } + + /** + * + * + * @generated + */ + public String getHdfsPersistLoc() { + return hdfsPersistLoc; + } + + /** + * + * + * @generated + */ + public void setHdfsPersistLoc(String newHdfsPersistLoc) { + String oldHdfsPersistLoc = hdfsPersistLoc; + hdfsPersistLoc = newHdfsPersistLoc; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_PERSIST_LOC, oldHdfsPersistLoc, hdfsPersistLoc)); + } + + /** + * + * + * @generated + */ + public String getHdfsPersistLocDescr() { + return hdfsPersistLocDescr; + } + + /** + * + * + * @generated + */ + public void setHdfsPersistLocDescr(String newHdfsPersistLocDescr) { + String oldHdfsPersistLocDescr = hdfsPersistLocDescr; + hdfsPersistLocDescr = newHdfsPersistLocDescr; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_PERSIST_LOC_DESCR, oldHdfsPersistLocDescr, hdfsPersistLocDescr)); + } + + /** + * + * + * @generated + */ + public String getDmaapConfFile() { + return dmaapConfFile; + } + + /** + * + * + * @generated + */ + public void setDmaapConfFile(String newDmaapConfFile) { + String oldDmaapConfFile = dmaapConfFile; + dmaapConfFile = newDmaapConfFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_CONF_FILE, oldDmaapConfFile, dmaapConfFile)); + } + + /** + * + * + * @generated + */ + public String getDmaapConfFileDescr() { + return dmaapConfFileDescr; + } + + /** + * + * + * @generated + */ + public void setDmaapConfFileDescr(String newDmaapConfFileDescr) { + String oldDmaapConfFileDescr = dmaapConfFileDescr; + dmaapConfFileDescr = newDmaapConfFileDescr; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_CONF_FILE_DESCR, oldDmaapConfFileDescr, dmaapConfFileDescr)); + } + + /** + * + * + * @generated + */ + public String getDmaapStreamid() { + return dmaapStreamid; + } + + /** + * + * + * @generated + */ + public void setDmaapStreamid(String newDmaapStreamid) { + String oldDmaapStreamid = dmaapStreamid; + dmaapStreamid = newDmaapStreamid; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_STREAMID, oldDmaapStreamid, dmaapStreamid)); + } + + /** + * + * + * @generated + */ + public String getDmaapStreamidDescr() { + return dmaapStreamidDescr; + } + + /** + * + * + * @generated + */ + public void setDmaapStreamidDescr(String newDmaapStreamidDescr) { + String oldDmaapStreamidDescr = dmaapStreamidDescr; + dmaapStreamidDescr = newDmaapStreamidDescr; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_STREAMID_DESCR, oldDmaapStreamidDescr, dmaapStreamidDescr)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__CDAP_URL: + return getCdapUrl(); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__NUMBER_OF_CDAP_RECORDS: + return getNumberOfCdapRecords(); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__NUMBER_OF_CDAP_ERRORS: + return getNumberOfCdapErrors(); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_URI: + return getHdfsUri(); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_URI_DESCR: + return getHdfsUriDescr(); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_PERSIST_LOC: + return getHdfsPersistLoc(); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_PERSIST_LOC_DESCR: + return getHdfsPersistLocDescr(); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_CONF_FILE: + return getDmaapConfFile(); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_CONF_FILE_DESCR: + return getDmaapConfFileDescr(); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_STREAMID: + return getDmaapStreamid(); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_STREAMID_DESCR: + return getDmaapStreamidDescr(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__CDAP_URL: + setCdapUrl((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__NUMBER_OF_CDAP_RECORDS: + setNumberOfCdapRecords((IncreasingULongMetricAttribute)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__NUMBER_OF_CDAP_ERRORS: + setNumberOfCdapErrors((IncreasingULongMetricAttribute)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_URI: + setHdfsUri((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_URI_DESCR: + setHdfsUriDescr((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_PERSIST_LOC: + setHdfsPersistLoc((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_PERSIST_LOC_DESCR: + setHdfsPersistLocDescr((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_CONF_FILE: + setDmaapConfFile((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_CONF_FILE_DESCR: + setDmaapConfFileDescr((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_STREAMID: + setDmaapStreamid((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_STREAMID_DESCR: + setDmaapStreamidDescr((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__CDAP_URL: + setCdapUrl(CDAP_URL_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__NUMBER_OF_CDAP_RECORDS: + setNumberOfCdapRecords(NUMBER_OF_CDAP_RECORDS_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__NUMBER_OF_CDAP_ERRORS: + setNumberOfCdapErrors(NUMBER_OF_CDAP_ERRORS_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_URI: + setHdfsUri(HDFS_URI_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_URI_DESCR: + setHdfsUriDescr(HDFS_URI_DESCR_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_PERSIST_LOC: + setHdfsPersistLoc(HDFS_PERSIST_LOC_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_PERSIST_LOC_DESCR: + setHdfsPersistLocDescr(HDFS_PERSIST_LOC_DESCR_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_CONF_FILE: + setDmaapConfFile(DMAAP_CONF_FILE_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_CONF_FILE_DESCR: + setDmaapConfFileDescr(DMAAP_CONF_FILE_DESCR_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_STREAMID: + setDmaapStreamid(DMAAP_STREAMID_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_STREAMID_DESCR: + setDmaapStreamidDescr(DMAAP_STREAMID_DESCR_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__CDAP_URL: + return CDAP_URL_EDEFAULT == null ? cdapUrl != null : !CDAP_URL_EDEFAULT.equals(cdapUrl); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__NUMBER_OF_CDAP_RECORDS: + return NUMBER_OF_CDAP_RECORDS_EDEFAULT == null ? numberOfCdapRecords != null : !NUMBER_OF_CDAP_RECORDS_EDEFAULT.equals(numberOfCdapRecords); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__NUMBER_OF_CDAP_ERRORS: + return NUMBER_OF_CDAP_ERRORS_EDEFAULT == null ? numberOfCdapErrors != null : !NUMBER_OF_CDAP_ERRORS_EDEFAULT.equals(numberOfCdapErrors); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_URI: + return HDFS_URI_EDEFAULT == null ? hdfsUri != null : !HDFS_URI_EDEFAULT.equals(hdfsUri); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_URI_DESCR: + return HDFS_URI_DESCR_EDEFAULT == null ? hdfsUriDescr != null : !HDFS_URI_DESCR_EDEFAULT.equals(hdfsUriDescr); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_PERSIST_LOC: + return HDFS_PERSIST_LOC_EDEFAULT == null ? hdfsPersistLoc != null : !HDFS_PERSIST_LOC_EDEFAULT.equals(hdfsPersistLoc); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_PERSIST_LOC_DESCR: + return HDFS_PERSIST_LOC_DESCR_EDEFAULT == null ? hdfsPersistLocDescr != null : !HDFS_PERSIST_LOC_DESCR_EDEFAULT.equals(hdfsPersistLocDescr); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_CONF_FILE: + return DMAAP_CONF_FILE_EDEFAULT == null ? dmaapConfFile != null : !DMAAP_CONF_FILE_EDEFAULT.equals(dmaapConfFile); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_CONF_FILE_DESCR: + return DMAAP_CONF_FILE_DESCR_EDEFAULT == null ? dmaapConfFileDescr != null : !DMAAP_CONF_FILE_DESCR_EDEFAULT.equals(dmaapConfFileDescr); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_STREAMID: + return DMAAP_STREAMID_EDEFAULT == null ? dmaapStreamid != null : !DMAAP_STREAMID_EDEFAULT.equals(dmaapStreamid); + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_STREAMID_DESCR: + return DMAAP_STREAMID_DESCR_EDEFAULT == null ? dmaapStreamidDescr != null : !DMAAP_STREAMID_DESCR_EDEFAULT.equals(dmaapStreamidDescr); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == ControllerServiceDmaapDrsubServiceConfiguration.class) { + switch (derivedFeatureID) { + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__CDAP_URL: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__CDAP_URL; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__NUMBER_OF_CDAP_RECORDS: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_RECORDS; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__NUMBER_OF_CDAP_ERRORS: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_ERRORS; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_URI: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_URI_DESCR: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI_DESCR; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_PERSIST_LOC: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_PERSIST_LOC_DESCR: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC_DESCR; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_CONF_FILE: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_CONF_FILE_DESCR: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE_DESCR; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_STREAMID: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID; + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_STREAMID_DESCR: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID_DESCR; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == ControllerServiceDmaapDrsubServiceConfiguration.class) { + switch (baseFeatureID) { + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__CDAP_URL: return ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__CDAP_URL; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_RECORDS: return ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__NUMBER_OF_CDAP_RECORDS; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_ERRORS: return ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__NUMBER_OF_CDAP_ERRORS; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI: return ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_URI; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI_DESCR: return ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_URI_DESCR; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC: return ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_PERSIST_LOC; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC_DESCR: return ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__HDFS_PERSIST_LOC_DESCR; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE: return ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_CONF_FILE; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE_DESCR: return ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_CONF_FILE_DESCR; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID: return ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_STREAMID; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID_DESCR: return ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER__DMAAP_STREAMID_DESCR; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (cdapUrl: "); + result.append(cdapUrl); + result.append(", numberOfCdapRecords: "); + result.append(numberOfCdapRecords); + result.append(", numberOfCdapErrors: "); + result.append(numberOfCdapErrors); + result.append(", hdfsUri: "); + result.append(hdfsUri); + result.append(", hdfsUriDescr: "); + result.append(hdfsUriDescr); + result.append(", hdfsPersistLoc: "); + result.append(hdfsPersistLoc); + result.append(", hdfsPersistLocDescr: "); + result.append(hdfsPersistLocDescr); + result.append(", dmaapConfFile: "); + result.append(dmaapConfFile); + result.append(", dmaapConfFileDescr: "); + result.append(dmaapConfFileDescr); + result.append(", dmaapStreamid: "); + result.append(dmaapStreamid); + result.append(", dmaapStreamidDescr: "); + result.append(dmaapStreamidDescr); + result.append(')'); + return result.toString(); + } + +} //ControllerServiceDmaapDrsubManagerImpl diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/impl/ManagerFactoryImpl.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/impl/ManagerFactoryImpl.java new file mode 100644 index 0000000..cdaa90b --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/impl/ManagerFactoryImpl.java @@ -0,0 +1,116 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl; + +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ManagerFactoryImpl extends EFactoryImpl implements ManagerFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ManagerFactory init() { + try { + ManagerFactory theManagerFactory = (ManagerFactory)EPackage.Registry.INSTANCE.getEFactory(ManagerPackage.eNS_URI); + if (theManagerFactory != null) { + return theManagerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ManagerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ManagerFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER: return createControllerServiceDmaapDrsubManager(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public ControllerServiceDmaapDrsubManager createControllerServiceDmaapDrsubManager() { + ControllerServiceDmaapDrsubManagerImpl controllerServiceDmaapDrsubManager = new ControllerServiceDmaapDrsubManagerImpl(); + return controllerServiceDmaapDrsubManager; + } + + /** + * + * + * @generated + */ + public ManagerPackage getManagerPackage() { + return (ManagerPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ManagerPackage getPackage() { + return ManagerPackage.eINSTANCE; + } + +} //ManagerFactoryImpl diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/impl/ManagerPackageImpl.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/impl/ManagerPackageImpl.java new file mode 100644 index 0000000..b837457 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/impl/ManagerPackageImpl.java @@ -0,0 +1,196 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.manager.impl; + +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.ControllerServiceDmaapDrsubManager; +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ManagerPackageImpl extends EPackageImpl implements ManagerPackage { + /** + * + * + * @generated + */ + private EClass controllerServiceDmaapDrsubManagerEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.dmaap.drsub.manager.ManagerPackage#eNS_URI + * @see #init() + * @generated + */ + private ManagerPackageImpl() { + super(eNS_URI, ManagerFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ManagerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ManagerPackage init() { + if (isInited) return (ManagerPackage)EPackage.Registry.INSTANCE.getEPackage(ManagerPackage.eNS_URI); + + // Obtain or create and register package + ManagerPackageImpl theManagerPackage = (ManagerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ManagerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ManagerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + ServicePackage.eINSTANCE.eClass(); + VmmanagerPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theManagerPackage.createPackageContents(); + + // Initialize created meta-data + theManagerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theManagerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ManagerPackage.eNS_URI, theManagerPackage); + return theManagerPackage; + } + + /** + * + * + * @generated + */ + public EClass getControllerServiceDmaapDrsubManager() { + return controllerServiceDmaapDrsubManagerEClass; + } + + /** + * + * + * @generated + */ + public ManagerFactory getManagerFactory() { + return (ManagerFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + controllerServiceDmaapDrsubManagerEClass = createEClass(CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + VmmanagerPackage theVmmanagerPackage = (VmmanagerPackage)EPackage.Registry.INSTANCE.getEPackage(VmmanagerPackage.eNS_URI); + ServicePackage theServicePackage = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + controllerServiceDmaapDrsubManagerEClass.getESuperTypes().add(theVmmanagerPackage.getVirtualMachineManager()); + controllerServiceDmaapDrsubManagerEClass.getESuperTypes().add(theServicePackage.getControllerServiceDmaapDrsubServiceConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(controllerServiceDmaapDrsubManagerEClass, ControllerServiceDmaapDrsubManager.class, "ControllerServiceDmaapDrsubManager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //ManagerPackageImpl diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/util/ManagerAdapterFactory.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/util/ManagerAdapterFactory.java new file mode 100644 index 0000000..b02a36f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/util/ManagerAdapterFactory.java @@ -0,0 +1,259 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.*; + +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.manager.ManagerPackage + * @generated + */ +public class ManagerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ManagerAdapterFactory() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ManagerSwitch modelSwitch = + new ManagerSwitch() { + @Override + public Adapter caseControllerServiceDmaapDrsubManager(ControllerServiceDmaapDrsubManager object) { + return createControllerServiceDmaapDrsubManagerAdapter(); + } + @Override + public Adapter caseDcaeManager(DcaeManager object) { + return createDcaeManagerAdapter(); + } + @Override + public Adapter caseSouthBoundApi(SouthBoundApi object) { + return createSouthBoundApiAdapter(); + } + @Override + public Adapter caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return createSouthBoundApiWithProxyAdapter(); + } + @Override + public Adapter caseAbstractManagementServer(AbstractManagementServer object) { + return createAbstractManagementServerAdapter(); + } + @Override + public Adapter caseVirtualMachineManager(VirtualMachineManager object) { + return createVirtualMachineManagerAdapter(); + } + @Override + public Adapter caseControllerServiceDmaapDrsubServiceConfiguration(ControllerServiceDmaapDrsubServiceConfiguration object) { + return createControllerServiceDmaapDrsubServiceConfigurationAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.dmaap.drsub.manager.ControllerServiceDmaapDrsubManager Controller Service Dmaap Drsub Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.manager.ControllerServiceDmaapDrsubManager + * @generated + */ + public Adapter createControllerServiceDmaapDrsubManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.manager.DcaeManager Dcae Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager + * @generated + */ + public Adapter createDcaeManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApi South Bound Api}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApi + * @generated + */ + public Adapter createSouthBoundApiAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy South Bound Api With Proxy}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy + * @generated + */ + public Adapter createSouthBoundApiWithProxyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer Abstract Management Server}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer + * @generated + */ + public Adapter createAbstractManagementServerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager Virtual Machine Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager + * @generated + */ + public Adapter createVirtualMachineManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration Controller Service Dmaap Drsub Service Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration + * @generated + */ + public Adapter createControllerServiceDmaapDrsubServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ManagerAdapterFactory diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/util/ManagerSwitch.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/util/ManagerSwitch.java new file mode 100644 index 0000000..dfbb3a9 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/manager/util/ManagerSwitch.java @@ -0,0 +1,237 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.dmaap.drsub.manager.*; + +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.manager.ManagerPackage + * @generated + */ +public class ManagerSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ManagerSwitch() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ManagerPackage.CONTROLLER_SERVICE_DMAAP_DRSUB_MANAGER: { + ControllerServiceDmaapDrsubManager controllerServiceDmaapDrsubManager = (ControllerServiceDmaapDrsubManager)theEObject; + T result = caseControllerServiceDmaapDrsubManager(controllerServiceDmaapDrsubManager); + if (result == null) result = caseVirtualMachineManager(controllerServiceDmaapDrsubManager); + if (result == null) result = caseControllerServiceDmaapDrsubServiceConfiguration(controllerServiceDmaapDrsubManager); + if (result == null) result = caseDcaeManager(controllerServiceDmaapDrsubManager); + if (result == null) result = caseAbstractManagementServer(controllerServiceDmaapDrsubManager); + if (result == null) result = caseSouthBoundApiWithProxy(controllerServiceDmaapDrsubManager); + if (result == null) result = caseSouthBoundApi(controllerServiceDmaapDrsubManager); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Controller Service Dmaap Drsub Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Controller Service Dmaap Drsub Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseControllerServiceDmaapDrsubManager(ControllerServiceDmaapDrsubManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeManager(DcaeManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'South Bound Api'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'South Bound Api'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApi(SouthBoundApi object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'South Bound Api With Proxy'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'South Bound Api With Proxy'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Abstract Management Server'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Abstract Management Server'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAbstractManagementServer(AbstractManagementServer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineManager(VirtualMachineManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Controller Service Dmaap Drsub Service Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Controller Service Dmaap Drsub Service Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseControllerServiceDmaapDrsubServiceConfiguration(ControllerServiceDmaapDrsubServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ManagerSwitch diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ContrailController.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ContrailController.java new file mode 100644 index 0000000..40bbcfa --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ContrailController.java @@ -0,0 +1,130 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.service; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +/** + * + * A representation of the model object 'Contrail Controller'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ContrailController#getContrailIp Contrail Ip}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ContrailController#getNumberOfRecords Number Of Records}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ContrailController#getNumberOfErrors Number Of Errors}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getContrailController() + * @model + * @generated + */ +public interface ContrailController extends NamedEntity { + /** + * Returns the value of the 'Contrail Ip' attribute. + * + *

+ * If the meaning of the 'Contrail Ip' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Contrail Ip' attribute. + * @see #setContrailIp(String) + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getContrailController_ContrailIp() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getContrailIp(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ContrailController#getContrailIp Contrail Ip}' attribute. + * + * + * @param value the new value of the 'Contrail Ip' attribute. + * @see #getContrailIp() + * @generated + */ + void setContrailIp(String value); + + /** + * Returns the value of the 'Number Of Records' attribute. + * + *

+ * If the meaning of the 'Number Of Records' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Records' attribute. + * @see #setNumberOfRecords(IncreasingULongMetricAttribute) + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getContrailController_NumberOfRecords() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + IncreasingULongMetricAttribute getNumberOfRecords(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ContrailController#getNumberOfRecords Number Of Records}' attribute. + * + * + * @param value the new value of the 'Number Of Records' attribute. + * @see #getNumberOfRecords() + * @generated + */ + void setNumberOfRecords(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Number Of Errors' attribute. + * + *

+ * If the meaning of the 'Number Of Errors' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Errors' attribute. + * @see #setNumberOfErrors(IncreasingULongMetricAttribute) + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getContrailController_NumberOfErrors() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + IncreasingULongMetricAttribute getNumberOfErrors(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ContrailController#getNumberOfErrors Number Of Errors}' attribute. + * + * + * @param value the new value of the 'Number Of Errors' attribute. + * @see #getNumberOfErrors() + * @generated + */ + void setNumberOfErrors(IncreasingULongMetricAttribute value); + +} // ContrailController diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ControllerServiceDmaapDrsubService.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ControllerServiceDmaapDrsubService.java new file mode 100644 index 0000000..4a931ed --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ControllerServiceDmaapDrsubService.java @@ -0,0 +1,40 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; + +/** + * + * A representation of the model object 'Controller Service Dmaap Drsub Service'. + * + * + * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getControllerServiceDmaapDrsubService() + * @model + * @generated + */ +public interface ControllerServiceDmaapDrsubService extends VirtualMachineService { + +} // ControllerServiceDmaapDrsubService diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ControllerServiceDmaapDrsubServiceConfiguration.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ControllerServiceDmaapDrsubServiceConfiguration.java new file mode 100644 index 0000000..d9cb8c1 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ControllerServiceDmaapDrsubServiceConfiguration.java @@ -0,0 +1,353 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.service; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Controller Service Dmaap Drsub Service Configuration'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getCdapUrl Cdap Url}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getNumberOfCdapRecords Number Of Cdap Records}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getNumberOfCdapErrors Number Of Cdap Errors}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getHdfsUri Hdfs Uri}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getHdfsUriDescr Hdfs Uri Descr}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getHdfsPersistLoc Hdfs Persist Loc}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getHdfsPersistLocDescr Hdfs Persist Loc Descr}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getDmaapConfFile Dmaap Conf File}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getDmaapConfFileDescr Dmaap Conf File Descr}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getDmaapStreamid Dmaap Streamid}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getDmaapStreamidDescr Dmaap Streamid Descr}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getControllerServiceDmaapDrsubServiceConfiguration() + * @model + * @generated + */ +public interface ControllerServiceDmaapDrsubServiceConfiguration extends EObject { + /** + * Returns the value of the 'Cdap Url' attribute. + * + *

+ * If the meaning of the 'Cdap Url' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Cdap Url' attribute. + * @see #setCdapUrl(String) + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getControllerServiceDmaapDrsubServiceConfiguration_CdapUrl() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getCdapUrl(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getCdapUrl Cdap Url}' attribute. + * + * + * @param value the new value of the 'Cdap Url' attribute. + * @see #getCdapUrl() + * @generated + */ + void setCdapUrl(String value); + + /** + * Returns the value of the 'Number Of Cdap Records' attribute. + * + *

+ * If the meaning of the 'Number Of Cdap Records' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Cdap Records' attribute. + * @see #setNumberOfCdapRecords(IncreasingULongMetricAttribute) + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getControllerServiceDmaapDrsubServiceConfiguration_NumberOfCdapRecords() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + IncreasingULongMetricAttribute getNumberOfCdapRecords(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getNumberOfCdapRecords Number Of Cdap Records}' attribute. + * + * + * @param value the new value of the 'Number Of Cdap Records' attribute. + * @see #getNumberOfCdapRecords() + * @generated + */ + void setNumberOfCdapRecords(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Number Of Cdap Errors' attribute. + * + *

+ * If the meaning of the 'Number Of Cdap Errors' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Cdap Errors' attribute. + * @see #setNumberOfCdapErrors(IncreasingULongMetricAttribute) + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getControllerServiceDmaapDrsubServiceConfiguration_NumberOfCdapErrors() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + IncreasingULongMetricAttribute getNumberOfCdapErrors(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getNumberOfCdapErrors Number Of Cdap Errors}' attribute. + * + * + * @param value the new value of the 'Number Of Cdap Errors' attribute. + * @see #getNumberOfCdapErrors() + * @generated + */ + void setNumberOfCdapErrors(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Hdfs Uri' attribute. + * + *

+ * If the meaning of the 'Hdfs Uri' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Hdfs Uri' attribute. + * @see #setHdfsUri(String) + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getControllerServiceDmaapDrsubServiceConfiguration_HdfsUri() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getHdfsUri(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getHdfsUri Hdfs Uri}' attribute. + * + * + * @param value the new value of the 'Hdfs Uri' attribute. + * @see #getHdfsUri() + * @generated + */ + void setHdfsUri(String value); + + /** + * Returns the value of the 'Hdfs Uri Descr' attribute. + * + *

+ * If the meaning of the 'Hdfs Uri Descr' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Hdfs Uri Descr' attribute. + * @see #setHdfsUriDescr(String) + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getControllerServiceDmaapDrsubServiceConfiguration_HdfsUriDescr() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getHdfsUriDescr(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getHdfsUriDescr Hdfs Uri Descr}' attribute. + * + * + * @param value the new value of the 'Hdfs Uri Descr' attribute. + * @see #getHdfsUriDescr() + * @generated + */ + void setHdfsUriDescr(String value); + + /** + * Returns the value of the 'Hdfs Persist Loc' attribute. + * + *

+ * If the meaning of the 'Hdfs Persist Loc' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Hdfs Persist Loc' attribute. + * @see #setHdfsPersistLoc(String) + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getControllerServiceDmaapDrsubServiceConfiguration_HdfsPersistLoc() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getHdfsPersistLoc(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getHdfsPersistLoc Hdfs Persist Loc}' attribute. + * + * + * @param value the new value of the 'Hdfs Persist Loc' attribute. + * @see #getHdfsPersistLoc() + * @generated + */ + void setHdfsPersistLoc(String value); + + /** + * Returns the value of the 'Hdfs Persist Loc Descr' attribute. + * + *

+ * If the meaning of the 'Hdfs Persist Loc Descr' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Hdfs Persist Loc Descr' attribute. + * @see #setHdfsPersistLocDescr(String) + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getControllerServiceDmaapDrsubServiceConfiguration_HdfsPersistLocDescr() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getHdfsPersistLocDescr(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getHdfsPersistLocDescr Hdfs Persist Loc Descr}' attribute. + * + * + * @param value the new value of the 'Hdfs Persist Loc Descr' attribute. + * @see #getHdfsPersistLocDescr() + * @generated + */ + void setHdfsPersistLocDescr(String value); + + /** + * Returns the value of the 'Dmaap Conf File' attribute. + * + *

+ * If the meaning of the 'Dmaap Conf File' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dmaap Conf File' attribute. + * @see #setDmaapConfFile(String) + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getControllerServiceDmaapDrsubServiceConfiguration_DmaapConfFile() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getDmaapConfFile(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getDmaapConfFile Dmaap Conf File}' attribute. + * + * + * @param value the new value of the 'Dmaap Conf File' attribute. + * @see #getDmaapConfFile() + * @generated + */ + void setDmaapConfFile(String value); + + /** + * Returns the value of the 'Dmaap Conf File Descr' attribute. + * + *

+ * If the meaning of the 'Dmaap Conf File Descr' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dmaap Conf File Descr' attribute. + * @see #setDmaapConfFileDescr(String) + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getControllerServiceDmaapDrsubServiceConfiguration_DmaapConfFileDescr() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getDmaapConfFileDescr(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getDmaapConfFileDescr Dmaap Conf File Descr}' attribute. + * + * + * @param value the new value of the 'Dmaap Conf File Descr' attribute. + * @see #getDmaapConfFileDescr() + * @generated + */ + void setDmaapConfFileDescr(String value); + + /** + * Returns the value of the 'Dmaap Streamid' attribute. + * + *

+ * If the meaning of the 'Dmaap Streamid' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dmaap Streamid' attribute. + * @see #setDmaapStreamid(String) + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getControllerServiceDmaapDrsubServiceConfiguration_DmaapStreamid() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getDmaapStreamid(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getDmaapStreamid Dmaap Streamid}' attribute. + * + * + * @param value the new value of the 'Dmaap Streamid' attribute. + * @see #getDmaapStreamid() + * @generated + */ + void setDmaapStreamid(String value); + + /** + * Returns the value of the 'Dmaap Streamid Descr' attribute. + * + *

+ * If the meaning of the 'Dmaap Streamid Descr' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Dmaap Streamid Descr' attribute. + * @see #setDmaapStreamidDescr(String) + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getControllerServiceDmaapDrsubServiceConfiguration_DmaapStreamidDescr() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getDmaapStreamidDescr(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getDmaapStreamidDescr Dmaap Streamid Descr}' attribute. + * + * + * @param value the new value of the 'Dmaap Streamid Descr' attribute. + * @see #getDmaapStreamidDescr() + * @generated + */ + void setDmaapStreamidDescr(String value); + +} // ControllerServiceDmaapDrsubServiceConfiguration diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ControllerServiceDmaapDrsubServiceInstance.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ControllerServiceDmaapDrsubServiceInstance.java new file mode 100644 index 0000000..4abe40d --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ControllerServiceDmaapDrsubServiceInstance.java @@ -0,0 +1,99 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.service; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +/** + * + * A representation of the model object 'Controller Service Dmaap Drsub Service Instance'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceInstance#getCdapClusterInstance Cdap Cluster Instance}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceInstance#getCdapServiceName Cdap Service Name}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getControllerServiceDmaapDrsubServiceInstance() + * @model + * @generated + */ +public interface ControllerServiceDmaapDrsubServiceInstance extends VirtualMachineServiceInstance, ControllerServiceDmaapDrsubServiceConfiguration { + + /** + * Returns the value of the 'Cdap Cluster Instance' reference. + * + *

+ * If the meaning of the 'Cdap Cluster Instance' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Cdap Cluster Instance' reference. + * @see #setCdapClusterInstance(CdapClusterServiceInstance) + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getControllerServiceDmaapDrsubServiceInstance_CdapClusterInstance() + * @model + * @generated + */ + CdapClusterServiceInstance getCdapClusterInstance(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceInstance#getCdapClusterInstance Cdap Cluster Instance}' reference. + * + * + * @param value the new value of the 'Cdap Cluster Instance' reference. + * @see #getCdapClusterInstance() + * @generated + */ + void setCdapClusterInstance(CdapClusterServiceInstance value); + + /** + * Returns the value of the 'Cdap Service Name' attribute. + * + *

+ * If the meaning of the 'Cdap Service Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Cdap Service Name' attribute. + * @see #setCdapServiceName(String) + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#getControllerServiceDmaapDrsubServiceInstance_CdapServiceName() + * @model unique="false" + * @generated + */ + String getCdapServiceName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceInstance#getCdapServiceName Cdap Service Name}' attribute. + * + * + * @param value the new value of the 'Cdap Service Name' attribute. + * @see #getCdapServiceName() + * @generated + */ + void setCdapServiceName(String value); +} // ControllerServiceDmaapDrsubServiceInstance diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ServiceFactory.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ServiceFactory.java new file mode 100644 index 0000000..b63c6f5 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ServiceFactory.java @@ -0,0 +1,81 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.service; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage + * @generated + */ +public interface ServiceFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ServiceFactory eINSTANCE = org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ServiceFactoryImpl.init(); + + /** + * Returns a new object of class 'Controller Service Dmaap Drsub Service'. + * + * + * @return a new object of class 'Controller Service Dmaap Drsub Service'. + * @generated + */ + ControllerServiceDmaapDrsubService createControllerServiceDmaapDrsubService(); + + /** + * Returns a new object of class 'Controller Service Dmaap Drsub Service Instance'. + * + * + * @return a new object of class 'Controller Service Dmaap Drsub Service Instance'. + * @generated + */ + ControllerServiceDmaapDrsubServiceInstance createControllerServiceDmaapDrsubServiceInstance(); + + /** + * Returns a new object of class 'Controller Service Dmaap Drsub Service Configuration'. + * + * + * @return a new object of class 'Controller Service Dmaap Drsub Service Configuration'. + * @generated + */ + ControllerServiceDmaapDrsubServiceConfiguration createControllerServiceDmaapDrsubServiceConfiguration(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ServicePackage getServicePackage(); + +} //ServiceFactory diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ServicePackage.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ServicePackage.java new file mode 100644 index 0000000..511d3cf --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/ServicePackage.java @@ -0,0 +1,1165 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.service; + +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServiceFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.dmaap.drsub'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org'" + * @generated + */ +public interface ServicePackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "service"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.dmaap.drsub.service"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "service"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ServicePackage eINSTANCE = org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ServicePackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceImpl Controller Service Dmaap Drsub Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceImpl + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ServicePackageImpl#getControllerServiceDmaapDrsubService() + * @generated + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE__NAME = VmPackage.VIRTUAL_MACHINE_SERVICE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE__LAST_POLLED = VmPackage.VIRTUAL_MACHINE_SERVICE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE__LAST_CHANGED = VmPackage.VIRTUAL_MACHINE_SERVICE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE__CREATED = VmPackage.VIRTUAL_MACHINE_SERVICE__CREATED; + + /** + * The feature id for the 'Instances' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE__INSTANCES = VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE__MANAGER_PORT_NUMBER = VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER; + + /** + * The number of structural features of the 'Controller Service Dmaap Drsub Service' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_FEATURE_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_FEATURE_COUNT + 0; + + /** + * The operation id for the 'Deploy' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE___DEPLOY__STRING_STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___DEPLOY__STRING_STRING; + + /** + * The operation id for the 'Undeploy' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE___UNDEPLOY__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___UNDEPLOY__STRING; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE___TEST__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___TEST__STRING; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE___SUSPEND__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___SUSPEND__STRING; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE___RESUME__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___RESUME__STRING; + + /** + * The operation id for the 'Push Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Poll Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE___POLL_MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___POLL_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE___MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Operation' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT = VmPackage.VIRTUAL_MACHINE_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT; + + /** + * The operation id for the 'Update Configuration From Policy' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING; + + /** + * The operation id for the 'Run Health Tests' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE___RUN_HEALTH_TESTS = VmPackage.VIRTUAL_MACHINE_SERVICE___RUN_HEALTH_TESTS; + + /** + * The operation id for the 'Update Deployment Status' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE___UPDATE_DEPLOYMENT_STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS; + + /** + * The number of operations of the 'Controller Service Dmaap Drsub Service' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_OPERATION_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl Controller Service Dmaap Drsub Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ServicePackageImpl#getControllerServiceDmaapDrsubServiceInstance() + * @generated + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NAME = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__LAST_POLLED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__LAST_CHANGED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CREATED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CREATED; + + /** + * The feature id for the 'Service Container' reference. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__SERVICE_CONTAINER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_CONTAINER; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STATUS; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__INPUT_STREAMS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__OUTPUT_STREAMS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OUTPUT_STREAMS; + + /** + * The feature id for the 'Last Health Test' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__LAST_HEALTH_TEST = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_HEALTH_TEST; + + /** + * The feature id for the 'Health Test Status' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HEALTH_TEST_STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__HEALTH_TEST_STATUS; + + /** + * The feature id for the 'Health Test Message Code' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE; + + /** + * The feature id for the 'Configuration' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CONFIGURATION = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION; + + /** + * The feature id for the 'Location' reference. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__LOCATION = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION; + + /** + * The feature id for the 'Vm Type' reference. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__VM_TYPE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE; + + /** + * The feature id for the 'Users' reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__USERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS; + + /** + * The feature id for the 'Admin Users' reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__ADMIN_USERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS; + + /** + * The feature id for the 'Application Ids' attribute list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__APPLICATION_IDS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS; + + /** + * The feature id for the 'Admin Id' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__ADMIN_ID = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID; + + /** + * The feature id for the 'Number Of Servers' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_SERVERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS; + + /** + * The feature id for the 'Availability Zone' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__AVAILABILITY_ZONE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__MANAGER_PORT_NUMBER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER; + + /** + * The feature id for the 'Servers' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__SERVERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS; + + /** + * The feature id for the 'Leader Server' reference. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__LEADER_SERVER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER; + + /** + * The feature id for the 'Service' container reference. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__SERVICE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE; + + /** + * The feature id for the 'Ieds Admin' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__IEDS_ADMIN = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN; + + /** + * The feature id for the 'Chef User' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CHEF_USER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER; + + /** + * The feature id for the 'Chef Org' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CHEF_ORG = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG; + + /** + * The feature id for the 'Chef Topology' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CHEF_TOPOLOGY = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY; + + /** + * The feature id for the 'Openstack Flavor' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__OPENSTACK_FLAVOR = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR; + + /** + * The feature id for the 'Service Fqdn' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__SERVICE_FQDN = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN; + + /** + * The feature id for the 'Deployment Timeout Minutes' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES; + + /** + * The feature id for the 'Steps' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__STEPS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS; + + /** + * The feature id for the 'Cdap Url' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_URL = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Number Of Cdap Records' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_CDAP_RECORDS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Number Of Cdap Errors' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_CDAP_ERRORS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Hdfs Uri' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_URI = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Hdfs Uri Descr' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_URI_DESCR = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Hdfs Persist Loc' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_PERSIST_LOC = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Hdfs Persist Loc Descr' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_PERSIST_LOC_DESCR = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Dmaap Conf File' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_CONF_FILE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Dmaap Conf File Descr' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_CONF_FILE_DESCR = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 8; + + /** + * The feature id for the 'Dmaap Streamid' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_STREAMID = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 9; + + /** + * The feature id for the 'Dmaap Streamid Descr' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_STREAMID_DESCR = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 10; + + /** + * The feature id for the 'Cdap Cluster Instance' reference. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_CLUSTER_INSTANCE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 11; + + /** + * The feature id for the 'Cdap Service Name' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_SERVICE_NAME = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 12; + + /** + * The number of structural features of the 'Controller Service Dmaap Drsub Service Instance' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE_FEATURE_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 13; + + /** + * The number of operations of the 'Controller Service Dmaap Drsub Service Instance' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE_OPERATION_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceConfigurationImpl Controller Service Dmaap Drsub Service Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ServicePackageImpl#getControllerServiceDmaapDrsubServiceConfiguration() + * @generated + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION = 2; + + /** + * The feature id for the 'Cdap Url' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__CDAP_URL = 0; + + /** + * The feature id for the 'Number Of Cdap Records' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_RECORDS = 1; + + /** + * The feature id for the 'Number Of Cdap Errors' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_ERRORS = 2; + + /** + * The feature id for the 'Hdfs Uri' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI = 3; + + /** + * The feature id for the 'Hdfs Uri Descr' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI_DESCR = 4; + + /** + * The feature id for the 'Hdfs Persist Loc' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC = 5; + + /** + * The feature id for the 'Hdfs Persist Loc Descr' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC_DESCR = 6; + + /** + * The feature id for the 'Dmaap Conf File' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE = 7; + + /** + * The feature id for the 'Dmaap Conf File Descr' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE_DESCR = 8; + + /** + * The feature id for the 'Dmaap Streamid' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID = 9; + + /** + * The feature id for the 'Dmaap Streamid Descr' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID_DESCR = 10; + + /** + * The number of structural features of the 'Controller Service Dmaap Drsub Service Configuration' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION_FEATURE_COUNT = 11; + + /** + * The number of operations of the 'Controller Service Dmaap Drsub Service Configuration' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION_OPERATION_COUNT = 0; + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubService Controller Service Dmaap Drsub Service}'. + * + * + * @return the meta object for class 'Controller Service Dmaap Drsub Service'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubService + * @generated + */ + EClass getControllerServiceDmaapDrsubService(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceInstance Controller Service Dmaap Drsub Service Instance}'. + * + * + * @return the meta object for class 'Controller Service Dmaap Drsub Service Instance'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceInstance + * @generated + */ + EClass getControllerServiceDmaapDrsubServiceInstance(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceInstance#getCdapClusterInstance Cdap Cluster Instance}'. + * + * + * @return the meta object for the reference 'Cdap Cluster Instance'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceInstance#getCdapClusterInstance() + * @see #getControllerServiceDmaapDrsubServiceInstance() + * @generated + */ + EReference getControllerServiceDmaapDrsubServiceInstance_CdapClusterInstance(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceInstance#getCdapServiceName Cdap Service Name}'. + * + * + * @return the meta object for the attribute 'Cdap Service Name'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceInstance#getCdapServiceName() + * @see #getControllerServiceDmaapDrsubServiceInstance() + * @generated + */ + EAttribute getControllerServiceDmaapDrsubServiceInstance_CdapServiceName(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration Controller Service Dmaap Drsub Service Configuration}'. + * + * + * @return the meta object for class 'Controller Service Dmaap Drsub Service Configuration'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration + * @generated + */ + EClass getControllerServiceDmaapDrsubServiceConfiguration(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getCdapUrl Cdap Url}'. + * + * + * @return the meta object for the attribute 'Cdap Url'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getCdapUrl() + * @see #getControllerServiceDmaapDrsubServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceDmaapDrsubServiceConfiguration_CdapUrl(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getNumberOfCdapRecords Number Of Cdap Records}'. + * + * + * @return the meta object for the attribute 'Number Of Cdap Records'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getNumberOfCdapRecords() + * @see #getControllerServiceDmaapDrsubServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceDmaapDrsubServiceConfiguration_NumberOfCdapRecords(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getNumberOfCdapErrors Number Of Cdap Errors}'. + * + * + * @return the meta object for the attribute 'Number Of Cdap Errors'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getNumberOfCdapErrors() + * @see #getControllerServiceDmaapDrsubServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceDmaapDrsubServiceConfiguration_NumberOfCdapErrors(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getHdfsUri Hdfs Uri}'. + * + * + * @return the meta object for the attribute 'Hdfs Uri'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getHdfsUri() + * @see #getControllerServiceDmaapDrsubServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceDmaapDrsubServiceConfiguration_HdfsUri(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getHdfsUriDescr Hdfs Uri Descr}'. + * + * + * @return the meta object for the attribute 'Hdfs Uri Descr'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getHdfsUriDescr() + * @see #getControllerServiceDmaapDrsubServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceDmaapDrsubServiceConfiguration_HdfsUriDescr(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getHdfsPersistLoc Hdfs Persist Loc}'. + * + * + * @return the meta object for the attribute 'Hdfs Persist Loc'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getHdfsPersistLoc() + * @see #getControllerServiceDmaapDrsubServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceDmaapDrsubServiceConfiguration_HdfsPersistLoc(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getHdfsPersistLocDescr Hdfs Persist Loc Descr}'. + * + * + * @return the meta object for the attribute 'Hdfs Persist Loc Descr'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getHdfsPersistLocDescr() + * @see #getControllerServiceDmaapDrsubServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceDmaapDrsubServiceConfiguration_HdfsPersistLocDescr(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getDmaapConfFile Dmaap Conf File}'. + * + * + * @return the meta object for the attribute 'Dmaap Conf File'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getDmaapConfFile() + * @see #getControllerServiceDmaapDrsubServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceDmaapDrsubServiceConfiguration_DmaapConfFile(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getDmaapConfFileDescr Dmaap Conf File Descr}'. + * + * + * @return the meta object for the attribute 'Dmaap Conf File Descr'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getDmaapConfFileDescr() + * @see #getControllerServiceDmaapDrsubServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceDmaapDrsubServiceConfiguration_DmaapConfFileDescr(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getDmaapStreamid Dmaap Streamid}'. + * + * + * @return the meta object for the attribute 'Dmaap Streamid'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getDmaapStreamid() + * @see #getControllerServiceDmaapDrsubServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceDmaapDrsubServiceConfiguration_DmaapStreamid(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getDmaapStreamidDescr Dmaap Streamid Descr}'. + * + * + * @return the meta object for the attribute 'Dmaap Streamid Descr'. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration#getDmaapStreamidDescr() + * @see #getControllerServiceDmaapDrsubServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceDmaapDrsubServiceConfiguration_DmaapStreamidDescr(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ServiceFactory getServiceFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceImpl Controller Service Dmaap Drsub Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceImpl + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ServicePackageImpl#getControllerServiceDmaapDrsubService() + * @generated + */ + EClass CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE = eINSTANCE.getControllerServiceDmaapDrsubService(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl Controller Service Dmaap Drsub Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ServicePackageImpl#getControllerServiceDmaapDrsubServiceInstance() + * @generated + */ + EClass CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE = eINSTANCE.getControllerServiceDmaapDrsubServiceInstance(); + + /** + * The meta object literal for the 'Cdap Cluster Instance' reference feature. + * + * + * @generated + */ + EReference CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_CLUSTER_INSTANCE = eINSTANCE.getControllerServiceDmaapDrsubServiceInstance_CdapClusterInstance(); + + /** + * The meta object literal for the 'Cdap Service Name' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_SERVICE_NAME = eINSTANCE.getControllerServiceDmaapDrsubServiceInstance_CdapServiceName(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceConfigurationImpl Controller Service Dmaap Drsub Service Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ServicePackageImpl#getControllerServiceDmaapDrsubServiceConfiguration() + * @generated + */ + EClass CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION = eINSTANCE.getControllerServiceDmaapDrsubServiceConfiguration(); + + /** + * The meta object literal for the 'Cdap Url' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__CDAP_URL = eINSTANCE.getControllerServiceDmaapDrsubServiceConfiguration_CdapUrl(); + + /** + * The meta object literal for the 'Number Of Cdap Records' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_RECORDS = eINSTANCE.getControllerServiceDmaapDrsubServiceConfiguration_NumberOfCdapRecords(); + + /** + * The meta object literal for the 'Number Of Cdap Errors' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_ERRORS = eINSTANCE.getControllerServiceDmaapDrsubServiceConfiguration_NumberOfCdapErrors(); + + /** + * The meta object literal for the 'Hdfs Uri' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI = eINSTANCE.getControllerServiceDmaapDrsubServiceConfiguration_HdfsUri(); + + /** + * The meta object literal for the 'Hdfs Uri Descr' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI_DESCR = eINSTANCE.getControllerServiceDmaapDrsubServiceConfiguration_HdfsUriDescr(); + + /** + * The meta object literal for the 'Hdfs Persist Loc' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC = eINSTANCE.getControllerServiceDmaapDrsubServiceConfiguration_HdfsPersistLoc(); + + /** + * The meta object literal for the 'Hdfs Persist Loc Descr' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC_DESCR = eINSTANCE.getControllerServiceDmaapDrsubServiceConfiguration_HdfsPersistLocDescr(); + + /** + * The meta object literal for the 'Dmaap Conf File' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE = eINSTANCE.getControllerServiceDmaapDrsubServiceConfiguration_DmaapConfFile(); + + /** + * The meta object literal for the 'Dmaap Conf File Descr' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE_DESCR = eINSTANCE.getControllerServiceDmaapDrsubServiceConfiguration_DmaapConfFileDescr(); + + /** + * The meta object literal for the 'Dmaap Streamid' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID = eINSTANCE.getControllerServiceDmaapDrsubServiceConfiguration_DmaapStreamid(); + + /** + * The meta object literal for the 'Dmaap Streamid Descr' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID_DESCR = eINSTANCE.getControllerServiceDmaapDrsubServiceConfiguration_DmaapStreamidDescr(); + + } + +} //ServicePackage diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ControllerServiceDmaapDrsubServiceConfigurationImpl.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ControllerServiceDmaapDrsubServiceConfigurationImpl.java new file mode 100644 index 0000000..e0b228c --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ControllerServiceDmaapDrsubServiceConfigurationImpl.java @@ -0,0 +1,723 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.service.impl; + +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage; +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Controller Service Dmaap Drsub Service Configuration'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceConfigurationImpl#getCdapUrl Cdap Url}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceConfigurationImpl#getNumberOfCdapRecords Number Of Cdap Records}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceConfigurationImpl#getNumberOfCdapErrors Number Of Cdap Errors}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceConfigurationImpl#getHdfsUri Hdfs Uri}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceConfigurationImpl#getHdfsUriDescr Hdfs Uri Descr}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceConfigurationImpl#getHdfsPersistLoc Hdfs Persist Loc}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceConfigurationImpl#getHdfsPersistLocDescr Hdfs Persist Loc Descr}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceConfigurationImpl#getDmaapConfFile Dmaap Conf File}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceConfigurationImpl#getDmaapConfFileDescr Dmaap Conf File Descr}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceConfigurationImpl#getDmaapStreamid Dmaap Streamid}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceConfigurationImpl#getDmaapStreamidDescr Dmaap Streamid Descr}
  • + *
+ *

+ * + * @generated + */ +public class ControllerServiceDmaapDrsubServiceConfigurationImpl extends MinimalEObjectImpl.Container implements ControllerServiceDmaapDrsubServiceConfiguration { + /** + * The default value of the '{@link #getCdapUrl() Cdap Url}' attribute. + * + * + * @see #getCdapUrl() + * @generated + * @ordered + */ + protected static final String CDAP_URL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCdapUrl() Cdap Url}' attribute. + * + * + * @see #getCdapUrl() + * @generated + * @ordered + */ + protected String cdapUrl = CDAP_URL_EDEFAULT; + + /** + * The default value of the '{@link #getNumberOfCdapRecords() Number Of Cdap Records}' attribute. + * + * + * @see #getNumberOfCdapRecords() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_CDAP_RECORDS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNumberOfCdapRecords() Number Of Cdap Records}' attribute. + * + * + * @see #getNumberOfCdapRecords() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfCdapRecords = NUMBER_OF_CDAP_RECORDS_EDEFAULT; + + /** + * The default value of the '{@link #getNumberOfCdapErrors() Number Of Cdap Errors}' attribute. + * + * + * @see #getNumberOfCdapErrors() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_CDAP_ERRORS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNumberOfCdapErrors() Number Of Cdap Errors}' attribute. + * + * + * @see #getNumberOfCdapErrors() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfCdapErrors = NUMBER_OF_CDAP_ERRORS_EDEFAULT; + + /** + * The default value of the '{@link #getHdfsUri() Hdfs Uri}' attribute. + * + * + * @see #getHdfsUri() + * @generated + * @ordered + */ + protected static final String HDFS_URI_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHdfsUri() Hdfs Uri}' attribute. + * + * + * @see #getHdfsUri() + * @generated + * @ordered + */ + protected String hdfsUri = HDFS_URI_EDEFAULT; + + /** + * The default value of the '{@link #getHdfsUriDescr() Hdfs Uri Descr}' attribute. + * + * + * @see #getHdfsUriDescr() + * @generated + * @ordered + */ + protected static final String HDFS_URI_DESCR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHdfsUriDescr() Hdfs Uri Descr}' attribute. + * + * + * @see #getHdfsUriDescr() + * @generated + * @ordered + */ + protected String hdfsUriDescr = HDFS_URI_DESCR_EDEFAULT; + + /** + * The default value of the '{@link #getHdfsPersistLoc() Hdfs Persist Loc}' attribute. + * + * + * @see #getHdfsPersistLoc() + * @generated + * @ordered + */ + protected static final String HDFS_PERSIST_LOC_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHdfsPersistLoc() Hdfs Persist Loc}' attribute. + * + * + * @see #getHdfsPersistLoc() + * @generated + * @ordered + */ + protected String hdfsPersistLoc = HDFS_PERSIST_LOC_EDEFAULT; + + /** + * The default value of the '{@link #getHdfsPersistLocDescr() Hdfs Persist Loc Descr}' attribute. + * + * + * @see #getHdfsPersistLocDescr() + * @generated + * @ordered + */ + protected static final String HDFS_PERSIST_LOC_DESCR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHdfsPersistLocDescr() Hdfs Persist Loc Descr}' attribute. + * + * + * @see #getHdfsPersistLocDescr() + * @generated + * @ordered + */ + protected String hdfsPersistLocDescr = HDFS_PERSIST_LOC_DESCR_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapConfFile() Dmaap Conf File}' attribute. + * + * + * @see #getDmaapConfFile() + * @generated + * @ordered + */ + protected static final String DMAAP_CONF_FILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapConfFile() Dmaap Conf File}' attribute. + * + * + * @see #getDmaapConfFile() + * @generated + * @ordered + */ + protected String dmaapConfFile = DMAAP_CONF_FILE_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapConfFileDescr() Dmaap Conf File Descr}' attribute. + * + * + * @see #getDmaapConfFileDescr() + * @generated + * @ordered + */ + protected static final String DMAAP_CONF_FILE_DESCR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapConfFileDescr() Dmaap Conf File Descr}' attribute. + * + * + * @see #getDmaapConfFileDescr() + * @generated + * @ordered + */ + protected String dmaapConfFileDescr = DMAAP_CONF_FILE_DESCR_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapStreamid() Dmaap Streamid}' attribute. + * + * + * @see #getDmaapStreamid() + * @generated + * @ordered + */ + protected static final String DMAAP_STREAMID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapStreamid() Dmaap Streamid}' attribute. + * + * + * @see #getDmaapStreamid() + * @generated + * @ordered + */ + protected String dmaapStreamid = DMAAP_STREAMID_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapStreamidDescr() Dmaap Streamid Descr}' attribute. + * + * + * @see #getDmaapStreamidDescr() + * @generated + * @ordered + */ + protected static final String DMAAP_STREAMID_DESCR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapStreamidDescr() Dmaap Streamid Descr}' attribute. + * + * + * @see #getDmaapStreamidDescr() + * @generated + * @ordered + */ + protected String dmaapStreamidDescr = DMAAP_STREAMID_DESCR_EDEFAULT; + + /** + * + * + * @generated + */ + protected ControllerServiceDmaapDrsubServiceConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public String getCdapUrl() { + return cdapUrl; + } + + /** + * + * + * @generated + */ + public void setCdapUrl(String newCdapUrl) { + String oldCdapUrl = cdapUrl; + cdapUrl = newCdapUrl; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__CDAP_URL, oldCdapUrl, cdapUrl)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfCdapRecords() { + return numberOfCdapRecords; + } + + /** + * + * + * @generated + */ + public void setNumberOfCdapRecords(IncreasingULongMetricAttribute newNumberOfCdapRecords) { + IncreasingULongMetricAttribute oldNumberOfCdapRecords = numberOfCdapRecords; + numberOfCdapRecords = newNumberOfCdapRecords; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_RECORDS, oldNumberOfCdapRecords, numberOfCdapRecords)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfCdapErrors() { + return numberOfCdapErrors; + } + + /** + * + * + * @generated + */ + public void setNumberOfCdapErrors(IncreasingULongMetricAttribute newNumberOfCdapErrors) { + IncreasingULongMetricAttribute oldNumberOfCdapErrors = numberOfCdapErrors; + numberOfCdapErrors = newNumberOfCdapErrors; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_ERRORS, oldNumberOfCdapErrors, numberOfCdapErrors)); + } + + /** + * + * + * @generated + */ + public String getHdfsUri() { + return hdfsUri; + } + + /** + * + * + * @generated + */ + public void setHdfsUri(String newHdfsUri) { + String oldHdfsUri = hdfsUri; + hdfsUri = newHdfsUri; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI, oldHdfsUri, hdfsUri)); + } + + /** + * + * + * @generated + */ + public String getHdfsUriDescr() { + return hdfsUriDescr; + } + + /** + * + * + * @generated + */ + public void setHdfsUriDescr(String newHdfsUriDescr) { + String oldHdfsUriDescr = hdfsUriDescr; + hdfsUriDescr = newHdfsUriDescr; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI_DESCR, oldHdfsUriDescr, hdfsUriDescr)); + } + + /** + * + * + * @generated + */ + public String getHdfsPersistLoc() { + return hdfsPersistLoc; + } + + /** + * + * + * @generated + */ + public void setHdfsPersistLoc(String newHdfsPersistLoc) { + String oldHdfsPersistLoc = hdfsPersistLoc; + hdfsPersistLoc = newHdfsPersistLoc; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC, oldHdfsPersistLoc, hdfsPersistLoc)); + } + + /** + * + * + * @generated + */ + public String getHdfsPersistLocDescr() { + return hdfsPersistLocDescr; + } + + /** + * + * + * @generated + */ + public void setHdfsPersistLocDescr(String newHdfsPersistLocDescr) { + String oldHdfsPersistLocDescr = hdfsPersistLocDescr; + hdfsPersistLocDescr = newHdfsPersistLocDescr; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC_DESCR, oldHdfsPersistLocDescr, hdfsPersistLocDescr)); + } + + /** + * + * + * @generated + */ + public String getDmaapConfFile() { + return dmaapConfFile; + } + + /** + * + * + * @generated + */ + public void setDmaapConfFile(String newDmaapConfFile) { + String oldDmaapConfFile = dmaapConfFile; + dmaapConfFile = newDmaapConfFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE, oldDmaapConfFile, dmaapConfFile)); + } + + /** + * + * + * @generated + */ + public String getDmaapConfFileDescr() { + return dmaapConfFileDescr; + } + + /** + * + * + * @generated + */ + public void setDmaapConfFileDescr(String newDmaapConfFileDescr) { + String oldDmaapConfFileDescr = dmaapConfFileDescr; + dmaapConfFileDescr = newDmaapConfFileDescr; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE_DESCR, oldDmaapConfFileDescr, dmaapConfFileDescr)); + } + + /** + * + * + * @generated + */ + public String getDmaapStreamid() { + return dmaapStreamid; + } + + /** + * + * + * @generated + */ + public void setDmaapStreamid(String newDmaapStreamid) { + String oldDmaapStreamid = dmaapStreamid; + dmaapStreamid = newDmaapStreamid; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID, oldDmaapStreamid, dmaapStreamid)); + } + + /** + * + * + * @generated + */ + public String getDmaapStreamidDescr() { + return dmaapStreamidDescr; + } + + /** + * + * + * @generated + */ + public void setDmaapStreamidDescr(String newDmaapStreamidDescr) { + String oldDmaapStreamidDescr = dmaapStreamidDescr; + dmaapStreamidDescr = newDmaapStreamidDescr; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID_DESCR, oldDmaapStreamidDescr, dmaapStreamidDescr)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__CDAP_URL: + return getCdapUrl(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_RECORDS: + return getNumberOfCdapRecords(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_ERRORS: + return getNumberOfCdapErrors(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI: + return getHdfsUri(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI_DESCR: + return getHdfsUriDescr(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC: + return getHdfsPersistLoc(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC_DESCR: + return getHdfsPersistLocDescr(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE: + return getDmaapConfFile(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE_DESCR: + return getDmaapConfFileDescr(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID: + return getDmaapStreamid(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID_DESCR: + return getDmaapStreamidDescr(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__CDAP_URL: + setCdapUrl((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_RECORDS: + setNumberOfCdapRecords((IncreasingULongMetricAttribute)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_ERRORS: + setNumberOfCdapErrors((IncreasingULongMetricAttribute)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI: + setHdfsUri((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI_DESCR: + setHdfsUriDescr((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC: + setHdfsPersistLoc((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC_DESCR: + setHdfsPersistLocDescr((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE: + setDmaapConfFile((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE_DESCR: + setDmaapConfFileDescr((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID: + setDmaapStreamid((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID_DESCR: + setDmaapStreamidDescr((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__CDAP_URL: + setCdapUrl(CDAP_URL_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_RECORDS: + setNumberOfCdapRecords(NUMBER_OF_CDAP_RECORDS_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_ERRORS: + setNumberOfCdapErrors(NUMBER_OF_CDAP_ERRORS_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI: + setHdfsUri(HDFS_URI_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI_DESCR: + setHdfsUriDescr(HDFS_URI_DESCR_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC: + setHdfsPersistLoc(HDFS_PERSIST_LOC_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC_DESCR: + setHdfsPersistLocDescr(HDFS_PERSIST_LOC_DESCR_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE: + setDmaapConfFile(DMAAP_CONF_FILE_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE_DESCR: + setDmaapConfFileDescr(DMAAP_CONF_FILE_DESCR_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID: + setDmaapStreamid(DMAAP_STREAMID_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID_DESCR: + setDmaapStreamidDescr(DMAAP_STREAMID_DESCR_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__CDAP_URL: + return CDAP_URL_EDEFAULT == null ? cdapUrl != null : !CDAP_URL_EDEFAULT.equals(cdapUrl); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_RECORDS: + return NUMBER_OF_CDAP_RECORDS_EDEFAULT == null ? numberOfCdapRecords != null : !NUMBER_OF_CDAP_RECORDS_EDEFAULT.equals(numberOfCdapRecords); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_ERRORS: + return NUMBER_OF_CDAP_ERRORS_EDEFAULT == null ? numberOfCdapErrors != null : !NUMBER_OF_CDAP_ERRORS_EDEFAULT.equals(numberOfCdapErrors); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI: + return HDFS_URI_EDEFAULT == null ? hdfsUri != null : !HDFS_URI_EDEFAULT.equals(hdfsUri); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI_DESCR: + return HDFS_URI_DESCR_EDEFAULT == null ? hdfsUriDescr != null : !HDFS_URI_DESCR_EDEFAULT.equals(hdfsUriDescr); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC: + return HDFS_PERSIST_LOC_EDEFAULT == null ? hdfsPersistLoc != null : !HDFS_PERSIST_LOC_EDEFAULT.equals(hdfsPersistLoc); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC_DESCR: + return HDFS_PERSIST_LOC_DESCR_EDEFAULT == null ? hdfsPersistLocDescr != null : !HDFS_PERSIST_LOC_DESCR_EDEFAULT.equals(hdfsPersistLocDescr); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE: + return DMAAP_CONF_FILE_EDEFAULT == null ? dmaapConfFile != null : !DMAAP_CONF_FILE_EDEFAULT.equals(dmaapConfFile); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE_DESCR: + return DMAAP_CONF_FILE_DESCR_EDEFAULT == null ? dmaapConfFileDescr != null : !DMAAP_CONF_FILE_DESCR_EDEFAULT.equals(dmaapConfFileDescr); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID: + return DMAAP_STREAMID_EDEFAULT == null ? dmaapStreamid != null : !DMAAP_STREAMID_EDEFAULT.equals(dmaapStreamid); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID_DESCR: + return DMAAP_STREAMID_DESCR_EDEFAULT == null ? dmaapStreamidDescr != null : !DMAAP_STREAMID_DESCR_EDEFAULT.equals(dmaapStreamidDescr); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (cdapUrl: "); + result.append(cdapUrl); + result.append(", numberOfCdapRecords: "); + result.append(numberOfCdapRecords); + result.append(", numberOfCdapErrors: "); + result.append(numberOfCdapErrors); + result.append(", hdfsUri: "); + result.append(hdfsUri); + result.append(", hdfsUriDescr: "); + result.append(hdfsUriDescr); + result.append(", hdfsPersistLoc: "); + result.append(hdfsPersistLoc); + result.append(", hdfsPersistLocDescr: "); + result.append(hdfsPersistLocDescr); + result.append(", dmaapConfFile: "); + result.append(dmaapConfFile); + result.append(", dmaapConfFileDescr: "); + result.append(dmaapConfFileDescr); + result.append(", dmaapStreamid: "); + result.append(dmaapStreamid); + result.append(", dmaapStreamidDescr: "); + result.append(dmaapStreamidDescr); + result.append(')'); + return result.toString(); + } + +} //ControllerServiceDmaapDrsubServiceConfigurationImpl diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ControllerServiceDmaapDrsubServiceImpl.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ControllerServiceDmaapDrsubServiceImpl.java new file mode 100644 index 0000000..4da97f0 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ControllerServiceDmaapDrsubServiceImpl.java @@ -0,0 +1,60 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.service.impl; + +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubService; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage; +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl; +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Controller Service Dmaap Drsub Service'. + * + *

+ *

+ * + * @generated + */ +public class ControllerServiceDmaapDrsubServiceImpl extends VirtualMachineServiceImpl implements ControllerServiceDmaapDrsubService { + /** + * + * + * @generated + */ + protected ControllerServiceDmaapDrsubServiceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE; + } + +} //ControllerServiceDmaapDrsubServiceImpl diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ControllerServiceDmaapDrsubServiceInstanceImpl.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ControllerServiceDmaapDrsubServiceInstanceImpl.java new file mode 100644 index 0000000..e328f52 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ControllerServiceDmaapDrsubServiceInstanceImpl.java @@ -0,0 +1,892 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.service.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceInstance; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage; +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl; +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Controller Service Dmaap Drsub Service Instance'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl#getCdapUrl Cdap Url}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl#getNumberOfCdapRecords Number Of Cdap Records}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl#getNumberOfCdapErrors Number Of Cdap Errors}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl#getHdfsUri Hdfs Uri}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl#getHdfsUriDescr Hdfs Uri Descr}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl#getHdfsPersistLoc Hdfs Persist Loc}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl#getHdfsPersistLocDescr Hdfs Persist Loc Descr}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl#getDmaapConfFile Dmaap Conf File}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl#getDmaapConfFileDescr Dmaap Conf File Descr}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl#getDmaapStreamid Dmaap Streamid}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl#getDmaapStreamidDescr Dmaap Streamid Descr}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl#getCdapClusterInstance Cdap Cluster Instance}
  • + *
  • {@link org.openecomp.dcae.controller.service.dmaap.drsub.service.impl.ControllerServiceDmaapDrsubServiceInstanceImpl#getCdapServiceName Cdap Service Name}
  • + *
+ *

+ * + * @generated + */ +public class ControllerServiceDmaapDrsubServiceInstanceImpl extends VirtualMachineServiceInstanceImpl implements ControllerServiceDmaapDrsubServiceInstance { + /** + * The default value of the '{@link #getCdapUrl() Cdap Url}' attribute. + * + * + * @see #getCdapUrl() + * @generated + * @ordered + */ + protected static final String CDAP_URL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCdapUrl() Cdap Url}' attribute. + * + * + * @see #getCdapUrl() + * @generated + * @ordered + */ + protected String cdapUrl = CDAP_URL_EDEFAULT; + + /** + * The default value of the '{@link #getNumberOfCdapRecords() Number Of Cdap Records}' attribute. + * + * + * @see #getNumberOfCdapRecords() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_CDAP_RECORDS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNumberOfCdapRecords() Number Of Cdap Records}' attribute. + * + * + * @see #getNumberOfCdapRecords() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfCdapRecords = NUMBER_OF_CDAP_RECORDS_EDEFAULT; + + /** + * The default value of the '{@link #getNumberOfCdapErrors() Number Of Cdap Errors}' attribute. + * + * + * @see #getNumberOfCdapErrors() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_CDAP_ERRORS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNumberOfCdapErrors() Number Of Cdap Errors}' attribute. + * + * + * @see #getNumberOfCdapErrors() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfCdapErrors = NUMBER_OF_CDAP_ERRORS_EDEFAULT; + + /** + * The default value of the '{@link #getHdfsUri() Hdfs Uri}' attribute. + * + * + * @see #getHdfsUri() + * @generated + * @ordered + */ + protected static final String HDFS_URI_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHdfsUri() Hdfs Uri}' attribute. + * + * + * @see #getHdfsUri() + * @generated + * @ordered + */ + protected String hdfsUri = HDFS_URI_EDEFAULT; + + /** + * The default value of the '{@link #getHdfsUriDescr() Hdfs Uri Descr}' attribute. + * + * + * @see #getHdfsUriDescr() + * @generated + * @ordered + */ + protected static final String HDFS_URI_DESCR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHdfsUriDescr() Hdfs Uri Descr}' attribute. + * + * + * @see #getHdfsUriDescr() + * @generated + * @ordered + */ + protected String hdfsUriDescr = HDFS_URI_DESCR_EDEFAULT; + + /** + * The default value of the '{@link #getHdfsPersistLoc() Hdfs Persist Loc}' attribute. + * + * + * @see #getHdfsPersistLoc() + * @generated + * @ordered + */ + protected static final String HDFS_PERSIST_LOC_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHdfsPersistLoc() Hdfs Persist Loc}' attribute. + * + * + * @see #getHdfsPersistLoc() + * @generated + * @ordered + */ + protected String hdfsPersistLoc = HDFS_PERSIST_LOC_EDEFAULT; + + /** + * The default value of the '{@link #getHdfsPersistLocDescr() Hdfs Persist Loc Descr}' attribute. + * + * + * @see #getHdfsPersistLocDescr() + * @generated + * @ordered + */ + protected static final String HDFS_PERSIST_LOC_DESCR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHdfsPersistLocDescr() Hdfs Persist Loc Descr}' attribute. + * + * + * @see #getHdfsPersistLocDescr() + * @generated + * @ordered + */ + protected String hdfsPersistLocDescr = HDFS_PERSIST_LOC_DESCR_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapConfFile() Dmaap Conf File}' attribute. + * + * + * @see #getDmaapConfFile() + * @generated + * @ordered + */ + protected static final String DMAAP_CONF_FILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapConfFile() Dmaap Conf File}' attribute. + * + * + * @see #getDmaapConfFile() + * @generated + * @ordered + */ + protected String dmaapConfFile = DMAAP_CONF_FILE_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapConfFileDescr() Dmaap Conf File Descr}' attribute. + * + * + * @see #getDmaapConfFileDescr() + * @generated + * @ordered + */ + protected static final String DMAAP_CONF_FILE_DESCR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapConfFileDescr() Dmaap Conf File Descr}' attribute. + * + * + * @see #getDmaapConfFileDescr() + * @generated + * @ordered + */ + protected String dmaapConfFileDescr = DMAAP_CONF_FILE_DESCR_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapStreamid() Dmaap Streamid}' attribute. + * + * + * @see #getDmaapStreamid() + * @generated + * @ordered + */ + protected static final String DMAAP_STREAMID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapStreamid() Dmaap Streamid}' attribute. + * + * + * @see #getDmaapStreamid() + * @generated + * @ordered + */ + protected String dmaapStreamid = DMAAP_STREAMID_EDEFAULT; + + /** + * The default value of the '{@link #getDmaapStreamidDescr() Dmaap Streamid Descr}' attribute. + * + * + * @see #getDmaapStreamidDescr() + * @generated + * @ordered + */ + protected static final String DMAAP_STREAMID_DESCR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDmaapStreamidDescr() Dmaap Streamid Descr}' attribute. + * + * + * @see #getDmaapStreamidDescr() + * @generated + * @ordered + */ + protected String dmaapStreamidDescr = DMAAP_STREAMID_DESCR_EDEFAULT; + + /** + * The cached value of the '{@link #getCdapClusterInstance() Cdap Cluster Instance}' reference. + * + * + * @see #getCdapClusterInstance() + * @generated + * @ordered + */ + protected CdapClusterServiceInstance cdapClusterInstance; + + /** + * The default value of the '{@link #getCdapServiceName() Cdap Service Name}' attribute. + * + * + * @see #getCdapServiceName() + * @generated + * @ordered + */ + protected static final String CDAP_SERVICE_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCdapServiceName() Cdap Service Name}' attribute. + * + * + * @see #getCdapServiceName() + * @generated + * @ordered + */ + protected String cdapServiceName = CDAP_SERVICE_NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected ControllerServiceDmaapDrsubServiceInstanceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE; + } + + /** + * + * + * @generated + */ + public String getCdapUrl() { + return cdapUrl; + } + + /** + * + * + * @generated + */ + public void setCdapUrl(String newCdapUrl) { + String oldCdapUrl = cdapUrl; + cdapUrl = newCdapUrl; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_URL, oldCdapUrl, cdapUrl)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfCdapRecords() { + return numberOfCdapRecords; + } + + /** + * + * + * @generated + */ + public void setNumberOfCdapRecords(IncreasingULongMetricAttribute newNumberOfCdapRecords) { + IncreasingULongMetricAttribute oldNumberOfCdapRecords = numberOfCdapRecords; + numberOfCdapRecords = newNumberOfCdapRecords; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_CDAP_RECORDS, oldNumberOfCdapRecords, numberOfCdapRecords)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfCdapErrors() { + return numberOfCdapErrors; + } + + /** + * + * + * @generated + */ + public void setNumberOfCdapErrors(IncreasingULongMetricAttribute newNumberOfCdapErrors) { + IncreasingULongMetricAttribute oldNumberOfCdapErrors = numberOfCdapErrors; + numberOfCdapErrors = newNumberOfCdapErrors; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_CDAP_ERRORS, oldNumberOfCdapErrors, numberOfCdapErrors)); + } + + /** + * + * + * @generated + */ + public String getHdfsUri() { + return hdfsUri; + } + + /** + * + * + * @generated + */ + public void setHdfsUri(String newHdfsUri) { + String oldHdfsUri = hdfsUri; + hdfsUri = newHdfsUri; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_URI, oldHdfsUri, hdfsUri)); + } + + /** + * + * + * @generated + */ + public String getHdfsUriDescr() { + return hdfsUriDescr; + } + + /** + * + * + * @generated + */ + public void setHdfsUriDescr(String newHdfsUriDescr) { + String oldHdfsUriDescr = hdfsUriDescr; + hdfsUriDescr = newHdfsUriDescr; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_URI_DESCR, oldHdfsUriDescr, hdfsUriDescr)); + } + + /** + * + * + * @generated + */ + public String getHdfsPersistLoc() { + return hdfsPersistLoc; + } + + /** + * + * + * @generated + */ + public void setHdfsPersistLoc(String newHdfsPersistLoc) { + String oldHdfsPersistLoc = hdfsPersistLoc; + hdfsPersistLoc = newHdfsPersistLoc; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_PERSIST_LOC, oldHdfsPersistLoc, hdfsPersistLoc)); + } + + /** + * + * + * @generated + */ + public String getHdfsPersistLocDescr() { + return hdfsPersistLocDescr; + } + + /** + * + * + * @generated + */ + public void setHdfsPersistLocDescr(String newHdfsPersistLocDescr) { + String oldHdfsPersistLocDescr = hdfsPersistLocDescr; + hdfsPersistLocDescr = newHdfsPersistLocDescr; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_PERSIST_LOC_DESCR, oldHdfsPersistLocDescr, hdfsPersistLocDescr)); + } + + /** + * + * + * @generated + */ + public String getDmaapConfFile() { + return dmaapConfFile; + } + + /** + * + * + * @generated + */ + public void setDmaapConfFile(String newDmaapConfFile) { + String oldDmaapConfFile = dmaapConfFile; + dmaapConfFile = newDmaapConfFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_CONF_FILE, oldDmaapConfFile, dmaapConfFile)); + } + + /** + * + * + * @generated + */ + public String getDmaapConfFileDescr() { + return dmaapConfFileDescr; + } + + /** + * + * + * @generated + */ + public void setDmaapConfFileDescr(String newDmaapConfFileDescr) { + String oldDmaapConfFileDescr = dmaapConfFileDescr; + dmaapConfFileDescr = newDmaapConfFileDescr; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_CONF_FILE_DESCR, oldDmaapConfFileDescr, dmaapConfFileDescr)); + } + + /** + * + * + * @generated + */ + public String getDmaapStreamid() { + return dmaapStreamid; + } + + /** + * + * + * @generated + */ + public void setDmaapStreamid(String newDmaapStreamid) { + String oldDmaapStreamid = dmaapStreamid; + dmaapStreamid = newDmaapStreamid; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_STREAMID, oldDmaapStreamid, dmaapStreamid)); + } + + /** + * + * + * @generated + */ + public String getDmaapStreamidDescr() { + return dmaapStreamidDescr; + } + + /** + * + * + * @generated + */ + public void setDmaapStreamidDescr(String newDmaapStreamidDescr) { + String oldDmaapStreamidDescr = dmaapStreamidDescr; + dmaapStreamidDescr = newDmaapStreamidDescr; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_STREAMID_DESCR, oldDmaapStreamidDescr, dmaapStreamidDescr)); + } + + /** + * + * + * @generated + */ + public CdapClusterServiceInstance getCdapClusterInstance() { + if (cdapClusterInstance != null && cdapClusterInstance.eIsProxy()) { + InternalEObject oldCdapClusterInstance = (InternalEObject)cdapClusterInstance; + cdapClusterInstance = (CdapClusterServiceInstance)eResolveProxy(oldCdapClusterInstance); + if (cdapClusterInstance != oldCdapClusterInstance) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_CLUSTER_INSTANCE, oldCdapClusterInstance, cdapClusterInstance)); + } + } + return cdapClusterInstance; + } + + /** + * + * + * @generated + */ + public CdapClusterServiceInstance basicGetCdapClusterInstance() { + return cdapClusterInstance; + } + + /** + * + * + * @generated + */ + public void setCdapClusterInstance(CdapClusterServiceInstance newCdapClusterInstance) { + CdapClusterServiceInstance oldCdapClusterInstance = cdapClusterInstance; + cdapClusterInstance = newCdapClusterInstance; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_CLUSTER_INSTANCE, oldCdapClusterInstance, cdapClusterInstance)); + } + + /** + * + * + * @generated + */ + public String getCdapServiceName() { + return cdapServiceName; + } + + /** + * + * + * @generated + */ + public void setCdapServiceName(String newCdapServiceName) { + String oldCdapServiceName = cdapServiceName; + cdapServiceName = newCdapServiceName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_SERVICE_NAME, oldCdapServiceName, cdapServiceName)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_URL: + return getCdapUrl(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_CDAP_RECORDS: + return getNumberOfCdapRecords(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_CDAP_ERRORS: + return getNumberOfCdapErrors(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_URI: + return getHdfsUri(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_URI_DESCR: + return getHdfsUriDescr(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_PERSIST_LOC: + return getHdfsPersistLoc(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_PERSIST_LOC_DESCR: + return getHdfsPersistLocDescr(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_CONF_FILE: + return getDmaapConfFile(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_CONF_FILE_DESCR: + return getDmaapConfFileDescr(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_STREAMID: + return getDmaapStreamid(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_STREAMID_DESCR: + return getDmaapStreamidDescr(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_CLUSTER_INSTANCE: + if (resolve) return getCdapClusterInstance(); + return basicGetCdapClusterInstance(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_SERVICE_NAME: + return getCdapServiceName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_URL: + setCdapUrl((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_CDAP_RECORDS: + setNumberOfCdapRecords((IncreasingULongMetricAttribute)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_CDAP_ERRORS: + setNumberOfCdapErrors((IncreasingULongMetricAttribute)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_URI: + setHdfsUri((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_URI_DESCR: + setHdfsUriDescr((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_PERSIST_LOC: + setHdfsPersistLoc((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_PERSIST_LOC_DESCR: + setHdfsPersistLocDescr((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_CONF_FILE: + setDmaapConfFile((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_CONF_FILE_DESCR: + setDmaapConfFileDescr((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_STREAMID: + setDmaapStreamid((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_STREAMID_DESCR: + setDmaapStreamidDescr((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_CLUSTER_INSTANCE: + setCdapClusterInstance((CdapClusterServiceInstance)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_SERVICE_NAME: + setCdapServiceName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_URL: + setCdapUrl(CDAP_URL_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_CDAP_RECORDS: + setNumberOfCdapRecords(NUMBER_OF_CDAP_RECORDS_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_CDAP_ERRORS: + setNumberOfCdapErrors(NUMBER_OF_CDAP_ERRORS_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_URI: + setHdfsUri(HDFS_URI_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_URI_DESCR: + setHdfsUriDescr(HDFS_URI_DESCR_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_PERSIST_LOC: + setHdfsPersistLoc(HDFS_PERSIST_LOC_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_PERSIST_LOC_DESCR: + setHdfsPersistLocDescr(HDFS_PERSIST_LOC_DESCR_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_CONF_FILE: + setDmaapConfFile(DMAAP_CONF_FILE_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_CONF_FILE_DESCR: + setDmaapConfFileDescr(DMAAP_CONF_FILE_DESCR_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_STREAMID: + setDmaapStreamid(DMAAP_STREAMID_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_STREAMID_DESCR: + setDmaapStreamidDescr(DMAAP_STREAMID_DESCR_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_CLUSTER_INSTANCE: + setCdapClusterInstance((CdapClusterServiceInstance)null); + return; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_SERVICE_NAME: + setCdapServiceName(CDAP_SERVICE_NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_URL: + return CDAP_URL_EDEFAULT == null ? cdapUrl != null : !CDAP_URL_EDEFAULT.equals(cdapUrl); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_CDAP_RECORDS: + return NUMBER_OF_CDAP_RECORDS_EDEFAULT == null ? numberOfCdapRecords != null : !NUMBER_OF_CDAP_RECORDS_EDEFAULT.equals(numberOfCdapRecords); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_CDAP_ERRORS: + return NUMBER_OF_CDAP_ERRORS_EDEFAULT == null ? numberOfCdapErrors != null : !NUMBER_OF_CDAP_ERRORS_EDEFAULT.equals(numberOfCdapErrors); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_URI: + return HDFS_URI_EDEFAULT == null ? hdfsUri != null : !HDFS_URI_EDEFAULT.equals(hdfsUri); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_URI_DESCR: + return HDFS_URI_DESCR_EDEFAULT == null ? hdfsUriDescr != null : !HDFS_URI_DESCR_EDEFAULT.equals(hdfsUriDescr); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_PERSIST_LOC: + return HDFS_PERSIST_LOC_EDEFAULT == null ? hdfsPersistLoc != null : !HDFS_PERSIST_LOC_EDEFAULT.equals(hdfsPersistLoc); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_PERSIST_LOC_DESCR: + return HDFS_PERSIST_LOC_DESCR_EDEFAULT == null ? hdfsPersistLocDescr != null : !HDFS_PERSIST_LOC_DESCR_EDEFAULT.equals(hdfsPersistLocDescr); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_CONF_FILE: + return DMAAP_CONF_FILE_EDEFAULT == null ? dmaapConfFile != null : !DMAAP_CONF_FILE_EDEFAULT.equals(dmaapConfFile); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_CONF_FILE_DESCR: + return DMAAP_CONF_FILE_DESCR_EDEFAULT == null ? dmaapConfFileDescr != null : !DMAAP_CONF_FILE_DESCR_EDEFAULT.equals(dmaapConfFileDescr); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_STREAMID: + return DMAAP_STREAMID_EDEFAULT == null ? dmaapStreamid != null : !DMAAP_STREAMID_EDEFAULT.equals(dmaapStreamid); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_STREAMID_DESCR: + return DMAAP_STREAMID_DESCR_EDEFAULT == null ? dmaapStreamidDescr != null : !DMAAP_STREAMID_DESCR_EDEFAULT.equals(dmaapStreamidDescr); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_CLUSTER_INSTANCE: + return cdapClusterInstance != null; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_SERVICE_NAME: + return CDAP_SERVICE_NAME_EDEFAULT == null ? cdapServiceName != null : !CDAP_SERVICE_NAME_EDEFAULT.equals(cdapServiceName); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == ControllerServiceDmaapDrsubServiceConfiguration.class) { + switch (derivedFeatureID) { + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_URL: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__CDAP_URL; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_CDAP_RECORDS: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_RECORDS; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_CDAP_ERRORS: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_ERRORS; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_URI: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_URI_DESCR: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI_DESCR; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_PERSIST_LOC: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_PERSIST_LOC_DESCR: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC_DESCR; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_CONF_FILE: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_CONF_FILE_DESCR: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE_DESCR; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_STREAMID: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_STREAMID_DESCR: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID_DESCR; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == ControllerServiceDmaapDrsubServiceConfiguration.class) { + switch (baseFeatureID) { + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__CDAP_URL: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_URL; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_RECORDS: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_CDAP_RECORDS; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_ERRORS: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__NUMBER_OF_CDAP_ERRORS; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_URI; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI_DESCR: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_URI_DESCR; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_PERSIST_LOC; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC_DESCR: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__HDFS_PERSIST_LOC_DESCR; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_CONF_FILE; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE_DESCR: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_CONF_FILE_DESCR; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_STREAMID; + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID_DESCR: return ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__DMAAP_STREAMID_DESCR; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (cdapUrl: "); + result.append(cdapUrl); + result.append(", numberOfCdapRecords: "); + result.append(numberOfCdapRecords); + result.append(", numberOfCdapErrors: "); + result.append(numberOfCdapErrors); + result.append(", hdfsUri: "); + result.append(hdfsUri); + result.append(", hdfsUriDescr: "); + result.append(hdfsUriDescr); + result.append(", hdfsPersistLoc: "); + result.append(hdfsPersistLoc); + result.append(", hdfsPersistLocDescr: "); + result.append(hdfsPersistLocDescr); + result.append(", dmaapConfFile: "); + result.append(dmaapConfFile); + result.append(", dmaapConfFileDescr: "); + result.append(dmaapConfFileDescr); + result.append(", dmaapStreamid: "); + result.append(dmaapStreamid); + result.append(", dmaapStreamidDescr: "); + result.append(dmaapStreamidDescr); + result.append(", cdapServiceName: "); + result.append(cdapServiceName); + result.append(')'); + return result.toString(); + } + +} //ControllerServiceDmaapDrsubServiceInstanceImpl diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ServiceFactoryImpl.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ServiceFactoryImpl.java new file mode 100644 index 0000000..2f97110 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ServiceFactoryImpl.java @@ -0,0 +1,138 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.service.impl; + +import org.openecomp.dcae.controller.service.dmaap.drsub.service.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ServiceFactoryImpl extends EFactoryImpl implements ServiceFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ServiceFactory init() { + try { + ServiceFactory theServiceFactory = (ServiceFactory)EPackage.Registry.INSTANCE.getEFactory(ServicePackage.eNS_URI); + if (theServiceFactory != null) { + return theServiceFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ServiceFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ServiceFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE: return createControllerServiceDmaapDrsubService(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE: return createControllerServiceDmaapDrsubServiceInstance(); + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION: return createControllerServiceDmaapDrsubServiceConfiguration(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public ControllerServiceDmaapDrsubService createControllerServiceDmaapDrsubService() { + ControllerServiceDmaapDrsubServiceImpl controllerServiceDmaapDrsubService = new ControllerServiceDmaapDrsubServiceImpl(); + return controllerServiceDmaapDrsubService; + } + + /** + * + * + * @generated + */ + public ControllerServiceDmaapDrsubServiceInstance createControllerServiceDmaapDrsubServiceInstance() { + ControllerServiceDmaapDrsubServiceInstanceImpl controllerServiceDmaapDrsubServiceInstance = new ControllerServiceDmaapDrsubServiceInstanceImpl(); + return controllerServiceDmaapDrsubServiceInstance; + } + + /** + * + * + * @generated + */ + public ControllerServiceDmaapDrsubServiceConfiguration createControllerServiceDmaapDrsubServiceConfiguration() { + ControllerServiceDmaapDrsubServiceConfigurationImpl controllerServiceDmaapDrsubServiceConfiguration = new ControllerServiceDmaapDrsubServiceConfigurationImpl(); + return controllerServiceDmaapDrsubServiceConfiguration; + } + + /** + * + * + * @generated + */ + public ServicePackage getServicePackage() { + return (ServicePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ServicePackage getPackage() { + return ServicePackage.eINSTANCE; + } + +} //ServiceFactoryImpl diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ServicePackageImpl.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ServicePackageImpl.java new file mode 100644 index 0000000..e958f0b --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/impl/ServicePackageImpl.java @@ -0,0 +1,484 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.service.impl; + +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubService; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceInstance; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ServiceFactory; +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage; +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.openecomp.ncomp.core.CorePackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ServicePackageImpl extends EPackageImpl implements ServicePackage { + /** + * + * + * @generated + */ + private EClass controllerServiceDmaapDrsubServiceEClass = null; + + /** + * + * + * @generated + */ + private EClass controllerServiceDmaapDrsubServiceInstanceEClass = null; + + /** + * + * + * @generated + */ + private EClass controllerServiceDmaapDrsubServiceConfigurationEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage#eNS_URI + * @see #init() + * @generated + */ + private ServicePackageImpl() { + super(eNS_URI, ServiceFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ServicePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ServicePackage init() { + if (isInited) return (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + + // Obtain or create and register package + ServicePackageImpl theServicePackage = (ServicePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ServicePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ServicePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theServicePackage.createPackageContents(); + + // Initialize created meta-data + theServicePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theServicePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ServicePackage.eNS_URI, theServicePackage); + return theServicePackage; + } + + /** + * + * + * @generated + */ + public EClass getControllerServiceDmaapDrsubService() { + return controllerServiceDmaapDrsubServiceEClass; + } + + /** + * + * + * @generated + */ + public EClass getControllerServiceDmaapDrsubServiceInstance() { + return controllerServiceDmaapDrsubServiceInstanceEClass; + } + + /** + * + * + * @generated + */ + public EReference getControllerServiceDmaapDrsubServiceInstance_CdapClusterInstance() { + return (EReference)controllerServiceDmaapDrsubServiceInstanceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceDmaapDrsubServiceInstance_CdapServiceName() { + return (EAttribute)controllerServiceDmaapDrsubServiceInstanceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getControllerServiceDmaapDrsubServiceConfiguration() { + return controllerServiceDmaapDrsubServiceConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceDmaapDrsubServiceConfiguration_CdapUrl() { + return (EAttribute)controllerServiceDmaapDrsubServiceConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceDmaapDrsubServiceConfiguration_NumberOfCdapRecords() { + return (EAttribute)controllerServiceDmaapDrsubServiceConfigurationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceDmaapDrsubServiceConfiguration_NumberOfCdapErrors() { + return (EAttribute)controllerServiceDmaapDrsubServiceConfigurationEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceDmaapDrsubServiceConfiguration_HdfsUri() { + return (EAttribute)controllerServiceDmaapDrsubServiceConfigurationEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceDmaapDrsubServiceConfiguration_HdfsUriDescr() { + return (EAttribute)controllerServiceDmaapDrsubServiceConfigurationEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceDmaapDrsubServiceConfiguration_HdfsPersistLoc() { + return (EAttribute)controllerServiceDmaapDrsubServiceConfigurationEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceDmaapDrsubServiceConfiguration_HdfsPersistLocDescr() { + return (EAttribute)controllerServiceDmaapDrsubServiceConfigurationEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceDmaapDrsubServiceConfiguration_DmaapConfFile() { + return (EAttribute)controllerServiceDmaapDrsubServiceConfigurationEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceDmaapDrsubServiceConfiguration_DmaapConfFileDescr() { + return (EAttribute)controllerServiceDmaapDrsubServiceConfigurationEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceDmaapDrsubServiceConfiguration_DmaapStreamid() { + return (EAttribute)controllerServiceDmaapDrsubServiceConfigurationEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceDmaapDrsubServiceConfiguration_DmaapStreamidDescr() { + return (EAttribute)controllerServiceDmaapDrsubServiceConfigurationEClass.getEStructuralFeatures().get(10); + } + + /** + * + * + * @generated + */ + public ServiceFactory getServiceFactory() { + return (ServiceFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + controllerServiceDmaapDrsubServiceEClass = createEClass(CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE); + + controllerServiceDmaapDrsubServiceInstanceEClass = createEClass(CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE); + createEReference(controllerServiceDmaapDrsubServiceInstanceEClass, CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_CLUSTER_INSTANCE); + createEAttribute(controllerServiceDmaapDrsubServiceInstanceEClass, CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE__CDAP_SERVICE_NAME); + + controllerServiceDmaapDrsubServiceConfigurationEClass = createEClass(CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION); + createEAttribute(controllerServiceDmaapDrsubServiceConfigurationEClass, CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__CDAP_URL); + createEAttribute(controllerServiceDmaapDrsubServiceConfigurationEClass, CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_RECORDS); + createEAttribute(controllerServiceDmaapDrsubServiceConfigurationEClass, CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__NUMBER_OF_CDAP_ERRORS); + createEAttribute(controllerServiceDmaapDrsubServiceConfigurationEClass, CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI); + createEAttribute(controllerServiceDmaapDrsubServiceConfigurationEClass, CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_URI_DESCR); + createEAttribute(controllerServiceDmaapDrsubServiceConfigurationEClass, CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC); + createEAttribute(controllerServiceDmaapDrsubServiceConfigurationEClass, CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__HDFS_PERSIST_LOC_DESCR); + createEAttribute(controllerServiceDmaapDrsubServiceConfigurationEClass, CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE); + createEAttribute(controllerServiceDmaapDrsubServiceConfigurationEClass, CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_CONF_FILE_DESCR); + createEAttribute(controllerServiceDmaapDrsubServiceConfigurationEClass, CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID); + createEAttribute(controllerServiceDmaapDrsubServiceConfigurationEClass, CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION__DMAAP_STREAMID_DESCR); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + VmPackage theVmPackage = (VmPackage)EPackage.Registry.INSTANCE.getEPackage(VmPackage.eNS_URI); + org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage theServicePackage_1 = (org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage)EPackage.Registry.INSTANCE.getEPackage(org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + controllerServiceDmaapDrsubServiceEClass.getESuperTypes().add(theVmPackage.getVirtualMachineService()); + controllerServiceDmaapDrsubServiceInstanceEClass.getESuperTypes().add(theVmPackage.getVirtualMachineServiceInstance()); + controllerServiceDmaapDrsubServiceInstanceEClass.getESuperTypes().add(this.getControllerServiceDmaapDrsubServiceConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(controllerServiceDmaapDrsubServiceEClass, ControllerServiceDmaapDrsubService.class, "ControllerServiceDmaapDrsubService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(controllerServiceDmaapDrsubServiceInstanceEClass, ControllerServiceDmaapDrsubServiceInstance.class, "ControllerServiceDmaapDrsubServiceInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getControllerServiceDmaapDrsubServiceInstance_CdapClusterInstance(), theServicePackage_1.getCdapClusterServiceInstance(), null, "cdapClusterInstance", null, 0, 1, ControllerServiceDmaapDrsubServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceDmaapDrsubServiceInstance_CdapServiceName(), theEcorePackage.getEString(), "cdapServiceName", null, 0, 1, ControllerServiceDmaapDrsubServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(controllerServiceDmaapDrsubServiceConfigurationEClass, ControllerServiceDmaapDrsubServiceConfiguration.class, "ControllerServiceDmaapDrsubServiceConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getControllerServiceDmaapDrsubServiceConfiguration_CdapUrl(), theEcorePackage.getEString(), "cdapUrl", null, 0, 1, ControllerServiceDmaapDrsubServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceDmaapDrsubServiceConfiguration_NumberOfCdapRecords(), theCorePackage.getIncreasingULongMetricAttribute(), "numberOfCdapRecords", null, 0, 1, ControllerServiceDmaapDrsubServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceDmaapDrsubServiceConfiguration_NumberOfCdapErrors(), theCorePackage.getIncreasingULongMetricAttribute(), "numberOfCdapErrors", null, 0, 1, ControllerServiceDmaapDrsubServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceDmaapDrsubServiceConfiguration_HdfsUri(), theEcorePackage.getEString(), "hdfsUri", null, 0, 1, ControllerServiceDmaapDrsubServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceDmaapDrsubServiceConfiguration_HdfsUriDescr(), theEcorePackage.getEString(), "hdfsUriDescr", null, 0, 1, ControllerServiceDmaapDrsubServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceDmaapDrsubServiceConfiguration_HdfsPersistLoc(), theEcorePackage.getEString(), "hdfsPersistLoc", null, 0, 1, ControllerServiceDmaapDrsubServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceDmaapDrsubServiceConfiguration_HdfsPersistLocDescr(), theEcorePackage.getEString(), "hdfsPersistLocDescr", null, 0, 1, ControllerServiceDmaapDrsubServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceDmaapDrsubServiceConfiguration_DmaapConfFile(), theEcorePackage.getEString(), "dmaapConfFile", null, 0, 1, ControllerServiceDmaapDrsubServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceDmaapDrsubServiceConfiguration_DmaapConfFileDescr(), theEcorePackage.getEString(), "dmaapConfFileDescr", null, 0, 1, ControllerServiceDmaapDrsubServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceDmaapDrsubServiceConfiguration_DmaapStreamid(), theEcorePackage.getEString(), "dmaapStreamid", null, 0, 1, ControllerServiceDmaapDrsubServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceDmaapDrsubServiceConfiguration_DmaapStreamidDescr(), theEcorePackage.getEString(), "dmaapStreamidDescr", null, 0, 1, ControllerServiceDmaapDrsubServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + // http://openecomp.org + createEcompAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "ecomp", "http://openecomp.org" + }); + } + + /** + * Initializes the annotations for http://openecomp.org. + * + * + * @generated + */ + protected void createEcompAnnotations() { + String source = "http://openecomp.org"; + addAnnotation + (getControllerServiceDmaapDrsubServiceConfiguration_CdapUrl(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceDmaapDrsubServiceConfiguration_NumberOfCdapRecords(), + source, + new String[] { + "type", "operational" + }); + addAnnotation + (getControllerServiceDmaapDrsubServiceConfiguration_NumberOfCdapErrors(), + source, + new String[] { + "type", "operational" + }); + addAnnotation + (getControllerServiceDmaapDrsubServiceConfiguration_HdfsUri(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceDmaapDrsubServiceConfiguration_HdfsUriDescr(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceDmaapDrsubServiceConfiguration_HdfsPersistLoc(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceDmaapDrsubServiceConfiguration_HdfsPersistLocDescr(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceDmaapDrsubServiceConfiguration_DmaapConfFile(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceDmaapDrsubServiceConfiguration_DmaapConfFileDescr(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceDmaapDrsubServiceConfiguration_DmaapStreamid(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceDmaapDrsubServiceConfiguration_DmaapStreamidDescr(), + source, + new String[] { + "type", "configuration" + }); + } + +} //ServicePackageImpl diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/util/ServiceAdapterFactory.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/util/ServiceAdapterFactory.java new file mode 100644 index 0000000..c2fa1e5 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/util/ServiceAdapterFactory.java @@ -0,0 +1,294 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.dmaap.drsub.service.*; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage + * @generated + */ +public class ServiceAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ServiceAdapterFactory() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ServiceSwitch modelSwitch = + new ServiceSwitch() { + @Override + public Adapter caseControllerServiceDmaapDrsubService(ControllerServiceDmaapDrsubService object) { + return createControllerServiceDmaapDrsubServiceAdapter(); + } + @Override + public Adapter caseControllerServiceDmaapDrsubServiceInstance(ControllerServiceDmaapDrsubServiceInstance object) { + return createControllerServiceDmaapDrsubServiceInstanceAdapter(); + } + @Override + public Adapter caseControllerServiceDmaapDrsubServiceConfiguration(ControllerServiceDmaapDrsubServiceConfiguration object) { + return createControllerServiceDmaapDrsubServiceConfigurationAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseDcaeService(DcaeService object) { + return createDcaeServiceAdapter(); + } + @Override + public Adapter caseVirtualMachineService(VirtualMachineService object) { + return createVirtualMachineServiceAdapter(); + } + @Override + public Adapter caseDcaeServiceInstance(DcaeServiceInstance object) { + return createDcaeServiceInstanceAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceConfiguration(VirtualMachineServiceConfiguration object) { + return createVirtualMachineServiceConfigurationAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceInstance(VirtualMachineServiceInstance object) { + return createVirtualMachineServiceInstanceAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubService Controller Service Dmaap Drsub Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubService + * @generated + */ + public Adapter createControllerServiceDmaapDrsubServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceInstance Controller Service Dmaap Drsub Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceInstance + * @generated + */ + public Adapter createControllerServiceDmaapDrsubServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration Controller Service Dmaap Drsub Service Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration + * @generated + */ + public Adapter createControllerServiceDmaapDrsubServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeService Dcae Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeService + * @generated + */ + public Adapter createDcaeServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService Virtual Machine Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService + * @generated + */ + public Adapter createVirtualMachineServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance Dcae Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance + * @generated + */ + public Adapter createDcaeServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration Virtual Machine Service Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration + * @generated + */ + public Adapter createVirtualMachineServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance Virtual Machine Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance + * @generated + */ + public Adapter createVirtualMachineServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ServiceAdapterFactory diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/util/ServiceSwitch.java b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/util/ServiceSwitch.java new file mode 100644 index 0000000..2c30b4c --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/dmaap/drsub/service/util/ServiceSwitch.java @@ -0,0 +1,280 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.dmaap.drsub.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.dmaap.drsub.service.*; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.dmaap.drsub.service.ServicePackage + * @generated + */ +public class ServiceSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ServiceSwitch() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE: { + ControllerServiceDmaapDrsubService controllerServiceDmaapDrsubService = (ControllerServiceDmaapDrsubService)theEObject; + T result = caseControllerServiceDmaapDrsubService(controllerServiceDmaapDrsubService); + if (result == null) result = caseVirtualMachineService(controllerServiceDmaapDrsubService); + if (result == null) result = caseDcaeService(controllerServiceDmaapDrsubService); + if (result == null) result = caseNamedEntity(controllerServiceDmaapDrsubService); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_INSTANCE: { + ControllerServiceDmaapDrsubServiceInstance controllerServiceDmaapDrsubServiceInstance = (ControllerServiceDmaapDrsubServiceInstance)theEObject; + T result = caseControllerServiceDmaapDrsubServiceInstance(controllerServiceDmaapDrsubServiceInstance); + if (result == null) result = caseVirtualMachineServiceInstance(controllerServiceDmaapDrsubServiceInstance); + if (result == null) result = caseControllerServiceDmaapDrsubServiceConfiguration(controllerServiceDmaapDrsubServiceInstance); + if (result == null) result = caseDcaeServiceInstance(controllerServiceDmaapDrsubServiceInstance); + if (result == null) result = caseVirtualMachineServiceConfiguration(controllerServiceDmaapDrsubServiceInstance); + if (result == null) result = caseNamedEntity(controllerServiceDmaapDrsubServiceInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.CONTROLLER_SERVICE_DMAAP_DRSUB_SERVICE_CONFIGURATION: { + ControllerServiceDmaapDrsubServiceConfiguration controllerServiceDmaapDrsubServiceConfiguration = (ControllerServiceDmaapDrsubServiceConfiguration)theEObject; + T result = caseControllerServiceDmaapDrsubServiceConfiguration(controllerServiceDmaapDrsubServiceConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Controller Service Dmaap Drsub Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Controller Service Dmaap Drsub Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseControllerServiceDmaapDrsubService(ControllerServiceDmaapDrsubService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Controller Service Dmaap Drsub Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Controller Service Dmaap Drsub Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseControllerServiceDmaapDrsubServiceInstance(ControllerServiceDmaapDrsubServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Controller Service Dmaap Drsub Service Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Controller Service Dmaap Drsub Service Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseControllerServiceDmaapDrsubServiceConfiguration(ControllerServiceDmaapDrsubServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeService(DcaeService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineService(VirtualMachineService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceInstance(DcaeServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineServiceConfiguration(VirtualMachineServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Virtual Machine Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Virtual Machine Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineServiceInstance(VirtualMachineServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ServiceSwitch diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore/manager.xcore b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore/manager.xcore new file mode 100644 index 0000000..512863b --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore/manager.xcore @@ -0,0 +1,35 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen") + + +package org.openecomp.dcae.controller.service.dmaap.drsub.manager + + +import org.openecomp.dcae.controller.service.dmaap.drsub.service.ControllerServiceDmaapDrsubServiceConfiguration +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager + +// state of manager +class ControllerServiceDmaapDrsubManager extends VirtualMachineManager, ControllerServiceDmaapDrsubServiceConfiguration { + +} + diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore/service.xcore b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore/service.xcore new file mode 100644 index 0000000..ebdc44a --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/src/main/xcore/service.xcore @@ -0,0 +1,72 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-dmaap-drsub-model/src/main/xcore-gen") + + +package org.openecomp.dcae.controller.service.dmaap.drsub.service + + +import org.openecomp.ncomp.core.IncreasingULongMetricAttribute +import org.openecomp.dcae.controller.service.vm.VirtualMachineService +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance + +annotation "http://openecomp.org" as ecomp + +class ControllerServiceDmaapDrsubService extends VirtualMachineService { + +} + +// state in the controller +class ControllerServiceDmaapDrsubServiceInstance extends VirtualMachineServiceInstance, ControllerServiceDmaapDrsubServiceConfiguration { + refers CdapClusterServiceInstance cdapClusterInstance + String cdapServiceName +} + +// state in both controller and manager +class ControllerServiceDmaapDrsubServiceConfiguration { + @ecomp(^type = "configuration") + String cdapUrl + @ecomp(^type = "operational") + IncreasingULongMetricAttribute numberOfCdapRecords + @ecomp(^type = "operational") + IncreasingULongMetricAttribute numberOfCdapErrors + @ecomp(^type = "configuration") + String hdfsUri + @ecomp(^type = "configuration") + String hdfsUriDescr + @ecomp(^type = "configuration") + String hdfsPersistLoc + @ecomp(^type = "configuration") + String hdfsPersistLocDescr + @ecomp(^type = "configuration") + String dmaapConfFile + @ecomp(^type = "configuration") + String dmaapConfFileDescr + @ecomp(^type = "configuration") + String dmaapStreamid + @ecomp(^type = "configuration") + String dmaapStreamidDescr +} + + + diff --git a/dcae-controller-service/dcae-controller-service-dmaap-drsub/pom.xml b/dcae-controller-service/dcae-controller-service-dmaap-drsub/pom.xml new file mode 100644 index 0000000..461f582 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-dmaap-drsub/pom.xml @@ -0,0 +1,82 @@ + + 4.0.0 + + org.openecomp.dcae.controller + dcae-controller-service-dmaap-drsub + 0.1.0-SNAPSHOT + pom + dcae-controller-service-dmaap-drsub + + + UTF-8 + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + + dcae-controller-service-dmaap-drsub-manager + dcae-controller-service-dmaap-drsub-model + + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/.gitignore b/dcae-controller-service/dcae-controller-service-standardeventcollector/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/LICENSE.txt b/dcae-controller-service/dcae-controller-service-standardeventcollector/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.classpath b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.classpath new file mode 100644 index 0000000..d2d34b3 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.gitignore b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.project b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.project new file mode 100644 index 0000000..e9bcd59 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.project @@ -0,0 +1,35 @@ + + + dcae-controller-service-standardeventcollector-manager + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.settings/org.eclipse.core.resources.prefs b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.settings/org.eclipse.jdt.groovy.core.prefs b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/LICENSE.txt b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/META-INF/MANIFEST.MF b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/META-INF/MANIFEST.MF new file mode 100644 index 0000000..1424a21 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: dcae-controller-service-standardeventcollector-manager +Bundle-SymbolicName: dcae-controller-service-standardeventcollector-manager +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.dcae.controller.service.standardeventcollector.manager.tools, + org.openecomp.dcae.controller.service.standardeventcollector.servers.manager +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + dcae-controller-service-standardeventcollector-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + dcae-controller-core-model diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/build.properties b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/build.properties new file mode 100644 index 0000000..80bc250 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/build.properties @@ -0,0 +1,6 @@ +source.. = src/main/java/,\ + src/main/resources/,\ + src/test/java/,\ + src/test/resources/ +bin.includes = META-INF/,\ + . diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/pom.xml b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/pom.xml new file mode 100644 index 0000000..8bbd24f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/pom.xml @@ -0,0 +1,193 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-standardeventcollector-manager + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-base + 0.1.0-SNAPSHOT + ../../../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-base + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-assembly-plugin + 2.6 + + + zipfile + + single + + package + + false + ${project.artifactId}-${project.version} + + src/assembly/assemble_zip.xml + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/lib + false + true + true + false + false + false + org.opendaylight,com.brocade.odl + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/versions + + + src/main/resources/versions + + version.properties + + true + + + + + + copy-resources + + copy-resources + + validate + + ${basedir}/target/etc/bvc-extensions + + + src/main/resources/etc/bvc-extensions + + feature_config_template.cfg + feature_custom.install + + true + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + attach-artifacts + package + + attach-artifact + + + + + target/${project.artifactId}-${project.version}-runtime.zip + zip + runtime + + + + + + + + + + + + org.openecomp.dcae.controller + dcae-controller-service-standardeventcollector-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-docker-adaptor + ${project.version} + + + diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/assembly/assemble_zip.xml b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..f831cd4 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/assembly/assemble_zip.xml @@ -0,0 +1,61 @@ + + + + runtime + + zip + + + + false + + + + target + lib + + dcae-controller-service-standardeventcollector-manager-${project.version}.jar + + + + target/assembly/ + . + + + + + . + lib + + *.jar + + + + src/main/server-gen/bin + bin + 0744 + + + + + src/main/server/bin + bin + 0744 + + + + + src/main/server-gen/scripts + scripts + + + src/main/server/scripts + scripts + + + + diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/manager/tools/Generator.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/manager/tools/Generator.java new file mode 100644 index 0000000..d34bb3c --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/manager/tools/Generator.java @@ -0,0 +1,99 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.standardeventcollector.manager.tools; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.openecomp.dcae.controller.service.docker.DockerFactory; +import org.openecomp.dcae.controller.service.dockermanager.DockermanagerFactory; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelFactory; +import org.openecomp.ncomp.sirius.manager.generator.ControllerGenerator; +import org.openecomp.ncomp.gwt.siriusportal.model.*; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; + +import org.openecomp.dcae.controller.service.standardeventcollector.service.ServiceFactory; +import org.openecomp.dcae.controller.service.standardeventcollector.manager.ManagerFactory; + +import org.openecomp.utils.YamlToJava; + +public class Generator { + + /** + * @param args + */ + public static void main(String[] args) { + @SuppressWarnings("unused") + ServerPackage f = ServerPackage.eINSTANCE; + genManager(); + genService(); + } + + public static void genManager() { + EObject o = ManagerFactory.eINSTANCE.createControllerServiceStandardeventcollectorManager(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix(); + dir = "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceStandardeventcollectorManager"); + m.setTitle("ControllerServiceStandardeventcollectorManager"); + ControllerGenerator g = new ControllerGenerator(o, m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(true); + g.addFactory(ServiceFactory.eINSTANCE); + EObject gui = ModelFactory.eINSTANCE.createGuiClientApi(); + g.addObject("gui", gui, m); + g.setProvider(DockermanagerFactory.eINSTANCE.createDockerManager(), "Dcae"); + g.generate(dir); + g.generateScripts("src/main/server-gen/bin", "controller-service-standardeventcollector-manager"); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; + YamlToJava.convert("src/main/sirius-gen/ControllerServiceStandardeventcollectorManager.yaml", dir + "/logging", pName); + String pName1 = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".gui.logging"; + YamlToJava.convert("src/main/sirius-gen/GuiClientApi.yaml", dir + "/gui/logging", pName1); + + } + + public static void genService() { + EObject o = ServiceFactory.eINSTANCE.createControllerServiceStandardeventcollectorService(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+"$", "") + "servers." + p.getNsPrefix(); + dir = "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Dcae"); + m.setPluginName(p.getNsURI()); + m.setName("ControllerServiceStandardeventcollectorService"); + m.setTitle("ControllerServiceStandardeventcollectorService"); + ControllerGenerator g = new ControllerGenerator(o, m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(true); + g.setProvider(DockerFactory.eINSTANCE.createDockerService(), "Dcae"); + g.generate(dir); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; + YamlToJava.convert("src/main/sirius-gen/ControllerServiceStandardeventcollectorService.yaml", dir + "/logging", pName); + } + +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerProvider.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerProvider.java new file mode 100644 index 0000000..ea013e0 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerProvider.java @@ -0,0 +1,468 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager; + + + + + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; +import org.json.JSONArray; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + + + + +import org.openecomp.dcae.controller.service.servers.dockermanager.DcaeDockerManagerProvider; +import org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl; +import org.openecomp.dcae.controller.service.standardeventcollector.manager.ControllerServiceStandardeventcollectorManager; + + +public class DcaeControllerServiceStandardeventcollectorManagerProvider extends DcaeDockerManagerProvider { + private static final Logger logger = Logger.getLogger(DcaeControllerServiceStandardeventcollectorManagerProvider.class); + ControllerServiceStandardeventcollectorManager o; + + //private static final String HP_CH_CONFIG = "/etc/dcae/channel.json"; + private static final String DMAAP_CONFIG = "/etc/dcae/dmaap.conf"; + + //To be updated to docker localtion and remove _COPY reference + //private static final String HP_MAIN_CONFIG = "/home/dcae/SEC/SE-Collector-1.0.0-SNAPSHOT/etc/HPProcessingConfig.json"; + //private static final String HP_MAIN_CONFIG_COPY = "/home/dcae/SEC/SE-Collector-1.0.0-SNAPSHOT/etc/HPProcessingConfig.json.copy"; + + private static final String HP_MAIN_CONFIG = "/opt/app/SEC/etc/HPProcessingConfig.json"; + private static final String HP_MAIN_CONFIG_COPY = "/opt/app/SEC/etc/HPProcessingConfig.json"; + + + public DcaeControllerServiceStandardeventcollectorManagerProvider(ISiriusServer controller, ControllerServiceStandardeventcollectorManager o) { + super(controller, o); + this.o = o; + } + + + private void executeCommand(String cmd) { + // TODO Auto-generated method stub + Runtime run = Runtime.getRuntime(); + Process pr; + try { + pr = run.exec(cmd); + pr.waitFor(); + BufferedReader buf = new BufferedReader(new InputStreamReader(pr.getInputStream())); + String line = ""; + while ((line = buf.readLine()) != null) { + System.out.println("line is " +line); + System.out.println("updated the config successfully"); + } + } catch (IOException | InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + + @Override + public void configurationChanged() { + // important to call the super methods for handling DMaaP setup. + super.configurationChanged(); + + try { + //Added to avoid timing issues and ensure dmaap.conf is updated + // by the call to super.configurationChanges before checking contents into it. + Thread.sleep(3000); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + System.out.println ("Sleep time expired"); + } + JSONArray charray = retrieveDmaapSetting(); + System.out.println("Modified HPchannel config:" + charray); + logger.info("Modified HPchannel config: " + charray); + + JSONObject channelconfig = new JSONObject(); + channelconfig.put("channels", charray); + updateJsonToHPConfig (HP_MAIN_CONFIG, HP_MAIN_CONFIG,charray); + + //For debug purpose + //writeJsonToFile(HP_CH_CONFIG, channelconfig); + //updateJsonToHPConfig (HP_MAIN_CONFIG, HP_MAIN_CONFIG_COPY,charray); + + + //Collector port + String cport = o.getCport(); + if (cport !=null) { + String cmd=""; + cmd = "bin/Cec_controller_update.sh " + "collector.service.port" +" "+ cport; + executeCommand(cmd); + } + + //Collector csecport + String csecport = o.getCsecport(); + if (csecport !=null) { + String cmd=""; + cmd = "bin/Cec_controller_update.sh " + "collector.service.secure.port" +" "+ csecport; + executeCommand(cmd); + } + + //Collector keystoreloc + String keystoreloc = o.getKeystoreloc(); + if (cport !=null) { + String cmd=""; + cmd = "bin/Cec_controller_update.sh " + "collector.keystore.file.location" +" "+ keystoreloc; + executeCommand(cmd); + } + + //Collector keystorepwd + String keystorepwd = o.getKeystorepwd(); + if (cport !=null) { + String cmd=""; + cmd = "bin/Cec_controller_update.sh " + "collector.keystore.password" +" "+ keystorepwd; + executeCommand(cmd); + } + + //Collector maxinputqueue + String maxinputqueue = o.getCport(); + if (cport !=null) { + String cmd=""; + cmd = "bin/Cec_controller_update.sh " + "collector.inputQueue.maxPending" +" "+ maxinputqueue; + executeCommand(cmd); + } + + //authid + String authid = o.getAuthid(); + if (authid != null && !authid.equals("")) { + String cmd=""; + cmd = "bin/Cec_controller_update.sh " + "header.authid" +" "+ authid; + executeCommand(cmd); + } else { + System.out.println("Auth ID is null"); + } + + //authpwd + String authpwd = o.getAuthpwd(); + if (authpwd != null && !authpwd.equals("")) { + String cmd=""; + cmd = "bin/Cec_controller_update.sh " + "header.authpwd" +" "+ authpwd; + executeCommand(cmd); + + } else { + System.out.println("Auth Password is null"); + } + + // Auth file + String authfile = o.getAuthfile(); + if (authfile != null && !authfile.equals("")) { + String cmd=""; + cmd = "bin/Cec_controller_update.sh " + "header.authstore" +" "+ authfile; + executeCommand(cmd); + + } else { + System.out.println("authfile is null"); + } + + // Auth Flag + String authflag = o.getAuthflag(); + if (authflag != null && !authflag.equals("")) { + String cmd=""; + cmd = "bin/Cec_controller_update.sh " + "header.authflag" +" "+ authflag; + executeCommand(cmd); + + } else { + System.out.println("authflag is null"); + } + + //checkschemaflag + String checkschemaflag = o.getCheckschemaflag(); + if (checkschemaflag != null && !checkschemaflag.equals("")) { + String cmd=""; + cmd = "bin/Cec_controller_update.sh " + "collector.schema.checkflag" +" "+ checkschemaflag; + executeCommand(cmd); + + } else { + System.out.println("Schemaflag is null"); + } + + // schemafile + String schemafile = o.getSchemafile(); + if (schemafile != null && !schemafile.equals("")) { + String cmd=""; + cmd = "bin/Cec_controller_update.sh " + "collector.schema.file" +" "+ schemafile; + executeCommand(cmd); + + } else { + System.out.println("Schemafile is null"); + } + + resume(); + } + + +private JSONArray retrieveDmaapSetting() { + String fileName = DMAAP_CONFIG; + + File f = new File(fileName); + + if (!f.exists() || !f.canRead() || f.isDirectory()) { + System.out.println("faile to open file: [" + fileName + "]"); + return null; + } + + String jsonData = readFile(fileName); + JSONArray charray = new JSONArray(); + try { + JSONObject jobj = verifyJSON(jsonData); + JSONArray jarray = jobj.getJSONArray("dmaaps"); + + for (int i = 0; i < jarray.length(); i++) { + JSONObject tmpobj = jarray.getJSONObject(i); + System.out.println("tempobj:" + tmpobj); + JSONObject hpC = buildHpChannel(tmpobj); + charray.put(hpC); + } + } catch (Exception e) { + logger.warn("Failed_To_Get_DMaaP_Configuation: " + e); + } + + return charray; + +} + +private String readFile(String fileName) { + String result = ""; + BufferedReader br = null; + try { + br = new BufferedReader(new FileReader(fileName)); + StringBuilder sb = new StringBuilder(); + String line = br.readLine(); + while (line != null) { + sb.append(line); + line = br.readLine(); + } + result = "{ \"dmaaps\":" + sb.toString() + "}"; + } catch (Exception e) { + System.out.println("Failed to read file: [" + fileName + "]"); + logger.warn("Failed_To_Get_DMaaP_Configuation from file [" + fileName + "]" + e); + e.printStackTrace(); + } finally { + if (null != br) { + try { + br.close(); + } catch (Exception e) { + logger.warn("readFile().BufferedReader cannot be closed"); + } + } + } + return result; +} + +private JSONObject verifyJSON(String data) { + JSONObject temp; + try { + temp = new JSONObject(data); + } catch (Exception e) { + temp = null; + e.printStackTrace(); + } + return temp; +} + +private JSONObject buildHpChannel(JSONObject tmpObj) { + JSONObject hpC = new JSONObject(); + + String hpName; + String mrType = null; // UEB: in|out DMaaP: subscribe|publish + String mrClass = "HpCambriaOutputStream";// getDmaapClass(); + String mrUrl = null; + String sType = "HTTPS"; + String mrTopic = ""; + String hpGroup = ""; + String hpInstance = "0"; + String basicAuthUsername = null; // UEB apiKey, DMaaP: dmaapUserName + String basicAuthPassword = null; // DMaaP: dmaapPassword + String dmaapDataType = "message"; + + mrUrl = tmpObj.getString("dmaapUrl"); + String[] urlParts = dmaapUrlSplit(mrUrl); + + mrType = tmpObj.getString("dmaapAction"); + if (mrType.equals("publish")) { + mrType = "out"; + } else { + mrType = "in"; + mrClass = "HpCambriaInputStream";// getDmaapClass(); + } + + //basicAuthUsername = tmpObj.getString("dmaapUserName"); + //basicAuthPassword = tmpObj.getString("dmaapPassword"); + String dataTypeTmp = tmpObj.getString("dmaapDataType"); + if (!dmaapDataType.equals(dataTypeTmp)) { + System.out.println("Invalid DataType (non message) recieved" + dataTypeTmp ); + logger.warn("Invalid DataType (non message) recieved" + dataTypeTmp); + } + if (null != urlParts) { + mrUrl = urlParts[2]; + + if (urlParts[3].equals("events")) + { + mrTopic = urlParts[4]; + } + else + { + mrTopic = urlParts[3]; + } + if (mrType.equals("subscribe") || mrType.equals("in")) { + if (urlParts.length > 4) { + hpGroup = urlParts[5]; + } + if (urlParts.length > 4) { + hpInstance = urlParts[6]; + } + } + } + + hpName = tmpObj.getString("dmaapStreamId"); + + String[] hostport = mrUrl.split(":"); + hpC.put("name", hpName); + hpC.put("type", mrType); + hpC.put("class", mrClass); + //hpC.put("cambria.url", mrUrl); + hpC.put("cambria.hosts", hostport[0]); + hpC.put("cambria.topic", mrTopic); + //hpC.put("cambria.connectionType", sType); + //hpC.put("basicAuthUsername", basicAuthUsername); + //hpC.put("basicAuthPassword", basicAuthPassword); + if (mrType.equals("out")) { + hpC.put("stripHpId", "true"); + } else { + hpC.put("cambria.group", hpGroup); + hpC.put("cambria.instance", hpInstance); + } + + return hpC; +} + +private static void writeJsonToFile(String fileName, JSONObject obj) { + FileWriter file = null; + try { + + file = new FileWriter(fileName); + file.write(obj.toString(4)); + } catch (Exception e) { + System.out.println(" FileWriter Error: " + e); + } finally { + if (file != null) + try { + file.close(); + } catch (Exception fe) { + } + } +} + +private String[] dmaapUrlSplit(String dmUrl) { + String[] multUrls = dmUrl.split(","); + + StringBuffer newUrls = new StringBuffer(); + String urlParts[] = null; + for (int i = 0; i < multUrls.length; i++) { + urlParts = multUrls[i].split("/"); + if (i == 0) { + newUrls = newUrls.append(urlParts[2]); + } else { + newUrls = newUrls.append(",").append(urlParts[2]); + } + } + return urlParts; +} + + +private void updateJsonToHPConfig(String sourceName,String targetfile, JSONArray obj) { + String jsonData = readFile(sourceName); + JSONObject jobj = verifyJSON(jsonData); + //JSONArray jarray = jobj.getJSONArray("dmaaps"); + JSONObject job = jobj.getJSONObject("dmaaps"); + + + + job.remove("channels"); + job.put("channels", obj); + writeJsonToFile(targetfile, job); + +} + + + + + + @Override + public void start() { + String cmd=""; + cmd = "bin/Cec_controller_update.sh " + "ADMIN" +" "+ "start"; + executeCommand(cmd); + + // TODO IMPLEMENT + // throw new UnsupportedOperationException(); + } + + @Override + public void suspend() { + String cmd=""; + cmd = "bin/Cec_controller_update.sh " + "ADMIN" +" "+ "stop"; + executeCommand(cmd); + } + + @Override + public void resume() { + + String cmd=""; + cmd = "bin/Cec_controller_update.sh " + "ADMIN" +" "+ "stop"; + executeCommand(cmd); + + cmd=""; + cmd = "bin/Cec_controller_update.sh " + "ADMIN" +" "+ "start"; + executeCommand(cmd); + + // TODO IMPLEMENT + // throw new UnsupportedOperationException(); + } + + + + +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApiProvider.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApiProvider.java new file mode 100644 index 0000000..5627b52 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApiProvider.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProvider extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProvider.class); + GuiClientApi o; + + public DcaeGuiClientApiProvider(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceProvider.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceProvider.java new file mode 100644 index 0000000..8026f06 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceProvider.java @@ -0,0 +1,73 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.standardeventcollector.servers.service; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.JavaHttpClient; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.json.JSONObject; + +import org.openecomp.dcae.controller.service.servers.docker.DcaeDockerServiceProvider; +import org.openecomp.dcae.controller.service.standardeventcollector.manager.ControllerServiceStandardeventcollectorManager; +import org.openecomp.dcae.controller.service.standardeventcollector.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceImpl; +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorService; + + +public class DcaeControllerServiceStandardeventcollectorServiceProvider extends DcaeDockerServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeControllerServiceStandardeventcollectorServiceProvider.class); + ControllerServiceStandardeventcollectorService o; + + public DcaeControllerServiceStandardeventcollectorServiceProvider(ISiriusServer controller, ControllerServiceStandardeventcollectorService o) { + super(controller, o); + this.o = o; + } + + @Override + public EObject managerConfiguration(String instanceName) { + //EObject o1 = ManagerFactory.eINSTANCE.createControllerServiceStandardeventcollectorManager(); + ControllerServiceStandardeventcollectorManager o1 = ManagerFactory.eINSTANCE.createControllerServiceStandardeventcollectorManager(); + ManagementServer.copy(findInstance(instanceName),o1); + o1.setKeystorepwd(JavaHttpClient.decryptPassword(o1.getKeystorepwd())); + + return o1; + } + + + + + +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server-gen/bin/controller-service-standardeventcollector-manager-controller b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server-gen/bin/controller-service-standardeventcollector-manager-controller new file mode 100644 index 0000000..96d45cc --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server-gen/bin/controller-service-standardeventcollector-manager-controller @@ -0,0 +1,138 @@ +#!/bin/bash + +# setup env if needed. java 6 required +## JAVA_HOME= + +############################## DO NOT EDIT BELOW ########################## + +SNAME="Dcae Controller" +PNAME=controller-service-standardeventcollector-manager-controller +CLASS=org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.DcaeControllerServiceStandardeventcollectorManagerServer + +############################## COMMON BELOW ########################## + +check_status () +{ + if [ -f "${_PIDFILE}" ]; then + _PID=`cat "${_PIDFILE}"` + check_status_of_pid $_PID + else + _STATUS="$SNAME (no pidfile) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + +remove_pid_file () +{ + if [ -f "${_PIDFILE}" ]; then + rm "${_PIDFILE}" + fi +} + + +_DIR=`dirname "$0"` +_DIR=`dirname "$_DIR"` + +_PIDFILE=$_DIR/PID + +CMD=$1 +shift + +check_status + +CP=$(find $_DIR/lib/*/* -name \*.jar 2>/dev/null | xargs -I X printf ":%s" X) + +JVMARGS=$(grep 'server.jvmargs' $_DIR/config/manager.properties | sed -e 's/.*=//') + +case $CMD in + status) + echo $_STATUS + exit 0 + ;; + console) + $GROOVY_HOME/bin/groovysh -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP + ;; + run) + $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + groovy) + $GROOVY_HOME/bin/groovy -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + start) + if [ "$_RUNNING" = "1" ]; then + echo $_STATUS + exit 0 + fi + mkdir -p $_DIR/logs + if [ -e $_DIR/logs/$PNAME.out.1 ]; then mv $_DIR/logs/$PNAME.out.1 $_DIR/logs/$PNAME.out.2; fi + if [ -e $_DIR/logs/$PNAME.err.1 ]; then mv $_DIR/logs/$PNAME.err.1 $_DIR/logs/$PNAME.err.2; fi + if [ -e $_DIR/logs/$PNAME.out ]; then mv $_DIR/logs/$PNAME.out $_DIR/logs/$PNAME.out.1; fi + if [ -e $_DIR/logs/$PNAME.err ]; then mv $_DIR/logs/$PNAME.err $_DIR/logs/$PNAME.err.1; fi + + nohup $JAVA_HOME/bin/java $JVMARGS -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" $CLASS >> $_DIR/logs/$PNAME.out 2>> $_DIR/logs/$PNAME.err & + + _PID=$! + echo $_PID > $_PIDFILE + sleep 5 + check_status + echo $_STATUS + if [ "$_RUNNING" = "1" ]; then + exit 0 + else + echo "Failed to start - make sure the $SNAME is fully configured properly" + exit 1 + fi + ;; + stop) + if [ "$_RUNNING" = "0" ]; then + echo $_STATUS + remove_pid_file + exit 0 + fi + echo "Stopping $SNAME..." + _PID_TO_KILL=$_PID; + echo "$SNAME (pid=${_PID_TO_KILL}) is stopping..." + kill -TERM $_PID_TO_KILL + sleep 5 + check_status_of_pid $_PID_TO_KILL + if [ "$_RUNNING" = "1" ]; then + kill -TERM $_PID_TO_KILL + fi + while [ "$_RUNNING" = "1" ]; do + sleep 2 + check_status_of_pid $_PID_TO_KILL + done + remove_pid_file + echo "$SNAME has stopped." + exit 0 + ;; + *) + echo "$0 start|stop" + ;; +esac + + diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/bin/Cec_controller_update.sh b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/bin/Cec_controller_update.sh new file mode 100644 index 0000000..6edfa0e --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/bin/Cec_controller_update.sh @@ -0,0 +1,32 @@ +#!/bin/bash +paramName=$1 +paramValue=$2 +#localpropertyfile="/home/dcae/SEC/SE-Collector-1.0.0-SNAPSHOT/etc/collector.properties" +#localadminscript="/home/dcae/SEC/SE-Collector-1.0.0-SNAPSHOT/bin/SErestfulCollector.sh" +#tmpfile="/home/dcae/SEC/SE-Collector-1.0.0-SNAPSHOT/etc/collector.properties.tmp" + +localpropertyfile="/opt/app/SEC/etc/collector.properties" +localadminscript="/opt/app/SEC/bin/SErestfulCollector.sh" +tmpfile="/opt/app/SEC/etc/collector.properties.tmp" + + +echo $paramName +echo $paramValue + + + +case $1 in + "ADMIN") + echo $localadminscript $2 + $localadminscript $2 + ;; + *) + rm $tmpfile + sed "s~$paramName=.*~$paramName=$paramValue~g" $localpropertyfile > $tmpfile + echo `cat $tmpfile > $localpropertyfile` + rm $tmpfile + #$localadminscript stop + #$localadminscript start + ;; +esac +## To be modified for supporting DMAAP \ No newline at end of file diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/bin/Cec_controller_update.sh~ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/bin/Cec_controller_update.sh~ new file mode 100644 index 0000000..e69de29 diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/console.properties b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/console.properties new file mode 100644 index 0000000..4b63607 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:PORT +localhost.user=console +localhost.password=CONSOLE_PW diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/gui.properties b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/gui.properties new file mode 100644 index 0000000..e69de29 diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/log4j.properties b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/log4j.properties new file mode 100644 index 0000000..8b3b8f9 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/log4j.properties @@ -0,0 +1,24 @@ +#log4j.debug=0 +log4j.rootLogger=warn, file +log4j.logger.org.openecomp.ncomp=info, file +log4j.additivity.org.openecomp.ncomp=false +log4j.logger.org.openecomp.ncomp.datarouter=warn, file +log4j.additivity.org.openecomp.ncomp.datarouter=false +log4j.logger.org.apache.http.headers=debug, file +log4j.logger.org.apache.http.wire=debug, file + +## uploaded logger +log4j.logger.org.openecomp.ncomp.sirius.manager.uploaded=info, uploaded +log4j.additivity.org.openecomp.ncomp.sirius.manager.uploaded=false +## request logging +log4j.logger.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=info, requests +log4j.additivity.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=false + + +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=logs/BBBB.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n +log4j.appender.file.MaxFileSize=50MB +log4j.appender.file.MaxBackupIndex=5 + diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/makefile b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/makefile new file mode 100644 index 0000000..e272181 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/makefile @@ -0,0 +1,9 @@ + +restart: stop start + +start: + M2_HOME=$(HOME)/.m2 bin/BBBB-controller start +stop: + bin/BBBB-controller stop +console: + bin/BBBB-controller console diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/manager.properties b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/manager.properties new file mode 100644 index 0000000..4605389 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/manager.properties @@ -0,0 +1,7 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = PORT +server.user.console = CONSOLE_PW +server.user.gui = GUI_PW +server.user.client = CLIENT_PW diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/pw.sh.sh b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/pw.sh.sh new file mode 100644 index 0000000..cd022ae --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/config/pw.sh.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +### used to generate random passwords + + +echo '#!/bin/bash' +echo "" + +echo 'cat \' + +for i in CONSOLE GUI CLIENT +do + echo ' |' sed s/${i}_PW/$(echo $i:$(date +%s) | sha256sum | base64 | head -c 20 ; echo)/ \\ +done + \ No newline at end of file diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/scripts/console.groovy b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/scripts/console.groovy new file mode 100644 index 0000000..b1a29de --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/server/scripts/console.groovy @@ -0,0 +1,27 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +import org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.DcaeControllerServiceStandardeventcollectorManagerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +manager = new DcaeControllerServiceStandardeventcollectorManagerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/ControllerServiceStandardeventcollectorManager.yaml b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/ControllerServiceStandardeventcollectorManager.yaml new file mode 100644 index 0000000..6ab6771 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/ControllerServiceStandardeventcollectorManager.yaml @@ -0,0 +1,69 @@ +operations: + test: {} + suspend: {} + resume: {} + publicKey: {} + configurationChanged: {} + updateStreams: {} + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_publicKey: + decription: Remote call publicKey + REMOTE_configurationChanged: + decription: Remote call configurationChanged + REMOTE_updateStreams: + decription: Remote call updateStreams +messages: + dummy: {} + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + publicKey: + errorCode: publicKey-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + configurationChanged: + errorCode: configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateStreams: + errorCode: updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_publicKey: + errorCode: REMOTE-publicKey-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_configurationChanged: + errorCode: REMOTE-configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateStreams: + errorCode: REMOTE-updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/ControllerServiceStandardeventcollectorService.yaml b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/ControllerServiceStandardeventcollectorService.yaml new file mode 100644 index 0000000..c449feb --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/ControllerServiceStandardeventcollectorService.yaml @@ -0,0 +1,124 @@ +operations: + deploy: {} + undeploy: {} + test: {} + suspend: {} + resume: {} + pushManagerConfiguration: {} + pollManagerConfiguration: {} + managerConfiguration: {} + managerOperation: {} + updateConfigurationFromPolicy: {} + runHealthTests: {} + REMOTE_deploy: + decription: Remote call deploy + REMOTE_undeploy: + decription: Remote call undeploy + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_pushManagerConfiguration: + decription: Remote call pushManagerConfiguration + REMOTE_pollManagerConfiguration: + decription: Remote call pollManagerConfiguration + REMOTE_managerConfiguration: + decription: Remote call managerConfiguration + REMOTE_managerOperation: + decription: Remote call managerOperation + REMOTE_updateConfigurationFromPolicy: + decription: Remote call updateConfigurationFromPolicy + REMOTE_runHealthTests: + decription: Remote call runHealthTests +messages: + dummy: {} + deploy: + errorCode: deploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + undeploy: + errorCode: undeploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pushManagerConfiguration: + errorCode: pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pollManagerConfiguration: + errorCode: pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerConfiguration: + errorCode: managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerOperation: + errorCode: managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateConfigurationFromPolicy: + errorCode: updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + runHealthTests: + errorCode: runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_deploy: + errorCode: REMOTE-deploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_undeploy: + errorCode: REMOTE-undeploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pushManagerConfiguration: + errorCode: REMOTE-pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pollManagerConfiguration: + errorCode: REMOTE-pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerConfiguration: + errorCode: REMOTE-managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerOperation: + errorCode: REMOTE-managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateConfigurationFromPolicy: + errorCode: REMOTE-updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_runHealthTests: + errorCode: REMOTE-runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/GuiClientApi.yaml b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/GuiClientApi.yaml new file mode 100644 index 0000000..bf3d69d --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/GuiClientApi.yaml @@ -0,0 +1,69 @@ +operations: + getTree: {} + getObject: {} + getTimeSerie: {} + getTable: {} + getHtml: {} + getGraph: {} + REMOTE_getTree: + decription: Remote call getTree + REMOTE_getObject: + decription: Remote call getObject + REMOTE_getTimeSerie: + decription: Remote call getTimeSerie + REMOTE_getTable: + decription: Remote call getTable + REMOTE_getHtml: + decription: Remote call getHtml + REMOTE_getGraph: + decription: Remote call getGraph +messages: + dummy: {} + getTree: + errorCode: getTree-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getObject: + errorCode: getObject-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTimeSerie: + errorCode: getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTable: + errorCode: getTable-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getHtml: + errorCode: getHtml-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getGraph: + errorCode: getGraph-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_getTree: + errorCode: REMOTE-getTree-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getObject: + errorCode: REMOTE-getObject-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTimeSerie: + errorCode: REMOTE-getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTable: + errorCode: REMOTE-getTable-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getHtml: + errorCode: REMOTE-getHtml-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getGraph: + errorCode: REMOTE-getGraph-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManager.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManager.java new file mode 100644 index 0000000..3014ce6 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManager.java @@ -0,0 +1,231 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.logging.ControllerServiceStandardeventcollectorManagerOperationEnum; + + + + +import org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl; + + + +public class DcaeControllerServiceStandardeventcollectorManager extends ControllerServiceStandardeventcollectorManagerImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceStandardeventcollectorManager.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeControllerServiceStandardeventcollectorManagerProvider controller; + ISiriusServer server; + + public DcaeControllerServiceStandardeventcollectorManager(ISiriusServer server) { + this.server = server; + this.controller = new DcaeControllerServiceStandardeventcollectorManagerProvider(server,this); + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorManagerOperationEnum.test); + try { + res = controller.test(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void suspend() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorManagerOperationEnum.suspend); + try { + controller.suspend(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_); + + } + + public void resume() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorManagerOperationEnum.resume); + try { + controller.resume(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_); + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorManagerOperationEnum.publicKey); + try { + res = controller.publicKey(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void configurationChanged() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorManagerOperationEnum.configurationChanged); + try { + controller.configurationChanged(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.OKAY, duration_); + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.START, duration_,inputStreams,outputStreams); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorManagerOperationEnum.updateStreams); + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.ERROR, duration_,inputStreams,outputStreams); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.OKAY, duration_,inputStreams,outputStreams); + + } + + + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + DcaeControllerServiceStandardeventcollectorManagerProvider.ecoreSetup(); + } + public DcaeControllerServiceStandardeventcollectorManagerProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerClient.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerClient.java new file mode 100644 index 0000000..17c4ce0 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerClient.java @@ -0,0 +1,174 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl; +import org.openecomp.dcae.controller.service.standardeventcollector.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.logging.ControllerServiceStandardeventcollectorManagerOperationEnum; +import org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.logging.ControllerServiceStandardeventcollectorManagerMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeControllerServiceStandardeventcollectorManagerClient extends ControllerServiceStandardeventcollectorManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceStandardeventcollectorManagerClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeControllerServiceStandardeventcollectorManagerClient(String file, String name) { + DcaeControllerServiceStandardeventcollectorManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeControllerServiceStandardeventcollectorManagerClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeControllerServiceStandardeventcollectorManagerClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceStandardeventcollectorManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorManagerOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorManagerMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: test", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend() { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceStandardeventcollectorManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorManagerOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorManagerMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: suspend", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume() { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceStandardeventcollectorManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorManagerOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorManagerMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: resume", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public java.lang.String publicKey() { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceStandardeventcollectorManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorManagerOperationEnum.REMOTE_publicKey); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "publicKey", null); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorManagerMessageEnum.REMOTE_publicKey, e.toString()); + throw new RuntimeException("remote call failed: publicKey", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void configurationChanged() { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceStandardeventcollectorManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorManagerOperationEnum.REMOTE_configurationChanged); + + try { + client.operationPath("/resources", c, "configurationChanged", null); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorManagerMessageEnum.REMOTE_configurationChanged, e.toString()); + throw new RuntimeException("remote call failed: configurationChanged", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void updateStreams(EList inputStreams, EList outputStreams) { + EClass c = ManagerPackage.eINSTANCE.getControllerServiceStandardeventcollectorManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorManagerOperationEnum.REMOTE_updateStreams); + + try { + client.operationPath("/resources", c, "updateStreams", null, inputStreams,outputStreams); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorManagerMessageEnum.REMOTE_updateStreams, e.toString()); + throw new RuntimeException("remote call failed: updateStreams", e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerConsole.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerConsole.java new file mode 100644 index 0000000..85db4d5 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerConsole.java @@ -0,0 +1,127 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + +import org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.gui.DcaeGuiClientApiConsole; + + +public class DcaeControllerServiceStandardeventcollectorManagerConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceStandardeventcollectorManagerConsole.class); + protected DcaeControllerServiceStandardeventcollectorManagerClient controller; + + + DcaeGuiClientApiConsole gui; + + + public DcaeControllerServiceStandardeventcollectorManagerConsole(String filename, String name) { + super(filename, name); + controller = new DcaeControllerServiceStandardeventcollectorManagerClient(filename,name); + client = controller.client; + + gui = new DcaeGuiClientApiConsole(filename,name); + } + + public DcaeControllerServiceStandardeventcollectorManagerConsole(AbstractClient c) { + controller = new DcaeControllerServiceStandardeventcollectorManagerClient(c); + client = controller.client; + } + + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend() { + + try { + controller.suspend(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume() { + + try { + controller.resume(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + try { + res = controller.publicKey(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void configurationChanged() { + + try { + controller.configurationChanged(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void updateStreams(EList inputStreams, EList outputStreams) { + + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerProviderTemplate.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerProviderTemplate.java new file mode 100644 index 0000000..3dd0109 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerProviderTemplate.java @@ -0,0 +1,65 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.dcae.controller.service.servers.dockermanager.DcaeDockerManagerProvider; + + +import org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl; +import org.openecomp.dcae.controller.service.standardeventcollector.manager.ControllerServiceStandardeventcollectorManager; + + +public class DcaeControllerServiceStandardeventcollectorManagerProviderTemplate extends DcaeDockerManagerProvider { + private static final Logger logger = Logger.getLogger(DcaeControllerServiceStandardeventcollectorManagerProviderTemplate.class); + ControllerServiceStandardeventcollectorManager o; + + public DcaeControllerServiceStandardeventcollectorManagerProviderTemplate(ISiriusServer controller, ControllerServiceStandardeventcollectorManager o) { + super(controller, o); + this.o = o; + } + + + + + + + + +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerServer.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerServer.java new file mode 100644 index 0000000..bab474a --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerServer.java @@ -0,0 +1,112 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.standardeventcollector.manager.ControllerServiceStandardeventcollectorManager; + + +import org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.gui.DcaeModelFactory; + + + + + +public class DcaeControllerServiceStandardeventcollectorManagerServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceStandardeventcollectorManagerServer.class); + String serverPath; + ManagementServer server; + DcaeControllerServiceStandardeventcollectorManager controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeManagerFactory f = new DcaeManagerFactory(this); + + + String guiPath; + ManagementServer guiServer; + + + public DcaeControllerServiceStandardeventcollectorManagerServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeControllerServiceStandardeventcollectorManager.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "ControllerServiceStandardeventcollectorManager", serverPath, filename); + server.addFactory(f); + + server.addFactory(org.openecomp.dcae.controller.service.standardeventcollector.service.ServiceFactory.eINSTANCE); + + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeControllerServiceStandardeventcollectorManager) server.find("/").o; + webServer = new Jetty8Server("manager.properties"); + webServer.add("/resources",server); + + + + EFactory guiFactory = new DcaeModelFactory(this); + guiPath = serverPath + "/gui"; + guiServer = new ManagementServer(guiFactory, "GuiClientApi", guiPath, "gui.properties"); + guiServer.start(); + webServer.add("/gui",guiServer); + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeControllerServiceStandardeventcollectorManagerServer s = new DcaeControllerServiceStandardeventcollectorManagerServer("manager.properties"); + s.runWebserver(); + } + public ControllerServiceStandardeventcollectorManager getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeManagerFactory.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeManagerFactory.java new file mode 100644 index 0000000..cfcb2c6 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeManagerFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.standardeventcollector.manager.ControllerServiceStandardeventcollectorManager; +import org.openecomp.dcae.controller.service.standardeventcollector.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ManagerFactoryImpl; + + + + + +public class DcaeManagerFactory extends ManagerFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeManagerFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ManagerPackage.eINSTANCE; } + public DcaeManagerFactory(ISiriusServer server) { + this.server = server; + } + @Override + public ControllerServiceStandardeventcollectorManager createControllerServiceStandardeventcollectorManager() { + return new DcaeControllerServiceStandardeventcollectorManager(server); + } + + + +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApi.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApi.java new file mode 100644 index 0000000..2f96918 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApi.java @@ -0,0 +1,256 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.gui; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.gui.logging.GuiClientApiOperationEnum; + + + + + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + + + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + + + + +import org.openecomp.ncomp.sirius.manager.Subject; + + + + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + + + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; + + + +public class DcaeGuiClientApi extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApi.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeGuiClientApiProvider controller; + ISiriusServer server; + + public DcaeGuiClientApi(ISiriusServer server) { + this.server = server; + this.controller = new DcaeGuiClientApiProvider(server,this); + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTree); + try { + res = controller.getTree(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.OKAY, duration_); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.START, duration_,path); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getObject); + try { + res = controller.getObject(path); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.ERROR, duration_,path); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.OKAY, duration_,path); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.START, duration_,path,start,end,duration); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTimeSerie); + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.ERROR, duration_,path,start,end,duration); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.OKAY, duration_,path,start,end,duration); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTable); + try { + res = controller.getTable(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getHtml); + try { + res = controller.getHtml(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getGraph); + try { + res = controller.getGraph(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + + + + + + public static void ecoreSetup() { + DcaeGuiClientApiProvider.ecoreSetup(); + } + public DcaeGuiClientApiProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApiClient.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApiClient.java new file mode 100644 index 0000000..dbbdf22 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApiClient.java @@ -0,0 +1,175 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.gui; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.gui.logging.GuiClientApiMessageEnum; + + +import org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.DcaeControllerServiceStandardeventcollectorManager; + + + + +@SuppressWarnings("unchecked") +public class DcaeGuiClientApiClient extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeGuiClientApiClient(String file, String name) { + DcaeControllerServiceStandardeventcollectorManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTree); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTree) client.operationPath("/gui", c, "getTree", null); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTree, e.toString()); + throw new RuntimeException("remote call failed: getTree", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getObject); + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiObject) client.operationPath("/gui", c, "getObject", null, path); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getObject, e.toString()); + throw new RuntimeException("remote call failed: getObject", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTimeSerie); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie) client.operationPath("/gui", c, "getTimeSerie", null, path,start,end,duration); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTimeSerie, e.toString()); + throw new RuntimeException("remote call failed: getTimeSerie", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTable); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTable) client.operationPath("/gui", c, "getTable", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTable, e.toString()); + throw new RuntimeException("remote call failed: getTable", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getHtml); + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml) client.operationPath("/gui", c, "getHtml", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getHtml, e.toString()); + throw new RuntimeException("remote call failed: getHtml", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getGraph); + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res; + try { + res = (org.openecomp.ncomp.sirius.manager.graph.GuiGraph) client.operationPath("/gui", c, "getGraph", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getGraph, e.toString()); + throw new RuntimeException("remote call failed: getGraph", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApiConsole.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApiConsole.java new file mode 100644 index 0000000..4ea0ad1 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApiConsole.java @@ -0,0 +1,123 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.gui; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeGuiClientApiConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiConsole.class); + protected DcaeGuiClientApiClient controller; + + + + + public DcaeGuiClientApiConsole(String filename, String name) { + super(filename, name); + controller = new DcaeGuiClientApiClient(filename,name); + client = controller.client; + + } + + public DcaeGuiClientApiConsole(AbstractClient c) { + controller = new DcaeGuiClientApiClient(c); + client = controller.client; + } + + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + try { + res = controller.getTree(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + try { + res = controller.getObject(path); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + try { + res = controller.getTable(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + try { + res = controller.getHtml(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + try { + res = controller.getGraph(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java new file mode 100644 index 0000000..39e900c --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class DcaeGuiClientApiProviderTemplate extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProviderTemplate.class); + GuiClientApi o; + + public DcaeGuiClientApiProviderTemplate(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeModelFactory.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeModelFactory.java new file mode 100644 index 0000000..ba0b047 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/DcaeModelFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.gui; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelFactoryImpl; + +import org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.DcaeControllerServiceStandardeventcollectorManagerServer; + + + +public class DcaeModelFactory extends ModelFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeModelFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ModelPackage.eINSTANCE; } + public DcaeModelFactory(ISiriusServer server) { + this.server = server; + } + @Override + public GuiClientApi createGuiClientApi() { + return new DcaeGuiClientApi(server); + } + + + +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/logging/GuiClientApi.properties b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/logging/GuiClientApi.properties new file mode 100644 index 0000000..8705ab8 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/logging/GuiClientApi.properties @@ -0,0 +1,78 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +getTree=\ + getTree-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getObject=\ + getObject-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTimeSerie=\ + getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTable=\ + getTable-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getHtml=\ + getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getGraph=\ + getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_getTree=\ + REMOTE-getTree-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getObject=\ + REMOTE-getObject-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTimeSerie=\ + REMOTE-getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTable=\ + REMOTE-getTable-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getHtml=\ + REMOTE-getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getGraph=\ + REMOTE-getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/logging/GuiClientApiMessageEnum.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/logging/GuiClientApiMessageEnum.java new file mode 100644 index 0000000..8cf3235 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/logging/GuiClientApiMessageEnum.java @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.gui.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum GuiClientApiMessageEnum implements EcompMessageEnum { + + dummy, + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.gui.logging.GuiClientApi"); + } +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/logging/GuiClientApiOperationEnum.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/logging/GuiClientApiOperationEnum.java new file mode 100644 index 0000000..c1e38aa --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/gui/logging/GuiClientApiOperationEnum.java @@ -0,0 +1,41 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.gui.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum GuiClientApiOperationEnum implements EcompOperationEnum { + + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/logging/ControllerServiceStandardeventcollectorManager.properties b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/logging/ControllerServiceStandardeventcollectorManager.properties new file mode 100644 index 0000000..ef19f9b --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/logging/ControllerServiceStandardeventcollectorManager.properties @@ -0,0 +1,78 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +publicKey=\ + publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +configurationChanged=\ + configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateStreams=\ + updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_publicKey=\ + REMOTE-publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_configurationChanged=\ + REMOTE-configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateStreams=\ + REMOTE-updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/logging/ControllerServiceStandardeventcollectorManagerMessageEnum.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/logging/ControllerServiceStandardeventcollectorManagerMessageEnum.java new file mode 100644 index 0000000..63cf554 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/logging/ControllerServiceStandardeventcollectorManagerMessageEnum.java @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum ControllerServiceStandardeventcollectorManagerMessageEnum implements EcompMessageEnum { + + dummy, + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.logging.ControllerServiceStandardeventcollectorManager"); + } +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/logging/ControllerServiceStandardeventcollectorManagerOperationEnum.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/logging/ControllerServiceStandardeventcollectorManagerOperationEnum.java new file mode 100644 index 0000000..f15b357 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/logging/ControllerServiceStandardeventcollectorManagerOperationEnum.java @@ -0,0 +1,41 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum ControllerServiceStandardeventcollectorManagerOperationEnum implements EcompOperationEnum { + + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams; +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorService.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorService.java new file mode 100644 index 0000000..24aac3f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorService.java @@ -0,0 +1,356 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.standardeventcollector.servers.service; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.dcae.controller.service.standardeventcollector.servers.service.logging.ControllerServiceStandardeventcollectorServiceOperationEnum; + + + + +import org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceImpl; + + + +public class DcaeControllerServiceStandardeventcollectorService extends ControllerServiceStandardeventcollectorServiceImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceStandardeventcollectorService.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeControllerServiceStandardeventcollectorServiceProvider controller; + ISiriusServer server; + + public DcaeControllerServiceStandardeventcollectorService(ISiriusServer server) { + this.server = server; + this.controller = new DcaeControllerServiceStandardeventcollectorServiceProvider(server,this); + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.START, duration_,instanceName,containerPath); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.deploy); + try { + controller.deploy(instanceName,containerPath); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.ERROR, duration_,instanceName,containerPath); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.OKAY, duration_,instanceName,containerPath); + + } + + public void undeploy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.undeploy); + try { + controller.undeploy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.test); + try { + res = controller.test(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public void suspend(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.suspend); + try { + controller.suspend(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void resume(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.resume); + try { + controller.resume(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.pushManagerConfiguration); + try { + controller.pushManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.pollManagerConfiguration); + try { + controller.pollManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.managerConfiguration); + try { + res = controller.managerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.START, duration_,instanceName,operation,parameters); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.managerOperation); + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.ERROR, duration_,instanceName,operation,parameters); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.OKAY, duration_,instanceName,operation,parameters); + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.updateConfigurationFromPolicy); + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void runHealthTests() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.runHealthTests); + try { + controller.runHealthTests(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.OKAY, duration_); + + } + + + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + DcaeControllerServiceStandardeventcollectorServiceProvider.ecoreSetup(); + } + public DcaeControllerServiceStandardeventcollectorServiceProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceClient.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceClient.java new file mode 100644 index 0000000..329a18e --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceClient.java @@ -0,0 +1,259 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.standardeventcollector.servers.service; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceImpl; +import org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage; +import org.openecomp.dcae.controller.service.standardeventcollector.servers.service.logging.ControllerServiceStandardeventcollectorServiceOperationEnum; +import org.openecomp.dcae.controller.service.standardeventcollector.servers.service.logging.ControllerServiceStandardeventcollectorServiceMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeControllerServiceStandardeventcollectorServiceClient extends ControllerServiceStandardeventcollectorServiceImpl { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceStandardeventcollectorServiceClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeControllerServiceStandardeventcollectorServiceClient(String file, String name) { + DcaeControllerServiceStandardeventcollectorService.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeControllerServiceStandardeventcollectorServiceClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public DcaeControllerServiceStandardeventcollectorServiceClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceStandardeventcollectorService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.REMOTE_deploy); + + try { + client.operationPath("/resources", c, "deploy", null, instanceName,containerPath); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorServiceMessageEnum.REMOTE_deploy, e.toString()); + throw new RuntimeException("remote call failed: deploy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void undeploy(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceStandardeventcollectorService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.REMOTE_undeploy); + + try { + client.operationPath("/resources", c, "undeploy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorServiceMessageEnum.REMOTE_undeploy, e.toString()); + throw new RuntimeException("remote call failed: undeploy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceStandardeventcollectorService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorServiceMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: test", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceStandardeventcollectorService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorServiceMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: suspend", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceStandardeventcollectorService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorServiceMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: resume", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pushManagerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceStandardeventcollectorService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.REMOTE_pushManagerConfiguration); + + try { + client.operationPath("/resources", c, "pushManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorServiceMessageEnum.REMOTE_pushManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: pushManagerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pollManagerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceStandardeventcollectorService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.REMOTE_pollManagerConfiguration); + + try { + client.operationPath("/resources", c, "pollManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorServiceMessageEnum.REMOTE_pollManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: pollManagerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceStandardeventcollectorService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.REMOTE_managerConfiguration); + org.eclipse.emf.ecore.EObject res; + try { + res = (org.eclipse.emf.ecore.EObject) client.operationPath("/resources", c, "managerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorServiceMessageEnum.REMOTE_managerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: managerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceStandardeventcollectorService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.REMOTE_managerOperation); + org.json.JSONObject res; + try { + res = (org.json.JSONObject) client.operationPath("/resources", c, "managerOperation", null, instanceName,operation,parameters); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorServiceMessageEnum.REMOTE_managerOperation, e.toString()); + throw new RuntimeException("remote call failed: managerOperation", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getControllerServiceStandardeventcollectorService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.REMOTE_updateConfigurationFromPolicy); + + try { + client.operationPath("/resources", c, "updateConfigurationFromPolicy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString()); + throw new RuntimeException("remote call failed: updateConfigurationFromPolicy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void runHealthTests() { + EClass c = ServicePackage.eINSTANCE.getControllerServiceStandardeventcollectorService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(ControllerServiceStandardeventcollectorServiceOperationEnum.REMOTE_runHealthTests); + + try { + client.operationPath("/resources", c, "runHealthTests", null); + } + catch (Exception e) { + ecomplogger.warn(ControllerServiceStandardeventcollectorServiceMessageEnum.REMOTE_runHealthTests, e.toString()); + throw new RuntimeException("remote call failed: runHealthTests", e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceConsole.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceConsole.java new file mode 100644 index 0000000..53252c4 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceConsole.java @@ -0,0 +1,178 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.standardeventcollector.servers.service; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeControllerServiceStandardeventcollectorServiceConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceStandardeventcollectorServiceConsole.class); + protected DcaeControllerServiceStandardeventcollectorServiceClient controller; + + + + + public DcaeControllerServiceStandardeventcollectorServiceConsole(String filename, String name) { + super(filename, name); + controller = new DcaeControllerServiceStandardeventcollectorServiceClient(filename,name); + client = controller.client; + + } + + public DcaeControllerServiceStandardeventcollectorServiceConsole(AbstractClient c) { + controller = new DcaeControllerServiceStandardeventcollectorServiceClient(c); + client = controller.client; + } + + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + try { + controller.deploy(instanceName,containerPath); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void undeploy(java.lang.String instanceName) { + + try { + controller.undeploy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend(java.lang.String instanceName) { + + try { + controller.suspend(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume(java.lang.String instanceName) { + + try { + controller.resume(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pushManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pollManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + try { + res = controller.managerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void runHealthTests() { + + try { + controller.runHealthTests(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceProviderTemplate.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceProviderTemplate.java new file mode 100644 index 0000000..3900df1 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceProviderTemplate.java @@ -0,0 +1,65 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.standardeventcollector.servers.service; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.dcae.controller.service.servers.docker.DcaeDockerServiceProvider; + + +import org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceImpl; +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorService; + + +public class DcaeControllerServiceStandardeventcollectorServiceProviderTemplate extends DcaeDockerServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeControllerServiceStandardeventcollectorServiceProviderTemplate.class); + ControllerServiceStandardeventcollectorService o; + + public DcaeControllerServiceStandardeventcollectorServiceProviderTemplate(ISiriusServer controller, ControllerServiceStandardeventcollectorService o) { + super(controller, o); + this.o = o; + } + + + + + + + + +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceServer.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceServer.java new file mode 100644 index 0000000..0f7ffa4 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceServer.java @@ -0,0 +1,98 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.standardeventcollector.servers.service; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorService; + + + + + + +public class DcaeControllerServiceStandardeventcollectorServiceServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeControllerServiceStandardeventcollectorServiceServer.class); + String serverPath; + ManagementServer server; + DcaeControllerServiceStandardeventcollectorService controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeServiceFactory f = new DcaeServiceFactory(this); + + + + public DcaeControllerServiceStandardeventcollectorServiceServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeControllerServiceStandardeventcollectorService.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "ControllerServiceStandardeventcollectorService", serverPath, filename); + server.addFactory(f); + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeControllerServiceStandardeventcollectorService) server.find("/").o; + webServer = new Jetty8Server("service.properties"); + webServer.add("/resources",server); + + + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + DcaeControllerServiceStandardeventcollectorServiceServer s = new DcaeControllerServiceStandardeventcollectorServiceServer("service.properties"); + s.runWebserver(); + } + public ControllerServiceStandardeventcollectorService getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeServiceFactory.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeServiceFactory.java new file mode 100644 index 0000000..078defc --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeServiceFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.dcae.controller.service.standardeventcollector.servers.service; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorService; +import org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage; +import org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ServiceFactoryImpl; + + + + + +public class DcaeServiceFactory extends ServiceFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeServiceFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ServicePackage.eINSTANCE; } + public DcaeServiceFactory(ISiriusServer server) { + this.server = server; + } + @Override + public ControllerServiceStandardeventcollectorService createControllerServiceStandardeventcollectorService() { + return new DcaeControllerServiceStandardeventcollectorService(server); + } + + + +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/logging/ControllerServiceStandardeventcollectorService.properties b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/logging/ControllerServiceStandardeventcollectorService.properties new file mode 100644 index 0000000..13a57d6 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/logging/ControllerServiceStandardeventcollectorService.properties @@ -0,0 +1,138 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +deploy=\ + deploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +undeploy=\ + undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pushManagerConfiguration=\ + pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pollManagerConfiguration=\ + pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerConfiguration=\ + managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerOperation=\ + managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateConfigurationFromPolicy=\ + updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +runHealthTests=\ + runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_deploy=\ + REMOTE-deploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_undeploy=\ + REMOTE-undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pushManagerConfiguration=\ + REMOTE-pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pollManagerConfiguration=\ + REMOTE-pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerConfiguration=\ + REMOTE-managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerOperation=\ + REMOTE-managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateConfigurationFromPolicy=\ + REMOTE-updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_runHealthTests=\ + REMOTE-runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/logging/ControllerServiceStandardeventcollectorServiceMessageEnum.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/logging/ControllerServiceStandardeventcollectorServiceMessageEnum.java new file mode 100644 index 0000000..674f680 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/logging/ControllerServiceStandardeventcollectorServiceMessageEnum.java @@ -0,0 +1,57 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.standardeventcollector.servers.service.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum ControllerServiceStandardeventcollectorServiceMessageEnum implements EcompMessageEnum { + + dummy, + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.standardeventcollector.servers.service.logging.ControllerServiceStandardeventcollectorService"); + } +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/logging/ControllerServiceStandardeventcollectorServiceOperationEnum.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/logging/ControllerServiceStandardeventcollectorServiceOperationEnum.java new file mode 100644 index 0000000..9ed3453 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/logging/ControllerServiceStandardeventcollectorServiceOperationEnum.java @@ -0,0 +1,51 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.dcae.controller.service.standardeventcollector.servers.service.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum ControllerServiceStandardeventcollectorServiceOperationEnum implements EcompOperationEnum { + + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests; +} diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.classpath b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.gitignore b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.project b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.project new file mode 100644 index 0000000..95decc1 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.project @@ -0,0 +1,34 @@ + + + dcae-controller-service-standardeventcollector-model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/LICENSE.txt b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/META-INF/MANIFEST.MF b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..befd3c9 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/META-INF/MANIFEST.MF @@ -0,0 +1,32 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: dcae-controller-service-standardeventcollector-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.openecomp.dcae.controller.service.standardeventcollector.manager, + org.openecomp.dcae.controller.service.standardeventcollector.manager.impl, + org.openecomp.dcae.controller.service.standardeventcollector.manager.util, + org.openecomp.dcae.controller.service.standardeventcollector.service, + org.openecomp.dcae.controller.service.standardeventcollector.service.impl, + org.openecomp.dcae.controller.service.standardeventcollector.service.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + dcae-controller-core-model;visibility:=reexport, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-openstack-model;visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + dcae-controller-service-docker-model;bundle-version="0.1.0";visibility:=reexport, + dcae-controller-service-standardeventcollector-model;visibility:=reexport, + ncomp-sirius-manager-agent-model;visibility:=reexport, + ncomp-docker-model;visibility:=reexport, + dcae-controller-service-docker-host-model;visibility:=reexport, + dcae-controller-service-vm-model;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/build.properties b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/build.properties @@ -0,0 +1,11 @@ +# + +bin.includes = .,\ + src/main/xcore/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/xcore-gen/,\ + src/main/xcore/ +output.. = target/classes/ diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/plugin.properties b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/plugin.xml b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/plugin.xml new file mode 100644 index 0000000..f25f8a7 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/plugin.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/pom.xml b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/pom.xml new file mode 100644 index 0000000..7698a3b --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/pom.xml @@ -0,0 +1,24 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-standardeventcollector-model + + org.openecomp.ncomp.maven + ncomp-maven-xcore + 0.1.0-SNAPSHOT + ../../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore + + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + ${project.version} + + + org.openecomp.dcae.controller + dcae-controller-service-docker-model + ${project.version} + + + diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/ControllerServiceStandardeventcollectorManager.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/ControllerServiceStandardeventcollectorManager.java new file mode 100644 index 0000000..f369467 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/ControllerServiceStandardeventcollectorManager.java @@ -0,0 +1,41 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.manager; + +import org.openecomp.dcae.controller.service.dockermanager.DockerManager; + +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration; + +/** + * + * A representation of the model object 'Controller Service Standardeventcollector Manager'. + * + * + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.manager.ManagerPackage#getControllerServiceStandardeventcollectorManager() + * @model + * @generated + */ +public interface ControllerServiceStandardeventcollectorManager extends DockerManager, ControllerServiceStandardeventcollectorServiceConfiguration { +} // ControllerServiceStandardeventcollectorManager diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/ManagerFactory.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/ManagerFactory.java new file mode 100644 index 0000000..bc2757c --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/ManagerFactory.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.manager; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.manager.ManagerPackage + * @generated + */ +public interface ManagerFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ManagerFactory eINSTANCE = org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ManagerFactoryImpl.init(); + + /** + * Returns a new object of class 'Controller Service Standardeventcollector Manager'. + * + * + * @return a new object of class 'Controller Service Standardeventcollector Manager'. + * @generated + */ + ControllerServiceStandardeventcollectorManager createControllerServiceStandardeventcollectorManager(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ManagerPackage getManagerPackage(); + +} //ManagerFactory diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/ManagerPackage.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/ManagerPackage.java new file mode 100644 index 0000000..a926505 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/ManagerPackage.java @@ -0,0 +1,335 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.manager; + +import org.openecomp.dcae.controller.service.dockermanager.DockermanagerPackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *

    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.standardeventcollector.manager.ManagerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.standardeventcollector'" + * @generated + */ +public interface ManagerPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "manager"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.standardeventcollector.manager"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "manager"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ManagerPackage eINSTANCE = org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ManagerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl Controller Service Standardeventcollector Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl + * @see org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ManagerPackageImpl#getControllerServiceStandardeventcollectorManager() + * @generated + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER = 0; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__INPUT_STREAMS = DockermanagerPackage.DOCKER_MANAGER__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__OUTPUT_STREAMS = DockermanagerPackage.DOCKER_MANAGER__OUTPUT_STREAMS; + + /** + * The feature id for the 'Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CONFIGURATION = DockermanagerPackage.DOCKER_MANAGER__CONFIGURATION; + + /** + * The feature id for the 'Cport' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CPORT = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Csecport' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CSECPORT = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Keystoreloc' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__KEYSTORELOC = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Keystorepwd' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__KEYSTOREPWD = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Maxinputqueue' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__MAXINPUTQUEUE = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Authid' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHID = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Authflag' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHFLAG = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Authpwd' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHPWD = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Authfile' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHFILE = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 8; + + /** + * The feature id for the 'Checkschemaflag' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CHECKSCHEMAFLAG = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 9; + + /** + * The feature id for the 'Schemafile' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__SCHEMAFILE = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 10; + + /** + * The number of structural features of the 'Controller Service Standardeventcollector Manager' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER_FEATURE_COUNT = DockermanagerPackage.DOCKER_MANAGER_FEATURE_COUNT + 11; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER___TEST = DockermanagerPackage.DOCKER_MANAGER___TEST; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER___SUSPEND = DockermanagerPackage.DOCKER_MANAGER___SUSPEND; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER___RESUME = DockermanagerPackage.DOCKER_MANAGER___RESUME; + + /** + * The operation id for the 'Public Key' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER___PUBLIC_KEY = DockermanagerPackage.DOCKER_MANAGER___PUBLIC_KEY; + + /** + * The operation id for the 'Configuration Changed' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER___CONFIGURATION_CHANGED = DockermanagerPackage.DOCKER_MANAGER___CONFIGURATION_CHANGED; + + /** + * The operation id for the 'Update Streams' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER___UPDATE_STREAMS__ELIST_ELIST = DockermanagerPackage.DOCKER_MANAGER___UPDATE_STREAMS__ELIST_ELIST; + + /** + * The number of operations of the 'Controller Service Standardeventcollector Manager' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER_OPERATION_COUNT = DockermanagerPackage.DOCKER_MANAGER_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.standardeventcollector.manager.ControllerServiceStandardeventcollectorManager Controller Service Standardeventcollector Manager}'. + * + * + * @return the meta object for class 'Controller Service Standardeventcollector Manager'. + * @see org.openecomp.dcae.controller.service.standardeventcollector.manager.ControllerServiceStandardeventcollectorManager + * @generated + */ + EClass getControllerServiceStandardeventcollectorManager(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ManagerFactory getManagerFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl Controller Service Standardeventcollector Manager}' class. + * + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl + * @see org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ManagerPackageImpl#getControllerServiceStandardeventcollectorManager() + * @generated + */ + EClass CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER = eINSTANCE.getControllerServiceStandardeventcollectorManager(); + + } + +} //ManagerPackage diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/impl/ControllerServiceStandardeventcollectorManagerImpl.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/impl/ControllerServiceStandardeventcollectorManagerImpl.java new file mode 100644 index 0000000..24761cc --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/impl/ControllerServiceStandardeventcollectorManagerImpl.java @@ -0,0 +1,755 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.manager.impl; + +import org.openecomp.dcae.controller.service.dockermanager.impl.DockerManagerImpl; + +import org.openecomp.dcae.controller.service.standardeventcollector.manager.ControllerServiceStandardeventcollectorManager; +import org.openecomp.dcae.controller.service.standardeventcollector.manager.ManagerPackage; + +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration; +import org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Controller Service Standardeventcollector Manager'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl#getCport Cport}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl#getCsecport Csecport}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl#getKeystoreloc Keystoreloc}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl#getKeystorepwd Keystorepwd}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl#getMaxinputqueue Maxinputqueue}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl#getAuthid Authid}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl#getAuthflag Authflag}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl#getAuthpwd Authpwd}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl#getAuthfile Authfile}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl#getCheckschemaflag Checkschemaflag}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.manager.impl.ControllerServiceStandardeventcollectorManagerImpl#getSchemafile Schemafile}
  • + *
+ *

+ * + * @generated + */ +public class ControllerServiceStandardeventcollectorManagerImpl extends DockerManagerImpl implements ControllerServiceStandardeventcollectorManager { + /** + * The default value of the '{@link #getCport() Cport}' attribute. + * + * + * @see #getCport() + * @generated + * @ordered + */ + protected static final String CPORT_EDEFAULT = null; + /** + * The cached value of the '{@link #getCport() Cport}' attribute. + * + * + * @see #getCport() + * @generated + * @ordered + */ + protected String cport = CPORT_EDEFAULT; + /** + * The default value of the '{@link #getCsecport() Csecport}' attribute. + * + * + * @see #getCsecport() + * @generated + * @ordered + */ + protected static final String CSECPORT_EDEFAULT = null; + /** + * The cached value of the '{@link #getCsecport() Csecport}' attribute. + * + * + * @see #getCsecport() + * @generated + * @ordered + */ + protected String csecport = CSECPORT_EDEFAULT; + /** + * The default value of the '{@link #getKeystoreloc() Keystoreloc}' attribute. + * + * + * @see #getKeystoreloc() + * @generated + * @ordered + */ + protected static final String KEYSTORELOC_EDEFAULT = null; + /** + * The cached value of the '{@link #getKeystoreloc() Keystoreloc}' attribute. + * + * + * @see #getKeystoreloc() + * @generated + * @ordered + */ + protected String keystoreloc = KEYSTORELOC_EDEFAULT; + /** + * The default value of the '{@link #getKeystorepwd() Keystorepwd}' attribute. + * + * + * @see #getKeystorepwd() + * @generated + * @ordered + */ + protected static final String KEYSTOREPWD_EDEFAULT = null; + /** + * The cached value of the '{@link #getKeystorepwd() Keystorepwd}' attribute. + * + * + * @see #getKeystorepwd() + * @generated + * @ordered + */ + protected String keystorepwd = KEYSTOREPWD_EDEFAULT; + /** + * The default value of the '{@link #getMaxinputqueue() Maxinputqueue}' attribute. + * + * + * @see #getMaxinputqueue() + * @generated + * @ordered + */ + protected static final String MAXINPUTQUEUE_EDEFAULT = null; + /** + * The cached value of the '{@link #getMaxinputqueue() Maxinputqueue}' attribute. + * + * + * @see #getMaxinputqueue() + * @generated + * @ordered + */ + protected String maxinputqueue = MAXINPUTQUEUE_EDEFAULT; + /** + * The default value of the '{@link #getAuthid() Authid}' attribute. + * + * + * @see #getAuthid() + * @generated + * @ordered + */ + protected static final String AUTHID_EDEFAULT = null; + /** + * The cached value of the '{@link #getAuthid() Authid}' attribute. + * + * + * @see #getAuthid() + * @generated + * @ordered + */ + protected String authid = AUTHID_EDEFAULT; + /** + * The default value of the '{@link #getAuthflag() Authflag}' attribute. + * + * + * @see #getAuthflag() + * @generated + * @ordered + */ + protected static final String AUTHFLAG_EDEFAULT = null; + /** + * The cached value of the '{@link #getAuthflag() Authflag}' attribute. + * + * + * @see #getAuthflag() + * @generated + * @ordered + */ + protected String authflag = AUTHFLAG_EDEFAULT; + /** + * The default value of the '{@link #getAuthpwd() Authpwd}' attribute. + * + * + * @see #getAuthpwd() + * @generated + * @ordered + */ + protected static final String AUTHPWD_EDEFAULT = null; + /** + * The cached value of the '{@link #getAuthpwd() Authpwd}' attribute. + * + * + * @see #getAuthpwd() + * @generated + * @ordered + */ + protected String authpwd = AUTHPWD_EDEFAULT; + /** + * The default value of the '{@link #getAuthfile() Authfile}' attribute. + * + * + * @see #getAuthfile() + * @generated + * @ordered + */ + protected static final String AUTHFILE_EDEFAULT = null; + /** + * The cached value of the '{@link #getAuthfile() Authfile}' attribute. + * + * + * @see #getAuthfile() + * @generated + * @ordered + */ + protected String authfile = AUTHFILE_EDEFAULT; + /** + * The default value of the '{@link #getCheckschemaflag() Checkschemaflag}' attribute. + * + * + * @see #getCheckschemaflag() + * @generated + * @ordered + */ + protected static final String CHECKSCHEMAFLAG_EDEFAULT = null; + /** + * The cached value of the '{@link #getCheckschemaflag() Checkschemaflag}' attribute. + * + * + * @see #getCheckschemaflag() + * @generated + * @ordered + */ + protected String checkschemaflag = CHECKSCHEMAFLAG_EDEFAULT; + /** + * The default value of the '{@link #getSchemafile() Schemafile}' attribute. + * + * + * @see #getSchemafile() + * @generated + * @ordered + */ + protected static final String SCHEMAFILE_EDEFAULT = null; + /** + * The cached value of the '{@link #getSchemafile() Schemafile}' attribute. + * + * + * @see #getSchemafile() + * @generated + * @ordered + */ + protected String schemafile = SCHEMAFILE_EDEFAULT; + /** + * + * + * @generated + */ + protected ControllerServiceStandardeventcollectorManagerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ManagerPackage.Literals.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER; + } + + /** + * + * + * @generated + */ + public String getCport() { + return cport; + } + + /** + * + * + * @generated + */ + public void setCport(String newCport) { + String oldCport = cport; + cport = newCport; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CPORT, oldCport, cport)); + } + + /** + * + * + * @generated + */ + public String getCsecport() { + return csecport; + } + + /** + * + * + * @generated + */ + public void setCsecport(String newCsecport) { + String oldCsecport = csecport; + csecport = newCsecport; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CSECPORT, oldCsecport, csecport)); + } + + /** + * + * + * @generated + */ + public String getKeystoreloc() { + return keystoreloc; + } + + /** + * + * + * @generated + */ + public void setKeystoreloc(String newKeystoreloc) { + String oldKeystoreloc = keystoreloc; + keystoreloc = newKeystoreloc; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__KEYSTORELOC, oldKeystoreloc, keystoreloc)); + } + + /** + * + * + * @generated + */ + public String getKeystorepwd() { + return keystorepwd; + } + + /** + * + * + * @generated + */ + public void setKeystorepwd(String newKeystorepwd) { + String oldKeystorepwd = keystorepwd; + keystorepwd = newKeystorepwd; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__KEYSTOREPWD, oldKeystorepwd, keystorepwd)); + } + + /** + * + * + * @generated + */ + public String getMaxinputqueue() { + return maxinputqueue; + } + + /** + * + * + * @generated + */ + public void setMaxinputqueue(String newMaxinputqueue) { + String oldMaxinputqueue = maxinputqueue; + maxinputqueue = newMaxinputqueue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__MAXINPUTQUEUE, oldMaxinputqueue, maxinputqueue)); + } + + /** + * + * + * @generated + */ + public String getAuthid() { + return authid; + } + + /** + * + * + * @generated + */ + public void setAuthid(String newAuthid) { + String oldAuthid = authid; + authid = newAuthid; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHID, oldAuthid, authid)); + } + + /** + * + * + * @generated + */ + public String getAuthflag() { + return authflag; + } + + /** + * + * + * @generated + */ + public void setAuthflag(String newAuthflag) { + String oldAuthflag = authflag; + authflag = newAuthflag; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHFLAG, oldAuthflag, authflag)); + } + + /** + * + * + * @generated + */ + public String getAuthpwd() { + return authpwd; + } + + /** + * + * + * @generated + */ + public void setAuthpwd(String newAuthpwd) { + String oldAuthpwd = authpwd; + authpwd = newAuthpwd; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHPWD, oldAuthpwd, authpwd)); + } + + /** + * + * + * @generated + */ + public String getAuthfile() { + return authfile; + } + + /** + * + * + * @generated + */ + public void setAuthfile(String newAuthfile) { + String oldAuthfile = authfile; + authfile = newAuthfile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHFILE, oldAuthfile, authfile)); + } + + /** + * + * + * @generated + */ + public String getCheckschemaflag() { + return checkschemaflag; + } + + /** + * + * + * @generated + */ + public void setCheckschemaflag(String newCheckschemaflag) { + String oldCheckschemaflag = checkschemaflag; + checkschemaflag = newCheckschemaflag; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CHECKSCHEMAFLAG, oldCheckschemaflag, checkschemaflag)); + } + + /** + * + * + * @generated + */ + public String getSchemafile() { + return schemafile; + } + + /** + * + * + * @generated + */ + public void setSchemafile(String newSchemafile) { + String oldSchemafile = schemafile; + schemafile = newSchemafile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__SCHEMAFILE, oldSchemafile, schemafile)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CPORT: + return getCport(); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CSECPORT: + return getCsecport(); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__KEYSTORELOC: + return getKeystoreloc(); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__KEYSTOREPWD: + return getKeystorepwd(); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__MAXINPUTQUEUE: + return getMaxinputqueue(); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHID: + return getAuthid(); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHFLAG: + return getAuthflag(); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHPWD: + return getAuthpwd(); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHFILE: + return getAuthfile(); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CHECKSCHEMAFLAG: + return getCheckschemaflag(); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__SCHEMAFILE: + return getSchemafile(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CPORT: + setCport((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CSECPORT: + setCsecport((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__KEYSTORELOC: + setKeystoreloc((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__KEYSTOREPWD: + setKeystorepwd((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__MAXINPUTQUEUE: + setMaxinputqueue((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHID: + setAuthid((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHFLAG: + setAuthflag((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHPWD: + setAuthpwd((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHFILE: + setAuthfile((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CHECKSCHEMAFLAG: + setCheckschemaflag((String)newValue); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__SCHEMAFILE: + setSchemafile((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CPORT: + setCport(CPORT_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CSECPORT: + setCsecport(CSECPORT_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__KEYSTORELOC: + setKeystoreloc(KEYSTORELOC_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__KEYSTOREPWD: + setKeystorepwd(KEYSTOREPWD_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__MAXINPUTQUEUE: + setMaxinputqueue(MAXINPUTQUEUE_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHID: + setAuthid(AUTHID_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHFLAG: + setAuthflag(AUTHFLAG_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHPWD: + setAuthpwd(AUTHPWD_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHFILE: + setAuthfile(AUTHFILE_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CHECKSCHEMAFLAG: + setCheckschemaflag(CHECKSCHEMAFLAG_EDEFAULT); + return; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__SCHEMAFILE: + setSchemafile(SCHEMAFILE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CPORT: + return CPORT_EDEFAULT == null ? cport != null : !CPORT_EDEFAULT.equals(cport); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CSECPORT: + return CSECPORT_EDEFAULT == null ? csecport != null : !CSECPORT_EDEFAULT.equals(csecport); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__KEYSTORELOC: + return KEYSTORELOC_EDEFAULT == null ? keystoreloc != null : !KEYSTORELOC_EDEFAULT.equals(keystoreloc); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__KEYSTOREPWD: + return KEYSTOREPWD_EDEFAULT == null ? keystorepwd != null : !KEYSTOREPWD_EDEFAULT.equals(keystorepwd); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__MAXINPUTQUEUE: + return MAXINPUTQUEUE_EDEFAULT == null ? maxinputqueue != null : !MAXINPUTQUEUE_EDEFAULT.equals(maxinputqueue); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHID: + return AUTHID_EDEFAULT == null ? authid != null : !AUTHID_EDEFAULT.equals(authid); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHFLAG: + return AUTHFLAG_EDEFAULT == null ? authflag != null : !AUTHFLAG_EDEFAULT.equals(authflag); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHPWD: + return AUTHPWD_EDEFAULT == null ? authpwd != null : !AUTHPWD_EDEFAULT.equals(authpwd); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHFILE: + return AUTHFILE_EDEFAULT == null ? authfile != null : !AUTHFILE_EDEFAULT.equals(authfile); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CHECKSCHEMAFLAG: + return CHECKSCHEMAFLAG_EDEFAULT == null ? checkschemaflag != null : !CHECKSCHEMAFLAG_EDEFAULT.equals(checkschemaflag); + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__SCHEMAFILE: + return SCHEMAFILE_EDEFAULT == null ? schemafile != null : !SCHEMAFILE_EDEFAULT.equals(schemafile); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == ControllerServiceStandardeventcollectorServiceConfiguration.class) { + switch (derivedFeatureID) { + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CPORT: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CPORT; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CSECPORT: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CSECPORT; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__KEYSTORELOC: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTORELOC; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__KEYSTOREPWD: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTOREPWD; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__MAXINPUTQUEUE: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__MAXINPUTQUEUE; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHID: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHID; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHFLAG: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFLAG; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHPWD: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHPWD; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHFILE: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFILE; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CHECKSCHEMAFLAG: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CHECKSCHEMAFLAG; + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__SCHEMAFILE: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__SCHEMAFILE; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == ControllerServiceStandardeventcollectorServiceConfiguration.class) { + switch (baseFeatureID) { + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CPORT: return ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CPORT; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CSECPORT: return ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CSECPORT; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTORELOC: return ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__KEYSTORELOC; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTOREPWD: return ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__KEYSTOREPWD; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__MAXINPUTQUEUE: return ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__MAXINPUTQUEUE; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHID: return ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHID; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFLAG: return ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHFLAG; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHPWD: return ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHPWD; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFILE: return ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHFILE; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CHECKSCHEMAFLAG: return ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__CHECKSCHEMAFLAG; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__SCHEMAFILE: return ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__SCHEMAFILE; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (cport: "); + result.append(cport); + result.append(", csecport: "); + result.append(csecport); + result.append(", keystoreloc: "); + result.append(keystoreloc); + result.append(", keystorepwd: "); + result.append(keystorepwd); + result.append(", maxinputqueue: "); + result.append(maxinputqueue); + result.append(", authid: "); + result.append(authid); + result.append(", authflag: "); + result.append(authflag); + result.append(", authpwd: "); + result.append(authpwd); + result.append(", authfile: "); + result.append(authfile); + result.append(", checkschemaflag: "); + result.append(checkschemaflag); + result.append(", schemafile: "); + result.append(schemafile); + result.append(')'); + return result.toString(); + } + +} //ControllerServiceStandardeventcollectorManagerImpl diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/impl/ManagerFactoryImpl.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/impl/ManagerFactoryImpl.java new file mode 100644 index 0000000..d11084a --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/impl/ManagerFactoryImpl.java @@ -0,0 +1,116 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.manager.impl; + +import org.openecomp.dcae.controller.service.standardeventcollector.manager.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ManagerFactoryImpl extends EFactoryImpl implements ManagerFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ManagerFactory init() { + try { + ManagerFactory theManagerFactory = (ManagerFactory)EPackage.Registry.INSTANCE.getEFactory(ManagerPackage.eNS_URI); + if (theManagerFactory != null) { + return theManagerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ManagerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ManagerFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER: return createControllerServiceStandardeventcollectorManager(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public ControllerServiceStandardeventcollectorManager createControllerServiceStandardeventcollectorManager() { + ControllerServiceStandardeventcollectorManagerImpl controllerServiceStandardeventcollectorManager = new ControllerServiceStandardeventcollectorManagerImpl(); + return controllerServiceStandardeventcollectorManager; + } + + /** + * + * + * @generated + */ + public ManagerPackage getManagerPackage() { + return (ManagerPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ManagerPackage getPackage() { + return ManagerPackage.eINSTANCE; + } + +} //ManagerFactoryImpl diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/impl/ManagerPackageImpl.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/impl/ManagerPackageImpl.java new file mode 100644 index 0000000..b064dea --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/impl/ManagerPackageImpl.java @@ -0,0 +1,200 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.manager.impl; + +import org.openecomp.dcae.controller.service.dockermanager.DockermanagerPackage; + +import org.openecomp.dcae.controller.service.standardeventcollector.manager.ControllerServiceStandardeventcollectorManager; +import org.openecomp.dcae.controller.service.standardeventcollector.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.standardeventcollector.manager.ManagerPackage; + +import org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ManagerPackageImpl extends EPackageImpl implements ManagerPackage { + /** + * + * + * @generated + */ + private EClass controllerServiceStandardeventcollectorManagerEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.standardeventcollector.manager.ManagerPackage#eNS_URI + * @see #init() + * @generated + */ + private ManagerPackageImpl() { + super(eNS_URI, ManagerFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ManagerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ManagerPackage init() { + if (isInited) return (ManagerPackage)EPackage.Registry.INSTANCE.getEPackage(ManagerPackage.eNS_URI); + + // Obtain or create and register package + ManagerPackageImpl theManagerPackage = (ManagerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ManagerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ManagerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + DockermanagerPackage.eINSTANCE.eClass(); + ServicePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theManagerPackage.createPackageContents(); + + // Initialize created meta-data + theManagerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theManagerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ManagerPackage.eNS_URI, theManagerPackage); + return theManagerPackage; + } + + /** + * + * + * @generated + */ + public EClass getControllerServiceStandardeventcollectorManager() { + return controllerServiceStandardeventcollectorManagerEClass; + } + + /** + * + * + * @generated + */ + public ManagerFactory getManagerFactory() { + return (ManagerFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + controllerServiceStandardeventcollectorManagerEClass = createEClass(CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + DockermanagerPackage theDockermanagerPackage = (DockermanagerPackage)EPackage.Registry.INSTANCE.getEPackage(DockermanagerPackage.eNS_URI); + ServicePackage theServicePackage = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + controllerServiceStandardeventcollectorManagerEClass.getESuperTypes().add(theDockermanagerPackage.getDockerManager()); + controllerServiceStandardeventcollectorManagerEClass.getESuperTypes().add(theServicePackage.getControllerServiceStandardeventcollectorServiceConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(controllerServiceStandardeventcollectorManagerEClass, ControllerServiceStandardeventcollectorManager.class, "ControllerServiceStandardeventcollectorManager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //ManagerPackageImpl diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/util/ManagerAdapterFactory.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/util/ManagerAdapterFactory.java new file mode 100644 index 0000000..4936e09 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/util/ManagerAdapterFactory.java @@ -0,0 +1,201 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.dockermanager.DockerManager; + +import org.openecomp.dcae.controller.service.standardeventcollector.manager.*; + +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.manager.ManagerPackage + * @generated + */ +public class ManagerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ManagerAdapterFactory() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ManagerSwitch modelSwitch = + new ManagerSwitch() { + @Override + public Adapter caseControllerServiceStandardeventcollectorManager(ControllerServiceStandardeventcollectorManager object) { + return createControllerServiceStandardeventcollectorManagerAdapter(); + } + @Override + public Adapter caseDcaeManager(DcaeManager object) { + return createDcaeManagerAdapter(); + } + @Override + public Adapter caseDockerManager(DockerManager object) { + return createDockerManagerAdapter(); + } + @Override + public Adapter caseControllerServiceStandardeventcollectorServiceConfiguration(ControllerServiceStandardeventcollectorServiceConfiguration object) { + return createControllerServiceStandardeventcollectorServiceConfigurationAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.standardeventcollector.manager.ControllerServiceStandardeventcollectorManager Controller Service Standardeventcollector Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.standardeventcollector.manager.ControllerServiceStandardeventcollectorManager + * @generated + */ + public Adapter createControllerServiceStandardeventcollectorManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.manager.DcaeManager Dcae Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager + * @generated + */ + public Adapter createDcaeManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.dockermanager.DockerManager Docker Manager}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.dockermanager.DockerManager + * @generated + */ + public Adapter createDockerManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration Controller Service Standardeventcollector Service Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration + * @generated + */ + public Adapter createControllerServiceStandardeventcollectorServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ManagerAdapterFactory diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/util/ManagerSwitch.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/util/ManagerSwitch.java new file mode 100644 index 0000000..4833d85 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/util/ManagerSwitch.java @@ -0,0 +1,185 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.dockermanager.DockerManager; + +import org.openecomp.dcae.controller.service.standardeventcollector.manager.*; + +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.manager.ManagerPackage + * @generated + */ +public class ManagerSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ManagerSwitch() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER: { + ControllerServiceStandardeventcollectorManager controllerServiceStandardeventcollectorManager = (ControllerServiceStandardeventcollectorManager)theEObject; + T result = caseControllerServiceStandardeventcollectorManager(controllerServiceStandardeventcollectorManager); + if (result == null) result = caseDockerManager(controllerServiceStandardeventcollectorManager); + if (result == null) result = caseControllerServiceStandardeventcollectorServiceConfiguration(controllerServiceStandardeventcollectorManager); + if (result == null) result = caseDcaeManager(controllerServiceStandardeventcollectorManager); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Controller Service Standardeventcollector Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Controller Service Standardeventcollector Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseControllerServiceStandardeventcollectorManager(ControllerServiceStandardeventcollectorManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeManager(DcaeManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Docker Manager'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Docker Manager'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDockerManager(DockerManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Controller Service Standardeventcollector Service Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Controller Service Standardeventcollector Service Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseControllerServiceStandardeventcollectorServiceConfiguration(ControllerServiceStandardeventcollectorServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ManagerSwitch diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ControllerServiceStandardeventcollectorService.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ControllerServiceStandardeventcollectorService.java new file mode 100644 index 0000000..3aa6b14 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ControllerServiceStandardeventcollectorService.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.service; + +import org.openecomp.dcae.controller.service.docker.DockerService; + +/** + * + * A representation of the model object 'Controller Service Standardeventcollector Service'. + * + * + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#getControllerServiceStandardeventcollectorService() + * @model + * @generated + */ +public interface ControllerServiceStandardeventcollectorService extends DockerService { +} // ControllerServiceStandardeventcollectorService diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ControllerServiceStandardeventcollectorServiceConfiguration.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ControllerServiceStandardeventcollectorServiceConfiguration.java new file mode 100644 index 0000000..d7866bf --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ControllerServiceStandardeventcollectorServiceConfiguration.java @@ -0,0 +1,352 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.service; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Controller Service Standardeventcollector Service Configuration'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getCport Cport}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getCsecport Csecport}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getKeystoreloc Keystoreloc}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getKeystorepwd Keystorepwd}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getMaxinputqueue Maxinputqueue}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthid Authid}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthflag Authflag}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthpwd Authpwd}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthfile Authfile}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getCheckschemaflag Checkschemaflag}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getSchemafile Schemafile}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#getControllerServiceStandardeventcollectorServiceConfiguration() + * @model + * @generated + */ +public interface ControllerServiceStandardeventcollectorServiceConfiguration extends EObject { + + /** + * Returns the value of the 'Cport' attribute. + * + *

+ * If the meaning of the 'Cport' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Cport' attribute. + * @see #setCport(String) + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#getControllerServiceStandardeventcollectorServiceConfiguration_Cport() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getCport(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getCport Cport}' attribute. + * + * + * @param value the new value of the 'Cport' attribute. + * @see #getCport() + * @generated + */ + void setCport(String value); + + /** + * Returns the value of the 'Csecport' attribute. + * + *

+ * If the meaning of the 'Csecport' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Csecport' attribute. + * @see #setCsecport(String) + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#getControllerServiceStandardeventcollectorServiceConfiguration_Csecport() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getCsecport(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getCsecport Csecport}' attribute. + * + * + * @param value the new value of the 'Csecport' attribute. + * @see #getCsecport() + * @generated + */ + void setCsecport(String value); + + /** + * Returns the value of the 'Keystoreloc' attribute. + * + *

+ * If the meaning of the 'Keystoreloc' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Keystoreloc' attribute. + * @see #setKeystoreloc(String) + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#getControllerServiceStandardeventcollectorServiceConfiguration_Keystoreloc() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getKeystoreloc(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getKeystoreloc Keystoreloc}' attribute. + * + * + * @param value the new value of the 'Keystoreloc' attribute. + * @see #getKeystoreloc() + * @generated + */ + void setKeystoreloc(String value); + + /** + * Returns the value of the 'Keystorepwd' attribute. + * + *

+ * If the meaning of the 'Keystorepwd' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Keystorepwd' attribute. + * @see #setKeystorepwd(String) + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#getControllerServiceStandardeventcollectorServiceConfiguration_Keystorepwd() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getKeystorepwd(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getKeystorepwd Keystorepwd}' attribute. + * + * + * @param value the new value of the 'Keystorepwd' attribute. + * @see #getKeystorepwd() + * @generated + */ + void setKeystorepwd(String value); + + /** + * Returns the value of the 'Maxinputqueue' attribute. + * + *

+ * If the meaning of the 'Maxinputqueue' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Maxinputqueue' attribute. + * @see #setMaxinputqueue(String) + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#getControllerServiceStandardeventcollectorServiceConfiguration_Maxinputqueue() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getMaxinputqueue(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getMaxinputqueue Maxinputqueue}' attribute. + * + * + * @param value the new value of the 'Maxinputqueue' attribute. + * @see #getMaxinputqueue() + * @generated + */ + void setMaxinputqueue(String value); + + /** + * Returns the value of the 'Authid' attribute. + * + *

+ * If the meaning of the 'Authid' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Authid' attribute. + * @see #setAuthid(String) + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#getControllerServiceStandardeventcollectorServiceConfiguration_Authid() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getAuthid(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthid Authid}' attribute. + * + * + * @param value the new value of the 'Authid' attribute. + * @see #getAuthid() + * @generated + */ + void setAuthid(String value); + + /** + * Returns the value of the 'Authflag' attribute. + * + *

+ * If the meaning of the 'Authflag' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Authflag' attribute. + * @see #setAuthflag(String) + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#getControllerServiceStandardeventcollectorServiceConfiguration_Authflag() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getAuthflag(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthflag Authflag}' attribute. + * + * + * @param value the new value of the 'Authflag' attribute. + * @see #getAuthflag() + * @generated + */ + void setAuthflag(String value); + + /** + * Returns the value of the 'Authpwd' attribute. + * + *

+ * If the meaning of the 'Authpwd' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Authpwd' attribute. + * @see #setAuthpwd(String) + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#getControllerServiceStandardeventcollectorServiceConfiguration_Authpwd() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getAuthpwd(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthpwd Authpwd}' attribute. + * + * + * @param value the new value of the 'Authpwd' attribute. + * @see #getAuthpwd() + * @generated + */ + void setAuthpwd(String value); + + /** + * Returns the value of the 'Authfile' attribute. + * + *

+ * If the meaning of the 'Authfile' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Authfile' attribute. + * @see #setAuthfile(String) + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#getControllerServiceStandardeventcollectorServiceConfiguration_Authfile() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getAuthfile(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthfile Authfile}' attribute. + * + * + * @param value the new value of the 'Authfile' attribute. + * @see #getAuthfile() + * @generated + */ + void setAuthfile(String value); + + /** + * Returns the value of the 'Checkschemaflag' attribute. + * + *

+ * If the meaning of the 'Checkschemaflag' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Checkschemaflag' attribute. + * @see #setCheckschemaflag(String) + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#getControllerServiceStandardeventcollectorServiceConfiguration_Checkschemaflag() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getCheckschemaflag(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getCheckschemaflag Checkschemaflag}' attribute. + * + * + * @param value the new value of the 'Checkschemaflag' attribute. + * @see #getCheckschemaflag() + * @generated + */ + void setCheckschemaflag(String value); + + /** + * Returns the value of the 'Schemafile' attribute. + * + *

+ * If the meaning of the 'Schemafile' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Schemafile' attribute. + * @see #setSchemafile(String) + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#getControllerServiceStandardeventcollectorServiceConfiguration_Schemafile() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getSchemafile(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getSchemafile Schemafile}' attribute. + * + * + * @param value the new value of the 'Schemafile' attribute. + * @see #getSchemafile() + * @generated + */ + void setSchemafile(String value); +} // ControllerServiceStandardeventcollectorServiceConfiguration diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ControllerServiceStandardeventcollectorServiceInstance.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ControllerServiceStandardeventcollectorServiceInstance.java new file mode 100644 index 0000000..05dfba3 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ControllerServiceStandardeventcollectorServiceInstance.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.service; + +import org.openecomp.dcae.controller.service.docker.DockerServiceInstance; + +/** + * + * A representation of the model object 'Controller Service Standardeventcollector Service Instance'. + * + * + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#getControllerServiceStandardeventcollectorServiceInstance() + * @model + * @generated + */ +public interface ControllerServiceStandardeventcollectorServiceInstance extends DockerServiceInstance, ControllerServiceStandardeventcollectorServiceConfiguration { +} // ControllerServiceStandardeventcollectorServiceInstance diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ServiceFactory.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ServiceFactory.java new file mode 100644 index 0000000..0b12943 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ServiceFactory.java @@ -0,0 +1,81 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.service; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage + * @generated + */ +public interface ServiceFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ServiceFactory eINSTANCE = org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ServiceFactoryImpl.init(); + + /** + * Returns a new object of class 'Controller Service Standardeventcollector Service'. + * + * + * @return a new object of class 'Controller Service Standardeventcollector Service'. + * @generated + */ + ControllerServiceStandardeventcollectorService createControllerServiceStandardeventcollectorService(); + + /** + * Returns a new object of class 'Controller Service Standardeventcollector Service Instance'. + * + * + * @return a new object of class 'Controller Service Standardeventcollector Service Instance'. + * @generated + */ + ControllerServiceStandardeventcollectorServiceInstance createControllerServiceStandardeventcollectorServiceInstance(); + + /** + * Returns a new object of class 'Controller Service Standardeventcollector Service Configuration'. + * + * + * @return a new object of class 'Controller Service Standardeventcollector Service Configuration'. + * @generated + */ + ControllerServiceStandardeventcollectorServiceConfiguration createControllerServiceStandardeventcollectorServiceConfiguration(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ServicePackage getServicePackage(); + +} //ServiceFactory diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ServicePackage.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ServicePackage.java new file mode 100644 index 0000000..c69f5c3 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ServicePackage.java @@ -0,0 +1,993 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.service; + +import org.openecomp.dcae.controller.service.docker.DockerPackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServiceFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.standardeventcollector'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org'" + * @generated + */ +public interface ServicePackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "service"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.standardeventcollector.service"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "service"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ServicePackage eINSTANCE = org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ServicePackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceImpl Controller Service Standardeventcollector Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceImpl + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ServicePackageImpl#getControllerServiceStandardeventcollectorService() + * @generated + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE__NAME = DockerPackage.DOCKER_SERVICE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE__LAST_POLLED = DockerPackage.DOCKER_SERVICE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE__LAST_CHANGED = DockerPackage.DOCKER_SERVICE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE__CREATED = DockerPackage.DOCKER_SERVICE__CREATED; + + /** + * The feature id for the 'Instances' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE__INSTANCES = DockerPackage.DOCKER_SERVICE__INSTANCES; + + /** + * The number of structural features of the 'Controller Service Standardeventcollector Service' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_FEATURE_COUNT = DockerPackage.DOCKER_SERVICE_FEATURE_COUNT + 0; + + /** + * The operation id for the 'Deploy' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE___DEPLOY__STRING_STRING = DockerPackage.DOCKER_SERVICE___DEPLOY__STRING_STRING; + + /** + * The operation id for the 'Undeploy' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE___UNDEPLOY__STRING = DockerPackage.DOCKER_SERVICE___UNDEPLOY__STRING; + + /** + * The operation id for the 'Test' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE___TEST__STRING = DockerPackage.DOCKER_SERVICE___TEST__STRING; + + /** + * The operation id for the 'Suspend' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE___SUSPEND__STRING = DockerPackage.DOCKER_SERVICE___SUSPEND__STRING; + + /** + * The operation id for the 'Resume' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE___RESUME__STRING = DockerPackage.DOCKER_SERVICE___RESUME__STRING; + + /** + * The operation id for the 'Push Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING = DockerPackage.DOCKER_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Poll Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE___POLL_MANAGER_CONFIGURATION__STRING = DockerPackage.DOCKER_SERVICE___POLL_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Configuration' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE___MANAGER_CONFIGURATION__STRING = DockerPackage.DOCKER_SERVICE___MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the 'Manager Operation' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT = DockerPackage.DOCKER_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT; + + /** + * The operation id for the 'Update Configuration From Policy' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING = DockerPackage.DOCKER_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING; + + /** + * The operation id for the 'Run Health Tests' operation. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE___RUN_HEALTH_TESTS = DockerPackage.DOCKER_SERVICE___RUN_HEALTH_TESTS; + + /** + * The number of operations of the 'Controller Service Standardeventcollector Service' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_OPERATION_COUNT = DockerPackage.DOCKER_SERVICE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceInstanceImpl Controller Service Standardeventcollector Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ServicePackageImpl#getControllerServiceStandardeventcollectorServiceInstance() + * @generated + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__NAME = DockerPackage.DOCKER_SERVICE_INSTANCE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__LAST_POLLED = DockerPackage.DOCKER_SERVICE_INSTANCE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__LAST_CHANGED = DockerPackage.DOCKER_SERVICE_INSTANCE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CREATED = DockerPackage.DOCKER_SERVICE_INSTANCE__CREATED; + + /** + * The feature id for the 'Service Container' reference. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__SERVICE_CONTAINER = DockerPackage.DOCKER_SERVICE_INSTANCE__SERVICE_CONTAINER; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__STATUS = DockerPackage.DOCKER_SERVICE_INSTANCE__STATUS; + + /** + * The feature id for the 'Input Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__INPUT_STREAMS = DockerPackage.DOCKER_SERVICE_INSTANCE__INPUT_STREAMS; + + /** + * The feature id for the 'Output Streams' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__OUTPUT_STREAMS = DockerPackage.DOCKER_SERVICE_INSTANCE__OUTPUT_STREAMS; + + /** + * The feature id for the 'Last Health Test' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__LAST_HEALTH_TEST = DockerPackage.DOCKER_SERVICE_INSTANCE__LAST_HEALTH_TEST; + + /** + * The feature id for the 'Health Test Status' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__HEALTH_TEST_STATUS = DockerPackage.DOCKER_SERVICE_INSTANCE__HEALTH_TEST_STATUS; + + /** + * The feature id for the 'Health Test Message Code' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE = DockerPackage.DOCKER_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE; + + /** + * The feature id for the 'Docker Host' containment reference. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__DOCKER_HOST = DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_HOST; + + /** + * The feature id for the 'Host Service' reference. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__HOST_SERVICE = DockerPackage.DOCKER_SERVICE_INSTANCE__HOST_SERVICE; + + /** + * The feature id for the 'Docker Name' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__DOCKER_NAME = DockerPackage.DOCKER_SERVICE_INSTANCE__DOCKER_NAME; + + /** + * The feature id for the 'Image' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__IMAGE = DockerPackage.DOCKER_SERVICE_INSTANCE__IMAGE; + + /** + * The feature id for the 'Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CONFIGURATION = DockerPackage.DOCKER_SERVICE_INSTANCE__CONFIGURATION; + + /** + * The feature id for the 'Volumes' attribute list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__VOLUMES = DockerPackage.DOCKER_SERVICE_INSTANCE__VOLUMES; + + /** + * The feature id for the 'Links' attribute list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__LINKS = DockerPackage.DOCKER_SERVICE_INSTANCE__LINKS; + + /** + * The feature id for the 'Envs' attribute list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__ENVS = DockerPackage.DOCKER_SERVICE_INSTANCE__ENVS; + + /** + * The feature id for the 'Port Bindings' containment reference list. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__PORT_BINDINGS = DockerPackage.DOCKER_SERVICE_INSTANCE__PORT_BINDINGS; + + /** + * The feature id for the 'Manager Port Number' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__MANAGER_PORT_NUMBER = DockerPackage.DOCKER_SERVICE_INSTANCE__MANAGER_PORT_NUMBER; + + /** + * The feature id for the 'Cport' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CPORT = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Csecport' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CSECPORT = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Keystoreloc' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__KEYSTORELOC = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Keystorepwd' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__KEYSTOREPWD = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Maxinputqueue' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__MAXINPUTQUEUE = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Authid' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHID = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Authflag' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHFLAG = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Authpwd' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHPWD = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Authfile' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHFILE = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 8; + + /** + * The feature id for the 'Checkschemaflag' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CHECKSCHEMAFLAG = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 9; + + /** + * The feature id for the 'Schemafile' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__SCHEMAFILE = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 10; + + /** + * The number of structural features of the 'Controller Service Standardeventcollector Service Instance' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE_FEATURE_COUNT = DockerPackage.DOCKER_SERVICE_INSTANCE_FEATURE_COUNT + 11; + + /** + * The number of operations of the 'Controller Service Standardeventcollector Service Instance' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE_OPERATION_COUNT = DockerPackage.DOCKER_SERVICE_INSTANCE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceConfigurationImpl Controller Service Standardeventcollector Service Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ServicePackageImpl#getControllerServiceStandardeventcollectorServiceConfiguration() + * @generated + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION = 2; + + /** + * The feature id for the 'Cport' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CPORT = 0; + + /** + * The feature id for the 'Csecport' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CSECPORT = 1; + + /** + * The feature id for the 'Keystoreloc' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTORELOC = 2; + + /** + * The feature id for the 'Keystorepwd' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTOREPWD = 3; + + /** + * The feature id for the 'Maxinputqueue' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__MAXINPUTQUEUE = 4; + + /** + * The feature id for the 'Authid' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHID = 5; + + /** + * The feature id for the 'Authflag' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFLAG = 6; + + /** + * The feature id for the 'Authpwd' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHPWD = 7; + + /** + * The feature id for the 'Authfile' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFILE = 8; + + /** + * The feature id for the 'Checkschemaflag' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CHECKSCHEMAFLAG = 9; + + /** + * The feature id for the 'Schemafile' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__SCHEMAFILE = 10; + + /** + * The number of structural features of the 'Controller Service Standardeventcollector Service Configuration' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION_FEATURE_COUNT = 11; + + /** + * The number of operations of the 'Controller Service Standardeventcollector Service Configuration' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION_OPERATION_COUNT = 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorService Controller Service Standardeventcollector Service}'. + * + * + * @return the meta object for class 'Controller Service Standardeventcollector Service'. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorService + * @generated + */ + EClass getControllerServiceStandardeventcollectorService(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceInstance Controller Service Standardeventcollector Service Instance}'. + * + * + * @return the meta object for class 'Controller Service Standardeventcollector Service Instance'. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceInstance + * @generated + */ + EClass getControllerServiceStandardeventcollectorServiceInstance(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration Controller Service Standardeventcollector Service Configuration}'. + * + * + * @return the meta object for class 'Controller Service Standardeventcollector Service Configuration'. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration + * @generated + */ + EClass getControllerServiceStandardeventcollectorServiceConfiguration(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getCport Cport}'. + * + * + * @return the meta object for the attribute 'Cport'. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getCport() + * @see #getControllerServiceStandardeventcollectorServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Cport(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getCsecport Csecport}'. + * + * + * @return the meta object for the attribute 'Csecport'. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getCsecport() + * @see #getControllerServiceStandardeventcollectorServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Csecport(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getKeystoreloc Keystoreloc}'. + * + * + * @return the meta object for the attribute 'Keystoreloc'. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getKeystoreloc() + * @see #getControllerServiceStandardeventcollectorServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Keystoreloc(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getKeystorepwd Keystorepwd}'. + * + * + * @return the meta object for the attribute 'Keystorepwd'. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getKeystorepwd() + * @see #getControllerServiceStandardeventcollectorServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Keystorepwd(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getMaxinputqueue Maxinputqueue}'. + * + * + * @return the meta object for the attribute 'Maxinputqueue'. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getMaxinputqueue() + * @see #getControllerServiceStandardeventcollectorServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Maxinputqueue(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthid Authid}'. + * + * + * @return the meta object for the attribute 'Authid'. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthid() + * @see #getControllerServiceStandardeventcollectorServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Authid(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthflag Authflag}'. + * + * + * @return the meta object for the attribute 'Authflag'. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthflag() + * @see #getControllerServiceStandardeventcollectorServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Authflag(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthpwd Authpwd}'. + * + * + * @return the meta object for the attribute 'Authpwd'. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthpwd() + * @see #getControllerServiceStandardeventcollectorServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Authpwd(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthfile Authfile}'. + * + * + * @return the meta object for the attribute 'Authfile'. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthfile() + * @see #getControllerServiceStandardeventcollectorServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Authfile(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getCheckschemaflag Checkschemaflag}'. + * + * + * @return the meta object for the attribute 'Checkschemaflag'. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getCheckschemaflag() + * @see #getControllerServiceStandardeventcollectorServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Checkschemaflag(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getSchemafile Schemafile}'. + * + * + * @return the meta object for the attribute 'Schemafile'. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getSchemafile() + * @see #getControllerServiceStandardeventcollectorServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Schemafile(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ServiceFactory getServiceFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceImpl Controller Service Standardeventcollector Service}' class. + * + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceImpl + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ServicePackageImpl#getControllerServiceStandardeventcollectorService() + * @generated + */ + EClass CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE = eINSTANCE.getControllerServiceStandardeventcollectorService(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceInstanceImpl Controller Service Standardeventcollector Service Instance}' class. + * + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ServicePackageImpl#getControllerServiceStandardeventcollectorServiceInstance() + * @generated + */ + EClass CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE = eINSTANCE.getControllerServiceStandardeventcollectorServiceInstance(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceConfigurationImpl Controller Service Standardeventcollector Service Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ServicePackageImpl#getControllerServiceStandardeventcollectorServiceConfiguration() + * @generated + */ + EClass CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration(); + + /** + * The meta object literal for the 'Cport' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CPORT = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Cport(); + + /** + * The meta object literal for the 'Csecport' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CSECPORT = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Csecport(); + + /** + * The meta object literal for the 'Keystoreloc' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTORELOC = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Keystoreloc(); + + /** + * The meta object literal for the 'Keystorepwd' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTOREPWD = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Keystorepwd(); + + /** + * The meta object literal for the 'Maxinputqueue' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__MAXINPUTQUEUE = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Maxinputqueue(); + + /** + * The meta object literal for the 'Authid' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHID = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Authid(); + + /** + * The meta object literal for the 'Authflag' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFLAG = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Authflag(); + + /** + * The meta object literal for the 'Authpwd' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHPWD = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Authpwd(); + + /** + * The meta object literal for the 'Authfile' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFILE = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Authfile(); + + /** + * The meta object literal for the 'Checkschemaflag' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CHECKSCHEMAFLAG = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Checkschemaflag(); + + /** + * The meta object literal for the 'Schemafile' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__SCHEMAFILE = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Schemafile(); + + } + +} //ServicePackage diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceConfigurationImpl.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceConfigurationImpl.java new file mode 100644 index 0000000..ce333f2 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceConfigurationImpl.java @@ -0,0 +1,701 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.service.impl; + +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration; +import org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Controller Service Standardeventcollector Service Configuration'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceConfigurationImpl#getCport Cport}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceConfigurationImpl#getCsecport Csecport}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceConfigurationImpl#getKeystoreloc Keystoreloc}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceConfigurationImpl#getKeystorepwd Keystorepwd}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceConfigurationImpl#getMaxinputqueue Maxinputqueue}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceConfigurationImpl#getAuthid Authid}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceConfigurationImpl#getAuthflag Authflag}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceConfigurationImpl#getAuthpwd Authpwd}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceConfigurationImpl#getAuthfile Authfile}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceConfigurationImpl#getCheckschemaflag Checkschemaflag}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceConfigurationImpl#getSchemafile Schemafile}
  • + *
+ *

+ * + * @generated + */ +public class ControllerServiceStandardeventcollectorServiceConfigurationImpl extends MinimalEObjectImpl.Container implements ControllerServiceStandardeventcollectorServiceConfiguration { + /** + * The default value of the '{@link #getCport() Cport}' attribute. + * + * + * @see #getCport() + * @generated + * @ordered + */ + protected static final String CPORT_EDEFAULT = null; + /** + * The cached value of the '{@link #getCport() Cport}' attribute. + * + * + * @see #getCport() + * @generated + * @ordered + */ + protected String cport = CPORT_EDEFAULT; + /** + * The default value of the '{@link #getCsecport() Csecport}' attribute. + * + * + * @see #getCsecport() + * @generated + * @ordered + */ + protected static final String CSECPORT_EDEFAULT = null; + /** + * The cached value of the '{@link #getCsecport() Csecport}' attribute. + * + * + * @see #getCsecport() + * @generated + * @ordered + */ + protected String csecport = CSECPORT_EDEFAULT; + /** + * The default value of the '{@link #getKeystoreloc() Keystoreloc}' attribute. + * + * + * @see #getKeystoreloc() + * @generated + * @ordered + */ + protected static final String KEYSTORELOC_EDEFAULT = null; + /** + * The cached value of the '{@link #getKeystoreloc() Keystoreloc}' attribute. + * + * + * @see #getKeystoreloc() + * @generated + * @ordered + */ + protected String keystoreloc = KEYSTORELOC_EDEFAULT; + /** + * The default value of the '{@link #getKeystorepwd() Keystorepwd}' attribute. + * + * + * @see #getKeystorepwd() + * @generated + * @ordered + */ + protected static final String KEYSTOREPWD_EDEFAULT = null; + /** + * The cached value of the '{@link #getKeystorepwd() Keystorepwd}' attribute. + * + * + * @see #getKeystorepwd() + * @generated + * @ordered + */ + protected String keystorepwd = KEYSTOREPWD_EDEFAULT; + /** + * The default value of the '{@link #getMaxinputqueue() Maxinputqueue}' attribute. + * + * + * @see #getMaxinputqueue() + * @generated + * @ordered + */ + protected static final String MAXINPUTQUEUE_EDEFAULT = null; + /** + * The cached value of the '{@link #getMaxinputqueue() Maxinputqueue}' attribute. + * + * + * @see #getMaxinputqueue() + * @generated + * @ordered + */ + protected String maxinputqueue = MAXINPUTQUEUE_EDEFAULT; + /** + * The default value of the '{@link #getAuthid() Authid}' attribute. + * + * + * @see #getAuthid() + * @generated + * @ordered + */ + protected static final String AUTHID_EDEFAULT = null; + /** + * The cached value of the '{@link #getAuthid() Authid}' attribute. + * + * + * @see #getAuthid() + * @generated + * @ordered + */ + protected String authid = AUTHID_EDEFAULT; + /** + * The default value of the '{@link #getAuthflag() Authflag}' attribute. + * + * + * @see #getAuthflag() + * @generated + * @ordered + */ + protected static final String AUTHFLAG_EDEFAULT = null; + /** + * The cached value of the '{@link #getAuthflag() Authflag}' attribute. + * + * + * @see #getAuthflag() + * @generated + * @ordered + */ + protected String authflag = AUTHFLAG_EDEFAULT; + /** + * The default value of the '{@link #getAuthpwd() Authpwd}' attribute. + * + * + * @see #getAuthpwd() + * @generated + * @ordered + */ + protected static final String AUTHPWD_EDEFAULT = null; + /** + * The cached value of the '{@link #getAuthpwd() Authpwd}' attribute. + * + * + * @see #getAuthpwd() + * @generated + * @ordered + */ + protected String authpwd = AUTHPWD_EDEFAULT; + /** + * The default value of the '{@link #getAuthfile() Authfile}' attribute. + * + * + * @see #getAuthfile() + * @generated + * @ordered + */ + protected static final String AUTHFILE_EDEFAULT = null; + /** + * The cached value of the '{@link #getAuthfile() Authfile}' attribute. + * + * + * @see #getAuthfile() + * @generated + * @ordered + */ + protected String authfile = AUTHFILE_EDEFAULT; + /** + * The default value of the '{@link #getCheckschemaflag() Checkschemaflag}' attribute. + * + * + * @see #getCheckschemaflag() + * @generated + * @ordered + */ + protected static final String CHECKSCHEMAFLAG_EDEFAULT = null; + /** + * The cached value of the '{@link #getCheckschemaflag() Checkschemaflag}' attribute. + * + * + * @see #getCheckschemaflag() + * @generated + * @ordered + */ + protected String checkschemaflag = CHECKSCHEMAFLAG_EDEFAULT; + /** + * The default value of the '{@link #getSchemafile() Schemafile}' attribute. + * + * + * @see #getSchemafile() + * @generated + * @ordered + */ + protected static final String SCHEMAFILE_EDEFAULT = null; + /** + * The cached value of the '{@link #getSchemafile() Schemafile}' attribute. + * + * + * @see #getSchemafile() + * @generated + * @ordered + */ + protected String schemafile = SCHEMAFILE_EDEFAULT; + /** + * + * + * @generated + */ + protected ControllerServiceStandardeventcollectorServiceConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public String getCport() { + return cport; + } + + /** + * + * + * @generated + */ + public void setCport(String newCport) { + String oldCport = cport; + cport = newCport; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CPORT, oldCport, cport)); + } + + /** + * + * + * @generated + */ + public String getCsecport() { + return csecport; + } + + /** + * + * + * @generated + */ + public void setCsecport(String newCsecport) { + String oldCsecport = csecport; + csecport = newCsecport; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CSECPORT, oldCsecport, csecport)); + } + + /** + * + * + * @generated + */ + public String getKeystoreloc() { + return keystoreloc; + } + + /** + * + * + * @generated + */ + public void setKeystoreloc(String newKeystoreloc) { + String oldKeystoreloc = keystoreloc; + keystoreloc = newKeystoreloc; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTORELOC, oldKeystoreloc, keystoreloc)); + } + + /** + * + * + * @generated + */ + public String getKeystorepwd() { + return keystorepwd; + } + + /** + * + * + * @generated + */ + public void setKeystorepwd(String newKeystorepwd) { + String oldKeystorepwd = keystorepwd; + keystorepwd = newKeystorepwd; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTOREPWD, oldKeystorepwd, keystorepwd)); + } + + /** + * + * + * @generated + */ + public String getMaxinputqueue() { + return maxinputqueue; + } + + /** + * + * + * @generated + */ + public void setMaxinputqueue(String newMaxinputqueue) { + String oldMaxinputqueue = maxinputqueue; + maxinputqueue = newMaxinputqueue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__MAXINPUTQUEUE, oldMaxinputqueue, maxinputqueue)); + } + + /** + * + * + * @generated + */ + public String getAuthid() { + return authid; + } + + /** + * + * + * @generated + */ + public void setAuthid(String newAuthid) { + String oldAuthid = authid; + authid = newAuthid; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHID, oldAuthid, authid)); + } + + /** + * + * + * @generated + */ + public String getAuthflag() { + return authflag; + } + + /** + * + * + * @generated + */ + public void setAuthflag(String newAuthflag) { + String oldAuthflag = authflag; + authflag = newAuthflag; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFLAG, oldAuthflag, authflag)); + } + + /** + * + * + * @generated + */ + public String getAuthpwd() { + return authpwd; + } + + /** + * + * + * @generated + */ + public void setAuthpwd(String newAuthpwd) { + String oldAuthpwd = authpwd; + authpwd = newAuthpwd; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHPWD, oldAuthpwd, authpwd)); + } + + /** + * + * + * @generated + */ + public String getAuthfile() { + return authfile; + } + + /** + * + * + * @generated + */ + public void setAuthfile(String newAuthfile) { + String oldAuthfile = authfile; + authfile = newAuthfile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFILE, oldAuthfile, authfile)); + } + + /** + * + * + * @generated + */ + public String getCheckschemaflag() { + return checkschemaflag; + } + + /** + * + * + * @generated + */ + public void setCheckschemaflag(String newCheckschemaflag) { + String oldCheckschemaflag = checkschemaflag; + checkschemaflag = newCheckschemaflag; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CHECKSCHEMAFLAG, oldCheckschemaflag, checkschemaflag)); + } + + /** + * + * + * @generated + */ + public String getSchemafile() { + return schemafile; + } + + /** + * + * + * @generated + */ + public void setSchemafile(String newSchemafile) { + String oldSchemafile = schemafile; + schemafile = newSchemafile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__SCHEMAFILE, oldSchemafile, schemafile)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CPORT: + return getCport(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CSECPORT: + return getCsecport(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTORELOC: + return getKeystoreloc(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTOREPWD: + return getKeystorepwd(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__MAXINPUTQUEUE: + return getMaxinputqueue(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHID: + return getAuthid(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFLAG: + return getAuthflag(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHPWD: + return getAuthpwd(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFILE: + return getAuthfile(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CHECKSCHEMAFLAG: + return getCheckschemaflag(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__SCHEMAFILE: + return getSchemafile(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CPORT: + setCport((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CSECPORT: + setCsecport((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTORELOC: + setKeystoreloc((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTOREPWD: + setKeystorepwd((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__MAXINPUTQUEUE: + setMaxinputqueue((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHID: + setAuthid((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFLAG: + setAuthflag((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHPWD: + setAuthpwd((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFILE: + setAuthfile((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CHECKSCHEMAFLAG: + setCheckschemaflag((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__SCHEMAFILE: + setSchemafile((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CPORT: + setCport(CPORT_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CSECPORT: + setCsecport(CSECPORT_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTORELOC: + setKeystoreloc(KEYSTORELOC_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTOREPWD: + setKeystorepwd(KEYSTOREPWD_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__MAXINPUTQUEUE: + setMaxinputqueue(MAXINPUTQUEUE_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHID: + setAuthid(AUTHID_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFLAG: + setAuthflag(AUTHFLAG_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHPWD: + setAuthpwd(AUTHPWD_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFILE: + setAuthfile(AUTHFILE_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CHECKSCHEMAFLAG: + setCheckschemaflag(CHECKSCHEMAFLAG_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__SCHEMAFILE: + setSchemafile(SCHEMAFILE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CPORT: + return CPORT_EDEFAULT == null ? cport != null : !CPORT_EDEFAULT.equals(cport); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CSECPORT: + return CSECPORT_EDEFAULT == null ? csecport != null : !CSECPORT_EDEFAULT.equals(csecport); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTORELOC: + return KEYSTORELOC_EDEFAULT == null ? keystoreloc != null : !KEYSTORELOC_EDEFAULT.equals(keystoreloc); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTOREPWD: + return KEYSTOREPWD_EDEFAULT == null ? keystorepwd != null : !KEYSTOREPWD_EDEFAULT.equals(keystorepwd); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__MAXINPUTQUEUE: + return MAXINPUTQUEUE_EDEFAULT == null ? maxinputqueue != null : !MAXINPUTQUEUE_EDEFAULT.equals(maxinputqueue); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHID: + return AUTHID_EDEFAULT == null ? authid != null : !AUTHID_EDEFAULT.equals(authid); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFLAG: + return AUTHFLAG_EDEFAULT == null ? authflag != null : !AUTHFLAG_EDEFAULT.equals(authflag); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHPWD: + return AUTHPWD_EDEFAULT == null ? authpwd != null : !AUTHPWD_EDEFAULT.equals(authpwd); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFILE: + return AUTHFILE_EDEFAULT == null ? authfile != null : !AUTHFILE_EDEFAULT.equals(authfile); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CHECKSCHEMAFLAG: + return CHECKSCHEMAFLAG_EDEFAULT == null ? checkschemaflag != null : !CHECKSCHEMAFLAG_EDEFAULT.equals(checkschemaflag); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__SCHEMAFILE: + return SCHEMAFILE_EDEFAULT == null ? schemafile != null : !SCHEMAFILE_EDEFAULT.equals(schemafile); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (cport: "); + result.append(cport); + result.append(", csecport: "); + result.append(csecport); + result.append(", keystoreloc: "); + result.append(keystoreloc); + result.append(", keystorepwd: "); + result.append(keystorepwd); + result.append(", maxinputqueue: "); + result.append(maxinputqueue); + result.append(", authid: "); + result.append(authid); + result.append(", authflag: "); + result.append(authflag); + result.append(", authpwd: "); + result.append(authpwd); + result.append(", authfile: "); + result.append(authfile); + result.append(", checkschemaflag: "); + result.append(checkschemaflag); + result.append(", schemafile: "); + result.append(schemafile); + result.append(')'); + return result.toString(); + } + +} //ControllerServiceStandardeventcollectorServiceConfigurationImpl diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceImpl.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceImpl.java new file mode 100644 index 0000000..136dc7e --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.service.impl; + +import org.openecomp.dcae.controller.service.docker.impl.DockerServiceImpl; + +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorService; +import org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Controller Service Standardeventcollector Service'. + * + *

+ *

+ * + * @generated + */ +public class ControllerServiceStandardeventcollectorServiceImpl extends DockerServiceImpl implements ControllerServiceStandardeventcollectorService { + /** + * + * + * @generated + */ + protected ControllerServiceStandardeventcollectorServiceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE; + } + +} //ControllerServiceStandardeventcollectorServiceImpl diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceInstanceImpl.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceInstanceImpl.java new file mode 100644 index 0000000..b0cc8aa --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceInstanceImpl.java @@ -0,0 +1,754 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.service.impl; + +import org.openecomp.dcae.controller.service.docker.impl.DockerServiceInstanceImpl; + +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration; +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceInstance; +import org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Controller Service Standardeventcollector Service Instance'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceInstanceImpl#getCport Cport}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceInstanceImpl#getCsecport Csecport}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceInstanceImpl#getKeystoreloc Keystoreloc}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceInstanceImpl#getKeystorepwd Keystorepwd}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceInstanceImpl#getMaxinputqueue Maxinputqueue}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceInstanceImpl#getAuthid Authid}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceInstanceImpl#getAuthflag Authflag}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceInstanceImpl#getAuthpwd Authpwd}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceInstanceImpl#getAuthfile Authfile}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceInstanceImpl#getCheckschemaflag Checkschemaflag}
  • + *
  • {@link org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceInstanceImpl#getSchemafile Schemafile}
  • + *
+ *

+ * + * @generated + */ +public class ControllerServiceStandardeventcollectorServiceInstanceImpl extends DockerServiceInstanceImpl implements ControllerServiceStandardeventcollectorServiceInstance { + /** + * The default value of the '{@link #getCport() Cport}' attribute. + * + * + * @see #getCport() + * @generated + * @ordered + */ + protected static final String CPORT_EDEFAULT = null; + /** + * The cached value of the '{@link #getCport() Cport}' attribute. + * + * + * @see #getCport() + * @generated + * @ordered + */ + protected String cport = CPORT_EDEFAULT; + /** + * The default value of the '{@link #getCsecport() Csecport}' attribute. + * + * + * @see #getCsecport() + * @generated + * @ordered + */ + protected static final String CSECPORT_EDEFAULT = null; + /** + * The cached value of the '{@link #getCsecport() Csecport}' attribute. + * + * + * @see #getCsecport() + * @generated + * @ordered + */ + protected String csecport = CSECPORT_EDEFAULT; + /** + * The default value of the '{@link #getKeystoreloc() Keystoreloc}' attribute. + * + * + * @see #getKeystoreloc() + * @generated + * @ordered + */ + protected static final String KEYSTORELOC_EDEFAULT = null; + /** + * The cached value of the '{@link #getKeystoreloc() Keystoreloc}' attribute. + * + * + * @see #getKeystoreloc() + * @generated + * @ordered + */ + protected String keystoreloc = KEYSTORELOC_EDEFAULT; + /** + * The default value of the '{@link #getKeystorepwd() Keystorepwd}' attribute. + * + * + * @see #getKeystorepwd() + * @generated + * @ordered + */ + protected static final String KEYSTOREPWD_EDEFAULT = null; + /** + * The cached value of the '{@link #getKeystorepwd() Keystorepwd}' attribute. + * + * + * @see #getKeystorepwd() + * @generated + * @ordered + */ + protected String keystorepwd = KEYSTOREPWD_EDEFAULT; + /** + * The default value of the '{@link #getMaxinputqueue() Maxinputqueue}' attribute. + * + * + * @see #getMaxinputqueue() + * @generated + * @ordered + */ + protected static final String MAXINPUTQUEUE_EDEFAULT = null; + /** + * The cached value of the '{@link #getMaxinputqueue() Maxinputqueue}' attribute. + * + * + * @see #getMaxinputqueue() + * @generated + * @ordered + */ + protected String maxinputqueue = MAXINPUTQUEUE_EDEFAULT; + /** + * The default value of the '{@link #getAuthid() Authid}' attribute. + * + * + * @see #getAuthid() + * @generated + * @ordered + */ + protected static final String AUTHID_EDEFAULT = null; + /** + * The cached value of the '{@link #getAuthid() Authid}' attribute. + * + * + * @see #getAuthid() + * @generated + * @ordered + */ + protected String authid = AUTHID_EDEFAULT; + /** + * The default value of the '{@link #getAuthflag() Authflag}' attribute. + * + * + * @see #getAuthflag() + * @generated + * @ordered + */ + protected static final String AUTHFLAG_EDEFAULT = null; + /** + * The cached value of the '{@link #getAuthflag() Authflag}' attribute. + * + * + * @see #getAuthflag() + * @generated + * @ordered + */ + protected String authflag = AUTHFLAG_EDEFAULT; + /** + * The default value of the '{@link #getAuthpwd() Authpwd}' attribute. + * + * + * @see #getAuthpwd() + * @generated + * @ordered + */ + protected static final String AUTHPWD_EDEFAULT = null; + /** + * The cached value of the '{@link #getAuthpwd() Authpwd}' attribute. + * + * + * @see #getAuthpwd() + * @generated + * @ordered + */ + protected String authpwd = AUTHPWD_EDEFAULT; + /** + * The default value of the '{@link #getAuthfile() Authfile}' attribute. + * + * + * @see #getAuthfile() + * @generated + * @ordered + */ + protected static final String AUTHFILE_EDEFAULT = null; + /** + * The cached value of the '{@link #getAuthfile() Authfile}' attribute. + * + * + * @see #getAuthfile() + * @generated + * @ordered + */ + protected String authfile = AUTHFILE_EDEFAULT; + /** + * The default value of the '{@link #getCheckschemaflag() Checkschemaflag}' attribute. + * + * + * @see #getCheckschemaflag() + * @generated + * @ordered + */ + protected static final String CHECKSCHEMAFLAG_EDEFAULT = null; + /** + * The cached value of the '{@link #getCheckschemaflag() Checkschemaflag}' attribute. + * + * + * @see #getCheckschemaflag() + * @generated + * @ordered + */ + protected String checkschemaflag = CHECKSCHEMAFLAG_EDEFAULT; + /** + * The default value of the '{@link #getSchemafile() Schemafile}' attribute. + * + * + * @see #getSchemafile() + * @generated + * @ordered + */ + protected static final String SCHEMAFILE_EDEFAULT = null; + /** + * The cached value of the '{@link #getSchemafile() Schemafile}' attribute. + * + * + * @see #getSchemafile() + * @generated + * @ordered + */ + protected String schemafile = SCHEMAFILE_EDEFAULT; + /** + * + * + * @generated + */ + protected ControllerServiceStandardeventcollectorServiceInstanceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE; + } + + /** + * + * + * @generated + */ + public String getCport() { + return cport; + } + + /** + * + * + * @generated + */ + public void setCport(String newCport) { + String oldCport = cport; + cport = newCport; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CPORT, oldCport, cport)); + } + + /** + * + * + * @generated + */ + public String getCsecport() { + return csecport; + } + + /** + * + * + * @generated + */ + public void setCsecport(String newCsecport) { + String oldCsecport = csecport; + csecport = newCsecport; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CSECPORT, oldCsecport, csecport)); + } + + /** + * + * + * @generated + */ + public String getKeystoreloc() { + return keystoreloc; + } + + /** + * + * + * @generated + */ + public void setKeystoreloc(String newKeystoreloc) { + String oldKeystoreloc = keystoreloc; + keystoreloc = newKeystoreloc; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__KEYSTORELOC, oldKeystoreloc, keystoreloc)); + } + + /** + * + * + * @generated + */ + public String getKeystorepwd() { + return keystorepwd; + } + + /** + * + * + * @generated + */ + public void setKeystorepwd(String newKeystorepwd) { + String oldKeystorepwd = keystorepwd; + keystorepwd = newKeystorepwd; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__KEYSTOREPWD, oldKeystorepwd, keystorepwd)); + } + + /** + * + * + * @generated + */ + public String getMaxinputqueue() { + return maxinputqueue; + } + + /** + * + * + * @generated + */ + public void setMaxinputqueue(String newMaxinputqueue) { + String oldMaxinputqueue = maxinputqueue; + maxinputqueue = newMaxinputqueue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__MAXINPUTQUEUE, oldMaxinputqueue, maxinputqueue)); + } + + /** + * + * + * @generated + */ + public String getAuthid() { + return authid; + } + + /** + * + * + * @generated + */ + public void setAuthid(String newAuthid) { + String oldAuthid = authid; + authid = newAuthid; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHID, oldAuthid, authid)); + } + + /** + * + * + * @generated + */ + public String getAuthflag() { + return authflag; + } + + /** + * + * + * @generated + */ + public void setAuthflag(String newAuthflag) { + String oldAuthflag = authflag; + authflag = newAuthflag; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHFLAG, oldAuthflag, authflag)); + } + + /** + * + * + * @generated + */ + public String getAuthpwd() { + return authpwd; + } + + /** + * + * + * @generated + */ + public void setAuthpwd(String newAuthpwd) { + String oldAuthpwd = authpwd; + authpwd = newAuthpwd; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHPWD, oldAuthpwd, authpwd)); + } + + /** + * + * + * @generated + */ + public String getAuthfile() { + return authfile; + } + + /** + * + * + * @generated + */ + public void setAuthfile(String newAuthfile) { + String oldAuthfile = authfile; + authfile = newAuthfile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHFILE, oldAuthfile, authfile)); + } + + /** + * + * + * @generated + */ + public String getCheckschemaflag() { + return checkschemaflag; + } + + /** + * + * + * @generated + */ + public void setCheckschemaflag(String newCheckschemaflag) { + String oldCheckschemaflag = checkschemaflag; + checkschemaflag = newCheckschemaflag; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CHECKSCHEMAFLAG, oldCheckschemaflag, checkschemaflag)); + } + + /** + * + * + * @generated + */ + public String getSchemafile() { + return schemafile; + } + + /** + * + * + * @generated + */ + public void setSchemafile(String newSchemafile) { + String oldSchemafile = schemafile; + schemafile = newSchemafile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__SCHEMAFILE, oldSchemafile, schemafile)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CPORT: + return getCport(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CSECPORT: + return getCsecport(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__KEYSTORELOC: + return getKeystoreloc(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__KEYSTOREPWD: + return getKeystorepwd(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__MAXINPUTQUEUE: + return getMaxinputqueue(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHID: + return getAuthid(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHFLAG: + return getAuthflag(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHPWD: + return getAuthpwd(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHFILE: + return getAuthfile(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CHECKSCHEMAFLAG: + return getCheckschemaflag(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__SCHEMAFILE: + return getSchemafile(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CPORT: + setCport((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CSECPORT: + setCsecport((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__KEYSTORELOC: + setKeystoreloc((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__KEYSTOREPWD: + setKeystorepwd((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__MAXINPUTQUEUE: + setMaxinputqueue((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHID: + setAuthid((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHFLAG: + setAuthflag((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHPWD: + setAuthpwd((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHFILE: + setAuthfile((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CHECKSCHEMAFLAG: + setCheckschemaflag((String)newValue); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__SCHEMAFILE: + setSchemafile((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CPORT: + setCport(CPORT_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CSECPORT: + setCsecport(CSECPORT_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__KEYSTORELOC: + setKeystoreloc(KEYSTORELOC_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__KEYSTOREPWD: + setKeystorepwd(KEYSTOREPWD_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__MAXINPUTQUEUE: + setMaxinputqueue(MAXINPUTQUEUE_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHID: + setAuthid(AUTHID_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHFLAG: + setAuthflag(AUTHFLAG_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHPWD: + setAuthpwd(AUTHPWD_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHFILE: + setAuthfile(AUTHFILE_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CHECKSCHEMAFLAG: + setCheckschemaflag(CHECKSCHEMAFLAG_EDEFAULT); + return; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__SCHEMAFILE: + setSchemafile(SCHEMAFILE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CPORT: + return CPORT_EDEFAULT == null ? cport != null : !CPORT_EDEFAULT.equals(cport); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CSECPORT: + return CSECPORT_EDEFAULT == null ? csecport != null : !CSECPORT_EDEFAULT.equals(csecport); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__KEYSTORELOC: + return KEYSTORELOC_EDEFAULT == null ? keystoreloc != null : !KEYSTORELOC_EDEFAULT.equals(keystoreloc); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__KEYSTOREPWD: + return KEYSTOREPWD_EDEFAULT == null ? keystorepwd != null : !KEYSTOREPWD_EDEFAULT.equals(keystorepwd); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__MAXINPUTQUEUE: + return MAXINPUTQUEUE_EDEFAULT == null ? maxinputqueue != null : !MAXINPUTQUEUE_EDEFAULT.equals(maxinputqueue); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHID: + return AUTHID_EDEFAULT == null ? authid != null : !AUTHID_EDEFAULT.equals(authid); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHFLAG: + return AUTHFLAG_EDEFAULT == null ? authflag != null : !AUTHFLAG_EDEFAULT.equals(authflag); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHPWD: + return AUTHPWD_EDEFAULT == null ? authpwd != null : !AUTHPWD_EDEFAULT.equals(authpwd); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHFILE: + return AUTHFILE_EDEFAULT == null ? authfile != null : !AUTHFILE_EDEFAULT.equals(authfile); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CHECKSCHEMAFLAG: + return CHECKSCHEMAFLAG_EDEFAULT == null ? checkschemaflag != null : !CHECKSCHEMAFLAG_EDEFAULT.equals(checkschemaflag); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__SCHEMAFILE: + return SCHEMAFILE_EDEFAULT == null ? schemafile != null : !SCHEMAFILE_EDEFAULT.equals(schemafile); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == ControllerServiceStandardeventcollectorServiceConfiguration.class) { + switch (derivedFeatureID) { + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CPORT: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CPORT; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CSECPORT: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CSECPORT; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__KEYSTORELOC: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTORELOC; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__KEYSTOREPWD: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTOREPWD; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__MAXINPUTQUEUE: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__MAXINPUTQUEUE; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHID: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHID; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHFLAG: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFLAG; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHPWD: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHPWD; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHFILE: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFILE; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CHECKSCHEMAFLAG: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CHECKSCHEMAFLAG; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__SCHEMAFILE: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__SCHEMAFILE; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == ControllerServiceStandardeventcollectorServiceConfiguration.class) { + switch (baseFeatureID) { + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CPORT: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CPORT; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CSECPORT: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CSECPORT; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTORELOC: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__KEYSTORELOC; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTOREPWD: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__KEYSTOREPWD; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__MAXINPUTQUEUE: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__MAXINPUTQUEUE; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHID: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHID; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFLAG: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHFLAG; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHPWD: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHPWD; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFILE: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHFILE; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CHECKSCHEMAFLAG: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CHECKSCHEMAFLAG; + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__SCHEMAFILE: return ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__SCHEMAFILE; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (cport: "); + result.append(cport); + result.append(", csecport: "); + result.append(csecport); + result.append(", keystoreloc: "); + result.append(keystoreloc); + result.append(", keystorepwd: "); + result.append(keystorepwd); + result.append(", maxinputqueue: "); + result.append(maxinputqueue); + result.append(", authid: "); + result.append(authid); + result.append(", authflag: "); + result.append(authflag); + result.append(", authpwd: "); + result.append(authpwd); + result.append(", authfile: "); + result.append(authfile); + result.append(", checkschemaflag: "); + result.append(checkschemaflag); + result.append(", schemafile: "); + result.append(schemafile); + result.append(')'); + return result.toString(); + } + +} //ControllerServiceStandardeventcollectorServiceInstanceImpl diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ServiceFactoryImpl.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ServiceFactoryImpl.java new file mode 100644 index 0000000..e71f12d --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ServiceFactoryImpl.java @@ -0,0 +1,138 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.service.impl; + +import org.openecomp.dcae.controller.service.standardeventcollector.service.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ServiceFactoryImpl extends EFactoryImpl implements ServiceFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ServiceFactory init() { + try { + ServiceFactory theServiceFactory = (ServiceFactory)EPackage.Registry.INSTANCE.getEFactory(ServicePackage.eNS_URI); + if (theServiceFactory != null) { + return theServiceFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ServiceFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ServiceFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE: return createControllerServiceStandardeventcollectorService(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE: return createControllerServiceStandardeventcollectorServiceInstance(); + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION: return createControllerServiceStandardeventcollectorServiceConfiguration(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public ControllerServiceStandardeventcollectorService createControllerServiceStandardeventcollectorService() { + ControllerServiceStandardeventcollectorServiceImpl controllerServiceStandardeventcollectorService = new ControllerServiceStandardeventcollectorServiceImpl(); + return controllerServiceStandardeventcollectorService; + } + + /** + * + * + * @generated + */ + public ControllerServiceStandardeventcollectorServiceInstance createControllerServiceStandardeventcollectorServiceInstance() { + ControllerServiceStandardeventcollectorServiceInstanceImpl controllerServiceStandardeventcollectorServiceInstance = new ControllerServiceStandardeventcollectorServiceInstanceImpl(); + return controllerServiceStandardeventcollectorServiceInstance; + } + + /** + * + * + * @generated + */ + public ControllerServiceStandardeventcollectorServiceConfiguration createControllerServiceStandardeventcollectorServiceConfiguration() { + ControllerServiceStandardeventcollectorServiceConfigurationImpl controllerServiceStandardeventcollectorServiceConfiguration = new ControllerServiceStandardeventcollectorServiceConfigurationImpl(); + return controllerServiceStandardeventcollectorServiceConfiguration; + } + + /** + * + * + * @generated + */ + public ServicePackage getServicePackage() { + return (ServicePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ServicePackage getPackage() { + return ServicePackage.eINSTANCE; + } + +} //ServiceFactoryImpl diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ServicePackageImpl.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ServicePackageImpl.java new file mode 100644 index 0000000..3ff2a1e --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ServicePackageImpl.java @@ -0,0 +1,461 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.service.impl; + +import org.openecomp.dcae.controller.service.docker.DockerPackage; + +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorService; +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration; +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceInstance; +import org.openecomp.dcae.controller.service.standardeventcollector.service.ServiceFactory; +import org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ServicePackageImpl extends EPackageImpl implements ServicePackage { + /** + * + * + * @generated + */ + private EClass controllerServiceStandardeventcollectorServiceEClass = null; + + /** + * + * + * @generated + */ + private EClass controllerServiceStandardeventcollectorServiceInstanceEClass = null; + + /** + * + * + * @generated + */ + private EClass controllerServiceStandardeventcollectorServiceConfigurationEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#eNS_URI + * @see #init() + * @generated + */ + private ServicePackageImpl() { + super(eNS_URI, ServiceFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ServicePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ServicePackage init() { + if (isInited) return (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + + // Obtain or create and register package + ServicePackageImpl theServicePackage = (ServicePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ServicePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ServicePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + DockerPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theServicePackage.createPackageContents(); + + // Initialize created meta-data + theServicePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theServicePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ServicePackage.eNS_URI, theServicePackage); + return theServicePackage; + } + + /** + * + * + * @generated + */ + public EClass getControllerServiceStandardeventcollectorService() { + return controllerServiceStandardeventcollectorServiceEClass; + } + + /** + * + * + * @generated + */ + public EClass getControllerServiceStandardeventcollectorServiceInstance() { + return controllerServiceStandardeventcollectorServiceInstanceEClass; + } + + /** + * + * + * @generated + */ + public EClass getControllerServiceStandardeventcollectorServiceConfiguration() { + return controllerServiceStandardeventcollectorServiceConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Cport() { + return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Csecport() { + return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Keystoreloc() { + return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Keystorepwd() { + return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Maxinputqueue() { + return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Authid() { + return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Authflag() { + return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Authpwd() { + return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Authfile() { + return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Checkschemaflag() { + return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Schemafile() { + return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(10); + } + + /** + * + * + * @generated + */ + public ServiceFactory getServiceFactory() { + return (ServiceFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + controllerServiceStandardeventcollectorServiceEClass = createEClass(CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE); + + controllerServiceStandardeventcollectorServiceInstanceEClass = createEClass(CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE); + + controllerServiceStandardeventcollectorServiceConfigurationEClass = createEClass(CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION); + createEAttribute(controllerServiceStandardeventcollectorServiceConfigurationEClass, CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CPORT); + createEAttribute(controllerServiceStandardeventcollectorServiceConfigurationEClass, CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CSECPORT); + createEAttribute(controllerServiceStandardeventcollectorServiceConfigurationEClass, CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTORELOC); + createEAttribute(controllerServiceStandardeventcollectorServiceConfigurationEClass, CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__KEYSTOREPWD); + createEAttribute(controllerServiceStandardeventcollectorServiceConfigurationEClass, CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__MAXINPUTQUEUE); + createEAttribute(controllerServiceStandardeventcollectorServiceConfigurationEClass, CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHID); + createEAttribute(controllerServiceStandardeventcollectorServiceConfigurationEClass, CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFLAG); + createEAttribute(controllerServiceStandardeventcollectorServiceConfigurationEClass, CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHPWD); + createEAttribute(controllerServiceStandardeventcollectorServiceConfigurationEClass, CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFILE); + createEAttribute(controllerServiceStandardeventcollectorServiceConfigurationEClass, CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CHECKSCHEMAFLAG); + createEAttribute(controllerServiceStandardeventcollectorServiceConfigurationEClass, CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__SCHEMAFILE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + DockerPackage theDockerPackage = (DockerPackage)EPackage.Registry.INSTANCE.getEPackage(DockerPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + controllerServiceStandardeventcollectorServiceEClass.getESuperTypes().add(theDockerPackage.getDockerService()); + controllerServiceStandardeventcollectorServiceInstanceEClass.getESuperTypes().add(theDockerPackage.getDockerServiceInstance()); + controllerServiceStandardeventcollectorServiceInstanceEClass.getESuperTypes().add(this.getControllerServiceStandardeventcollectorServiceConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(controllerServiceStandardeventcollectorServiceEClass, ControllerServiceStandardeventcollectorService.class, "ControllerServiceStandardeventcollectorService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(controllerServiceStandardeventcollectorServiceInstanceEClass, ControllerServiceStandardeventcollectorServiceInstance.class, "ControllerServiceStandardeventcollectorServiceInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(controllerServiceStandardeventcollectorServiceConfigurationEClass, ControllerServiceStandardeventcollectorServiceConfiguration.class, "ControllerServiceStandardeventcollectorServiceConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getControllerServiceStandardeventcollectorServiceConfiguration_Cport(), theEcorePackage.getEString(), "cport", null, 0, 1, ControllerServiceStandardeventcollectorServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceStandardeventcollectorServiceConfiguration_Csecport(), theEcorePackage.getEString(), "csecport", null, 0, 1, ControllerServiceStandardeventcollectorServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceStandardeventcollectorServiceConfiguration_Keystoreloc(), theEcorePackage.getEString(), "keystoreloc", null, 0, 1, ControllerServiceStandardeventcollectorServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceStandardeventcollectorServiceConfiguration_Keystorepwd(), theEcorePackage.getEString(), "keystorepwd", null, 0, 1, ControllerServiceStandardeventcollectorServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceStandardeventcollectorServiceConfiguration_Maxinputqueue(), theEcorePackage.getEString(), "maxinputqueue", null, 0, 1, ControllerServiceStandardeventcollectorServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceStandardeventcollectorServiceConfiguration_Authid(), theEcorePackage.getEString(), "authid", null, 0, 1, ControllerServiceStandardeventcollectorServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceStandardeventcollectorServiceConfiguration_Authflag(), theEcorePackage.getEString(), "authflag", null, 0, 1, ControllerServiceStandardeventcollectorServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceStandardeventcollectorServiceConfiguration_Authpwd(), theEcorePackage.getEString(), "authpwd", null, 0, 1, ControllerServiceStandardeventcollectorServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceStandardeventcollectorServiceConfiguration_Authfile(), theEcorePackage.getEString(), "authfile", null, 0, 1, ControllerServiceStandardeventcollectorServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceStandardeventcollectorServiceConfiguration_Checkschemaflag(), theEcorePackage.getEString(), "checkschemaflag", null, 0, 1, ControllerServiceStandardeventcollectorServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerServiceStandardeventcollectorServiceConfiguration_Schemafile(), theEcorePackage.getEString(), "schemafile", null, 0, 1, ControllerServiceStandardeventcollectorServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + // http://openecomp.org + createEcompAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "ecomp", "http://openecomp.org" + }); + } + + /** + * Initializes the annotations for http://openecomp.org. + * + * + * @generated + */ + protected void createEcompAnnotations() { + String source = "http://openecomp.org"; + addAnnotation + (getControllerServiceStandardeventcollectorServiceConfiguration_Cport(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceStandardeventcollectorServiceConfiguration_Csecport(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceStandardeventcollectorServiceConfiguration_Keystoreloc(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceStandardeventcollectorServiceConfiguration_Keystorepwd(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceStandardeventcollectorServiceConfiguration_Maxinputqueue(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceStandardeventcollectorServiceConfiguration_Authid(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceStandardeventcollectorServiceConfiguration_Authflag(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceStandardeventcollectorServiceConfiguration_Authpwd(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceStandardeventcollectorServiceConfiguration_Authfile(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceStandardeventcollectorServiceConfiguration_Checkschemaflag(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getControllerServiceStandardeventcollectorServiceConfiguration_Schemafile(), + source, + new String[] { + "type", "configuration" + }); + } + +} //ServicePackageImpl diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/util/ServiceAdapterFactory.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/util/ServiceAdapterFactory.java new file mode 100644 index 0000000..a95ef53 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/util/ServiceAdapterFactory.java @@ -0,0 +1,275 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.docker.DockerService; +import org.openecomp.dcae.controller.service.docker.DockerServiceInstance; + +import org.openecomp.dcae.controller.service.standardeventcollector.service.*; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage + * @generated + */ +public class ServiceAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ServiceAdapterFactory() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ServiceSwitch modelSwitch = + new ServiceSwitch() { + @Override + public Adapter caseControllerServiceStandardeventcollectorService(ControllerServiceStandardeventcollectorService object) { + return createControllerServiceStandardeventcollectorServiceAdapter(); + } + @Override + public Adapter caseControllerServiceStandardeventcollectorServiceInstance(ControllerServiceStandardeventcollectorServiceInstance object) { + return createControllerServiceStandardeventcollectorServiceInstanceAdapter(); + } + @Override + public Adapter caseControllerServiceStandardeventcollectorServiceConfiguration(ControllerServiceStandardeventcollectorServiceConfiguration object) { + return createControllerServiceStandardeventcollectorServiceConfigurationAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseDcaeService(DcaeService object) { + return createDcaeServiceAdapter(); + } + @Override + public Adapter caseDockerService(DockerService object) { + return createDockerServiceAdapter(); + } + @Override + public Adapter caseDcaeServiceInstance(DcaeServiceInstance object) { + return createDcaeServiceInstanceAdapter(); + } + @Override + public Adapter caseDockerServiceInstance(DockerServiceInstance object) { + return createDockerServiceInstanceAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorService Controller Service Standardeventcollector Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorService + * @generated + */ + public Adapter createControllerServiceStandardeventcollectorServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceInstance Controller Service Standardeventcollector Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceInstance + * @generated + */ + public Adapter createControllerServiceStandardeventcollectorServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration Controller Service Standardeventcollector Service Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration + * @generated + */ + public Adapter createControllerServiceStandardeventcollectorServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeService Dcae Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeService + * @generated + */ + public Adapter createDcaeServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.docker.DockerService Service}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.docker.DockerService + * @generated + */ + public Adapter createDockerServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance Dcae Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance + * @generated + */ + public Adapter createDcaeServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.docker.DockerServiceInstance Service Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.docker.DockerServiceInstance + * @generated + */ + public Adapter createDockerServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ServiceAdapterFactory diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/util/ServiceSwitch.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/util/ServiceSwitch.java new file mode 100644 index 0000000..d729c31 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/util/ServiceSwitch.java @@ -0,0 +1,263 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.standardeventcollector.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.docker.DockerService; +import org.openecomp.dcae.controller.service.docker.DockerServiceInstance; + +import org.openecomp.dcae.controller.service.standardeventcollector.service.*; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage + * @generated + */ +public class ServiceSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ServiceSwitch() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE: { + ControllerServiceStandardeventcollectorService controllerServiceStandardeventcollectorService = (ControllerServiceStandardeventcollectorService)theEObject; + T result = caseControllerServiceStandardeventcollectorService(controllerServiceStandardeventcollectorService); + if (result == null) result = caseDockerService(controllerServiceStandardeventcollectorService); + if (result == null) result = caseDcaeService(controllerServiceStandardeventcollectorService); + if (result == null) result = caseNamedEntity(controllerServiceStandardeventcollectorService); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE: { + ControllerServiceStandardeventcollectorServiceInstance controllerServiceStandardeventcollectorServiceInstance = (ControllerServiceStandardeventcollectorServiceInstance)theEObject; + T result = caseControllerServiceStandardeventcollectorServiceInstance(controllerServiceStandardeventcollectorServiceInstance); + if (result == null) result = caseDockerServiceInstance(controllerServiceStandardeventcollectorServiceInstance); + if (result == null) result = caseControllerServiceStandardeventcollectorServiceConfiguration(controllerServiceStandardeventcollectorServiceInstance); + if (result == null) result = caseDcaeServiceInstance(controllerServiceStandardeventcollectorServiceInstance); + if (result == null) result = caseNamedEntity(controllerServiceStandardeventcollectorServiceInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION: { + ControllerServiceStandardeventcollectorServiceConfiguration controllerServiceStandardeventcollectorServiceConfiguration = (ControllerServiceStandardeventcollectorServiceConfiguration)theEObject; + T result = caseControllerServiceStandardeventcollectorServiceConfiguration(controllerServiceStandardeventcollectorServiceConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Controller Service Standardeventcollector Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Controller Service Standardeventcollector Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseControllerServiceStandardeventcollectorService(ControllerServiceStandardeventcollectorService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Controller Service Standardeventcollector Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Controller Service Standardeventcollector Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseControllerServiceStandardeventcollectorServiceInstance(ControllerServiceStandardeventcollectorServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Controller Service Standardeventcollector Service Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Controller Service Standardeventcollector Service Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseControllerServiceStandardeventcollectorServiceConfiguration(ControllerServiceStandardeventcollectorServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeService(DcaeService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Service'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Service'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDockerService(DockerService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dcae Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dcae Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceInstance(DcaeServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Service Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Service Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDockerServiceInstance(DockerServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ServiceSwitch diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore/manager.xcore b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore/manager.xcore new file mode 100644 index 0000000..b83db67 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore/manager.xcore @@ -0,0 +1,35 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen") + + +package org.openecomp.dcae.controller.service.standardeventcollector.manager + + +import org.openecomp.dcae.controller.service.dockermanager.DockerManager +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration + +// state of manager +class ControllerServiceStandardeventcollectorManager extends DockerManager, ControllerServiceStandardeventcollectorServiceConfiguration { + +} + diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore/service.xcore b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore/service.xcore new file mode 100644 index 0000000..97e6cf1 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore/service.xcore @@ -0,0 +1,71 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen") + + +package org.openecomp.dcae.controller.service.standardeventcollector.service + + +import org.openecomp.dcae.controller.service.docker.DockerService +import org.openecomp.dcae.controller.service.docker.DockerServiceInstance + +annotation "http://openecomp.org" as ecomp + +class ControllerServiceStandardeventcollectorService extends DockerService { + +} + +// state in the controller +class ControllerServiceStandardeventcollectorServiceInstance extends DockerServiceInstance, ControllerServiceStandardeventcollectorServiceConfiguration { +} + +// state in both controller and manager +class ControllerServiceStandardeventcollectorServiceConfiguration { +// @ecomp(^type = "configuration") +// String cdapUrl + @ecomp(^type = "configuration") + String cport + @ecomp(^type = "configuration") + String csecport + @ecomp(^type = "configuration") + String keystoreloc + @ecomp(^type = "configuration") + String keystorepwd + @ecomp(^type = "configuration") + String maxinputqueue + @ecomp(^type = "configuration") + String authid + @ecomp(^type = "configuration") + String authflag + @ecomp(^type = "configuration") + String authpwd + @ecomp(^type = "configuration") + String authfile + @ecomp(^type = "configuration") + String checkschemaflag + @ecomp(^type = "configuration") + String schemafile + + +} + + diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/pom.xml b/dcae-controller-service/dcae-controller-service-standardeventcollector/pom.xml new file mode 100644 index 0000000..de14dd8 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/pom.xml @@ -0,0 +1,82 @@ + + 4.0.0 + + org.openecomp.dcae.controller + dcae-controller-service-standardeventcollector + 0.1.0-SNAPSHOT + pom + dcae-controller-service-standardeventcollector + + + UTF-8 + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + + dcae-controller-service-standardeventcollector-manager + dcae-controller-service-standardeventcollector-model + + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/.classpath b/dcae-controller-service/dcae-controller-service-storage-postgres-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/.gitignore b/dcae-controller-service/dcae-controller-service-storage-postgres-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/.project b/dcae-controller-service/dcae-controller-service-storage-postgres-model/.project new file mode 100644 index 0000000..a11982f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/.project @@ -0,0 +1,34 @@ + + + dcae-controller-service-storage-postgres-model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service/dcae-controller-service-storage-postgres-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service/dcae-controller-service-storage-postgres-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/LICENSE.txt b/dcae-controller-service/dcae-controller-service-storage-postgres-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/META-INF/MANIFEST.MF b/dcae-controller-service/dcae-controller-service-storage-postgres-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..7e3e61a --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/META-INF/MANIFEST.MF @@ -0,0 +1,27 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: dcae-controller-service-storage-postgres-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.openecomp.dcae.controller.service.storage.postgres.service, + org.openecomp.dcae.controller.service.storage.postgres.service.impl, + org.openecomp.dcae.controller.service.storage.postgres.service.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + dcae-controller-core-model;visibility:=reexport, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + dcae-controller-service-storage-postgres-model;visibility:=reexport, + ncomp-openstack-model;visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + dcae-controller-service-vm-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-agent-model;visibility:=reexport, + dcae-controller-service-common-vm-model;bundle-version="0.1.0";visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/build.properties b/dcae-controller-service/dcae-controller-service-storage-postgres-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/build.properties @@ -0,0 +1,11 @@ +# + +bin.includes = .,\ + src/main/xcore/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/xcore-gen/,\ + src/main/xcore/ +output.. = target/classes/ diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/plugin.properties b/dcae-controller-service/dcae-controller-service-storage-postgres-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/plugin.xml b/dcae-controller-service/dcae-controller-service-storage-postgres-model/plugin.xml new file mode 100644 index 0000000..d84f5c8 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/plugin.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/pom.xml b/dcae-controller-service/dcae-controller-service-storage-postgres-model/pom.xml new file mode 100644 index 0000000..4a7e37c --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/pom.xml @@ -0,0 +1,29 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-service-storage-postgres-model + + org.openecomp.ncomp.maven + ncomp-maven-xcore + 0.1.0-SNAPSHOT + ../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore + + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + 0.1.0-SNAPSHOT + + + org.openecomp.dcae.controller + dcae-controller-service-vm-model + 0.1.0-SNAPSHOT + + + org.openecomp.dcae.controller + dcae-controller-service-common-vm-model + 0.1.0-SNAPSHOT + + + diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/Contact.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/Contact.java new file mode 100644 index 0000000..e97690f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/Contact.java @@ -0,0 +1,71 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Contact'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.Contact#getFullName Full Name}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getContact() + * @model + * @generated + */ +public interface Contact extends NamedEntity { + /** + * Returns the value of the 'Full Name' attribute. + * + *

+ * If the meaning of the 'Full Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Full Name' attribute. + * @see #setFullName(String) + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getContact_FullName() + * @model unique="false" + * @generated + */ + String getFullName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Contact#getFullName Full Name}' attribute. + * + * + * @param value the new value of the 'Full Name' attribute. + * @see #getFullName() + * @generated + */ + void setFullName(String value); + +} // Contact diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ContrailController.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ContrailController.java new file mode 100644 index 0000000..1be6e2d --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ContrailController.java @@ -0,0 +1,130 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +/** + * + * A representation of the model object 'Contrail Controller'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.ContrailController#getContailIp Contail Ip}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.ContrailController#getNumberOfRecords Number Of Records}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.ContrailController#getNumberOfErrors Number Of Errors}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getContrailController() + * @model + * @generated + */ +public interface ContrailController extends NamedEntity { + /** + * Returns the value of the 'Contail Ip' attribute. + * + *

+ * If the meaning of the 'Contail Ip' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Contail Ip' attribute. + * @see #setContailIp(String) + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getContrailController_ContailIp() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getContailIp(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.ContrailController#getContailIp Contail Ip}' attribute. + * + * + * @param value the new value of the 'Contail Ip' attribute. + * @see #getContailIp() + * @generated + */ + void setContailIp(String value); + + /** + * Returns the value of the 'Number Of Records' attribute. + * + *

+ * If the meaning of the 'Number Of Records' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Records' attribute. + * @see #setNumberOfRecords(IncreasingULongMetricAttribute) + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getContrailController_NumberOfRecords() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + IncreasingULongMetricAttribute getNumberOfRecords(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.ContrailController#getNumberOfRecords Number Of Records}' attribute. + * + * + * @param value the new value of the 'Number Of Records' attribute. + * @see #getNumberOfRecords() + * @generated + */ + void setNumberOfRecords(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Number Of Errors' attribute. + * + *

+ * If the meaning of the 'Number Of Errors' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Errors' attribute. + * @see #setNumberOfErrors(IncreasingULongMetricAttribute) + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getContrailController_NumberOfErrors() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + IncreasingULongMetricAttribute getNumberOfErrors(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.ContrailController#getNumberOfErrors Number Of Errors}' attribute. + * + * + * @param value the new value of the 'Number Of Errors' attribute. + * @see #getNumberOfErrors() + * @generated + */ + void setNumberOfErrors(IncreasingULongMetricAttribute value); + +} // ContrailController diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ControllerServiceStoragePostgresService.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ControllerServiceStoragePostgresService.java new file mode 100644 index 0000000..b96525f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ControllerServiceStoragePostgresService.java @@ -0,0 +1,40 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; + +/** + * + * A representation of the model object 'Controller Service Storage Postgres Service'. + * + * + * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getControllerServiceStoragePostgresService() + * @model + * @generated + */ +public interface ControllerServiceStoragePostgresService extends VirtualMachineService { + +} // ControllerServiceStoragePostgresService diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ControllerServiceStoragePostgresServiceConfiguration.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ControllerServiceStoragePostgresServiceConfiguration.java new file mode 100644 index 0000000..3fbb19c --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ControllerServiceStoragePostgresServiceConfiguration.java @@ -0,0 +1,185 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Controller Service Storage Postgres Service Configuration'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.ControllerServiceStoragePostgresServiceConfiguration#getJdbcUrl Jdbc Url}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.ControllerServiceStoragePostgresServiceConfiguration#getNumberOfJdbcCommands Number Of Jdbc Commands}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.ControllerServiceStoragePostgresServiceConfiguration#getNumberOfJdbcErrors Number Of Jdbc Errors}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.ControllerServiceStoragePostgresServiceConfiguration#getEncryptedAdminPassword Encrypted Admin Password}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.ControllerServiceStoragePostgresServiceConfiguration#getConfig Config}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getControllerServiceStoragePostgresServiceConfiguration() + * @model + * @generated + */ +public interface ControllerServiceStoragePostgresServiceConfiguration extends EObject { + /** + * Returns the value of the 'Jdbc Url' attribute. + * + *

+ * If the meaning of the 'Jdbc Url' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Jdbc Url' attribute. + * @see #setJdbcUrl(String) + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getControllerServiceStoragePostgresServiceConfiguration_JdbcUrl() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getJdbcUrl(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.ControllerServiceStoragePostgresServiceConfiguration#getJdbcUrl Jdbc Url}' attribute. + * + * + * @param value the new value of the 'Jdbc Url' attribute. + * @see #getJdbcUrl() + * @generated + */ + void setJdbcUrl(String value); + + /** + * Returns the value of the 'Number Of Jdbc Commands' attribute. + * + *

+ * If the meaning of the 'Number Of Jdbc Commands' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Jdbc Commands' attribute. + * @see #setNumberOfJdbcCommands(IncreasingULongMetricAttribute) + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getControllerServiceStoragePostgresServiceConfiguration_NumberOfJdbcCommands() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + IncreasingULongMetricAttribute getNumberOfJdbcCommands(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.ControllerServiceStoragePostgresServiceConfiguration#getNumberOfJdbcCommands Number Of Jdbc Commands}' attribute. + * + * + * @param value the new value of the 'Number Of Jdbc Commands' attribute. + * @see #getNumberOfJdbcCommands() + * @generated + */ + void setNumberOfJdbcCommands(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Number Of Jdbc Errors' attribute. + * + *

+ * If the meaning of the 'Number Of Jdbc Errors' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Jdbc Errors' attribute. + * @see #setNumberOfJdbcErrors(IncreasingULongMetricAttribute) + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getControllerServiceStoragePostgresServiceConfiguration_NumberOfJdbcErrors() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + IncreasingULongMetricAttribute getNumberOfJdbcErrors(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.ControllerServiceStoragePostgresServiceConfiguration#getNumberOfJdbcErrors Number Of Jdbc Errors}' attribute. + * + * + * @param value the new value of the 'Number Of Jdbc Errors' attribute. + * @see #getNumberOfJdbcErrors() + * @generated + */ + void setNumberOfJdbcErrors(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Encrypted Admin Password' attribute. + * + *

+ * If the meaning of the 'Encrypted Admin Password' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Encrypted Admin Password' attribute. + * @see #setEncryptedAdminPassword(String) + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getControllerServiceStoragePostgresServiceConfiguration_EncryptedAdminPassword() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getEncryptedAdminPassword(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.ControllerServiceStoragePostgresServiceConfiguration#getEncryptedAdminPassword Encrypted Admin Password}' attribute. + * + * + * @param value the new value of the 'Encrypted Admin Password' attribute. + * @see #getEncryptedAdminPassword() + * @generated + */ + void setEncryptedAdminPassword(String value); + + /** + * Returns the value of the 'Config' attribute. + * + *

+ * If the meaning of the 'Config' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Config' attribute. + * @see #setConfig(String) + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getControllerServiceStoragePostgresServiceConfiguration_Config() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getConfig(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.ControllerServiceStoragePostgresServiceConfiguration#getConfig Config}' attribute. + * + * + * @param value the new value of the 'Config' attribute. + * @see #getConfig() + * @generated + */ + void setConfig(String value); + +} // ControllerServiceStoragePostgresServiceConfiguration diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ControllerServiceStoragePostgresServiceInstance.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ControllerServiceStoragePostgresServiceInstance.java new file mode 100644 index 0000000..04474a1 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ControllerServiceStoragePostgresServiceInstance.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +/** + * + * A representation of the model object 'Controller Service Storage Postgres Service Instance'. + * + * + * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getControllerServiceStoragePostgresServiceInstance() + * @model + * @generated + */ +public interface ControllerServiceStoragePostgresServiceInstance extends VirtualMachineServiceInstance, ControllerServiceStoragePostgresServiceConfiguration { +} // ControllerServiceStoragePostgresServiceInstance diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/Database.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/Database.java new file mode 100644 index 0000000..6992060 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/Database.java @@ -0,0 +1,134 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Database'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.Database#getDescription Description}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.Database#getContacts Contacts}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.Database#getOwnerRole Owner Role}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.Database#getRoles Roles}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getDatabase() + * @model + * @generated + */ +public interface Database extends NamedEntity { + /** + * Returns the value of the 'Description' attribute. + * + *

+ * If the meaning of the 'Description' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Description' attribute. + * @see #setDescription(String) + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getDatabase_Description() + * @model unique="false" + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Database#getDescription Description}' attribute. + * + * + * @param value the new value of the 'Description' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + + /** + * Returns the value of the 'Contacts' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.service.storage.postgres.service.Contact}. + * + *

+ * If the meaning of the 'Contacts' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Contacts' containment reference list. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getDatabase_Contacts() + * @model containment="true" + * @generated + */ + EList getContacts(); + + /** + * Returns the value of the 'Owner Role' attribute. + * + *

+ * If the meaning of the 'Owner Role' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Owner Role' attribute. + * @see #setOwnerRole(String) + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getDatabase_OwnerRole() + * @model unique="false" + * @generated + */ + String getOwnerRole(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Database#getOwnerRole Owner Role}' attribute. + * + * + * @param value the new value of the 'Owner Role' attribute. + * @see #getOwnerRole() + * @generated + */ + void setOwnerRole(String value); + + /** + * Returns the value of the 'Roles' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.service.storage.postgres.service.Role}. + * + *

+ * If the meaning of the 'Roles' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Roles' containment reference list. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getDatabase_Roles() + * @model containment="true" + * @generated + */ + EList getRoles(); + +} // Database diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/PostgresServiceConfiguration.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/PostgresServiceConfiguration.java new file mode 100644 index 0000000..0dfcdb7 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/PostgresServiceConfiguration.java @@ -0,0 +1,90 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Postgres Service Configuration'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.PostgresServiceConfiguration#getState State}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.PostgresServiceConfiguration#getDatabases Databases}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getPostgresServiceConfiguration() + * @model + * @generated + */ +public interface PostgresServiceConfiguration extends CommonVmServiceConfiguration { + /** + * Returns the value of the 'State' attribute. + * + *

+ * If the meaning of the 'State' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'State' attribute. + * @see #setState(String) + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getPostgresServiceConfiguration_State() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getState(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.PostgresServiceConfiguration#getState State}' attribute. + * + * + * @param value the new value of the 'State' attribute. + * @see #getState() + * @generated + */ + void setState(String value); + + /** + * Returns the value of the 'Databases' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.service.storage.postgres.service.Database}. + * + *

+ * If the meaning of the 'Databases' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Databases' containment reference list. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getPostgresServiceConfiguration_Databases() + * @model containment="true" + * @generated + */ + EList getDatabases(); + +} // PostgresServiceConfiguration diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/Role.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/Role.java new file mode 100644 index 0000000..7f68a28 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/Role.java @@ -0,0 +1,143 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service; + +import org.openecomp.ncomp.core.NamedEntity; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Role'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.Role#getPassword Password}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.Role#getRole Role}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.Role#getRoleComments Role Comments}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.Role#getFullName Full Name}
  • + *
+ *

+ * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getRole() + * @model + * @generated + */ +public interface Role extends NamedEntity { + /** + * Returns the value of the 'Password' attribute. + * + *

+ * If the meaning of the 'Password' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Password' attribute. + * @see #setPassword(String) + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getRole_Password() + * @model unique="false" + * @generated + */ + String getPassword(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Role#getPassword Password}' attribute. + * + * + * @param value the new value of the 'Password' attribute. + * @see #getPassword() + * @generated + */ + void setPassword(String value); + + /** + * Returns the value of the 'Role' attribute. + * + *

+ * If the meaning of the 'Role' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Role' attribute. + * @see #setRole(String) + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getRole_Role() + * @model unique="false" + * @generated + */ + String getRole(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Role#getRole Role}' attribute. + * + * + * @param value the new value of the 'Role' attribute. + * @see #getRole() + * @generated + */ + void setRole(String value); + + /** + * Returns the value of the 'Role Comments' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

+ * If the meaning of the 'Role Comments' attribute list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Role Comments' attribute list. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getRole_RoleComments() + * @model unique="false" + * @generated + */ + EList getRoleComments(); + + /** + * Returns the value of the 'Full Name' attribute. + * + *

+ * If the meaning of the 'Full Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Full Name' attribute. + * @see #setFullName(String) + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#getRole_FullName() + * @model unique="false" + * @generated + */ + String getFullName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Role#getFullName Full Name}' attribute. + * + * + * @param value the new value of the 'Full Name' attribute. + * @see #getFullName() + * @generated + */ + void setFullName(String value); + +} // Role diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ServiceFactory.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ServiceFactory.java new file mode 100644 index 0000000..293f4a0 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ServiceFactory.java @@ -0,0 +1,90 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage + * @generated + */ +public interface ServiceFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ServiceFactory eINSTANCE = org.openecomp.dcae.controller.service.storage.postgres.service.impl.ServiceFactoryImpl.init(); + + /** + * Returns a new object of class 'Postgres Service Configuration'. + * + * + * @return a new object of class 'Postgres Service Configuration'. + * @generated + */ + PostgresServiceConfiguration createPostgresServiceConfiguration(); + + /** + * Returns a new object of class 'Database'. + * + * + * @return a new object of class 'Database'. + * @generated + */ + Database createDatabase(); + + /** + * Returns a new object of class 'Contact'. + * + * + * @return a new object of class 'Contact'. + * @generated + */ + Contact createContact(); + + /** + * Returns a new object of class 'Role'. + * + * + * @return a new object of class 'Role'. + * @generated + */ + Role createRole(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ServicePackage getServicePackage(); + +} //ServiceFactory diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ServicePackage.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ServicePackage.java new file mode 100644 index 0000000..f2f5e6f --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/ServicePackage.java @@ -0,0 +1,716 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service; + +import org.openecomp.ncomp.core.CorePackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServiceFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-storage-postgres-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.storage.postgres'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org'" + * @generated + */ +public interface ServicePackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "service"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.storage.postgres.service"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "service"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ServicePackage eINSTANCE = org.openecomp.dcae.controller.service.storage.postgres.service.impl.ServicePackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.PostgresServiceConfigurationImpl Postgres Service Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.impl.PostgresServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.storage.postgres.service.impl.ServicePackageImpl#getPostgresServiceConfiguration() + * @generated + */ + int POSTGRES_SERVICE_CONFIGURATION = 0; + + /** + * The feature id for the 'State' attribute. + * + * + * @generated + * @ordered + */ + int POSTGRES_SERVICE_CONFIGURATION__STATE = org.openecomp.dcae.controller.service.common.vm.service.ServicePackage.COMMON_VM_SERVICE_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Databases' containment reference list. + * + * + * @generated + * @ordered + */ + int POSTGRES_SERVICE_CONFIGURATION__DATABASES = org.openecomp.dcae.controller.service.common.vm.service.ServicePackage.COMMON_VM_SERVICE_CONFIGURATION_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Postgres Service Configuration' class. + * + * + * @generated + * @ordered + */ + int POSTGRES_SERVICE_CONFIGURATION_FEATURE_COUNT = org.openecomp.dcae.controller.service.common.vm.service.ServicePackage.COMMON_VM_SERVICE_CONFIGURATION_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Postgres Service Configuration' class. + * + * + * @generated + * @ordered + */ + int POSTGRES_SERVICE_CONFIGURATION_OPERATION_COUNT = org.openecomp.dcae.controller.service.common.vm.service.ServicePackage.COMMON_VM_SERVICE_CONFIGURATION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.DatabaseImpl Database}' class. + * + * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.impl.DatabaseImpl + * @see org.openecomp.dcae.controller.service.storage.postgres.service.impl.ServicePackageImpl#getDatabase() + * @generated + */ + int DATABASE = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DATABASE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DATABASE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DATABASE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DATABASE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int DATABASE__DESCRIPTION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Contacts' containment reference list. + * + * + * @generated + * @ordered + */ + int DATABASE__CONTACTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Owner Role' attribute. + * + * + * @generated + * @ordered + */ + int DATABASE__OWNER_ROLE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Roles' containment reference list. + * + * + * @generated + * @ordered + */ + int DATABASE__ROLES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The number of structural features of the 'Database' class. + * + * + * @generated + * @ordered + */ + int DATABASE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of operations of the 'Database' class. + * + * + * @generated + * @ordered + */ + int DATABASE_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.ContactImpl Contact}' class. + * + * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.impl.ContactImpl + * @see org.openecomp.dcae.controller.service.storage.postgres.service.impl.ServicePackageImpl#getContact() + * @generated + */ + int CONTACT = 2; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CONTACT__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CONTACT__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CONTACT__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CONTACT__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Full Name' attribute. + * + * + * @generated + * @ordered + */ + int CONTACT__FULL_NAME = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Contact' class. + * + * + * @generated + * @ordered + */ + int CONTACT_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Contact' class. + * + * + * @generated + * @ordered + */ + int CONTACT_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.RoleImpl Role}' class. + * + * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.impl.RoleImpl + * @see org.openecomp.dcae.controller.service.storage.postgres.service.impl.ServicePackageImpl#getRole() + * @generated + */ + int ROLE = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int ROLE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int ROLE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int ROLE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int ROLE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Password' attribute. + * + * + * @generated + * @ordered + */ + int ROLE__PASSWORD = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Role' attribute. + * + * + * @generated + * @ordered + */ + int ROLE__ROLE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Role Comments' attribute list. + * + * + * @generated + * @ordered + */ + int ROLE__ROLE_COMMENTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Full Name' attribute. + * + * + * @generated + * @ordered + */ + int ROLE__FULL_NAME = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The number of structural features of the 'Role' class. + * + * + * @generated + * @ordered + */ + int ROLE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of operations of the 'Role' class. + * + * + * @generated + * @ordered + */ + int ROLE_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.storage.postgres.service.PostgresServiceConfiguration Postgres Service Configuration}'. + * + * + * @return the meta object for class 'Postgres Service Configuration'. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.PostgresServiceConfiguration + * @generated + */ + EClass getPostgresServiceConfiguration(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.storage.postgres.service.PostgresServiceConfiguration#getState State}'. + * + * + * @return the meta object for the attribute 'State'. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.PostgresServiceConfiguration#getState() + * @see #getPostgresServiceConfiguration() + * @generated + */ + EAttribute getPostgresServiceConfiguration_State(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.storage.postgres.service.PostgresServiceConfiguration#getDatabases Databases}'. + * + * + * @return the meta object for the containment reference list 'Databases'. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.PostgresServiceConfiguration#getDatabases() + * @see #getPostgresServiceConfiguration() + * @generated + */ + EReference getPostgresServiceConfiguration_Databases(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Database Database}'. + * + * + * @return the meta object for class 'Database'. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.Database + * @generated + */ + EClass getDatabase(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Database#getDescription Description}'. + * + * + * @return the meta object for the attribute 'Description'. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.Database#getDescription() + * @see #getDatabase() + * @generated + */ + EAttribute getDatabase_Description(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Database#getContacts Contacts}'. + * + * + * @return the meta object for the containment reference list 'Contacts'. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.Database#getContacts() + * @see #getDatabase() + * @generated + */ + EReference getDatabase_Contacts(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Database#getOwnerRole Owner Role}'. + * + * + * @return the meta object for the attribute 'Owner Role'. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.Database#getOwnerRole() + * @see #getDatabase() + * @generated + */ + EAttribute getDatabase_OwnerRole(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Database#getRoles Roles}'. + * + * + * @return the meta object for the containment reference list 'Roles'. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.Database#getRoles() + * @see #getDatabase() + * @generated + */ + EReference getDatabase_Roles(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Contact Contact}'. + * + * + * @return the meta object for class 'Contact'. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.Contact + * @generated + */ + EClass getContact(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Contact#getFullName Full Name}'. + * + * + * @return the meta object for the attribute 'Full Name'. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.Contact#getFullName() + * @see #getContact() + * @generated + */ + EAttribute getContact_FullName(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Role Role}'. + * + * + * @return the meta object for class 'Role'. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.Role + * @generated + */ + EClass getRole(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Role#getPassword Password}'. + * + * + * @return the meta object for the attribute 'Password'. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.Role#getPassword() + * @see #getRole() + * @generated + */ + EAttribute getRole_Password(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Role#getRole Role}'. + * + * + * @return the meta object for the attribute 'Role'. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.Role#getRole() + * @see #getRole() + * @generated + */ + EAttribute getRole_Role(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Role#getRoleComments Role Comments}'. + * + * + * @return the meta object for the attribute list 'Role Comments'. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.Role#getRoleComments() + * @see #getRole() + * @generated + */ + EAttribute getRole_RoleComments(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Role#getFullName Full Name}'. + * + * + * @return the meta object for the attribute 'Full Name'. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.Role#getFullName() + * @see #getRole() + * @generated + */ + EAttribute getRole_FullName(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ServiceFactory getServiceFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.PostgresServiceConfigurationImpl Postgres Service Configuration}' class. + * + * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.impl.PostgresServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.storage.postgres.service.impl.ServicePackageImpl#getPostgresServiceConfiguration() + * @generated + */ + EClass POSTGRES_SERVICE_CONFIGURATION = eINSTANCE.getPostgresServiceConfiguration(); + + /** + * The meta object literal for the 'State' attribute feature. + * + * + * @generated + */ + EAttribute POSTGRES_SERVICE_CONFIGURATION__STATE = eINSTANCE.getPostgresServiceConfiguration_State(); + + /** + * The meta object literal for the 'Databases' containment reference list feature. + * + * + * @generated + */ + EReference POSTGRES_SERVICE_CONFIGURATION__DATABASES = eINSTANCE.getPostgresServiceConfiguration_Databases(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.DatabaseImpl Database}' class. + * + * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.impl.DatabaseImpl + * @see org.openecomp.dcae.controller.service.storage.postgres.service.impl.ServicePackageImpl#getDatabase() + * @generated + */ + EClass DATABASE = eINSTANCE.getDatabase(); + + /** + * The meta object literal for the 'Description' attribute feature. + * + * + * @generated + */ + EAttribute DATABASE__DESCRIPTION = eINSTANCE.getDatabase_Description(); + + /** + * The meta object literal for the 'Contacts' containment reference list feature. + * + * + * @generated + */ + EReference DATABASE__CONTACTS = eINSTANCE.getDatabase_Contacts(); + + /** + * The meta object literal for the 'Owner Role' attribute feature. + * + * + * @generated + */ + EAttribute DATABASE__OWNER_ROLE = eINSTANCE.getDatabase_OwnerRole(); + + /** + * The meta object literal for the 'Roles' containment reference list feature. + * + * + * @generated + */ + EReference DATABASE__ROLES = eINSTANCE.getDatabase_Roles(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.ContactImpl Contact}' class. + * + * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.impl.ContactImpl + * @see org.openecomp.dcae.controller.service.storage.postgres.service.impl.ServicePackageImpl#getContact() + * @generated + */ + EClass CONTACT = eINSTANCE.getContact(); + + /** + * The meta object literal for the 'Full Name' attribute feature. + * + * + * @generated + */ + EAttribute CONTACT__FULL_NAME = eINSTANCE.getContact_FullName(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.RoleImpl Role}' class. + * + * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.impl.RoleImpl + * @see org.openecomp.dcae.controller.service.storage.postgres.service.impl.ServicePackageImpl#getRole() + * @generated + */ + EClass ROLE = eINSTANCE.getRole(); + + /** + * The meta object literal for the 'Password' attribute feature. + * + * + * @generated + */ + EAttribute ROLE__PASSWORD = eINSTANCE.getRole_Password(); + + /** + * The meta object literal for the 'Role' attribute feature. + * + * + * @generated + */ + EAttribute ROLE__ROLE = eINSTANCE.getRole_Role(); + + /** + * The meta object literal for the 'Role Comments' attribute list feature. + * + * + * @generated + */ + EAttribute ROLE__ROLE_COMMENTS = eINSTANCE.getRole_RoleComments(); + + /** + * The meta object literal for the 'Full Name' attribute feature. + * + * + * @generated + */ + EAttribute ROLE__FULL_NAME = eINSTANCE.getRole_FullName(); + + } + +} //ServicePackage diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/ContactImpl.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/ContactImpl.java new file mode 100644 index 0000000..db28b0a --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/ContactImpl.java @@ -0,0 +1,185 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service.impl; + +import org.openecomp.dcae.controller.service.storage.postgres.service.Contact; +import org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Contact'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.ContactImpl#getFullName Full Name}
  • + *
+ *

+ * + * @generated + */ +public class ContactImpl extends NamedEntityImpl implements Contact { + /** + * The default value of the '{@link #getFullName() Full Name}' attribute. + * + * + * @see #getFullName() + * @generated + * @ordered + */ + protected static final String FULL_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFullName() Full Name}' attribute. + * + * + * @see #getFullName() + * @generated + * @ordered + */ + protected String fullName = FULL_NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected ContactImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.CONTACT; + } + + /** + * + * + * @generated + */ + public String getFullName() { + return fullName; + } + + /** + * + * + * @generated + */ + public void setFullName(String newFullName) { + String oldFullName = fullName; + fullName = newFullName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTACT__FULL_NAME, oldFullName, fullName)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.CONTACT__FULL_NAME: + return getFullName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.CONTACT__FULL_NAME: + setFullName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.CONTACT__FULL_NAME: + setFullName(FULL_NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.CONTACT__FULL_NAME: + return FULL_NAME_EDEFAULT == null ? fullName != null : !FULL_NAME_EDEFAULT.equals(fullName); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (fullName: "); + result.append(fullName); + result.append(')'); + return result.toString(); + } + +} //ContactImpl diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/DatabaseImpl.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/DatabaseImpl.java new file mode 100644 index 0000000..7efcf15 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/DatabaseImpl.java @@ -0,0 +1,335 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service.impl; + +import org.openecomp.dcae.controller.service.storage.postgres.service.Contact; +import org.openecomp.dcae.controller.service.storage.postgres.service.Database; +import org.openecomp.dcae.controller.service.storage.postgres.service.Role; +import org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Database'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.DatabaseImpl#getDescription Description}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.DatabaseImpl#getContacts Contacts}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.DatabaseImpl#getOwnerRole Owner Role}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.DatabaseImpl#getRoles Roles}
  • + *
+ *

+ * + * @generated + */ +public class DatabaseImpl extends NamedEntityImpl implements Database { + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The cached value of the '{@link #getContacts() Contacts}' containment reference list. + * + * + * @see #getContacts() + * @generated + * @ordered + */ + protected EList contacts; + + /** + * The default value of the '{@link #getOwnerRole() Owner Role}' attribute. + * + * + * @see #getOwnerRole() + * @generated + * @ordered + */ + protected static final String OWNER_ROLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getOwnerRole() Owner Role}' attribute. + * + * + * @see #getOwnerRole() + * @generated + * @ordered + */ + protected String ownerRole = OWNER_ROLE_EDEFAULT; + + /** + * The cached value of the '{@link #getRoles() Roles}' containment reference list. + * + * + * @see #getRoles() + * @generated + * @ordered + */ + protected EList roles; + + /** + * + * + * @generated + */ + protected DatabaseImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.DATABASE; + } + + /** + * + * + * @generated + */ + public String getDescription() { + return description; + } + + /** + * + * + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DATABASE__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public EList getContacts() { + if (contacts == null) { + contacts = new EObjectContainmentEList(Contact.class, this, ServicePackage.DATABASE__CONTACTS); + } + return contacts; + } + + /** + * + * + * @generated + */ + public String getOwnerRole() { + return ownerRole; + } + + /** + * + * + * @generated + */ + public void setOwnerRole(String newOwnerRole) { + String oldOwnerRole = ownerRole; + ownerRole = newOwnerRole; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.DATABASE__OWNER_ROLE, oldOwnerRole, ownerRole)); + } + + /** + * + * + * @generated + */ + public EList getRoles() { + if (roles == null) { + roles = new EObjectContainmentEList(Role.class, this, ServicePackage.DATABASE__ROLES); + } + return roles; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.DATABASE__CONTACTS: + return ((InternalEList)getContacts()).basicRemove(otherEnd, msgs); + case ServicePackage.DATABASE__ROLES: + return ((InternalEList)getRoles()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.DATABASE__DESCRIPTION: + return getDescription(); + case ServicePackage.DATABASE__CONTACTS: + return getContacts(); + case ServicePackage.DATABASE__OWNER_ROLE: + return getOwnerRole(); + case ServicePackage.DATABASE__ROLES: + return getRoles(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.DATABASE__DESCRIPTION: + setDescription((String)newValue); + return; + case ServicePackage.DATABASE__CONTACTS: + getContacts().clear(); + getContacts().addAll((Collection)newValue); + return; + case ServicePackage.DATABASE__OWNER_ROLE: + setOwnerRole((String)newValue); + return; + case ServicePackage.DATABASE__ROLES: + getRoles().clear(); + getRoles().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.DATABASE__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case ServicePackage.DATABASE__CONTACTS: + getContacts().clear(); + return; + case ServicePackage.DATABASE__OWNER_ROLE: + setOwnerRole(OWNER_ROLE_EDEFAULT); + return; + case ServicePackage.DATABASE__ROLES: + getRoles().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.DATABASE__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case ServicePackage.DATABASE__CONTACTS: + return contacts != null && !contacts.isEmpty(); + case ServicePackage.DATABASE__OWNER_ROLE: + return OWNER_ROLE_EDEFAULT == null ? ownerRole != null : !OWNER_ROLE_EDEFAULT.equals(ownerRole); + case ServicePackage.DATABASE__ROLES: + return roles != null && !roles.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); + result.append(description); + result.append(", ownerRole: "); + result.append(ownerRole); + result.append(')'); + return result.toString(); + } + +} //DatabaseImpl diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/PostgresServiceConfigurationImpl.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/PostgresServiceConfigurationImpl.java new file mode 100644 index 0000000..7b8c7a6 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/PostgresServiceConfigurationImpl.java @@ -0,0 +1,237 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service.impl; + +import org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceConfigurationImpl; +import org.openecomp.dcae.controller.service.storage.postgres.service.Database; +import org.openecomp.dcae.controller.service.storage.postgres.service.PostgresServiceConfiguration; +import org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage; +import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Postgres Service Configuration'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.PostgresServiceConfigurationImpl#getState State}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.PostgresServiceConfigurationImpl#getDatabases Databases}
  • + *
+ *

+ * + * @generated + */ +public class PostgresServiceConfigurationImpl extends CommonVmServiceConfigurationImpl implements PostgresServiceConfiguration { + /** + * The default value of the '{@link #getState() State}' attribute. + * + * + * @see #getState() + * @generated + * @ordered + */ + protected static final String STATE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getState() State}' attribute. + * + * + * @see #getState() + * @generated + * @ordered + */ + protected String state = STATE_EDEFAULT; + + /** + * The cached value of the '{@link #getDatabases() Databases}' containment reference list. + * + * + * @see #getDatabases() + * @generated + * @ordered + */ + protected EList databases; + + /** + * + * + * @generated + */ + protected PostgresServiceConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.POSTGRES_SERVICE_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public String getState() { + return state; + } + + /** + * + * + * @generated + */ + public void setState(String newState) { + String oldState = state; + state = newState; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.POSTGRES_SERVICE_CONFIGURATION__STATE, oldState, state)); + } + + /** + * + * + * @generated + */ + public EList getDatabases() { + if (databases == null) { + databases = new EObjectContainmentEList(Database.class, this, ServicePackage.POSTGRES_SERVICE_CONFIGURATION__DATABASES); + } + return databases; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.POSTGRES_SERVICE_CONFIGURATION__DATABASES: + return ((InternalEList)getDatabases()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.POSTGRES_SERVICE_CONFIGURATION__STATE: + return getState(); + case ServicePackage.POSTGRES_SERVICE_CONFIGURATION__DATABASES: + return getDatabases(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.POSTGRES_SERVICE_CONFIGURATION__STATE: + setState((String)newValue); + return; + case ServicePackage.POSTGRES_SERVICE_CONFIGURATION__DATABASES: + getDatabases().clear(); + getDatabases().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.POSTGRES_SERVICE_CONFIGURATION__STATE: + setState(STATE_EDEFAULT); + return; + case ServicePackage.POSTGRES_SERVICE_CONFIGURATION__DATABASES: + getDatabases().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.POSTGRES_SERVICE_CONFIGURATION__STATE: + return STATE_EDEFAULT == null ? state != null : !STATE_EDEFAULT.equals(state); + case ServicePackage.POSTGRES_SERVICE_CONFIGURATION__DATABASES: + return databases != null && !databases.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (state: "); + result.append(state); + result.append(')'); + return result.toString(); + } + +} //PostgresServiceConfigurationImpl diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/RoleImpl.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/RoleImpl.java new file mode 100644 index 0000000..3735485 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/RoleImpl.java @@ -0,0 +1,333 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service.impl; + +import org.openecomp.dcae.controller.service.storage.postgres.service.Role; +import org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EDataTypeEList; + +/** + * + * An implementation of the model object 'Role'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.RoleImpl#getPassword Password}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.RoleImpl#getRole Role}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.RoleImpl#getRoleComments Role Comments}
  • + *
  • {@link org.openecomp.dcae.controller.service.storage.postgres.service.impl.RoleImpl#getFullName Full Name}
  • + *
+ *

+ * + * @generated + */ +public class RoleImpl extends NamedEntityImpl implements Role { + /** + * The default value of the '{@link #getPassword() Password}' attribute. + * + * + * @see #getPassword() + * @generated + * @ordered + */ + protected static final String PASSWORD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPassword() Password}' attribute. + * + * + * @see #getPassword() + * @generated + * @ordered + */ + protected String password = PASSWORD_EDEFAULT; + + /** + * The default value of the '{@link #getRole() Role}' attribute. + * + * + * @see #getRole() + * @generated + * @ordered + */ + protected static final String ROLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getRole() Role}' attribute. + * + * + * @see #getRole() + * @generated + * @ordered + */ + protected String role = ROLE_EDEFAULT; + + /** + * The cached value of the '{@link #getRoleComments() Role Comments}' attribute list. + * + * + * @see #getRoleComments() + * @generated + * @ordered + */ + protected EList roleComments; + + /** + * The default value of the '{@link #getFullName() Full Name}' attribute. + * + * + * @see #getFullName() + * @generated + * @ordered + */ + protected static final String FULL_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFullName() Full Name}' attribute. + * + * + * @see #getFullName() + * @generated + * @ordered + */ + protected String fullName = FULL_NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected RoleImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.ROLE; + } + + /** + * + * + * @generated + */ + public String getPassword() { + return password; + } + + /** + * + * + * @generated + */ + public void setPassword(String newPassword) { + String oldPassword = password; + password = newPassword; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.ROLE__PASSWORD, oldPassword, password)); + } + + /** + * + * + * @generated + */ + public String getRole() { + return role; + } + + /** + * + * + * @generated + */ + public void setRole(String newRole) { + String oldRole = role; + role = newRole; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.ROLE__ROLE, oldRole, role)); + } + + /** + * + * + * @generated + */ + public EList getRoleComments() { + if (roleComments == null) { + roleComments = new EDataTypeEList(String.class, this, ServicePackage.ROLE__ROLE_COMMENTS); + } + return roleComments; + } + + /** + * + * + * @generated + */ + public String getFullName() { + return fullName; + } + + /** + * + * + * @generated + */ + public void setFullName(String newFullName) { + String oldFullName = fullName; + fullName = newFullName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.ROLE__FULL_NAME, oldFullName, fullName)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.ROLE__PASSWORD: + return getPassword(); + case ServicePackage.ROLE__ROLE: + return getRole(); + case ServicePackage.ROLE__ROLE_COMMENTS: + return getRoleComments(); + case ServicePackage.ROLE__FULL_NAME: + return getFullName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.ROLE__PASSWORD: + setPassword((String)newValue); + return; + case ServicePackage.ROLE__ROLE: + setRole((String)newValue); + return; + case ServicePackage.ROLE__ROLE_COMMENTS: + getRoleComments().clear(); + getRoleComments().addAll((Collection)newValue); + return; + case ServicePackage.ROLE__FULL_NAME: + setFullName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.ROLE__PASSWORD: + setPassword(PASSWORD_EDEFAULT); + return; + case ServicePackage.ROLE__ROLE: + setRole(ROLE_EDEFAULT); + return; + case ServicePackage.ROLE__ROLE_COMMENTS: + getRoleComments().clear(); + return; + case ServicePackage.ROLE__FULL_NAME: + setFullName(FULL_NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.ROLE__PASSWORD: + return PASSWORD_EDEFAULT == null ? password != null : !PASSWORD_EDEFAULT.equals(password); + case ServicePackage.ROLE__ROLE: + return ROLE_EDEFAULT == null ? role != null : !ROLE_EDEFAULT.equals(role); + case ServicePackage.ROLE__ROLE_COMMENTS: + return roleComments != null && !roleComments.isEmpty(); + case ServicePackage.ROLE__FULL_NAME: + return FULL_NAME_EDEFAULT == null ? fullName != null : !FULL_NAME_EDEFAULT.equals(fullName); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (password: "); + result.append(password); + result.append(", role: "); + result.append(role); + result.append(", roleComments: "); + result.append(roleComments); + result.append(", fullName: "); + result.append(fullName); + result.append(')'); + return result.toString(); + } + +} //RoleImpl diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/ServiceFactoryImpl.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/ServiceFactoryImpl.java new file mode 100644 index 0000000..14758df --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/ServiceFactoryImpl.java @@ -0,0 +1,149 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service.impl; + +import org.openecomp.dcae.controller.service.storage.postgres.service.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ServiceFactoryImpl extends EFactoryImpl implements ServiceFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ServiceFactory init() { + try { + ServiceFactory theServiceFactory = (ServiceFactory)EPackage.Registry.INSTANCE.getEFactory(ServicePackage.eNS_URI); + if (theServiceFactory != null) { + return theServiceFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ServiceFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ServiceFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ServicePackage.POSTGRES_SERVICE_CONFIGURATION: return createPostgresServiceConfiguration(); + case ServicePackage.DATABASE: return createDatabase(); + case ServicePackage.CONTACT: return createContact(); + case ServicePackage.ROLE: return createRole(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public PostgresServiceConfiguration createPostgresServiceConfiguration() { + PostgresServiceConfigurationImpl postgresServiceConfiguration = new PostgresServiceConfigurationImpl(); + return postgresServiceConfiguration; + } + + /** + * + * + * @generated + */ + public Database createDatabase() { + DatabaseImpl database = new DatabaseImpl(); + return database; + } + + /** + * + * + * @generated + */ + public Contact createContact() { + ContactImpl contact = new ContactImpl(); + return contact; + } + + /** + * + * + * @generated + */ + public Role createRole() { + RoleImpl role = new RoleImpl(); + return role; + } + + /** + * + * + * @generated + */ + public ServicePackage getServicePackage() { + return (ServicePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ServicePackage getPackage() { + return ServicePackage.eINSTANCE; + } + +} //ServiceFactoryImpl diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/ServicePackageImpl.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/ServicePackageImpl.java new file mode 100644 index 0000000..69b1eb1 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/impl/ServicePackageImpl.java @@ -0,0 +1,420 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service.impl; + +import org.openecomp.dcae.controller.service.storage.postgres.service.Contact; +import org.openecomp.dcae.controller.service.storage.postgres.service.Database; +import org.openecomp.dcae.controller.service.storage.postgres.service.PostgresServiceConfiguration; +import org.openecomp.dcae.controller.service.storage.postgres.service.Role; +import org.openecomp.dcae.controller.service.storage.postgres.service.ServiceFactory; +import org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage; +import org.openecomp.ncomp.core.CorePackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ServicePackageImpl extends EPackageImpl implements ServicePackage { + /** + * + * + * @generated + */ + private EClass postgresServiceConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass databaseEClass = null; + /** + * + * + * @generated + */ + private EClass contactEClass = null; + /** + * + * + * @generated + */ + private EClass roleEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage#eNS_URI + * @see #init() + * @generated + */ + private ServicePackageImpl() { + super(eNS_URI, ServiceFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ServicePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ServicePackage init() { + if (isInited) return (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + + // Obtain or create and register package + ServicePackageImpl theServicePackage = (ServicePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ServicePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ServicePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + org.openecomp.dcae.controller.service.common.vm.service.ServicePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theServicePackage.createPackageContents(); + + // Initialize created meta-data + theServicePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theServicePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ServicePackage.eNS_URI, theServicePackage); + return theServicePackage; + } + + /** + * + * + * @generated + */ + public EClass getPostgresServiceConfiguration() { + return postgresServiceConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getPostgresServiceConfiguration_State() { + return (EAttribute)postgresServiceConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getPostgresServiceConfiguration_Databases() { + return (EReference)postgresServiceConfigurationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getDatabase() { + return databaseEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDatabase_Description() { + return (EAttribute)databaseEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getDatabase_Contacts() { + return (EReference)databaseEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDatabase_OwnerRole() { + return (EAttribute)databaseEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getDatabase_Roles() { + return (EReference)databaseEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getContact() { + return contactEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getContact_FullName() { + return (EAttribute)contactEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getRole() { + return roleEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getRole_Password() { + return (EAttribute)roleEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getRole_Role() { + return (EAttribute)roleEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getRole_RoleComments() { + return (EAttribute)roleEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getRole_FullName() { + return (EAttribute)roleEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public ServiceFactory getServiceFactory() { + return (ServiceFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + postgresServiceConfigurationEClass = createEClass(POSTGRES_SERVICE_CONFIGURATION); + createEAttribute(postgresServiceConfigurationEClass, POSTGRES_SERVICE_CONFIGURATION__STATE); + createEReference(postgresServiceConfigurationEClass, POSTGRES_SERVICE_CONFIGURATION__DATABASES); + + databaseEClass = createEClass(DATABASE); + createEAttribute(databaseEClass, DATABASE__DESCRIPTION); + createEReference(databaseEClass, DATABASE__CONTACTS); + createEAttribute(databaseEClass, DATABASE__OWNER_ROLE); + createEReference(databaseEClass, DATABASE__ROLES); + + contactEClass = createEClass(CONTACT); + createEAttribute(contactEClass, CONTACT__FULL_NAME); + + roleEClass = createEClass(ROLE); + createEAttribute(roleEClass, ROLE__PASSWORD); + createEAttribute(roleEClass, ROLE__ROLE); + createEAttribute(roleEClass, ROLE__ROLE_COMMENTS); + createEAttribute(roleEClass, ROLE__FULL_NAME); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + org.openecomp.dcae.controller.service.common.vm.service.ServicePackage theServicePackage_1 = (org.openecomp.dcae.controller.service.common.vm.service.ServicePackage)EPackage.Registry.INSTANCE.getEPackage(org.openecomp.dcae.controller.service.common.vm.service.ServicePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + postgresServiceConfigurationEClass.getESuperTypes().add(theServicePackage_1.getCommonVmServiceConfiguration()); + databaseEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + contactEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + roleEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + + // Initialize classes, features, and operations; add parameters + initEClass(postgresServiceConfigurationEClass, PostgresServiceConfiguration.class, "PostgresServiceConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getPostgresServiceConfiguration_State(), theEcorePackage.getEString(), "state", null, 0, 1, PostgresServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPostgresServiceConfiguration_Databases(), this.getDatabase(), null, "databases", null, 0, -1, PostgresServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(databaseEClass, Database.class, "Database", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDatabase_Description(), theEcorePackage.getEString(), "description", null, 0, 1, Database.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDatabase_Contacts(), this.getContact(), null, "contacts", null, 0, -1, Database.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDatabase_OwnerRole(), theEcorePackage.getEString(), "ownerRole", null, 0, 1, Database.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDatabase_Roles(), this.getRole(), null, "roles", null, 0, -1, Database.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(contactEClass, Contact.class, "Contact", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getContact_FullName(), theEcorePackage.getEString(), "fullName", null, 0, 1, Contact.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(roleEClass, Role.class, "Role", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getRole_Password(), theEcorePackage.getEString(), "password", null, 0, 1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getRole_Role(), theEcorePackage.getEString(), "role", null, 0, 1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getRole_RoleComments(), theEcorePackage.getEString(), "roleComments", null, 0, -1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getRole_FullName(), theEcorePackage.getEString(), "fullName", null, 0, 1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + // http://openecomp.org + createEcompAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "ecomp", "http://openecomp.org" + }); + } + + /** + * Initializes the annotations for http://openecomp.org. + * + * + * @generated + */ + protected void createEcompAnnotations() { + String source = "http://openecomp.org"; + addAnnotation + (getPostgresServiceConfiguration_State(), + source, + new String[] { + "type", "configuration" + }); + } + +} //ServicePackageImpl diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/util/ServiceAdapterFactory.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/util/ServiceAdapterFactory.java new file mode 100644 index 0000000..2dde68d --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/util/ServiceAdapterFactory.java @@ -0,0 +1,230 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service.util; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; +import org.openecomp.dcae.controller.service.storage.postgres.service.*; +import org.openecomp.ncomp.core.NamedEntity; +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage + * @generated + */ +public class ServiceAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ServiceAdapterFactory() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ServiceSwitch modelSwitch = + new ServiceSwitch() { + @Override + public Adapter casePostgresServiceConfiguration(PostgresServiceConfiguration object) { + return createPostgresServiceConfigurationAdapter(); + } + @Override + public Adapter caseDatabase(Database object) { + return createDatabaseAdapter(); + } + @Override + public Adapter caseContact(Contact object) { + return createContactAdapter(); + } + @Override + public Adapter caseRole(Role object) { + return createRoleAdapter(); + } + @Override + public Adapter caseCommonVmServiceConfiguration(CommonVmServiceConfiguration object) { + return createCommonVmServiceConfigurationAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.storage.postgres.service.PostgresServiceConfiguration Postgres Service Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.PostgresServiceConfiguration + * @generated + */ + public Adapter createPostgresServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Database Database}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.Database + * @generated + */ + public Adapter createDatabaseAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Contact Contact}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.Contact + * @generated + */ + public Adapter createContactAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.storage.postgres.service.Role Role}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.storage.postgres.service.Role + * @generated + */ + public Adapter createRoleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration Common Vm Service Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration + * @generated + */ + public Adapter createCommonVmServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ServiceAdapterFactory diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/util/ServiceSwitch.java b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/util/ServiceSwitch.java new file mode 100644 index 0000000..f862061 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/storage/postgres/service/util/ServiceSwitch.java @@ -0,0 +1,228 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.storage.postgres.service.util; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; +import org.openecomp.dcae.controller.service.storage.postgres.service.*; +import org.openecomp.ncomp.core.NamedEntity; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.dcae.controller.service.storage.postgres.service.ServicePackage + * @generated + */ +public class ServiceSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ServiceSwitch() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ServicePackage.POSTGRES_SERVICE_CONFIGURATION: { + PostgresServiceConfiguration postgresServiceConfiguration = (PostgresServiceConfiguration)theEObject; + T result = casePostgresServiceConfiguration(postgresServiceConfiguration); + if (result == null) result = caseCommonVmServiceConfiguration(postgresServiceConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.DATABASE: { + Database database = (Database)theEObject; + T result = caseDatabase(database); + if (result == null) result = caseNamedEntity(database); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.CONTACT: { + Contact contact = (Contact)theEObject; + T result = caseContact(contact); + if (result == null) result = caseNamedEntity(contact); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.ROLE: { + Role role = (Role)theEObject; + T result = caseRole(role); + if (result == null) result = caseNamedEntity(role); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Postgres Service Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Postgres Service Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePostgresServiceConfiguration(PostgresServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Database'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Database'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDatabase(Database object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Contact'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Contact'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseContact(Contact object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Role'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Role'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRole(Role object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Common Vm Service Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Common Vm Service Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCommonVmServiceConfiguration(CommonVmServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ServiceSwitch diff --git a/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore/service.xcore b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore/service.xcore new file mode 100644 index 0000000..d917284 --- /dev/null +++ b/dcae-controller-service/dcae-controller-service-storage-postgres-model/src/main/xcore/service.xcore @@ -0,0 +1,58 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * 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. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-storage-postgres-model/src/main/xcore-gen") + + +package org.openecomp.dcae.controller.service.storage.postgres.service + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration +import org.openecomp.ncomp.core.NamedEntity + +annotation "http://openecomp.org" as ecomp + +// state in both controller and manager +class PostgresServiceConfiguration extends CommonVmServiceConfiguration { + @ecomp(^type = "configuration") + String state + contains Database[] databases +} + +class Database extends NamedEntity { + String description + contains Contact[] contacts + String ownerRole + contains Role[] roles +} + +class Contact extends NamedEntity { + String fullName +} + +class Role extends NamedEntity { + String password + String role + String[] roleComments + String fullName +} + + + diff --git a/dcae-controller-service/pom.xml b/dcae-controller-service/pom.xml new file mode 100644 index 0000000..42d4da7 --- /dev/null +++ b/dcae-controller-service/pom.xml @@ -0,0 +1,82 @@ + + 4.0.0 + + org.openecomp.dcae.controller + dcae-controller-service + 0.1.0-SNAPSHOT + pom + dcae-controller-service + + + UTF-8 + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + + dcae-controller-service-standardeventcollector + dcae-controller-service-dmaap-drsub + dcae-controller-service-storage-postgres-model + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + diff --git a/deptree.text b/deptree.text new file mode 100644 index 0000000..effdef9 --- /dev/null +++ b/deptree.text @@ -0,0 +1 @@ +org.openecomp.dcae.controller:dcae-controller:pom:0.1.0-SNAPSHOT diff --git a/pom-complete-build.xml b/pom-complete-build.xml new file mode 100644 index 0000000..2e64f4d --- /dev/null +++ b/pom-complete-build.xml @@ -0,0 +1,142 @@ + + 4.0.0 + org.openecomp.dcae.controller + dcae-controller-complete + 0.1.0-SNAPSHOT + pom + + dcae-org.openecomp.dcae.controller + dcae-org.openecomp.operation.utils/operation-utils + dcae-org.openecomp.dcae.demo/dcae-demo-controller + dcae-org.openecomp.ncomp.utils + dcae-org.openecomp.ncomp.maven + dcae-org.openecomp.ncomp.core + dcae-org.openecomp.ncomp.sirius.manager + dcae-org.openecomp.ncomp.openstack + dcae-org.openecomp.ncomp.cdap + dcae-org.openecomp.ncomp.docker + dcae-org.openecomp.dcae.analytics/dcae-analytics-cdap-common-model + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + org.codehaus.mojo + sonar-maven-plugin + 3.2 + + + maven-scm-plugin + 1.8.1 + + ${project.artifactId}-${project.version} + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9 + + + + + + + + + + osecomp-nexus-releases + OSECOMP Release Repository + ${openecomp.nexus.releases} + + + osecomp-nexus-snapshots + OSECOMP Snapshot Repository + ${openecomp.nexus.snapshots} + + + dcae-javadoc + ${site.urlroot}/${project.artifactId}/${project.version}/ + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + false + org.umlgraph.doclet.UmlGraphDoc + + org.umlgraph + umlgraph + 5.6 + + -views + true + + + + + + + DCAE Controller main project + This Maven project is responsible to build and package all child projects - contributions in the DCAE Controller project. + + OPENECOMP - DCAE Controller + http://www.openecomp.org/ + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..bd010dc --- /dev/null +++ b/pom.xml @@ -0,0 +1,83 @@ + + 4.0.0 + + org.openecomp.dcae.controller + dcae-controller + pom + dcae-controller + + + UTF-8 + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + + dcae-controller-core + dcae-controller-service-vm + dcae-controller-service-cdap + dcae-controller-service-docker + dcae-controller-service + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + diff --git a/pom.xml.versionsBackup b/pom.xml.versionsBackup new file mode 100644 index 0000000..bd010dc --- /dev/null +++ b/pom.xml.versionsBackup @@ -0,0 +1,83 @@ + + 4.0.0 + + org.openecomp.dcae.controller + dcae-controller + pom + dcae-controller + + + UTF-8 + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + + dcae-controller-core + dcae-controller-service-vm + dcae-controller-service-cdap + dcae-controller-service-docker + dcae-controller-service + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + -- cgit 1.2.3-korg