EMMA Coverage Report (generated Fri Aug 26 14:14:05 EDT 2011)
[all classes][org.jclouds.ec2.compute.options]

COVERAGE SUMMARY FOR SOURCE FILE [EC2TemplateOptions.java]

nameclass, %method, %block, %line, %
EC2TemplateOptions.java100% (2/2)46%  (25/54)37%  (254/691)41%  (55.8/136)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class EC2TemplateOptions100% (1/1)46%  (17/37)32%  (166/522)38%  (40/104)
authorizePublicKey (Payload): EC2TemplateOptions 0%   (0/1)0%   (0/7)0%   (0/1)
blockDeviceMappings (Iterable): EC2TemplateOptions 0%   (0/1)0%   (0/10)0%   (0/2)
blockUntilRunning (boolean): EC2TemplateOptions 0%   (0/1)0%   (0/7)0%   (0/1)
clone (): EC2TemplateOptions 0%   (0/1)0%   (0/9)0%   (0/3)
dontAuthorizePublicKey (): EC2TemplateOptions 0%   (0/1)0%   (0/6)0%   (0/1)
hashCode (): int 0%   (0/1)0%   (0/65)0%   (0/8)
installPrivateKey (Payload): EC2TemplateOptions 0%   (0/1)0%   (0/7)0%   (0/1)
mapEBSSnapshotToDeviceName (String, String, Integer, boolean): EC2TemplateOpt... 0%   (0/1)0%   (0/14)0%   (0/2)
mapEphemeralDeviceToDeviceName (String, String): EC2TemplateOptions 0%   (0/1)0%   (0/11)0%   (0/2)
mapNewVolumeToDeviceName (String, int, boolean): EC2TemplateOptions 0%   (0/1)0%   (0/14)0%   (0/2)
nameTask (String): EC2TemplateOptions 0%   (0/1)0%   (0/7)0%   (0/1)
overrideCredentialsWith (Credentials): EC2TemplateOptions 0%   (0/1)0%   (0/7)0%   (0/1)
runAsRoot (boolean): EC2TemplateOptions 0%   (0/1)0%   (0/7)0%   (0/1)
runScript (Payload): EC2TemplateOptions 0%   (0/1)0%   (0/7)0%   (0/1)
runScript (Statement): EC2TemplateOptions 0%   (0/1)0%   (0/7)0%   (0/1)
runScript (byte []): EC2TemplateOptions 0%   (0/1)0%   (0/7)0%   (0/1)
toString (): String 0%   (0/1)0%   (0/34)0%   (0/1)
unmapDeviceNamed (String): EC2TemplateOptions 0%   (0/1)0%   (0/10)0%   (0/2)
userData (byte []): EC2TemplateOptions 0%   (0/1)0%   (0/17)0%   (0/3)
withMetadata (): EC2TemplateOptions 0%   (0/1)0%   (0/6)0%   (0/1)
equals (Object): boolean 100% (1/1)6%   (5/79)8%   (2/25)
copyTo (TemplateOptions): void 100% (1/1)56%  (29/52)64%  (9/14)
<static initializer> 100% (1/1)100% (5/5)100% (1/1)
EC2TemplateOptions (): void 100% (1/1)100% (12/12)100% (5/5)
authorizePublicKey (String): EC2TemplateOptions 100% (1/1)100% (7/7)100% (1/1)
blockOnPort (int, int): EC2TemplateOptions 100% (1/1)100% (8/8)100% (1/1)
getBlockDeviceMappings (): Set 100% (1/1)100% (4/4)100% (1/1)
getGroups (): Set 100% (1/1)100% (3/3)100% (1/1)
getKeyPair (): String 100% (1/1)100% (3/3)100% (1/1)
getUserData (): byte [] 100% (1/1)100% (3/3)100% (1/1)
inboundPorts (int []): EC2TemplateOptions 100% (1/1)100% (7/7)100% (1/1)
installPrivateKey (String): EC2TemplateOptions 100% (1/1)100% (7/7)100% (1/1)
keyPair (String): EC2TemplateOptions 100% (1/1)100% (20/20)100% (5/5)
noKeyPair (): EC2TemplateOptions 100% (1/1)100% (13/13)100% (3/3)
securityGroups (Iterable): EC2TemplateOptions 100% (1/1)100% (28/28)100% (5/5)
securityGroups (String []): EC2TemplateOptions 100% (1/1)100% (5/5)100% (1/1)
shouldAutomaticallyCreateKeyPair (): boolean 100% (1/1)100% (7/7)100% (1/1)
     
class EC2TemplateOptions$Builder100% (1/1)47%  (8/17)52%  (88/169)48%  (16/33)
EC2TemplateOptions$Builder (): void 0%   (0/1)0%   (0/3)0%   (0/1)
blockDeviceMappings (Set): EC2TemplateOptions 0%   (0/1)0%   (0/8)0%   (0/2)
mapEBSSnapshotToDeviceName (String, String, Integer, boolean): EC2TemplateOpt... 0%   (0/1)0%   (0/11)0%   (0/2)
mapEphemeralDeviceToDeviceName (String, String): EC2TemplateOptions 0%   (0/1)0%   (0/9)0%   (0/2)
mapNewVolumeToDeviceName (String, int, boolean): EC2TemplateOptions 0%   (0/1)0%   (0/10)0%   (0/2)
runScript (byte []): EC2TemplateOptions 0%   (0/1)0%   (0/11)0%   (0/2)
unmapDeviceNamed (String): EC2TemplateOptions 0%   (0/1)0%   (0/8)0%   (0/2)
userData (byte []): EC2TemplateOptions 0%   (0/1)0%   (0/11)0%   (0/2)
withDetails (): EC2TemplateOptions 0%   (0/1)0%   (0/10)0%   (0/2)
authorizePublicKey (String): EC2TemplateOptions 100% (1/1)100% (11/11)100% (2/2)
blockOnPort (int, int): EC2TemplateOptions 100% (1/1)100% (12/12)100% (2/2)
inboundPorts (int []): EC2TemplateOptions 100% (1/1)100% (11/11)100% (2/2)
installPrivateKey (String): EC2TemplateOptions 100% (1/1)100% (11/11)100% (2/2)
keyPair (String): EC2TemplateOptions 100% (1/1)100% (11/11)100% (2/2)
noKeyPair (): EC2TemplateOptions 100% (1/1)100% (10/10)100% (2/2)
securityGroups (Iterable): EC2TemplateOptions 100% (1/1)100% (11/11)100% (2/2)
securityGroups (String []): EC2TemplateOptions 100% (1/1)100% (11/11)100% (2/2)

1/**
2 *
3 * Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
4 *
5 * ====================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 * ====================================================================
18 */
19package org.jclouds.ec2.compute.options;
20 
21import static com.google.common.base.Preconditions.checkArgument;
22import static com.google.common.base.Preconditions.checkNotNull;
23import static com.google.common.base.Preconditions.checkState;
24 
25import java.util.Arrays;
26import java.util.Set;
27 
28import javax.annotation.Nullable;
29 
30import org.jclouds.compute.options.TemplateOptions;
31import org.jclouds.domain.Credentials;
32import org.jclouds.ec2.domain.BlockDeviceMapping;
33import org.jclouds.ec2.domain.BlockDeviceMapping.MapEBSSnapshotToDevice;
34import org.jclouds.ec2.domain.BlockDeviceMapping.MapEphemeralDeviceToDevice;
35import org.jclouds.ec2.domain.BlockDeviceMapping.MapNewVolumeToDevice;
36import org.jclouds.ec2.domain.BlockDeviceMapping.UnmapDeviceNamed;
37import org.jclouds.io.Payload;
38import org.jclouds.scriptbuilder.domain.Statement;
39import org.jclouds.util.Preconditions2;
40 
41import com.google.common.collect.ImmutableSet;
42import com.google.common.collect.Iterables;
43 
44/**
45 * Contains options supported in the {@code ComputeService#runNode} operation on the "ec2" provider.
46 * <h2>
47 * Usage</h2> The recommended way to instantiate a EC2TemplateOptions object is to statically import
48 * EC2TemplateOptions.* and invoke a static creation method followed by an instance mutator (if
49 * needed):
50 * <p/>
51 * <code>
52 * import static org.jclouds.aws.ec2.compute.options.EC2TemplateOptions.Builder.*;
53 * <p/>
54 * ComputeService client = // get connection
55 * templateBuilder.options(inboundPorts(22, 80, 8080, 443));
56 * Set<? extends NodeMetadata> set = client.runNodesWithTag(tag, 2, templateBuilder.build());
57 * <code>
58 * 
59 * @author Adrian Cole
60 */
61public class EC2TemplateOptions extends TemplateOptions implements Cloneable {
62   @Override
63   public EC2TemplateOptions clone() {
64      EC2TemplateOptions options = new EC2TemplateOptions();
65      copyTo(options);
66      return options;
67   }
68 
69   @Override
70   public void copyTo(TemplateOptions to) {
71      super.copyTo(to);
72      if (to instanceof EC2TemplateOptions) {
73         EC2TemplateOptions eTo = EC2TemplateOptions.class.cast(to);
74         if (getGroups().size() > 0)
75            eTo.securityGroups(getGroups());
76         if (getKeyPair() != null)
77            eTo.keyPair(getKeyPair());
78         if (getBlockDeviceMappings().size() > 0)
79            eTo.blockDeviceMappings(getBlockDeviceMappings());
80         if (!shouldAutomaticallyCreateKeyPair())
81            eTo.noKeyPair();
82         if (getUserData() != null)
83            eTo.userData(getUserData());
84      }
85   }
86 
87   private Set<String> groupNames = ImmutableSet.of();
88   private String keyPair = null;
89   private boolean noKeyPair;
90   private byte[] userData;
91   private ImmutableSet.Builder<BlockDeviceMapping> blockDeviceMappings = ImmutableSet.<BlockDeviceMapping> builder();
92 
93   public static final EC2TemplateOptions NONE = new EC2TemplateOptions();
94 
95   /**
96    * 
97    * @see EC2TemplateOptions#securityGroups(Iterable<String>)
98    */
99   public EC2TemplateOptions securityGroups(String... groupNames) {
100      return securityGroups(ImmutableSet.copyOf(groupNames));
101   }
102 
103   /**
104    * Specifies the security groups to be used for nodes with this template
105    */
106   public EC2TemplateOptions securityGroups(Iterable<String> groupNames) {
107      checkArgument(Iterables.size(groupNames) > 0, "you must specify at least one security group");
108      for (String groupId : groupNames)
109         Preconditions2.checkNotEmpty(groupId, "all security groups must be non-empty");
110      this.groupNames = ImmutableSet.copyOf(groupNames);
111      return this;
112   }
113 
114   /**
115    * Unencoded data
116    */
117   public EC2TemplateOptions userData(byte[] unencodedData) {
118      checkArgument(checkNotNull(unencodedData, "unencodedData").length <= 16 * 1024,
119            "userData cannot be larger than 16kb");
120      this.userData = unencodedData;
121      return this;
122   }
123 
124   /**
125    * Specifies the keypair used to run instances with
126    */
127   public EC2TemplateOptions keyPair(String keyPair) {
128      checkNotNull(keyPair, "use noKeyPair option to request boot without a keypair");
129      checkState(!noKeyPair, "you cannot specify both options keyPair and noKeyPair");
130      Preconditions2.checkNotEmpty(keyPair, "keypair must be non-empty");
131      this.keyPair = keyPair;
132      return this;
133   }
134 
135   /**
136    * Do not use a keypair on instances
137    */
138   public EC2TemplateOptions noKeyPair() {
139      checkState(keyPair == null, "you cannot specify both options keyPair and noKeyPair");
140      this.noKeyPair = true;
141      return this;
142   }
143 
144   public EC2TemplateOptions mapEBSSnapshotToDeviceName(String deviceName, String snapshotId,
145         @Nullable Integer sizeInGib, boolean deleteOnTermination) {
146      blockDeviceMappings.add(new MapEBSSnapshotToDevice(deviceName, snapshotId, sizeInGib, deleteOnTermination));
147      return this;
148   }
149 
150   public EC2TemplateOptions mapNewVolumeToDeviceName(String deviceName, int sizeInGib, boolean deleteOnTermination) {
151      blockDeviceMappings.add(new MapNewVolumeToDevice(deviceName, sizeInGib, deleteOnTermination));
152      return this;
153   }
154 
155   public EC2TemplateOptions mapEphemeralDeviceToDeviceName(String deviceName, String virtualName) {
156      blockDeviceMappings.add(new MapEphemeralDeviceToDevice(deviceName, virtualName));
157      return this;
158   }
159 
160   public EC2TemplateOptions unmapDeviceNamed(String deviceName) {
161      blockDeviceMappings.add(new UnmapDeviceNamed(deviceName));
162      return this;
163   }
164 
165   public EC2TemplateOptions blockDeviceMappings(Iterable<? extends BlockDeviceMapping> blockDeviceMappings) {
166      this.blockDeviceMappings.addAll(checkNotNull(blockDeviceMappings, "blockDeviceMappings"));
167      return this;
168   }
169 
170   public static class Builder {
171      /**
172       * @see EC2TemplateOptions#blockDeviceMappings
173       */
174      public static EC2TemplateOptions blockDeviceMappings(Set<? extends BlockDeviceMapping> blockDeviceMappings) {
175         EC2TemplateOptions options = new EC2TemplateOptions();
176         return options.blockDeviceMappings(blockDeviceMappings);
177      }
178 
179      /**
180       * @see EC2TemplateOptions#mapEBSSnapshotToDeviceName
181       */
182      public static EC2TemplateOptions mapEBSSnapshotToDeviceName(String deviceName, String snapshotId,
183            @Nullable Integer sizeInGib, boolean deleteOnTermination) {
184         EC2TemplateOptions options = new EC2TemplateOptions();
185         return options.mapEBSSnapshotToDeviceName(deviceName, snapshotId, sizeInGib, deleteOnTermination);
186      }
187 
188      /**
189       * @see EC2TemplateOptions#mapNewVolumeToDeviceName
190       */
191      public static EC2TemplateOptions mapNewVolumeToDeviceName(String deviceName, int sizeInGib,
192            boolean deleteOnTermination) {
193         EC2TemplateOptions options = new EC2TemplateOptions();
194         return options.mapNewVolumeToDeviceName(deviceName, sizeInGib, deleteOnTermination);
195      }
196 
197      /**
198       * @see EC2TemplateOptions#mapEphemeralDeviceToDeviceName
199       */
200      public static EC2TemplateOptions mapEphemeralDeviceToDeviceName(String deviceName, String virtualName) {
201         EC2TemplateOptions options = new EC2TemplateOptions();
202         return options.mapEphemeralDeviceToDeviceName(deviceName, virtualName);
203      }
204 
205      /**
206       * @see EC2TemplateOptions#unmapDeviceNamed
207       */
208      public static EC2TemplateOptions unmapDeviceNamed(String deviceName) {
209         EC2TemplateOptions options = new EC2TemplateOptions();
210         return options.unmapDeviceNamed(deviceName);
211      }
212 
213      /**
214       * @see EC2TemplateOptions#securityGroups(Iterable<String>)
215       */
216      public static EC2TemplateOptions securityGroups(String... groupNames) {
217         EC2TemplateOptions options = new EC2TemplateOptions();
218         return EC2TemplateOptions.class.cast(options.securityGroups(groupNames));
219      }
220 
221      /**
222       * @see EC2TemplateOptions#securityGroups(Iterable<String>)
223       */
224      public static EC2TemplateOptions securityGroups(Iterable<String> groupNames) {
225         EC2TemplateOptions options = new EC2TemplateOptions();
226         return EC2TemplateOptions.class.cast(options.securityGroups(groupNames));
227      }
228 
229      /**
230       * @see EC2TemplateOptions#keyPair
231       */
232      public static EC2TemplateOptions keyPair(String keyPair) {
233         EC2TemplateOptions options = new EC2TemplateOptions();
234         return EC2TemplateOptions.class.cast(options.keyPair(keyPair));
235      }
236 
237      /**
238       * @see EC2TemplateOptions#userData
239       */
240      public static EC2TemplateOptions userData(byte[] unencodedData) {
241         EC2TemplateOptions options = new EC2TemplateOptions();
242         return EC2TemplateOptions.class.cast(options.userData(unencodedData));
243      }
244 
245      /**
246       * @see EC2TemplateOptions#noKeyPair
247       */
248      public static EC2TemplateOptions noKeyPair() {
249         EC2TemplateOptions options = new EC2TemplateOptions();
250         return EC2TemplateOptions.class.cast(options.noKeyPair());
251      }
252 
253      // methods that only facilitate returning the correct object type
254      /**
255       * @see TemplateOptions#inboundPorts
256       */
257      public static EC2TemplateOptions inboundPorts(int... ports) {
258         EC2TemplateOptions options = new EC2TemplateOptions();
259         return EC2TemplateOptions.class.cast(options.inboundPorts(ports));
260      }
261 
262      /**
263       * @see TemplateOptions#port
264       */
265      public static EC2TemplateOptions blockOnPort(int port, int seconds) {
266         EC2TemplateOptions options = new EC2TemplateOptions();
267         return EC2TemplateOptions.class.cast(options.blockOnPort(port, seconds));
268      }
269 
270      /**
271       * @see TemplateOptions#runScript
272       */
273      public static EC2TemplateOptions runScript(byte[] script) {
274         EC2TemplateOptions options = new EC2TemplateOptions();
275         return EC2TemplateOptions.class.cast(options.runScript(script));
276      }
277 
278      /**
279       * @see TemplateOptions#installPrivateKey
280       */
281      public static EC2TemplateOptions installPrivateKey(String rsaKey) {
282         EC2TemplateOptions options = new EC2TemplateOptions();
283         return EC2TemplateOptions.class.cast(options.installPrivateKey(rsaKey));
284      }
285 
286      /**
287       * @see TemplateOptions#authorizePublicKey
288       */
289      public static EC2TemplateOptions authorizePublicKey(String rsaKey) {
290         EC2TemplateOptions options = new EC2TemplateOptions();
291         return EC2TemplateOptions.class.cast(options.authorizePublicKey(rsaKey));
292      }
293 
294      /**
295       * @see TemplateOptions#withDetails
296       */
297      public static EC2TemplateOptions withDetails() {
298         EC2TemplateOptions options = new EC2TemplateOptions();
299         return EC2TemplateOptions.class.cast(options.withMetadata());
300      }
301 
302   }
303 
304   // methods that only facilitate returning the correct object type
305 
306   /**
307    * {@inheritDoc}
308    */
309   @Override
310   public EC2TemplateOptions blockOnPort(int port, int seconds) {
311      return EC2TemplateOptions.class.cast(super.blockOnPort(port, seconds));
312   }
313 
314   /**
315    * {@inheritDoc}
316    */
317   @Override
318   public EC2TemplateOptions inboundPorts(int... ports) {
319      return EC2TemplateOptions.class.cast(super.inboundPorts(ports));
320   }
321 
322   /**
323    * {@inheritDoc}
324    */
325   @Override
326   public EC2TemplateOptions authorizePublicKey(String publicKey) {
327      return EC2TemplateOptions.class.cast(super.authorizePublicKey(publicKey));
328   }
329 
330   /**
331    * {@inheritDoc}
332    */
333   @Override
334   @Deprecated
335   public EC2TemplateOptions authorizePublicKey(Payload publicKey) {
336      return EC2TemplateOptions.class.cast(super.authorizePublicKey(publicKey));
337   }
338 
339   /**
340    * {@inheritDoc}
341    */
342   @Override
343   public EC2TemplateOptions installPrivateKey(String privateKey) {
344      return EC2TemplateOptions.class.cast(super.installPrivateKey(privateKey));
345   }
346 
347   /**
348    * {@inheritDoc}
349    */
350   @Override
351   @Deprecated
352   public EC2TemplateOptions installPrivateKey(Payload privateKey) {
353      return EC2TemplateOptions.class.cast(super.installPrivateKey(privateKey));
354   }
355 
356   /**
357    * {@inheritDoc}
358    */
359   @Override
360   public EC2TemplateOptions runScript(Payload script) {
361      return EC2TemplateOptions.class.cast(super.runScript(script));
362   }
363 
364   /**
365    * {@inheritDoc}
366    */
367   @Override
368   @Deprecated
369   public EC2TemplateOptions runScript(byte[] script) {
370      return EC2TemplateOptions.class.cast(super.runScript(script));
371   }
372 
373   /**
374    * {@inheritDoc}
375    */
376   @Override
377   public EC2TemplateOptions withMetadata() {
378      return EC2TemplateOptions.class.cast(super.withMetadata());
379   }
380 
381   /**
382    * {@inheritDoc}
383    */
384   @Override
385   public EC2TemplateOptions blockUntilRunning(boolean blockUntilRunning) {
386      return EC2TemplateOptions.class.cast(super.blockUntilRunning(blockUntilRunning));
387   }
388 
389   /**
390    * {@inheritDoc}
391    */
392   @Override
393   public EC2TemplateOptions dontAuthorizePublicKey() {
394      return EC2TemplateOptions.class.cast(super.dontAuthorizePublicKey());
395   }
396 
397   /**
398    * {@inheritDoc}
399    */
400   @Override
401   public EC2TemplateOptions nameTask(String name) {
402      return EC2TemplateOptions.class.cast(super.nameTask(name));
403   }
404 
405   /**
406    * {@inheritDoc}
407    */
408   @Override
409   public EC2TemplateOptions runAsRoot(boolean runAsRoot) {
410      return EC2TemplateOptions.class.cast(super.runAsRoot(runAsRoot));
411   }
412 
413   /**
414    * {@inheritDoc}
415    */
416   @Override
417   public EC2TemplateOptions runScript(Statement script) {
418      return EC2TemplateOptions.class.cast(super.runScript(script));
419   }
420 
421   /**
422    * {@inheritDoc}
423    */
424   @Override
425   public EC2TemplateOptions overrideCredentialsWith(Credentials overridingCredentials) {
426      return EC2TemplateOptions.class.cast(super.overrideCredentialsWith(overridingCredentials));
427   }
428 
429   /**
430    * @return groupNames the user specified to run instances with, or zero length set to create an
431    *         implicit group
432    */
433   public Set<String> getGroups() {
434      return groupNames;
435   }
436 
437   /**
438    * @return keyPair to use when running the instance or null, to generate a keypair.
439    */
440   public String getKeyPair() {
441      return keyPair;
442   }
443 
444   /**
445    * @return true (default) if we are supposed to use a keypair
446    */
447   public boolean shouldAutomaticallyCreateKeyPair() {
448      return !noKeyPair;
449   }
450 
451   /**
452    * @return unencoded user data.
453    */
454   public byte[] getUserData() {
455      return userData;
456   }
457 
458   /**
459    * @return BlockDeviceMapping to use when running the instance or null.
460    */
461   public Set<BlockDeviceMapping> getBlockDeviceMappings() {
462      return blockDeviceMappings.build();
463   }
464 
465   @Override
466   public int hashCode() {
467 
468      final int prime = 31;
469      int result = super.hashCode();
470      result = prime * result + ((blockDeviceMappings == null) ? 0 : blockDeviceMappings.hashCode());
471      result = prime * result + ((groupNames == null) ? 0 : groupNames.hashCode());
472      result = prime * result + ((keyPair == null) ? 0 : keyPair.hashCode());
473      result = prime * result + (noKeyPair ? 1231 : 1237);
474      result = prime * result + Arrays.hashCode(userData);
475      return result;
476   }
477 
478   @Override
479   public boolean equals(Object obj) {
480      if (this == obj)
481         return true;
482      if (!super.equals(obj))
483         return false;
484      if (getClass() != obj.getClass())
485         return false;
486      EC2TemplateOptions other = (EC2TemplateOptions) obj;
487      if (blockDeviceMappings == null) {
488         if (other.blockDeviceMappings != null)
489            return false;
490      } else if (!blockDeviceMappings.equals(other.blockDeviceMappings))
491         return false;
492      if (groupNames == null) {
493         if (other.groupNames != null)
494            return false;
495      } else if (!groupNames.equals(other.groupNames))
496         return false;
497      if (keyPair == null) {
498         if (other.keyPair != null)
499            return false;
500      } else if (!keyPair.equals(other.keyPair))
501         return false;
502 
503      if (!Arrays.equals(userData, other.userData))
504         return false;
505 
506      return true;
507   }
508 
509   @Override
510   public String toString() {
511      return "[groupNames=" + groupNames + ", keyPair=" + keyPair + ", noKeyPair=" + noKeyPair + ", userData="
512            + Arrays.toString(userData) + ", blockDeviceMappings=" + blockDeviceMappings.build() + "]";
513   }
514}

[all classes][org.jclouds.ec2.compute.options]
EMMA 2.0.5312 (C) Vladimir Roubtsov