Skip to content

Conversation

@jercherng
Copy link
Contributor

added functionality to configure target account interactively through the cli. There is also rudimentary regex to check for valid user input. I may have added the feature in bad form, when I added the calling method for 'configure' outside the scope of switch statement in bin/restacker. I did it so that we can call without having to initialize Restacker object bypassing need to login to configure yml file. To that end I also created the method as a singleton to the Restacker class so that we don't need to instantiate a Restacker object to use 'configure'. Did not configure for usage because the config_plane is set to ksp by default and I assumed that adding 'usage' when default config_plane is assumed would break intended functionality.

@godinezj
Copy link
Contributor

+1

@jercherng, this is a great start to having a configurable restacker. Please change line 301 in restacker.rb to something like target = config.fetch(location, {}).fetch(:target) so that we keep compatibility with earlier ruby versions (Hash#dig() is a new addition).

In the future we will add the capability to add new configuration section and also configure each section's control plane configuration.

@jercherng
Copy link
Contributor Author

all done, thank you for the advice.

@slietz slietz merged commit 5670232 into devsecops:master Jul 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants