| OLD | NEW |
| 1 # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ | 1 # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ |
| 2 # Copyright (c) 2010, Eucalyptus Systems, Inc. | 2 # Copyright (c) 2010, Eucalyptus Systems, Inc. |
| 3 # | 3 # |
| 4 # Permission is hereby granted, free of charge, to any person obtaining a | 4 # Permission is hereby granted, free of charge, to any person obtaining a |
| 5 # copy of this software and associated documentation files (the | 5 # copy of this software and associated documentation files (the |
| 6 # "Software"), to deal in the Software without restriction, including | 6 # "Software"), to deal in the Software without restriction, including |
| 7 # without limitation the rights to use, copy, modify, merge, publish, dis- | 7 # without limitation the rights to use, copy, modify, merge, publish, dis- |
| 8 # tribute, sublicense, and/or sell copies of the Software, and to permit | 8 # tribute, sublicense, and/or sell copies of the Software, and to permit |
| 9 # persons to whom the Software is furnished to do so, subject to the fol- | 9 # persons to whom the Software is furnished to do so, subject to the fol- |
| 10 # lowing conditions: | 10 # lowing conditions: |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 def attach(self, instance_id, device): | 103 def attach(self, instance_id, device): |
| 104 """ | 104 """ |
| 105 Attach this EBS volume to an EC2 instance. | 105 Attach this EBS volume to an EC2 instance. |
| 106 | 106 |
| 107 :type instance_id: str | 107 :type instance_id: str |
| 108 :param instance_id: The ID of the EC2 instance to which it will | 108 :param instance_id: The ID of the EC2 instance to which it will |
| 109 be attached. | 109 be attached. |
| 110 | 110 |
| 111 :type device: str | 111 :type device: str |
| 112 :param device: The device on the instance through which the | 112 :param device: The device on the instance through which the |
| 113 volume will be exposted (e.g. /dev/sdh) | 113 volume will be exposed (e.g. /dev/sdh) |
| 114 | 114 |
| 115 :rtype: bool | 115 :rtype: bool |
| 116 :return: True if successful | 116 :return: True if successful |
| 117 """ | 117 """ |
| 118 return self.connection.attach_volume(self.id, instance_id, device) | 118 return self.connection.attach_volume(self.id, instance_id, device) |
| 119 | 119 |
| 120 def detach(self, force=False): | 120 def detach(self, force=False): |
| 121 """ | 121 """ |
| 122 Detach this EBS volume from an EC2 instance. | 122 Detach this EBS volume from an EC2 instance. |
| 123 | 123 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 self.instance_id = value | 218 self.instance_id = value |
| 219 elif name == 'status': | 219 elif name == 'status': |
| 220 self.status = value | 220 self.status = value |
| 221 elif name == 'attachTime': | 221 elif name == 'attachTime': |
| 222 self.attach_time = value | 222 self.attach_time = value |
| 223 elif name == 'device': | 223 elif name == 'device': |
| 224 self.device = value | 224 self.device = value |
| 225 else: | 225 else: |
| 226 setattr(self, name, value) | 226 setattr(self, name, value) |
| 227 | 227 |
| OLD | NEW |