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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 def stop(self, force=False): | 249 def stop(self, force=False): |
250 """ | 250 """ |
251 Stop the instance | 251 Stop the instance |
252 | 252 |
253 :type force: bool | 253 :type force: bool |
254 :param force: Forces the instance to stop | 254 :param force: Forces the instance to stop |
255 | 255 |
256 :rtype: list | 256 :rtype: list |
257 :return: A list of the instances stopped | 257 :return: A list of the instances stopped |
258 """ | 258 """ |
259 rs = self.connection.stop_instances([self.id]) | 259 rs = self.connection.stop_instances([self.id], force) |
260 if len(rs) > 0: | 260 if len(rs) > 0: |
261 self._update(rs[0]) | 261 self._update(rs[0]) |
262 | 262 |
263 def start(self): | 263 def start(self): |
264 """ | 264 """ |
265 Start the instance. | 265 Start the instance. |
266 """ | 266 """ |
267 rs = self.connection.start_instances([self.id]) | 267 rs = self.connection.start_instances([self.id]) |
268 if len(rs) > 0: | 268 if len(rs) > 0: |
269 self._update(rs[0]) | 269 self._update(rs[0]) |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 def __init__(self, parent=None): | 425 def __init__(self, parent=None): |
426 dict.__init__(self) | 426 dict.__init__(self) |
427 | 427 |
428 def startElement(self, name, attrs, connection): | 428 def startElement(self, name, attrs, connection): |
429 return None | 429 return None |
430 | 430 |
431 def endElement(self, name, value, connection): | 431 def endElement(self, name, value, connection): |
432 if name != 'stateReason': | 432 if name != 'stateReason': |
433 self[name] = value | 433 self[name] = value |
434 | 434 |
OLD | NEW |