use of org.openstack4j.model.heat.AdoptStackData in project openstack4j by ContainX.
the class StackServiceTests method testAbandonStack.
public void testAbandonStack() throws Exception {
respondWith(JSON_ABANDON);
AdoptStackData adoptStackData = osv3().heat().stacks().abandon("stack_123", "416c09e9-2022-4d43-854b-0292ddff3f5d");
takeRequest();
assertEquals(adoptStackData.getName(), "stack_123");
assertEquals(adoptStackData.getStatus(), "COMPLETE");
final Map<String, Object> portResource = adoptStackData.getResources().get("network_port");
assertEquals(portResource.get("type"), "OS::Neutron::Port");
}
use of org.openstack4j.model.heat.AdoptStackData in project openstack4j by ContainX.
the class StackServiceTests method testAdoptStack.
public void testAdoptStack() throws Exception {
respondWith(JSON_ADOPT);
AdoptStackData adoptStackData = new ObjectMapper().readValue(getResource(JSON_ABANDON), HeatAdoptStackData.class);
Stack adoptedStack = osv3().heat().stacks().adopt(adoptStackData, new HashMap<String, String>(), false, 30L, null);
takeRequest();
assertEquals(adoptedStack.getId(), "79370050-6038-4ea2-baaa-3e4706d59e0e");
}
Aggregations