Update gvnfm-driver .gitreview file
[vfc/nfvo/driver/vnfm/gvnfm.git] / juju / juju-vnfmadapter / Juju-vnfmadapterService / service / src / main / java / org / onap / vfc / nfvo / vnfm / gvnfm / jujuvnfmadapter / service / adapter / inf / IJujuClientManager.java
1 /*
2  * Copyright 2016 Huawei Technologies Co., Ltd.
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.vnfm.gvnfm.jujuvnfmadapter.service.adapter.inf;
18
19 import net.sf.json.JSONObject;
20
21 /**
22  * <br/>
23  * <p>
24  * </p>
25  * 
26  * @author 
27  * @version NFVO 0.5 Sep 7, 2016
28  */
29 public interface IJujuClientManager {
30
31     /**
32      * * deploy juju charm from local filesystem. The charm will get deployed on a trusty instance
33      * with at least 2 GB RAM
34      * juju deploy $HOME/charms/example --series trusty --constraints mem=2G --config
35      * /path/to/custom/charm-config.yaml
36      * <br/>
37      * 
38      * @param charmPath
39      * @param mem (at least 2 GB RAM) unit/GB
40      * @param appName
41      * @return
42      * @since NFVO 0.5
43      */
44     JSONObject deploy(String charmPath, String appName);
45
46     /**
47      * * remove a charm completely
48      * juju remove-application example
49      * juju destroy-model model-name
50      * <br/>
51      * 
52      * @param appName
53      * @return
54      * @since NFVO 0.5
55      */
56     JSONObject destroy(String appName);
57
58     /**
59      * juju status --format=json
60      * juju status -m model-name --format=json
61      * get the status of a single charm
62      * juju status example --format=json
63      * Here is an example output from juju status --format=json
64      * http://paste.ubuntu.com/23113992/
65      * <br/>
66      * 
67      * @param modelName
68      * @return
69      * @since NFVO 0.5
70      */
71     JSONObject getStatus(String modelName);
72     /**
73      * 
74      * <br/>
75      * 
76      * @param charmPath
77      * @param appName
78      * @param action
79      * @param vnfId
80      * @return
81      * @since  NFVO 0.5
82      */
83     public boolean grantResource(String charmPath, String appName,String action , String vnfId);
84 }