rajatdt / typica

Automatically exported from code.google.com/p/typica
Apache License 2.0
0 stars 0 forks source link

No Access to the start Field of a ReservedInstances object #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What is the expected output? What do you see instead?

A date field called start that represents the start of the term of the reserved 
instance in question. 
This value is part of the returned SOAP for each instance.

What version of the product are you using? On what operating system?
1.6

Please provide any additional information below.

Original issue reported on code.google.com by george.r...@gtempaccount.com on 23 Sep 2009 at 5:08

GoogleCodeExporter commented 9 years ago
This is the launch time, right? That is available in the 
ReservationDescription.Instance object.

Original comment by dkavan...@gmail.com on 13 Oct 2009 at 1:39

GoogleCodeExporter commented 9 years ago
No, this is for reserved instances. Not for instances.

Here's the patch:

Index: java/com/xerox/amazonws/ec2/ReservedInstances.java
===================================================================
--- java/com/xerox/amazonws/ec2/ReservedInstances.java  (revision 280)
+++ java/com/xerox/amazonws/ec2/ReservedInstances.java  (working copy)
@@ -17,24 +17,32 @@

package com.xerox.amazonws.ec2;

+import java.util.Calendar;
+
public class ReservedInstances extends ProductDescription {
+    private Calendar start;
    private int instanceCount;
    private String state;

    public ReservedInstances(String reservedInstancesId, InstanceType instanceType,
                        String availabilityZone, long duration, double fixedPrice,
                        double usagePrice, String productDescription, int instanceCount,
-                       String state) {
+                             String state, Calendar start) {
        super(reservedInstancesId, instanceType, availabilityZone,
                duration, fixedPrice, usagePrice, productDescription);
        this.instanceCount = instanceCount;
        this.state = state;
+        this.start = start;
    }

    public int getInstanceCount() {
        return instanceCount;
    }

+    public Calendar getStart() {
+        return start;
+    }
+
    public String getState() {
        return state;
    }
Index: java/com/xerox/amazonws/ec2/Jec2.java
===================================================================
--- java/com/xerox/amazonws/ec2/Jec2.java   (revision 280)
+++ java/com/xerox/amazonws/ec2/Jec2.java   (working copy)
@@ -1858,8 +1858,8 @@
                            InstanceType.getTypeFromString(type.getInstanceType()),
                            type.getAvailabilityZone(),
                            type.getDuration(), type.getFixedPrice(), type.getUsagePrice(),
-                           type.getProductDescription(),
-                           type.getInstanceCount().intValue(), type.getState()));
+                                              type.getProductDescription(),
+                                              
type.getInstanceCount().intValue(), type.getState(), 
type.getStart().toGregorianCalendar()));
            }
            return ret;
        } finally {

Original comment by george.r...@gtempaccount.com on 13 Oct 2009 at 1:43

GoogleCodeExporter commented 9 years ago
Thanks. I've checked in the change in SVN r291

Original comment by dkavan...@gmail.com on 13 Oct 2009 at 11:26