diff options
Diffstat (limited to 'ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackController.java')
-rw-r--r-- | ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackController.java | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackController.java b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackController.java new file mode 100644 index 0000000..f6db33f --- /dev/null +++ b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackController.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============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.servers.openstack; + + + + +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.ncomp.servers.openstack.logging.OpenStackControllerOperationEnum; +import org.openecomp.ncomp.servers.openstack.logging.OpenStackControllerMessageEnum; + + + + +import org.openecomp.ncomp.openstack.impl.OpenStackControllerImpl; + + + +public class OsOpenStackController extends OpenStackControllerImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(OsOpenStackController.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public OsOpenStackControllerProvider controller; + ISiriusServer server; + + public OsOpenStackController(ISiriusServer server) { + this.server = server; + this.controller = new OsOpenStackControllerProvider(server,this); + } + + public void uploadOpenstackConfiguration(org.json.JSONObject cx, org.openecomp.ncomp.openstack.location.OpenStackLocation loc) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "uploadOpenstackConfiguration", ApiRequestStatus.START, duration_,cx,loc); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(OpenStackControllerOperationEnum.uploadOpenstackConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.uploadOpenstackConfiguration(cx,loc); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadOpenstackConfiguration", ApiRequestStatus.ERROR, duration_,cx,loc); + System.err.println("ERROR: " + e); + ecomplogger.warn(OpenStackControllerMessageEnum.uploadOpenstackConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadOpenstackConfiguration", ApiRequestStatus.OKAY, duration_,cx,loc); + + } + + + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + OsOpenStackControllerProvider.ecoreSetup(); + } + public OsOpenStackControllerProvider getSomfProvider() { + return controller; + } +} |