2 * Copyright 2016 Huawei Technologies Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org.openo.nfvo.jujuvnfmadapter.service.adapter.inf;
19 import net.sf.json.JSONObject;
27 * @version NFVO 0.5 Sep 7, 2016
29 public interface IJujuClientManager {
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
39 * @param mem (at least 2 GB RAM) unit/GB
44 JSONObject deploy(String charmPath, String appName);
47 * * remove a charm completely
48 * juju remove-application example
49 * juju destroy-model model-name
56 JSONObject destroy(String appName);
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/
71 JSONObject getStatus(String modelName);
83 public boolean grantResource(String charmPath, String appName,String action , String vnfId);