Closed jercherng closed 8 years ago
+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.
all done, thank you for the advice.
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.