Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Handle LogicalID for Softlayer instances #548

Merged
merged 1 commit into from May 17, 2017

Conversation

kaufers
Copy link
Contributor

@kaufers kaufers commented May 17, 2017

The current LogicalID processing in the terraform instance provider has two issues:

  • The LogicalID tag is only added to the tags if the tags object type is map but, for Softlayer, the tags object type is a list; this causes the LogicalID to never be added as a tag. Then, when the group plugin issues a DescribeInstances by group name, the instances returned have no LogicalID set -- and then the group plugin requests to create another instance.

  • Softlayer only supports lower-case chars in tags so all tag checks for "LogicalID" must support case-insensitive key checks

This also moves the logic to make the Softlayer tags all lower case to one common place; allowing the code to process tags generically and then we manipulate at the end.

Closes #546

Signed-off-by: Steven Kaufer kaufer@us.ibm.com

The current LogicalID processing in the terraform instance provider has
two issues:
- The LogicalID tag is only added to the tags if the tags object type is
  map but, for Softlayer, the tags object type is a list
- Softlayer only supports lower-case chars in tags so all tag checks for
  "LogicalID" must support case-insensitive key checks

This also moves the logic to make the Softlayer tags all lower case to one
common place; allowing the code to process tags generically and then we
manipulate at the end.

Closes docker-archive#546

Signed-off-by: Steven Kaufer <kaufer@us.ibm.com>
@codecov
Copy link

codecov bot commented May 17, 2017

Codecov Report

Merging #548 into master will increase coverage by 0.29%.
The diff coverage is 89.65%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #548      +/-   ##
==========================================
+ Coverage   56.58%   56.87%   +0.29%     
==========================================
  Files          57       57              
  Lines        3946     3954       +8     
==========================================
+ Hits         2233     2249      +16     
+ Misses       1426     1419       -7     
+ Partials      287      286       -1
Impacted Files Coverage Δ
examples/instance/terraform/plugin.go 66.98% <89.65%> (+3.5%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 928f3e3...9df04ed. Read the comment docs.

@chungers chungers merged commit fcc0579 into docker-archive:master May 17, 2017
@kaufers kaufers deleted the logicalid-case branch June 16, 2017 13:06
chungers pushed a commit to chungers/infrakit that referenced this pull request Sep 30, 2017
Fixes docker-archive#548

Signed-off-by: David Gageot <david@gageot.net>
chungers pushed a commit to chungers/infrakit that referenced this pull request Oct 1, 2017
Fixes docker-archive#548

Signed-off-by: David Gageot <david@gageot.net>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants