aboutsummaryrefslogtreecommitdiffstats
path: root/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config
diff options
context:
space:
mode:
authorAndrewLamb <andrew.a.lamb@est.tech>2019-10-07 15:48:25 +0100
committerAndrewLamb <andrew.a.lamb@est.tech>2019-10-08 10:49:20 +0100
commit1373c30ec881e04db719ecafa45598d3ff88480e (patch)
treec1b2243191031acabef386d372bccfb8272d1d93 /vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config
parentdb90144322187faee71622702bff58c43a2af300 (diff)
VNFM Simulator Removed. Moved to CSIT.
Change-Id: I6c439615d52751578200ef84aacb20b0263b3846 Issue-ID: SO-1952 Signed-off-by: AndrewLamb <andrew.a.lamb@est.tech>
Diffstat (limited to 'vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config')
-rw-r--r--vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/ApplicationConfig.java53
-rw-r--r--vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/SvnfmApplication.java46
-rw-r--r--vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/WebSecurityConfigImpl.java48
3 files changed, 0 insertions, 147 deletions
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/ApplicationConfig.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/ApplicationConfig.java
deleted file mode 100644
index a1abb05f07..0000000000
--- a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/ApplicationConfig.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.onap.svnfm.simulator.config;
-
-import java.util.Arrays;
-import org.onap.svnfm.simulator.constants.Constant;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.ApplicationArguments;
-import org.springframework.boot.ApplicationRunner;
-import org.springframework.cache.Cache;
-import org.springframework.cache.CacheManager;
-import org.springframework.cache.concurrent.ConcurrentMapCache;
-import org.springframework.cache.support.SimpleCacheManager;
-import org.springframework.context.annotation.Bean;
-import org.springframework.core.env.Environment;
-import org.springframework.stereotype.Component;
-
-@Component
-public class ApplicationConfig implements ApplicationRunner {
-
- private static final String PORT = "local.server.port";
-
- @Value("${server.dns.name:so-vnfm-simulator.onap}")
- private String serverDnsName;
-
- @Value("${server.request.grant.auth:oauth}")
- private String grantAuth;
-
- @Autowired
- private Environment environment;
-
- private String baseUrl;
-
- @Override
- public void run(final ApplicationArguments args) throws Exception {
- baseUrl = "https://" + serverDnsName + ":" + environment.getProperty(PORT);
- }
-
- public String getBaseUrl() {
- return baseUrl;
- }
-
- public String getGrantAuth() {
- return grantAuth;
- }
-
- @Bean
- public CacheManager cacheManager() {
- final Cache inlineResponse201 = new ConcurrentMapCache(Constant.IN_LINE_RESPONSE_201_CACHE);
- final SimpleCacheManager manager = new SimpleCacheManager();
- manager.setCaches(Arrays.asList(inlineResponse201));
- return manager;
- }
-}
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/SvnfmApplication.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/SvnfmApplication.java
deleted file mode 100644
index 723ae906e6..0000000000
--- a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/SvnfmApplication.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.svnfm.simulator.config;
-
-import org.onap.svnfm.simulator.controller.SvnfmController;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.domain.EntityScan;
-import org.springframework.cache.annotation.EnableCaching;
-import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
-
-/**
- * The spring boot application for the VNF LCM.
- * <p>
- * The VNFM receives requests through its REST API {@link SvnfmController}
- *
- * @author Lathishbabu Ganesan (lathishbabu.ganesan@est.tech)
- * @author ronan.kenny@est.tech
- */
-@SpringBootApplication(scanBasePackages = {"org.onap"})
-@EnableJpaRepositories("org.onap.svnfm.simulator")
-@EntityScan("org.onap.svnfm.simulator.model")
-@EnableCaching
-public class SvnfmApplication {
- public static void main(final String[] args) {
- SpringApplication.run(SvnfmApplication.class, args);
- }
-}
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/WebSecurityConfigImpl.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/WebSecurityConfigImpl.java
deleted file mode 100644
index 18eadd2fc3..0000000000
--- a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/WebSecurityConfigImpl.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.svnfm.simulator.config;
-
-import org.onap.so.security.MSOSpringFirewall;
-import org.onap.so.security.WebSecurityConfig;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.builders.WebSecurity;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.web.firewall.StrictHttpFirewall;
-
-/**
- * Configure the web security for the application.
- */
-@EnableWebSecurity
-public class WebSecurityConfigImpl extends WebSecurityConfig {
-
- @Override
- protected void configure(final HttpSecurity http) throws Exception {
- http.csrf().disable().authorizeRequests().antMatchers("/**").permitAll();
- }
-
- @Override
- public void configure(final WebSecurity web) throws Exception {
- super.configure(web);
- final StrictHttpFirewall firewall = new MSOSpringFirewall();
- web.httpFirewall(firewall);
- }
-
-}