• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java VNFRecordDependency类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.openbaton.catalogue.mano.record.VNFRecordDependency的典型用法代码示例。如果您正苦于以下问题:Java VNFRecordDependency类的具体用法?Java VNFRecordDependency怎么用?Java VNFRecordDependency使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



VNFRecordDependency类属于org.openbaton.catalogue.mano.record包,在下文中一共展示了VNFRecordDependency类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: handleExceptionalCommandNames

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
/**
 * This method modifies commands which do not use the object provided by their names. For example
 * the command NetworkServiceRecord-createVNFCInstance will not create a NetworkServiceRecord but
 * a VNFCInstance. Therefore the clazz attribute in the command object has to be changed from
 * NetworkServiceRecord to VNFCInstance.
 *
 * @param command
 */
private static void handleExceptionalCommandNames(Command command) {
  if (command.getClazz().equals(NetworkServiceRecord.class)) {
    if (command.getMethod().getName().equals("createVNFCInstance"))
      command.setClazz(VNFCInstance.class);
    if (command.getMethod().getName().equals("createVNFR"))
      command.setClazz(VirtualNetworkFunctionRecord.class);
    if (command.getMethod().getName().equals("postVNFDependency"))
      command.setClazz(VNFRecordDependency.class);
    if (command.getMethod().getName().equals("updateVNFDependency"))
      command.setClazz(VNFRecordDependency.class);
  }
  if (command.getClazz().equals(NetworkServiceDescriptor.class)) {
    if (command.getMethod().getName().equals("createVNFD"))
      command.setClazz(VirtualNetworkFunctionDescriptor.class);
    if (command.getMethod().getName().equals("createVNFDependency"))
      command.setClazz(VNFDependency.class);
  }
}
 
开发者ID:openbaton,项目名称:openbaton-client,代码行数:27,代码来源:NFVOCommandLineInterface.java


示例2: getVNFDependency

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
@ApiOperation(
  value = "Retrieve VNF Dependencies from VNFR",
  notes = "Returns all VNF Dependencies that reference the specified VNFR"
)
@RequestMapping(
  value = "{id}/vnfdependencies/{id_vnfr}",
  method = RequestMethod.GET,
  produces = MediaType.APPLICATION_JSON_VALUE
)
@ResponseStatus(HttpStatus.OK)
public VNFRecordDependency getVNFDependency(
    @PathVariable("id") String id,
    @PathVariable("id_vnfr") String id_vnfr,
    @RequestHeader(value = "project-id") String projectId)
    throws NotFoundException {
  NetworkServiceRecord nsr = networkServiceRecordManagement.query(id, projectId);
  return findVNFD(nsr.getVnf_dependency(), id_vnfr);
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:19,代码来源:RestNetworkServiceRecord.java


示例3: postVNFDependency

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
@ApiOperation(
  value = "Add a VNF Dependency to a NSR",
  notes = "Adds a new VNF Dependency to the specified NSR"
)
@RequestMapping(
  value = "{id}/vnfdependencies/",
  method = RequestMethod.POST,
  consumes = MediaType.APPLICATION_JSON_VALUE,
  produces = MediaType.APPLICATION_JSON_VALUE
)
@ResponseStatus(HttpStatus.CREATED)
public VNFRecordDependency postVNFDependency(
    @RequestBody @Valid VNFRecordDependency vnfDependency,
    @PathVariable("id") String id,
    @RequestHeader(value = "project-id") String projectId)
    throws NotFoundException {
  NetworkServiceRecord nsr = networkServiceRecordManagement.query(id, projectId);
  nsr.getVnf_dependency().add(vnfDependency);
  networkServiceRecordManagement.update(nsr, id, projectId);
  return vnfDependency;
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:22,代码来源:RestNetworkServiceRecord.java


示例4: updateVNFD

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
@ApiOperation(
  value = "Updates a VNF Dependency in an NSR",
  notes = "Updates a VNF Dependency based on the if of the VNF it concerns"
)
@RequestMapping(
  value = "{id}/vnfdependencies/{id_vnfd}",
  method = RequestMethod.PUT,
  consumes = MediaType.APPLICATION_JSON_VALUE,
  produces = MediaType.APPLICATION_JSON_VALUE
)
@ResponseStatus(HttpStatus.ACCEPTED)
public VNFRecordDependency updateVNFD(
    @RequestBody @Valid VNFRecordDependency vnfDependency,
    @PathVariable("id") String id,
    @PathVariable("id_vnfd") String id_vnfd,
    @RequestHeader(value = "project-id") String projectId)
    throws NotFoundException {
  NetworkServiceRecord nsr = networkServiceRecordManagement.query(id, projectId);
  nsr.getVnf_dependency().add(vnfDependency);
  networkServiceRecordManagement.update(nsr, id, projectId);
  return vnfDependency;
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:23,代码来源:RestNetworkServiceRecord.java


示例5: deleteVNFDependency

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
/**
 * Removes a VNFDependency from an NSR.
 *
 * @param idNsr ID of the NSR
 * @param idVnfd ID of the VNFDependency
 * @param projectId the current projectId
 */
@Override
public void deleteVNFDependency(String idNsr, String idVnfd, String projectId)
    throws NotFoundException {
  NetworkServiceRecord nsr = query(idNsr, projectId);
  VNFRecordDependency vnfDependency = null;
  for (VNFRecordDependency vnfdep : nsr.getVnf_dependency()) {
    if (vnfdep.getId().equals(idVnfd)) {
      vnfDependency = vnfdep;
    }
  }
  if (vnfDependency == null) {
    throw new NotFoundException(
        "No VNFDependency with ID " + idVnfd + " found in NSR with ID " + idNsr);
  }

  nsr.getVnf_dependency().remove(vnfDependency);
  nsrRepository.saveCascade(nsr);
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:26,代码来源:NetworkServiceRecordManagement.java


示例6: getDependencyForAVNFRecordTarget

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
@Override
public VNFRecordDependency getDependencyForAVNFRecordTarget(
    VirtualNetworkFunctionRecord virtualNetworkFunctionRecord) {
  NetworkServiceRecord nsr =
      nsrRepository.findFirstById(virtualNetworkFunctionRecord.getParent_ns_id());
  if (nsr.getStatus().ordinal() != Status.ERROR.ordinal()) {
    Set<VNFRecordDependency> vnfRecordDependencies = nsr.getVnf_dependency();

    for (VNFRecordDependency vnfRecordDependency : vnfRecordDependencies) {
      vnfRecordDependency = vnfrDependencyRepository.findOne(vnfRecordDependency.getId());

      if (vnfRecordDependency.getTarget().equals(virtualNetworkFunctionRecord.getName())) {
        return vnfRecordDependency;
      }
    }
  }
  return null;
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:19,代码来源:DependencyManagement.java


示例7: getDependencyForAVNFRecordSource

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
@Override
public List<VNFRecordDependency> getDependencyForAVNFRecordSource(
    VirtualNetworkFunctionRecord virtualNetworkFunctionRecord) {
  List<VNFRecordDependency> res = new ArrayList<>();
  NetworkServiceRecord nsr =
      nsrRepository.findFirstById(virtualNetworkFunctionRecord.getParent_ns_id());
  if (nsr.getStatus().ordinal() != Status.ERROR.ordinal()) {
    Set<VNFRecordDependency> vnfRecordDependencies = nsr.getVnf_dependency();

    for (VNFRecordDependency vnfRecordDependency : vnfRecordDependencies) {
      vnfRecordDependency = vnfrDependencyRepository.findOne(vnfRecordDependency.getId());

      log.trace(
          "Checking if "
              + virtualNetworkFunctionRecord.getName()
              + " is source for "
              + vnfRecordDependency);
      if (vnfRecordDependency.getIdType().containsKey(virtualNetworkFunctionRecord.getName())) {
        res.add(vnfRecordDependency);
      }
    }
  }
  return res;
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:25,代码来源:DependencyManagement.java


示例8: scale

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
@Override
public VirtualNetworkFunctionRecord scale(
    Action scaleInOrOut,
    VirtualNetworkFunctionRecord virtualNetworkFunctionRecord,
    VNFComponent component,
    Object scripts,
    VNFRecordDependency dependency)
    throws Exception {
  log.info(
      scaleInOrOut.name()
          + " on VNFR "
          + virtualNetworkFunctionRecord.getName()
          + " with id "
          + virtualNetworkFunctionRecord.getId());
  Thread.sleep((int) (Math.random() * 500) + 1000);
  return virtualNetworkFunctionRecord;
}
 
开发者ID:openbaton,项目名称:dummy-vnfm-amqp,代码行数:18,代码来源:DummyAMQPVNFManager.java


示例9: modify

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
@Override
public VirtualNetworkFunctionRecord modify(
    VirtualNetworkFunctionRecord virtualNetworkFunctionRecord, VNFRecordDependency dependency)
    throws InterruptedException {
  log.debug(
      "VirtualNetworkFunctionRecord VERSION is: " + virtualNetworkFunctionRecord.getHbVersion());
  log.debug("VirtualNetworkFunctionRecord NAME is: " + virtualNetworkFunctionRecord.getName());
  log.debug("Got dependency: " + dependency);
  log.debug("Parameters are: ");
  for (Map.Entry<String, DependencyParameters> entry : dependency.getParameters().entrySet()) {
    log.debug("Source type: " + entry.getKey());
    log.debug("Parameters: " + entry.getValue().getParameters());
  }
  Thread.sleep(3000 + ((int) (Math.random() * 7000)));
  return virtualNetworkFunctionRecord;
}
 
开发者ID:openbaton,项目名称:dummy-vnfm-amqp,代码行数:17,代码来源:DummyAMQPVNFManager.java


示例10: modify

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
@Override
public VirtualNetworkFunctionRecord modify(
    VirtualNetworkFunctionRecord virtualNetworkFunctionRecord, VNFRecordDependency dependency)
    throws InterruptedException {
  log.info("MODIFY for VNFR " + virtualNetworkFunctionRecord.getName());
  log.debug(
      "VirtualNetworkFunctionRecord VERSION is: " + virtualNetworkFunctionRecord.getHb_version());
  log.debug("VirtualNetworkFunctionRecord NAME is: " + virtualNetworkFunctionRecord.getName());
  log.debug("Got dependency: " + dependency);
  log.debug("Parameters are: ");
  for (Map.Entry<String, DependencyParameters> entry : dependency.getParameters().entrySet()) {
    log.debug("Source type: " + entry.getKey());
    log.debug("Parameters: " + entry.getValue().getParameters());
  }
  Thread.sleep(3000 + ((int) (Math.random() * 7000)));
  return virtualNetworkFunctionRecord;
}
 
开发者ID:openbaton,项目名称:dummy-vnfm-rest,代码行数:18,代码来源:DummyRestVNFManager.java


示例11: resume

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
@Override
public VirtualNetworkFunctionRecord resume(
    VirtualNetworkFunctionRecord virtualNetworkFunctionRecord,
    VNFCInstance vnfcInstance,
    VNFRecordDependency dependency)
    throws Exception {
  return virtualNetworkFunctionRecord;
}
 
开发者ID:openbaton,项目名称:juju-vnfm,代码行数:9,代码来源:JujuVnfm.java


示例12: scale

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
@Override
public VirtualNetworkFunctionRecord scale(
    Action scaleInOrOut,
    VirtualNetworkFunctionRecord virtualNetworkFunctionRecord,
    VNFComponent component,
    Object scripts,
    VNFRecordDependency dependency)
    throws Exception {
  return virtualNetworkFunctionRecord;
}
 
开发者ID:openbaton,项目名称:juju-vnfm,代码行数:11,代码来源:JujuVnfm.java


示例13: getVNFDependencies

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
/**
 * Returns a List of all the VNFRecordDependencies contained in a particular NetworkServiceRecord.
 *
 * @param idNsr the ID of the NetworkServiceRecord
 * @return a List of VNFRecordDependencies
 * @throws SDKException
 */
@Help(
  help =
      "Get all the VirtualNetworkFunctionRecord dependencies of NetworkServiceRecord with specific id"
)
public List<VNFRecordDependency> getVNFDependencies(final String idNsr) throws SDKException {
  String url = idNsr + "/vnfdependencies";
  return Arrays.asList((VNFRecordDependency[]) requestGetAll(url, VNFRecordDependency.class));
}
 
开发者ID:openbaton,项目名称:openbaton-client,代码行数:16,代码来源:NetworkServiceRecordAgent.java


示例14: getVNFDependency

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
/**
 * Returns a specific VNFRecordDependency from a particular NetworkServiceRecord.
 *
 * @param idNsr the ID of the NetworkServiceRecord
 * @param idVnfrDep the ID of the requested VNFRecordDependency
 * @return the VNFRecordDependency
 * @throws SDKException
 */
@Help(
  help =
      "Get the VirtualNetworkFunctionRecord Dependency of a NetworkServiceRecord with specific id"
)
public VNFRecordDependency getVNFDependency(final String idNsr, final String idVnfrDep)
    throws SDKException {
  String url = idNsr + "/vnfdependencies" + "/" + idVnfrDep;
  return (VNFRecordDependency) requestGet(url, VNFRecordDependency.class);
}
 
开发者ID:openbaton,项目名称:openbaton-client,代码行数:18,代码来源:NetworkServiceRecordAgent.java


示例15: postVNFDependency

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
/**
 * Add a new VNFRecordDependency to a NetworkServiceRecord.
 *
 * @param idNsr the ID of the NetworkServiceRecord
 * @param vnfRecordDependency the new VNFRecordDependency
 * @return the created VNFRecordDependency
 * @throws SDKException
 */
@Help(
  help =
      "Create the VirtualNetworkFunctionRecord Dependency of a NetworkServiceRecord with specific id"
)
public VNFRecordDependency postVNFDependency(
    final String idNsr, final VNFRecordDependency vnfRecordDependency) throws SDKException {
  String url = idNsr + "/vnfdependencies" + "/";
  return (VNFRecordDependency) requestPost(url, vnfRecordDependency);
}
 
开发者ID:openbaton,项目名称:openbaton-client,代码行数:18,代码来源:NetworkServiceRecordAgent.java


示例16: updateVNFDependency

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
/**
 * Update a VNFRecordDependency.
 *
 * @param idNsr the ID of the NetworkServiceRecord containing the VNFRecordDependency
 * @param idVnfrDep the ID of the VNFRecordDependency to update
 * @param vnfRecordDependency the updated version of the VNFRecordDependency
 * @return the updated VNFRecordDependency
 * @throws SDKException
 */
@Help(
  help =
      "Update the VirtualNetworkFunctionRecord Dependency of a NetworkServiceRecord with specific id"
)
public VNFRecordDependency updateVNFDependency(
    final String idNsr, final String idVnfrDep, final VNFRecordDependency vnfRecordDependency)
    throws SDKException {
  String url = idNsr + "/vnfdependencies" + "/" + idVnfrDep;
  return (VNFRecordDependency) requestPut(url, vnfRecordDependency);
}
 
开发者ID:openbaton,项目名称:openbaton-client,代码行数:20,代码来源:NetworkServiceRecordAgent.java


示例17: createVNFDependency

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
private VNFRecordDependency createVNFDependency() {
  VirtualNetworkFunctionRecord source = new VirtualNetworkFunctionRecord();
  source.setName("vnf-dummy-2");

  VirtualNetworkFunctionRecord target = new VirtualNetworkFunctionRecord();
  target.setName("vnf-dummy-1");

  return new VNFRecordDependency();
}
 
开发者ID:openbaton,项目名称:openbaton-client,代码行数:10,代码来源:SdkTest.java


示例18: modify

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
@Override
public VirtualNetworkFunctionRecord modify(
    VirtualNetworkFunctionRecord virtualNetworkFunctionRecord, VNFRecordDependency dependency)
    throws Exception {
  log.trace(
      "VirtualNetworkFunctionRecord VERSION is: " + virtualNetworkFunctionRecord.getHbVersion());
  log.info("executing modify for VNFR: " + virtualNetworkFunctionRecord.getName());

  log.debug("Got dependency: " + dependency);
  log.debug("Parameters are: ");
  for (Entry<String, DependencyParameters> entry : dependency.getParameters().entrySet()) {
    log.debug("Source type: " + entry.getKey());
    log.debug("Parameters: " + entry.getValue().getParameters());
  }

  if (VnfmUtils.getLifecycleEvent(
          virtualNetworkFunctionRecord.getLifecycle_event(), Event.CONFIGURE)
      != null) {
    log.debug(
        "LifeCycle events: "
            + VnfmUtils.getLifecycleEvent(
                    virtualNetworkFunctionRecord.getLifecycle_event(), Event.CONFIGURE)
                .getLifecycle_events());
    log.info("-----------------------------------------------------------------------");
    StringBuilder output = new StringBuilder("\n--------------------\n--------------------\n");
    for (String result :
        lcm.executeScriptsForEvent(virtualNetworkFunctionRecord, Event.CONFIGURE, dependency)) {
      output.append(JsonUtils.parse(result));
      output.append("\n--------------------\n");
    }
    output.append("\n--------------------\n");
    log.info("Executed script for CONFIGURE. Output was: \n\n" + output);
    log.info("-----------------------------------------------------------------------");
  } else {
    log.debug("No LifeCycle events for Event.CONFIGURE");
  }
  return virtualNetworkFunctionRecord;
}
 
开发者ID:openbaton,项目名称:generic-vnfm,代码行数:39,代码来源:GenericVNFM.java


示例19: resume

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
@Override
public VirtualNetworkFunctionRecord resume(
    VirtualNetworkFunctionRecord virtualNetworkFunctionRecord,
    VNFCInstance vnfcInstance,
    VNFRecordDependency dependency) {
  return virtualNetworkFunctionRecord;
}
 
开发者ID:openbaton,项目名称:generic-vnfm,代码行数:8,代码来源:GenericVNFM.java


示例20: OrVnfmStartStopMessage

import org.openbaton.catalogue.mano.record.VNFRecordDependency; //导入依赖的package包/类
public OrVnfmStartStopMessage(
    VirtualNetworkFunctionRecord virtualNetworkFunctionRecord,
    VNFCInstance vnfcInstance,
    VNFRecordDependency vnfrDependency) {
  this.virtualNetworkFunctionRecord = virtualNetworkFunctionRecord;
  this.vnfcInstance = vnfcInstance;
  this.vnfrDependency = vnfrDependency;
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:9,代码来源:OrVnfmStartStopMessage.java



注:本文中的org.openbaton.catalogue.mano.record.VNFRecordDependency类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java InvalidRelException类代码示例发布时间:2022-05-22
下一篇:
Java Device类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap