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

JCLOUDS-756 - Add support for tags in CloudStack #578

Merged
merged 2 commits into from
Oct 22, 2014

Conversation

abayer
Copy link
Member

@abayer abayer commented Oct 20, 2014

Note - this is just a preliminary PR, not ready for merge yet. I still have to add a couple more expect tests, update a couple more, add live tests and update one or two other live tests, but I wanted to throw this up so others could see it.

Note also that yeah, I went a little nutty and reformatted most of the json test files I touched to actually be readable, so the PR may look a bit uglier than it actually is. Hey, going forward, readability's nice, right? =)

@cloudbees-pull-request-builder

jclouds-pull-requests-java-6 #216 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

jclouds-pull-requests #1305 SUCCESS
This pull request looks good

@buildhive
Copy link

jclouds » jclouds #1815 SUCCESS
This pull request looks good
(what's this?)

"domainid": 1,
"key": "some-tag",
"resourceid": 2,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting.. so these actually come through as regular json values as opposed to stringly ones. Is it ever the case that a tag value is a hash?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the sample data, I only used one tag, but it's a list of hashes.

@codefromthecrypt
Copy link
Contributor

Epic. So, I'm expecting that there will be some live test impact, I guess (plus the mock/expect you mentioned). I'm also assuming you are following convention of existing codebase to avoid confusing things by porting only this to whatever latest style is.

I must admit that the tags concept is a bit confusing, particularly the array of things bit vs the map thing. I'd like to see an in-out live test, at least on one resource that explains the relationship between the tags on options and the Tag array thing. Otherwise, just explaining could help. I am probably fishing for whether it is possible to make tags appear less weird, and hide its weirdness inside somehow. Failing that possibility, the general approach looks sound.

Thanks for the help!

@abayer
Copy link
Member Author

abayer commented Oct 21, 2014

The tags aren't really confusing - they're just overly verbose, as it were. And yeah, as a copy-paste-coder, I always just use the style in place in the existing code in the API rather than diverging - maybe not ideal, but makes it much easier to read and maintain, IMO.

@codefromthecrypt
Copy link
Contributor

Heh I would clarify that it is read and maintainence neutral. There's
nothing easy to read about ConcreteBuilder :)

Anyways. Thanks and carry-on!

@abayer
Copy link
Member Author

abayer commented Oct 21, 2014

Ah, but it is easier to maintain an API when the entire API is doing the same thing, even if that thing is a bit wonky. =)

@codefromthecrypt
Copy link
Contributor

It also has a side benefit of making adrian's hands shake just about enough
for him to cleanse the whole api of its sins.. :)

@abayer
Copy link
Member Author

abayer commented Oct 21, 2014

..that too, yes.

@cloudbees-pull-request-builder

jclouds-pull-requests-java-6 #218 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

jclouds-pull-requests #1307 SUCCESS
This pull request looks good

@buildhive
Copy link

jclouds » jclouds #1819 SUCCESS
This pull request looks good
(what's this?)

@cloudbees-pull-request-builder

jclouds-pull-requests-java-6 #219 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

jclouds-pull-requests #1308 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

jclouds-pull-requests-java-6 #220 SUCCESS
This pull request looks good

@abayer
Copy link
Member Author

abayer commented Oct 21, 2014

Ok, live tests added and they pass - I think that suffices. Squashing now.

@buildhive
Copy link

jclouds » jclouds #1820 SUCCESS
This pull request looks good
(what's this?)

@cloudbees-pull-request-builder

jclouds-pull-requests-java-6 #221 SUCCESS
This pull request looks good

@codefromthecrypt
Copy link
Contributor

LGTM (gripes noted)

Thanks, Andrew!

@cloudbees-pull-request-builder

jclouds-pull-requests #1310 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

jclouds-pull-requests #1309 SUCCESS
This pull request looks good

@buildhive
Copy link

jclouds » jclouds #1821 SUCCESS
This pull request looks good
(what's this?)

@buildhive
Copy link

jclouds » jclouds #1822 SUCCESS
This pull request looks good
(what's this?)

@cloudbees-pull-request-builder

jclouds-pull-requests-java-6 #222 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

jclouds-pull-requests #1311 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

jclouds-pull-requests-java-6 #223 SUCCESS
This pull request looks good

@abayer
Copy link
Member Author

abayer commented Oct 22, 2014

Ok, added the tags/userMetadata to NodeMetadata, ComputeService-driven node creation, etc. I'm calling this done with another PR to come later on general live test cleanup/fixes.

@cloudbees-pull-request-builder

jclouds-pull-requests-java-6 #224 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

jclouds-pull-requests #1312 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

jclouds-pull-requests #1313 SUCCESS
This pull request looks good

@buildhive
Copy link

jclouds » jclouds #1824 SUCCESS
This pull request looks good
(what's this?)

@buildhive
Copy link

jclouds » jclouds #1825 SUCCESS
This pull request looks good
(what's this?)

@cloudbees-pull-request-builder

jclouds-pull-requests-java-6 #227 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

jclouds-pull-requests #1316 SUCCESS
This pull request looks good

@buildhive
Copy link

jclouds » jclouds #1828 UNSTABLE
Looks like there's a problem with this pull request
(what's this?)

@jclouds-mirror jclouds-mirror merged commit c854535 into jclouds:master Oct 22, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
5 participants