Permalink
Browse files

RunInstancesRequest: resurrect deprecated AddressingType parameter (e…

…ucalyptus still use it)
  • Loading branch information...
1 parent 3b4ff66 commit ea426f5b0fa9c3ae86a586f9fa741a8577a037c4 @sievlev sievlev committed May 19, 2010
@@ -142,6 +142,11 @@
private String instanceInitiatedShutdownBehavior;
/**
+ * Specifies whether the instance will have a public address
+ */
+ private String addressingType;
+
+ /**
* Unique ID of a machine image, returned by a call to DescribeImages.
*
* @return Unique ID of a machine image, returned by a call to DescribeImages.
@@ -828,7 +833,19 @@ public RunInstancesRequest withInstanceInitiatedShutdownBehavior(String instance
this.instanceInitiatedShutdownBehavior = instanceInitiatedShutdownBehavior;
return this;
}
-
+
+ public String getAddressingType() {
+ return addressingType;
+ }
+
+ public void setAddressingType(String addressingType) {
+ this.addressingType = addressingType;
+ }
+
+ public RunInstancesRequest withAddressingType(String addressingType) {
+ this.addressingType = addressingType;
+ return this;
+ }
@Override
public String toString() {
@@ -153,7 +153,11 @@
request.addParameter("InstanceInitiatedShutdownBehavior", StringUtils.fromString(runInstancesRequest.getInstanceInitiatedShutdownBehavior()));
}
}
-
+ if (runInstancesRequest != null) {
+ if (runInstancesRequest.getAddressingType() != null) {
+ request.addParameter("AddressingType", StringUtils.fromString(runInstancesRequest.getAddressingType()));
+ }
+ }
return request;
}

0 comments on commit ea426f5

Please sign in to comment.