it should be optional from VNFM
and Resouce Manager could provide the
specific vim by specific rules
(e.g. storage first or performance first).
but for now,we dont have the interface/capability
to pass the "rules"to resource Manager.
resource Manager could integrate OOF which may
provide this capabilities or interface.
Change-Id: I91faba8d573680beecf81dc88a252e34150b3b0b
Issue-ID: VFC-604
Signed-off-by: victor.gao <victor.gao@huawei.com>
return result;
}
+ private String getVimId(JSONObject object) {
+ String vimId = "";
+ if (object.containsKey(ParamConstant.PARAM_VIMID)){
+ vimId = object.getString(ParamConstant.PARAM_VIMID);
+ }
+ // TODO: Need integrate OOF to get vimID in R3.
+ return vimId;
+ }
@Override
public JSONObject grantResourceReal(JSONObject object) throws ServiceException {
LOGGER.info("function=grantResource; object: {}", object.toString());
- String vimId = object.getString(ParamConstant.PARAM_VIMID);
+ String vimId = getVimId(object);
JSONObject vimJson = VimUtil.getVimById(vimId);
JSONObject vim = parseVim(vimJson);
String resType = "";
/**
* <br>
*
- * @param addResource
+ * @param getGrantResource
* @return
* @since VFC 1.0
*/