Modify vfc-ztevnfmdriver termination tests
[vfc/nfvo/driver/vnfm/svnfm.git] / nokia / vnfmdriver / vfcadaptorservice / vfcadaptor / src / main / java / org / onap / vfc / nfvo / driver / vnfm / svnfm / init / MsbServiceRegister.java
1 /*
2  * Copyright 2016-2017, Nokia Corporation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16  
17 package org.onap.vfc.nfvo.driver.vnfm.svnfm.init;
18
19 import org.slf4j.Logger;
20 import org.slf4j.LoggerFactory;
21 import org.onap.vfc.nfvo.driver.vnfm.svnfm.msb.inf.IMsbMgmr;
22 import org.springframework.beans.factory.annotation.Autowired;
23 import org.springframework.boot.ApplicationArguments;
24 import org.springframework.boot.ApplicationRunner;
25 import org.springframework.core.annotation.Order;
26 import org.springframework.stereotype.Component;
27
28 @Order(2)
29 @Component
30 public class MsbServiceRegister implements ApplicationRunner{
31         private static final Logger logger = LoggerFactory.getLogger(MsbServiceRegister.class);
32         
33         @Autowired
34         private IMsbMgmr msbMgmr;
35
36         @Override
37         public void run(ApplicationArguments arg0) {
38                 logger.info("Start to register nokia vnfm driver service.");
39                 msbMgmr.register();
40                 logger.info("nokia vnfm driver successfully registered on the MSB");
41         }
42
43 }