Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't create instance if name is already created #100

Merged
merged 2 commits into from
Sep 21, 2015

Conversation

dpetzel
Copy link
Contributor

@dpetzel dpetzel commented Sep 17, 2015

This should address #67. The introduction of config_server_name was necessary to avoid these robocop offenses (which cropped up after adding the new conditional in create)

lib/kitchen/driver/openstack.rb:76:7: C: Assignment Branch Condition size for create is too high. [42.8/41]
      def create(state)
      ^^^
lib/kitchen/driver/openstack.rb:76:7: C: Cyclomatic complexity for create is too high. [9/8]
      def create(state)
      ^^^
lib/kitchen/driver/openstack.rb:76:7: C: Perceived complexity for create is too high. [11/10]
      def create(state)
      ^^^

I opted to shift that little bit of logic into its own function to avoid these violations.

@jjasghar
Copy link
Contributor

Nice! This is great. Thank you. I'll test it out today/tomorrow and wait for at least another 👍 from someone else.

@jjasghar jjasghar added TODO and removed TODO labels Sep 17, 2015
jjasghar pushed a commit that referenced this pull request Sep 21, 2015
Don't create instance if name is already created
@jjasghar jjasghar merged commit a6c4826 into test-kitchen:master Sep 21, 2015
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.

None yet

2 participants