* ================================================================================
* Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved.
+ * Modifications Copyright (C) 2019 Tech Mahindra
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
return vnfId;
}
throw new ControlLoopException("Target does not match target type");
+ case VFMODULE:
+ VirtualControlLoopEvent virtualOnsetEvent = (VirtualControlLoopEvent) this.onset;
+ if (this.onset.getTarget().equalsIgnoreCase(VSERVER_VSERVER_NAME)) {
+ return virtualOnsetEvent.getAai().get(VSERVER_VSERVER_NAME);
+ } else if (this.onset.getTarget().equalsIgnoreCase(GENERIC_VNF_VNF_ID)) {
+ return virtualOnsetEvent.getAai().get(GENERIC_VNF_VNF_ID);
+ } else if (this.onset.getTarget().equalsIgnoreCase(GENERIC_VNF_VNF_NAME)) {
+ /*
+ * If the onset is enriched with the vnf-id, we don't need an A&AI response
+ */
+ if (virtualOnsetEvent.getAai().containsKey(GENERIC_VNF_VNF_ID)) {
+ return virtualOnsetEvent.getAai().get(GENERIC_VNF_VNF_ID);
+ }
+
+ /*
+ * If the vnf-name was retrieved from the onset then the vnf-id must be obtained
+ * from the event manager's A&AI GET query
+ */
+ String vnfId = this.eventManager.getVnfResponse().getVnfId();
+ if (vnfId == null) {
+ throw new AaiException("No vnf-id found");
+ }
+ return vnfId;
+ }
+ throw new ControlLoopException("Target does not match target type");
default:
throw new ControlLoopException("The target type is not supported");
}
/**
* Construct a ControlLoopResponse object from actor response and input event.
- *
+ *
* @param response the response from actor
* @param event the input event
*
* guard
* ================================================================================
* Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Tech Mahindra
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// Create the Lock object
//
return new VnfTargetLock(targetType, targetInstance, requestId, callback);
+
+ case VFMODULE:
+ //
+ // Create the Lock object
+ //
+ return new VnfTargetLock(targetType, targetInstance, requestId, callback);
default:
logger.error("invalid target type {} for lock on {}", targetType, targetInstance);
return null;
actor: SO
recipe: VF Module Create
target:
- type: VNF
+ type: VFMODULE
+ modelInvariantId: 90b793b5-b8ae-4c36-b10b-4b6372859d3a
+ modelVersionId: 2210154d-e61a-4d7f-8fb9-0face1aee3f8
+ modelName: SproutScalingVf..scaling_sprout..module-1
+ modelVersion: 1
+ modelCustomizationId: 3e2d67ad-3495-4732-82f6-b0b872791fff
payload:
requestParameters: '{"usePreload":true,"userParams":[]}'
configurationParameters: '[{"ip-addr":"$.vf-module-topology.vf-module-parameters.param[9]","oam-ip-addr":"$.vf-module-topology.vf-module-parameters.param[16]","enabled":"$.vf-module-topology.vf-module-parameters.param[23]"}]'