本文整理汇总了Java中org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord类的典型用法代码示例。如果您正苦于以下问题:Java VirtualNetworkFunctionRecord类的具体用法?Java VirtualNetworkFunctionRecord怎么用?Java VirtualNetworkFunctionRecord使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VirtualNetworkFunctionRecord类属于org.openbaton.catalogue.mano.record包,在下文中一共展示了VirtualNetworkFunctionRecord类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: deactivate
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
/**
* Deactivates autoscaling for the passed NSR
*
* @param msg : NSR in payload to add for autoscaling
*/
@RequestMapping(
value = "RELEASE_RESOURCES_FINISH",
method = RequestMethod.POST,
consumes = MediaType.APPLICATION_JSON_VALUE,
produces = MediaType.APPLICATION_JSON_VALUE
)
@ResponseStatus(HttpStatus.CREATED)
public void deactivate(@RequestBody String msg) throws NotFoundException {
log.trace("msg=" + msg);
JsonParser jsonParser = new JsonParser();
JsonObject json = jsonParser.parse(msg).getAsJsonObject();
Gson mapper = new GsonBuilder().create();
Action action = mapper.fromJson(json.get("action"), Action.class);
log.trace("ACTION=" + action);
NetworkServiceRecord nsr = mapper.fromJson(json.get("payload"), NetworkServiceRecord.class);
log.trace("NSR=" + nsr);
for (VirtualNetworkFunctionRecord vnfr : nsr.getVnfr()) {
elasticityManagement.deactivate(nsr.getProjectId(), nsr.getId(), vnfr);
}
}
开发者ID:openbaton,项目名称:autoscaling-engine,代码行数:26,代码来源:RestElasticityManagementInterface.java
示例2: getDependencyForAVNFRecordTarget
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的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
示例3: handleError
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
@Override
public void handleError(VirtualNetworkFunctionRecord virtualNetworkFunctionRecord) {
log.error("Received Error for VNFR " + virtualNetworkFunctionRecord.getName());
if (VnfmUtils.getLifecycleEvent(virtualNetworkFunctionRecord.getLifecycle_event(), Event.ERROR)
!= null) {
StringBuilder output = new StringBuilder("\n--------------------\n--------------------\n");
try {
for (String result :
lcm.executeScriptsForEvent(virtualNetworkFunctionRecord, Event.ERROR)) {
output.append(JsonUtils.parse(result));
output.append("\n--------------------\n");
}
} catch (Exception e) {
e.printStackTrace();
log.error("Exception executing Error handling");
}
output.append("\n--------------------\n");
log.info("Executed script for ERROR. Output was: \n\n" + output);
}
}
开发者ID:openbaton,项目名称:generic-vnfm,代码行数:21,代码来源:GenericVNFM.java
示例4: start
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
@Override
public VirtualNetworkFunctionRecord start(
VirtualNetworkFunctionRecord virtualNetworkFunctionRecord) throws Exception {
log.info("Starting vnfr: " + virtualNetworkFunctionRecord.getName());
if (VnfmUtils.getLifecycleEvent(virtualNetworkFunctionRecord.getLifecycle_event(), Event.START)
!= null) {
if (VnfmUtils.getLifecycleEvent(
virtualNetworkFunctionRecord.getLifecycle_event(), Event.START)
.getLifecycle_events()
!= null) {
StringBuilder output = new StringBuilder("\n--------------------\n--------------------\n");
for (String result :
lcm.executeScriptsForEvent(virtualNetworkFunctionRecord, Event.START)) {
output.append(JsonUtils.parse(result));
output.append("\n--------------------\n");
}
output.append("\n--------------------\n");
log.info("Executed script for START. Output was: \n\n" + output);
}
}
return virtualNetworkFunctionRecord;
}
开发者ID:openbaton,项目名称:generic-vnfm,代码行数:25,代码来源:GenericVNFM.java
示例5: getNotInitializedVnfrSource
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
public Set<String> getNotInitializedVnfrSource(Set<String> ids, NetworkServiceRecord nsr) {
Set<String> res = new HashSet<>();
for (String sourceName : ids) {
log.debug("Looking for VNFR name: " + sourceName);
boolean found = false;
for (VirtualNetworkFunctionRecord vnfr : nsr.getVnfr()) {
if (sourceName.equals(vnfr.getName())) {
found = true;
if (vnfr.getStatus().ordinal() < Status.INITIALIZED.ordinal())
res.add(vnfr.getName() + nsr.getId());
}
}
if (!found) res.add(sourceName + nsr.getId());
}
if (!res.isEmpty()) log.debug("There are the following not initialized vnfr sources:" + res);
return res;
}
开发者ID:openbaton,项目名称:NFVO,代码行数:19,代码来源:DependencyManagement.java
示例6: sendStart
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
private void sendStart(VirtualNetworkFunctionRecord virtualNetworkFunctionRecord)
throws NotFoundException, BadFormatException, ExecutionException, InterruptedException {
VnfmSender vnfmSender;
vnfmSender =
this.getVnfmSender(
vnfmRegister.getVnfm(virtualNetworkFunctionRecord.getEndpoint()).getEndpointType());
log.info(
"Calling START to: "
+ virtualNetworkFunctionRecord.getName()
+ " because it has 0 dependencies");
log.trace(
"VNFR ("
+ virtualNetworkFunctionRecord.getId()
+ ") hibernate version is = "
+ virtualNetworkFunctionRecord.getHbVersion());
/*vnfmSender.sendCommand(
new OrVnfmGenericMessage(virtualNetworkFunctionRecord, Action.START),
vnfmRegister.getVnfm(virtualNetworkFunctionRecord.getEndpoint()));*/
vnfStateHandler.executeAction(
vnfmSender.sendCommand(
new OrVnfmStartStopMessage(virtualNetworkFunctionRecord, null, Action.START),
vnfmRegister.getVnfm(virtualNetworkFunctionRecord.getEndpoint())));
}
开发者ID:openbaton,项目名称:NFVO,代码行数:24,代码来源:InstantiateTask.java
示例7: getVirtualNetworkFunctionRecords
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
/**
* Returns the list of VirtualNetworkFunctionDescriptor into a NSD with id
*
* @param id of NSD
* @return Set<VirtualNetworkFunctionDescriptor>: List of VirtualNetworkFunctionDescriptor into
* NSD
*/
@ApiOperation(
value = "Returns the Virtual Network Function Records of a NSR",
notes = "Returns all the VNFRs that are part of the specified NSR"
)
@RequestMapping(
value = "{id}/vnfrecords",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE
)
@ResponseStatus(HttpStatus.OK)
public Set<VirtualNetworkFunctionRecord> getVirtualNetworkFunctionRecords(
@PathVariable("id") String id, @RequestHeader(value = "project-id") String projectId)
throws NotFoundException {
NetworkServiceRecord nsr = networkServiceRecordManagement.query(id, projectId);
log.trace("*****" + nsr.getVnfr().toString());
return nsr.getVnfr();
}
开发者ID:openbaton,项目名称:NFVO,代码行数:25,代码来源:RestNetworkServiceRecord.java
示例8: requestLog
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
@Override
@Async
public Future<NFVMessage> requestLog(VirtualNetworkFunctionRecord vnfr, String hostname)
throws NotFoundException, BadFormatException, ExecutionException, InterruptedException {
VnfmManagerEndpoint endpoint = generator.getVnfm(vnfr.getEndpoint());
if (endpoint == null)
throw new NotFoundException(
"VnfManager of type "
+ vnfr.getType()
+ " (endpoint = "
+ vnfr.getEndpoint()
+ ") is not registered");
OrVnfmLogMessage orVnfmLogMessage = new OrVnfmLogMessage(vnfr.getName(), hostname);
VnfmSender vnfmSender;
try {
vnfmSender = generator.getVnfmSender(endpoint.getEndpointType());
} catch (BeansException e) {
throw new NotFoundException(e);
}
Future<NFVMessage> answerFuture = vnfmSender.sendCommand(orVnfmLogMessage, endpoint);
answerFuture.get();
NFVMessage message = answerFuture.get();
return new AsyncResult<>(message);
}
开发者ID:openbaton,项目名称:NFVO,代码行数:26,代码来源:VnfmManager.java
示例9: addVnfr
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
public void addVnfr(VirtualNetworkFunctionRecord vnfr) {
for (VirtualNetworkFunctionRecord vnfrAlreadyPresent : vnfrList) {
if (vnfrAlreadyPresent.getId().equals(vnfr.getId())) {
return;
}
}
vnfrList.add(vnfr);
}
开发者ID:openbaton,项目名称:juju-vnfm,代码行数:9,代码来源:NetworkService.java
示例10: instantiate
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
@Override
public VirtualNetworkFunctionRecord instantiate(
VirtualNetworkFunctionRecord virtualNetworkFunctionRecord,
Object scripts,
Map<String, Collection<VimInstance>> vimInstances)
throws Exception {
return virtualNetworkFunctionRecord;
}
开发者ID:openbaton,项目名称:juju-vnfm,代码行数:9,代码来源:JujuVnfm.java
示例11: heal
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
@Override
public VirtualNetworkFunctionRecord heal(
VirtualNetworkFunctionRecord virtualNetworkFunctionRecord,
VNFCInstance component,
String cause)
throws Exception {
return virtualNetworkFunctionRecord;
}
开发者ID:openbaton,项目名称:juju-vnfm,代码行数:9,代码来源:JujuVnfm.java
示例12: resume
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
@Override
public VirtualNetworkFunctionRecord resume(
VirtualNetworkFunctionRecord virtualNetworkFunctionRecord,
VNFCInstance vnfcInstance,
VNFRecordDependency dependency)
throws Exception {
return virtualNetworkFunctionRecord;
}
开发者ID:openbaton,项目名称:juju-vnfm,代码行数:9,代码来源:JujuVnfm.java
示例13: scale
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的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
示例14: scaleOutTo
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
public void scaleOutTo(String projectId, VirtualNetworkFunctionRecord vnfr, int value)
throws SDKException, NotFoundException, VimException {
int vnfci_counter = 0;
for (VirtualDeploymentUnit vdu : vnfr.getVdu()) {
vnfci_counter += vdu.getVnfc_instance().size();
}
for (int i = vnfci_counter + 1; i <= value; i++) {
scaleOut(projectId, vnfr, 1);
}
}
开发者ID:openbaton,项目名称:autoscaling-engine,代码行数:11,代码来源:ExecutionEngine.java
示例15: scaleInTo
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
public void scaleInTo(String projectId, VirtualNetworkFunctionRecord vnfr, int value)
throws SDKException, NotFoundException, VimException {
int vnfci_counter = 0;
for (VirtualDeploymentUnit vdu : vnfr.getVdu()) {
vnfci_counter += vdu.getVnfc_instance().size();
}
for (int i = vnfci_counter; i > value; i--) {
scaleIn(projectId, vnfr, 1);
}
}
开发者ID:openbaton,项目名称:autoscaling-engine,代码行数:11,代码来源:ExecutionEngine.java
示例16: activate
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
public void activate(NetworkServiceRecord nsr)
throws NotFoundException, VimException, SDKException {
log.debug("Activating Elasticity for NSR with id: " + nsr.getId());
for (VirtualNetworkFunctionRecord vnfr : nsr.getVnfr()) {
for (AutoScalePolicy autoScalePolicy : vnfr.getAuto_scale_policy())
detectionManagment.start(nsr.getProjectId(), nsr.getId(), vnfr.getId(), autoScalePolicy);
}
log.info("Activated Elasticity for NSR with id: " + nsr.getId());
}
开发者ID:openbaton,项目名称:autoscaling-engine,代码行数:10,代码来源:ElasticityManagement.java
示例17: updateVNFR
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
/**
* Updates a VirtualNetworkFunctionRecord.
*
* @param idNsr the ID of the NetworkServiceRecord containing the VirtualNetworkFunctionRecord
* @param idVnfr the ID of the VirtualNetworkFunctionRecord to update
* @param virtualNetworkFunctionRecord the updated version of the VirtualNetworkFunctionRecord
* @return the updated VirtualNetworkFunctionRecord
* @throws SDKException
*/
@Help(help = "update VirtualNetworkFunctionRecord")
public String updateVNFR(
final String idNsr,
final String idVnfr,
final VirtualNetworkFunctionRecord virtualNetworkFunctionRecord)
throws SDKException {
String url = idNsr + "/vnfrecords" + "/" + idVnfr;
return requestPut(url, virtualNetworkFunctionRecord).toString();
}
开发者ID:openbaton,项目名称:openbaton-client,代码行数:19,代码来源:NetworkServiceRecordAgent.java
示例18: getNextToCallStart
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
protected VirtualNetworkFunctionRecord getNextToCallStart(
VirtualNetworkFunctionRecord virtualNetworkFunctionRecord) {
Map<String, Integer> vnfrNames =
vnfmManager.getVnfrNames().get(virtualNetworkFunctionRecord.getParent_ns_id());
if (vnfrNames != null) {
log.debug("List of VNFRs to start: " + vnfrNames);
if (!vnfrNames.isEmpty()) {
for (Entry<String, Integer> entry : vnfrNames.entrySet()) {
vnfrNames.remove(entry.getKey());
for (VirtualNetworkFunctionRecord vnfr :
networkServiceRecordRepository
.findFirstById(virtualNetworkFunctionRecord.getParent_ns_id())
.getVnfr()) {
if (vnfr.getName().equals(entry.getKey())) {
return vnfr;
}
}
return null;
}
}
}
return null;
}
开发者ID:openbaton,项目名称:NFVO,代码行数:29,代码来源:AbstractTask.java
示例19: stopVNFCInstance
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
@Override
public VirtualNetworkFunctionRecord stopVNFCInstance(
VirtualNetworkFunctionRecord virtualNetworkFunctionRecord, VNFCInstance vnfcInstance)
throws Exception {
log.info(
"Stop VNFCInstance " + vnfcInstance.getHostname() + " with id " + vnfcInstance.getId());
return virtualNetworkFunctionRecord;
}
开发者ID:openbaton,项目名称:dummy-vnfm-amqp,代码行数:9,代码来源:DummyAMQPVNFManager.java
示例20: allocate
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; //导入依赖的package包/类
Future<VNFCInstance> allocate(
VirtualDeploymentUnit vdu,
VirtualNetworkFunctionRecord virtualNetworkFunctionRecord,
VNFComponent componentToAdd,
BaseVimInstance vimInstance,
String userdata)
throws InterruptedException, ExecutionException, PluginException, VimException,
VimDriverException;
开发者ID:openbaton,项目名称:NFVO,代码行数:9,代码来源:ResourceManagement.java
注:本文中的org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论