mirror of https://github.com/apache/jclouds.git
Issue 27: adjusted for incorrect 0.0.0.0 ips and inconsistent timestamp formats in eucalyptus
This commit is contained in:
parent
4b91eb6046
commit
ca64722a0f
|
@ -132,6 +132,9 @@ public abstract class BaseReservationHandler<T> extends HandlerWithResult<T> {
|
||||||
amiLaunchIndex = currentOrNull();
|
amiLaunchIndex = currentOrNull();
|
||||||
} else if (qName.equals("dnsName")) {
|
} else if (qName.equals("dnsName")) {
|
||||||
dnsName = currentOrNull();
|
dnsName = currentOrNull();
|
||||||
|
// Eucalyptus
|
||||||
|
if ("0.0.0.0".equals(dnsName))
|
||||||
|
dnsName = null;
|
||||||
} else if (qName.equals("imageId")) {
|
} else if (qName.equals("imageId")) {
|
||||||
imageId = currentOrNull();
|
imageId = currentOrNull();
|
||||||
} else if (qName.equals("instanceId")) {
|
} else if (qName.equals("instanceId")) {
|
||||||
|
@ -147,7 +150,12 @@ public abstract class BaseReservationHandler<T> extends HandlerWithResult<T> {
|
||||||
} else if (qName.equals("keyName")) {
|
} else if (qName.equals("keyName")) {
|
||||||
keyName = currentOrNull();
|
keyName = currentOrNull();
|
||||||
} else if (qName.equals("launchTime")) {
|
} else if (qName.equals("launchTime")) {
|
||||||
|
try {
|
||||||
launchTime = dateService.iso8601DateParse(currentOrNull());
|
launchTime = dateService.iso8601DateParse(currentOrNull());
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
// Eucalyptus
|
||||||
|
launchTime = dateService.iso8601SecondsDateParse(currentOrNull());
|
||||||
|
}
|
||||||
} else if (qName.equals("enabled")) {
|
} else if (qName.equals("enabled")) {
|
||||||
monitoring = Boolean.parseBoolean(currentOrNull());
|
monitoring = Boolean.parseBoolean(currentOrNull());
|
||||||
} else if (qName.equals("availabilityZone")) {
|
} else if (qName.equals("availabilityZone")) {
|
||||||
|
@ -156,6 +164,9 @@ public abstract class BaseReservationHandler<T> extends HandlerWithResult<T> {
|
||||||
platform = currentOrNull();
|
platform = currentOrNull();
|
||||||
} else if (qName.equals("privateDnsName")) {
|
} else if (qName.equals("privateDnsName")) {
|
||||||
privateDnsName = currentOrNull();
|
privateDnsName = currentOrNull();
|
||||||
|
// Eucalyptus
|
||||||
|
if ("0.0.0.0".equals(privateDnsName))
|
||||||
|
privateDnsName = null;
|
||||||
} else if (qName.equals("privateIpAddress")) {
|
} else if (qName.equals("privateIpAddress")) {
|
||||||
privateIpAddress = currentOrNull();
|
privateIpAddress = currentOrNull();
|
||||||
} else if (qName.equals("ramdiskId")) {
|
} else if (qName.equals("ramdiskId")) {
|
||||||
|
|
|
@ -133,9 +133,9 @@ public class DescribeInstancesResponseHandlerTest extends BaseEC2HandlerTest {
|
||||||
contents.add(new Reservation(defaultRegion, ImmutableSet.of("default"),
|
contents.add(new Reservation(defaultRegion, ImmutableSet.of("default"),
|
||||||
ImmutableSet.of(new RunningInstance(defaultRegion, ImmutableSet
|
ImmutableSet.of(new RunningInstance(defaultRegion, ImmutableSet
|
||||||
.of("jclouds#euc"), "1", null, "emi-9ACB1363", "i-3FFA0762",
|
.of("jclouds#euc"), "1", null, "emi-9ACB1363", "i-3FFA0762",
|
||||||
InstanceState.SHUTTING_DOWN, InstanceType.M1_LARGE,
|
InstanceState.SHUTTING_DOWN, InstanceType.M1_LARGE, null,
|
||||||
"10.7.0.179", "eki-6CBD12F2", "jclouds#euc-17", dateService
|
"eki-6CBD12F2", "jclouds#euc-17", dateService
|
||||||
.iso8601DateParse("2010-06-16T03:06:19.771Z"), false,
|
.iso8601DateParse("2010-06-16T03:06:19.000Z"), false,
|
||||||
"open", null, null, "10.7.0.179", ImmutableSet.<String> of(),
|
"open", null, null, "10.7.0.179", ImmutableSet.<String> of(),
|
||||||
"eri-A97113E4", null, null, null,
|
"eri-A97113E4", null, null, null,
|
||||||
RootDeviceType.INSTANCE_STORE, null, ImmutableMap
|
RootDeviceType.INSTANCE_STORE, null, ImmutableMap
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
<DescribeInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2009-11-30/">
|
||||||
|
<requestId>e323d0bd-48a2-401b-aeee-1cbf653bc6db</requestId>
|
||||||
|
<reservationSet>
|
||||||
|
<item>
|
||||||
|
<reservationId>r-4D2A08AD</reservationId>
|
||||||
|
<ownerId>jclouds</ownerId>
|
||||||
|
<groupSet>
|
||||||
|
<item>
|
||||||
|
<groupId>jclouds#euc</groupId>
|
||||||
|
</item>
|
||||||
|
</groupSet>
|
||||||
|
<instancesSet>
|
||||||
|
<item>
|
||||||
|
<instanceId>i-3FFA0762</instanceId>
|
||||||
|
<imageId>emi-9ACB1363</imageId>
|
||||||
|
<instanceState>
|
||||||
|
<code>32</code>
|
||||||
|
<name>shutting-down</name>
|
||||||
|
</instanceState>
|
||||||
|
<privateDnsName>10.7.0.179</privateDnsName>
|
||||||
|
<dnsName>0.0.0.0</dnsName>
|
||||||
|
<keyName>jclouds#euc-17</keyName>
|
||||||
|
<amiLaunchIndex>1</amiLaunchIndex>
|
||||||
|
<productCodes />
|
||||||
|
<instanceType>m1.large</instanceType>
|
||||||
|
<launchTime>2010-06-16T03:06:19Z</launchTime>
|
||||||
|
<placement>
|
||||||
|
<availabilityZone>open</availabilityZone>
|
||||||
|
</placement>
|
||||||
|
<kernelId>eki-6CBD12F2</kernelId>
|
||||||
|
<ramdiskId>eri-A97113E4</ramdiskId>
|
||||||
|
<monitoring>
|
||||||
|
<state>false</state>
|
||||||
|
</monitoring>
|
||||||
|
</item>
|
||||||
|
</instancesSet>
|
||||||
|
</item>
|
||||||
|
</reservationSet>
|
||||||
|
</DescribeInstancesResponse>
|
Loading…
Reference in New Issue