google-code-export / typica

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

runInstance - SecurityGroup parameter not constructed correctly #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to run an Instance with the Jec2.runInstances method
2  
3.

What is the expected output? What do you see instead?

an instance should be started, but the URL constructed ist incorrect

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

current svn

Please provide any additional information below.

The runInstance method of Jec2 doesn´t construct the URL parameters for
Security Groups correctly.

For Security Groups a paramter "n" instead of "SecurityGroup.n" is
constructed. 

The following patch corrects this issue:

 mo@slartibartfast:~/typicasvn$ svn diff
Index: java/com/xerox/amazonws/ec2/Jec2.java
===================================================================
--- java/com/xerox/amazonws/ec2/Jec2.java       (revision 51)
+++ java/com/xerox/amazonws/ec2/Jec2.java       (working copy)
@@ -398,7 +398,7 @@
                        params.put("KeyName", keyName);
                }
                for (int i=0 ; i<groupSet.size(); i++) {
-                       params.put(""+(i+1), groupSet.get(i));
+                       params.put("SecurityGroup."+(i+1), groupSet.get(i));
                }

                try {

Original issue reported on code.google.com by xnix...@gmail.com on 13 Jun 2007 at 12:33

GoogleCodeExporter commented 9 years ago
The pdf documentation has a flaw and I should have caught that. I saw this same 
thing
in other cases. It said the param was "n", whereas the html documentation has
"SecurityGroup.n". So, I've fixed it and will check this in as soon as I finish
testing the logger changes.

Original comment by dkavan...@gmail.com on 14 Jun 2007 at 2:10

GoogleCodeExporter commented 9 years ago

Original comment by dkavan...@gmail.com on 18 Jun 2007 at 5:36