/*
* ============LICENSE_START=======================================================
* Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
update.setName(NetworkUtil.getHostname());
update.setPdpGroup("A");
update.setPdpSubgroup("a");
- update.setPolicies(List.of());
update.setPoliciesToBeDeployed(policiesToDeploy);
update.setPoliciesToBeUndeployed(fsm.getPolicyIds(policiesToUndeploy));
return update;
// undeploy operational.restart policy
- update.setPolicies(List.of());
update.setPoliciesToBeDeployed(List.of());
update.setPoliciesToBeUndeployed(List.of(toscaPolicyRestartV1.getIdentifier()));
assertTrue(fsm.update(update));
// redeploy operational.restart policy
- update.setPolicies(List.of());
update.setPoliciesToBeUndeployed(List.of());
update.setPoliciesToBeDeployed(List.of(toscaPolicyRestartV1));
assertTrue(fsm.update(update));
getExamplesPolicy("policies/vCPE.policy.operational.input.tosca.json", "operational.restart");
toscaPolicyRestartV2.setVersion("2.0.0");
toscaPolicyRestartV2.getProperties().put("controllerName", "lifecycle");
- update.setPolicies(List.of());
update.setPoliciesToBeUndeployed(List.of(toscaPolicyRestartV1.getIdentifier()));
update.setPoliciesToBeDeployed(List.of(toscaPolicyRestartV2));
assertTrue(fsm.update(update));
ToscaPolicy toscaPolicyFirewall =
getExamplesPolicy("policies/vFirewall.policy.operational.input.tosca.json", "operational.modifyconfig");
toscaPolicyFirewall.getProperties().put("controllerName", "lifecycle");
- update.setPolicies(List.of());
update.setPoliciesToBeUndeployed(List.of());
update.setPoliciesToBeDeployed(List.of(toscaPolicyRestartV2, toscaPolicyFirewall));
assertTrue(fsm.update(update));
long interval = 10 * originalInterval;
update.setPdpHeartbeatIntervalMs(interval * 1000L);
- update.setPolicies(List.of());
update.setPoliciesToBeUndeployed(List.of());
update.setPoliciesToBeDeployed(List.of());
assertTrue(fsm.update(update));
String badIntegerPolicy =
Files.readString(Paths.get(POLICY_COMPLIANT_VCPE_BAD_INTEGER_JSON), StandardCharsets.UTF_8);
ToscaPolicy toscaPolicyRestartBad = new StandardCoder().decode(badIntegerPolicy, ToscaPolicy.class);
- update.setPolicies(List.of());
update.setPoliciesToBeUndeployed(List.of(toscaPolicyRestartV2.getIdentifier(),
toscaPolicyFirewall.getIdentifier()));
update.setPoliciesToBeDeployed(List.of(toscaPolicyRestartBad));
* ONAP
* ================================================================================
* Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
update.setName(NetworkUtil.getHostname());
update.setPdpGroup("A");
update.setPdpSubgroup("a");
- update.setPolicies(Collections.emptyList());
+ update.setPoliciesToBeDeployed(Collections.emptyList());
update.setPdpHeartbeatIntervalMs(4 * 600000L);
assertFalse(fsm.update(update));