* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
StringBuilder str = new StringBuilder(getClient().getBaseUrl());
- String target = getProperty(OperationProperties.AAI_TARGET_ENTITY);
+ String target = getRequiredProperty(OperationProperties.AAI_TARGET_ENTITY, "target entity");
String path = getPath() + URI_SEP + URLEncoder.encode(target, StandardCharsets.UTF_8);
WebTarget web = getClient().getWebTarget().path(path);
str.append(path);
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
WebTarget web = getClient().getWebTarget().path(path);
str.append(path);
- String target = getProperty(OperationProperties.AAI_TARGET_ENTITY);
+ String target = getRequiredProperty(OperationProperties.AAI_TARGET_ENTITY, "target entity");
web = addQuery(web, str, "?", "search-node-type", "vserver");
web = addQuery(web, str, "&", "filter", "vserver-name:EQUALS:" + target);
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.controlloop.actor.aai;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
assertEquals(OperationResult.FAILURE, future2.get().getResult());
}
+ /**
+ * Tests startOperationAsync() when a property is missing.
+ */
+ @Test
+ public void testStartOperationAsyncMissingProperty() throws Exception {
+ oper = new AaiGetPnfOperation(params, config);
+
+ oper.generateSubRequestId(1);
+ outcome.setSubRequestId(oper.getSubRequestId());
+
+ assertThatIllegalStateException().isThrownBy(() -> oper.startOperationAsync(1, outcome))
+ .withMessageContaining("missing target entity");
+ }
+
@Test
public void testGetKey() {
assertEquals("AAI.Pnf." + TARGET_ENTITY, AaiGetPnfOperation.getKey(TARGET_ENTITY));
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.controlloop.actor.aai;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
assertEquals(OperationResult.FAILURE, future2.get().getResult());
}
+ /**
+ * Tests startOperationAsync() when a property is missing.
+ */
+ @Test
+ public void testStartOperationAsyncMissingProperty() throws Exception {
+ oper = new AaiGetTenantOperation(params, config);
+
+ oper.generateSubRequestId(1);
+ outcome.setSubRequestId(oper.getSubRequestId());
+
+ assertThatIllegalStateException().isThrownBy(() -> oper.startOperationAsync(1, outcome))
+ .withMessageContaining("missing target entity");
+ }
+
@Test
public void testGetKey() {
assertEquals("AAI.Tenant." + TARGET_ENTITY, AaiGetTenantOperation.getKey(TARGET_ENTITY));
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Action Identifiers are required for APPC LCM requests. For R1, the recipes
* supported by Policy only require a vnf-id.
*/
- String target = getProperty(OperationProperties.AAI_TARGET_ENTITY);
+ String target = getRequiredProperty(OperationProperties.AAI_TARGET_ENTITY, "target entity");
inputRequest.setActionIdentifiers(Map.of(VNF_ID_KEY, target));
/*
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
+import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
assertEquals(subreq, request.getBody().getInput().getCommonHeader().getSubRequestId());
}
+ /**
+ * Tests makeRequest() when a property is missing.
+ */
+ @Test
+ public void testMakeRequestMissingProperty() throws Exception {
+ oper = new AppcLcmOperation(params, config);
+ oper.generateSubRequestId(1);
+
+ assertThatIllegalStateException().isThrownBy(() -> oper.makeRequest(1))
+ .withMessageContaining("missing target entity");
+ }
+
@Test
public void testConvertPayload() {
// only builds a payload for ConfigModify
}
};
+ oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, TARGET_ENTITY);
oper.generateSubRequestId(2);
- assertThatThrownBy(() -> oper.makeRequest(2)).isInstanceOf(NullPointerException.class);
+ assertThatIllegalArgumentException().isThrownBy(() -> oper.makeRequest(2))
+ .withMessageContaining("Cannot convert payload");
}
@Test
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
SdncHealVfModuleParameter bandwidth = new SdncHealVfModuleParameter();
bandwidth.setName(BANDWIDTH);
- bandwidth.setValue(getProperty(OperationProperties.ENRICHMENT_BANDWIDTH));
+ bandwidth.setValue(getRequiredProperty(OperationProperties.ENRICHMENT_BANDWIDTH,
+ "bandwidth from enrichment data"));
SdncHealVfModuleParameter timeStamp = new SdncHealVfModuleParameter();
timeStamp.setName(BANDWIDTH_CHANGE_TIME);
- timeStamp.setValue(getProperty(OperationProperties.ENRICHMENT_BANDWIDTH_CHANGE_TIME));
+ timeStamp.setValue(getRequiredProperty(OperationProperties.ENRICHMENT_BANDWIDTH_CHANGE_TIME,
+ "bandwidth change time from enrichment data"));
SdncHealVfModuleParametersInfo vfParametersInfo = new SdncHealVfModuleParametersInfo();
vfParametersInfo.addParameters(bandwidth);
request.setUrl("/" + getPath());
SdncHealVnfInfo vnfInfo = new SdncHealVnfInfo();
- vnfInfo.setVnfId(getProperty(OperationProperties.ENRICHMENT_VNF_ID));
+ vnfInfo.setVnfId(getRequiredProperty(OperationProperties.ENRICHMENT_VNF_ID, "VNF id from enrichment data"));
SdncHealVfModuleInfo vfModuleInfo = new SdncHealVfModuleInfo();
vfModuleInfo.setVfModuleId("");
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.controlloop.actor.sdnc;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
verifyRequest("bod.json", verifyOperation(oper), IGNORE_FIELDS);
}
+
+ /*
+ * Tests makeRequest() when a property is missing.
+ */
+
+ @Test
+ public void testMakeRequestMissingBandwidth() throws Exception {
+ oper = new BandwidthOnDemandOperation(params, config);
+ oper.setProperty(OperationProperties.ENRICHMENT_SERVICE_ID, MY_SERVICE);
+ oper.setProperty(OperationProperties.ENRICHMENT_BANDWIDTH_CHANGE_TIME, MY_CHANGE_TIME);
+ oper.setProperty(OperationProperties.ENRICHMENT_VNF_ID, MY_VNF);
+
+ oper.generateSubRequestId(1);
+ outcome.setSubRequestId(oper.getSubRequestId());
+
+ assertThatIllegalStateException().isThrownBy(() -> oper.makeRequest(1))
+ .withMessageContaining("missing bandwidth from enrichment data");
+ }
+
+ @Test
+ public void testMakeRequestMissingBandwidthChangeTime() throws Exception {
+ oper = new BandwidthOnDemandOperation(params, config);
+ oper.setProperty(OperationProperties.ENRICHMENT_SERVICE_ID, MY_SERVICE);
+ oper.setProperty(OperationProperties.ENRICHMENT_BANDWIDTH, MY_BANDWIDTH);
+ oper.setProperty(OperationProperties.ENRICHMENT_VNF_ID, MY_VNF);
+
+ oper.generateSubRequestId(1);
+ outcome.setSubRequestId(oper.getSubRequestId());
+
+ assertThatIllegalStateException().isThrownBy(() -> oper.makeRequest(1))
+ .withMessageContaining("missing bandwidth change time from enrichment data");
+ }
+
+ @Test
+ public void testMakeRequestMissingVnfId() throws Exception {
+ oper = new BandwidthOnDemandOperation(params, config);
+ oper.setProperty(OperationProperties.ENRICHMENT_SERVICE_ID, MY_SERVICE);
+ oper.setProperty(OperationProperties.ENRICHMENT_BANDWIDTH, MY_BANDWIDTH);
+ oper.setProperty(OperationProperties.ENRICHMENT_BANDWIDTH_CHANGE_TIME, MY_CHANGE_TIME);
+
+ oper.generateSubRequestId(1);
+ outcome.setSubRequestId(oper.getSubRequestId());
+
+ assertThatIllegalStateException().isThrownBy(() -> oper.makeRequest(1))
+ .withMessageContaining("missing VNF id from enrichment data");
+ }
}
* ============LICENSE_START=======================================================
* SdnrOperation
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
requestCommonHeader.setSubRequestId(subRequestId);
sdnrRequest.setCommonHeader(requestCommonHeader);
- sdnrRequest.setPayload(getProperty(OperationProperties.EVENT_PAYLOAD));
+ sdnrRequest.setPayload(getRequiredProperty(OperationProperties.EVENT_PAYLOAD, "event payload"));
sdnrRequest.setAction(params.getOperation());
/*
* ============LICENSE_START=======================================================
* SdnrOperation
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.controlloop.actor.sdnr;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
super.setUp();
operation = new SdnrOperation(params, config);
+ operation.setProperty(OperationProperties.EVENT_PAYLOAD, "my payload");
}
@After
assertEquals(params.getRequestId(), header.getRequestId());
}
+ /**
+ * Tests makeRequest() when a property is missing.
+ */
+ @Test
+ public void testMakeRequestMissingProperty() throws Exception {
+ operation = new SdnrOperation(params, config);
+
+ operation.generateSubRequestId(1);
+ outcome.setSubRequestId(operation.getSubRequestId());
+
+ assertThatIllegalStateException().isThrownBy(() -> operation.makeRequest(1))
+ .withMessageContaining("missing event payload");
+ }
+
@Test
public void testGetExpectedKeyValues() {
operation.generateSubRequestId(1);
params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).build();
operation = new SdnrOperation(params, config);
+ operation.setProperty(OperationProperties.EVENT_PAYLOAD, "my payload");
outcome = operation.start().get();
assertEquals(OperationResult.SUCCESS, outcome.getResult());
* ONAP
* ================================================================================
* Copyright (C) 2020 Wipro Limited.
+ * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
return handleResponse(outcome, url, callback -> getClient().put(callback, path, entity, headers));
}
- private SoRequest3gpp makeRequest() {
+ protected SoRequest3gpp makeRequest() {
- String payload = getProperty(OperationProperties.EVENT_PAYLOAD);
+ String payload = getRequiredProperty(OperationProperties.EVENT_PAYLOAD, "event payload");
try {
return getCoder().convert(payload, SoRequest3gpp.class);
} catch (CoderException e) {
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2020 Wipro Limited.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
*/
protected SoCloudConfiguration constructCloudConfiguration(Tenant tenantItem, CloudRegion cloudRegionItem) {
SoCloudConfiguration cloudConfiguration = new SoCloudConfiguration();
- cloudConfiguration.setTenantId(tenantItem.getTenantId());
- cloudConfiguration.setLcpCloudRegionId(cloudRegionItem.getCloudRegionId());
+ cloudConfiguration.setTenantId(getRequiredText("tenant ID", tenantItem.getTenantId()));
+ cloudConfiguration.setLcpCloudRegionId(getRequiredText("cloud region ID", cloudRegionItem.getCloudRegionId()));
return cloudConfiguration;
}
+ /**
+ * Verifies that a value is not {@code null}.
+ *
+ * @param name value name
+ * @param value value to check
+ * @return the value
+ */
+ protected String getRequiredText(String name, String value) {
+ if (value == null) {
+ throw new IllegalArgumentException("missing " + name);
+ }
+
+ return value;
+ }
+
/**
* Create simple HTTP headers for unauthenticated requests to SO.
*
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2020 Wipro Limited.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
buildConfigurationParameters().ifPresent(request.getRequestDetails()::setConfigurationParameters);
// compute the path
- String path = PATH_PREFIX + vnfServiceItem.getServiceInstanceId() + "/vnfs/" + vnfItem.getVnfId()
- + "/vfModules/scaleOut";
+ String svcId = getRequiredText("service instance ID", vnfServiceItem.getServiceInstanceId());
+ String path = PATH_PREFIX + svcId + "/vnfs/" + vnfItem.getVnfId() + "/vfModules/scaleOut";
return Pair.of(path, request);
}
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2020 Wipro Limited.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
*/
// compute the path
- String path = PATH_PREFIX + vnfServiceItem.getServiceInstanceId() + "/vnfs/" + vnfItem.getVnfId()
- + "/vfModules/null";
+ String svcId = getRequiredText("service instance ID", vnfServiceItem.getServiceInstanceId());
+ String path = PATH_PREFIX + svcId + "/vnfs/" + vnfItem.getVnfId() + "/vfModules/null";
return Pair.of(path, request);
}
* ONAP
* ================================================================================
* Copyright (C) 2020 Wipro Limited.
- * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
+import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
return ResourceUtils.getResourceAsString("src/test/resources/ModifyNSSI.json");
}
+ /**
+ * Tests makeRequest() when a property is missing.
+ */
+ @Test
+ public void testMakeRequestMissingProperty() throws Exception {
+ oper = new ModifyNssi(params, config);
+
+ assertThatIllegalStateException().isThrownBy(() -> oper.makeRequest())
+ .withMessageContaining("missing event payload");
+ }
}
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2020 Wipro Limited.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
import java.util.Map;
import org.junit.Before;
import org.junit.Test;
+import org.onap.aai.domain.yang.CloudRegion;
+import org.onap.aai.domain.yang.Tenant;
import org.onap.policy.common.utils.coder.Coder;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.controlloop.ControlLoopOperation;
assertTrue(oper.buildConfigurationParameters().isEmpty());
}
+ @Test
+ public void testConstructCloudConfiguration() throws Exception {
+ Tenant tenantItem = new Tenant();
+ tenantItem.setTenantId("my-tenant-id");
+
+ CloudRegion cloudRegionItem = new CloudRegion();
+ cloudRegionItem.setCloudRegionId("my-cloud-id");
+
+ assertThatCode(() -> oper.constructCloudConfiguration(tenantItem, cloudRegionItem)).doesNotThrowAnyException();
+
+ tenantItem.setTenantId(null);
+ assertThatIllegalArgumentException()
+ .isThrownBy(() -> oper.constructCloudConfiguration(tenantItem, cloudRegionItem))
+ .withMessageContaining("missing tenant ID");
+ tenantItem.setTenantId("my-tenant-id");
+
+ cloudRegionItem.setCloudRegionId(null);
+ assertThatIllegalArgumentException()
+ .isThrownBy(() -> oper.constructCloudConfiguration(tenantItem, cloudRegionItem))
+ .withMessageContaining("missing cloud region ID");
+ cloudRegionItem.setCloudRegionId("my-cloud-id");
+ }
+
+ @Test
+ public void testGetRequiredText() throws Exception {
+
+ assertThatCode(() -> oper.getRequiredText("some value", "my value")).doesNotThrowAnyException();
+
+ assertThatIllegalArgumentException().isThrownBy(() -> oper.getRequiredText("some value", null))
+ .withMessageContaining("missing some value");
+ }
+
@Test
public void testGetCoder() throws CoderException {
Coder opcoder = oper.getCoder();
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2020 Wipro Limited.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
verifyRequest("vfModuleCreate.json", pair.getRight());
}
+ /**
+ * Tests makeRequest() when a property is missing.
+ */
+ @Test
+ public void testMakeRequestMissingProperty() throws Exception {
+ loadProperties();
+
+ ServiceInstance instance = new ServiceInstance();
+ oper.setProperty(OperationProperties.AAI_SERVICE, instance);
+
+ assertThatIllegalArgumentException().isThrownBy(() -> oper.makeRequest())
+ .withMessageContaining("missing service instance ID");
+ }
+
private void loadProperties() {
// set the properties
ServiceInstance instance = new ServiceInstance();
vnf.setVnfId(VNF_ID);
oper.setProperty(OperationProperties.AAI_VNF, vnf);
- oper.setProperty(OperationProperties.AAI_DEFAULT_CLOUD_REGION, new CloudRegion());
- oper.setProperty(OperationProperties.AAI_DEFAULT_TENANT, new Tenant());
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setCloudRegionId("my-cloud-id");
+ oper.setProperty(OperationProperties.AAI_DEFAULT_CLOUD_REGION, cloudRegion);
+
+ Tenant tenant = new Tenant();
+ tenant.setTenantId("my-tenant-id");
+ oper.setProperty(OperationProperties.AAI_DEFAULT_TENANT, tenant);
oper.setProperty(OperationProperties.DATA_VF_COUNT, VF_COUNT);
}
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2020 Wipro Limited.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
assertEquals("Basic " + encoded, valueCaptor.getValue());
}
+ /**
+ * Tests makeRequest() when a property is missing.
+ */
+ @Test
+ public void testMakeRequestMissingProperty() throws Exception {
+ loadProperties();
+
+ ServiceInstance instance = new ServiceInstance();
+ oper.setProperty(OperationProperties.AAI_SERVICE, instance);
+
+ assertThatIllegalArgumentException().isThrownBy(() -> oper.makeRequest())
+ .withMessageContaining("missing service instance ID");
+ }
+
@Test
public void testMakeHttpClient() {
// must use a real operation to invoke this method
vnf.setVnfId(VNF_ID);
oper.setProperty(OperationProperties.AAI_VNF, vnf);
- oper.setProperty(OperationProperties.AAI_DEFAULT_CLOUD_REGION, new CloudRegion());
- oper.setProperty(OperationProperties.AAI_DEFAULT_TENANT, new Tenant());
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setCloudRegionId("my-cloud-id");
+ oper.setProperty(OperationProperties.AAI_DEFAULT_CLOUD_REGION, cloudRegion);
+
+ Tenant tenant = new Tenant();
+ tenant.setTenantId("my-tenant-id");
+ oper.setProperty(OperationProperties.AAI_DEFAULT_TENANT, tenant);
oper.setProperty(OperationProperties.DATA_VF_COUNT, VF_COUNT);
}
"modelVersion": "my-model-version",
"modelCustomizationId": "my-model-customization-id"
},
- "cloudConfiguration": {},
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "my-cloud-id",
+ "tenantId": "my-tenant-id"
+ },
"requestInfo": {
"source": "POLICY",
"suppressRollback": false,
"modelVersion": "my-model-version",
"modelCustomizationId": "my-model-customization-id"
},
- "cloudConfiguration": {},
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "my-cloud-id",
+ "tenantId": "my-tenant-id"
+ },
"requestInfo": {
"instanceName": "vfModuleName",
"source": "POLICY",