Launch config name is not required for update #1239

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@cgbystrom

UpdateAutoScalingGroup doesn't require LaunchConfigurationName parameter to be sent.
See http://docs.aws.amazon.com/AutoScaling/2011-01-01/APIReference/API_UpdateAutoScalingGroup.html

In cases where you want to update a group (for example change min size) it is unnecessary and cumbersome to look up the LaunchConfigurationName each time.

Launch config name is not required for update
UpdateAutoScalingGroup doesn't require LaunchConfigurationName parameter to be sent.
See http://docs.aws.amazon.com/AutoScaling/2011-01-01/APIReference/API_UpdateAutoScalingGroup.html
@jamesls

This comment has been minimized.

Show comment Hide comment
@jamesls

jamesls Jan 14, 2013

Owner

The _update_group method is also used for create_auto_scaling_group, which does require the launch configuration name.

Is there a way we can accomodate both the create and update operations? I think it would be ideal to require the launch_configuration_name for creation, but make it optional for update.

Owner

jamesls commented Jan 14, 2013

The _update_group method is also used for create_auto_scaling_group, which does require the launch configuration name.

Is there a way we can accomodate both the create and update operations? I think it would be ideal to require the launch_configuration_name for creation, but make it optional for update.

@cgbystrom

This comment has been minimized.

Show comment Hide comment
@cgbystrom

cgbystrom Jan 15, 2013

Sorry about that. Perhaps my pull request was in bit of a hurry.

Due to time constraints I did a workaround with:

orig_get_object = AutoScaleConnection.get_object
def patched_get_object(self, action, params, cls, path='/', parent=None, verb='GET'):
    del params['LaunchConfigurationName']
    return orig_get_object(self, action, params, cls, path, parent, verb)
AutoScaleConnection.get_object = patched_get_object

Not pretty though :)

Sorry about that. Perhaps my pull request was in bit of a hurry.

Due to time constraints I did a workaround with:

orig_get_object = AutoScaleConnection.get_object
def patched_get_object(self, action, params, cls, path='/', parent=None, verb='GET'):
    del params['LaunchConfigurationName']
    return orig_get_object(self, action, params, cls, path, parent, verb)
AutoScaleConnection.get_object = patched_get_object

Not pretty though :)

@ghost ghost assigned jamesls Feb 21, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment