mirror of https://github.com/apache/jclouds.git
mapped eucalypus invalid instance state of shutdown to terminated
This commit is contained in:
parent
d2b145b470
commit
d743f72ae5
|
@ -145,7 +145,14 @@ public abstract class BaseReservationHandler<T> extends HandlerForGeneratedReque
|
||||||
} else if (qName.equals("instanceId")) {
|
} else if (qName.equals("instanceId")) {
|
||||||
instanceId = currentOrNull();
|
instanceId = currentOrNull();
|
||||||
} else if (qName.equals("name")) {
|
} else if (qName.equals("name")) {
|
||||||
instanceState = InstanceState.fromValue(currentOrNull());
|
String state = currentOrNull();
|
||||||
|
if (state != null) {
|
||||||
|
// Eucalyptus
|
||||||
|
if ("shutdown".equalsIgnoreCase(state))
|
||||||
|
instanceState = InstanceState.TERMINATED;
|
||||||
|
else
|
||||||
|
instanceState = InstanceState.fromValue(state);
|
||||||
|
}
|
||||||
} else if (qName.equals("instanceType")) {
|
} else if (qName.equals("instanceType")) {
|
||||||
instanceType = currentOrNull();
|
instanceType = currentOrNull();
|
||||||
} else if (qName.equals("ipAddress")) {
|
} else if (qName.equals("ipAddress")) {
|
||||||
|
|
|
@ -138,7 +138,7 @@ public class DescribeInstancesResponseHandlerTest extends BaseEC2HandlerTest {
|
||||||
|
|
||||||
contents.add(new Reservation<RunningInstance>(defaultRegion, ImmutableSet.of("default"), ImmutableSet
|
contents.add(new Reservation<RunningInstance>(defaultRegion, ImmutableSet.of("default"), ImmutableSet
|
||||||
.of(new RunningInstance(defaultRegion, ImmutableSet.<String> of(), "0", null, "ami-h30p5im0",
|
.of(new RunningInstance(defaultRegion, ImmutableSet.<String> of(), "0", null, "ami-h30p5im0",
|
||||||
"i-9slweygo", InstanceState.RUNNING, InstanceType.M1_SMALL, null, null, "nebulatanimislam",
|
"i-9slweygo", InstanceState.TERMINATED, InstanceType.M1_SMALL, null, null, "nebulatanimislam",
|
||||||
dateService.iso8601SecondsDateParse("2010-09-09T18:09:42Z"), null, null, null, "paravirtual",
|
dateService.iso8601SecondsDateParse("2010-09-09T18:09:42Z"), null, null, null, "paravirtual",
|
||||||
null, null, "10.128.207.5", ImmutableSet.<String> of("None"), null, null, null, null, null,
|
null, null, "10.128.207.5", ImmutableSet.<String> of("None"), null, null, null, null, null,
|
||||||
RootDeviceType.INSTANCE_STORE, null, ImmutableMap.<String, EbsBlockDevice> of())), "tislam1",
|
RootDeviceType.INSTANCE_STORE, null, ImmutableMap.<String, EbsBlockDevice> of())), "tislam1",
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<imageId>ami-h30p5im0</imageId>
|
<imageId>ami-h30p5im0</imageId>
|
||||||
<instanceState>
|
<instanceState>
|
||||||
<code>1</code>
|
<code>1</code>
|
||||||
<name>running</name>
|
<name>shutdown</name>
|
||||||
</instanceState>
|
</instanceState>
|
||||||
<keyName>nebulatanimislam</keyName>
|
<keyName>nebulatanimislam</keyName>
|
||||||
<publicDnsName>10.128.207.5</publicDnsName>
|
<publicDnsName>10.128.207.5</publicDnsName>
|
||||||
|
|
Loading…
Reference in New Issue