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

LIBCLOUD-506: Added the resource extra attribute mapping and implemented... #239

Closed
wants to merge 2 commits into from

Conversation

@cderamus
Copy link
Contributor

@cderamus cderamus commented Feb 2, 2014

... it for networks, nodes and volumes. I also went ahead and added a number of additional properties for each of the three resource types.

…ted it for networks, nodes and volumes. I also went ahead and added a number of additional properties for each of the three resource types.
for net in nets:
extra = self._get_extra_dict(net, extra_map)

if 'tags' in net.keys():

This comment has been minimized.

@Kami

Kami Feb 2, 2014
Member

.keys() is unnecessary, you can just do if 'tags' in net.

for vol in volumes['volume']:
extra = self._get_extra_dict(vol, extra_map)

if 'tags' in vol.keys():

This comment has been minimized.

@Kami

Kami Feb 2, 2014
Member

Same here.

RESOURCE_EXTRA_ATTRIBUTES_MAP = {
'network': {
'broadcast_domain_type': {
'xpath': 'broadcastdomaintype',

This comment has been minimized.

@Kami

Kami Feb 2, 2014
Member

CloudStack API returns JSON so calling a key xpath is deceiving :)

Maybe we should call it key_name or something along those lines?

This comment has been minimized.

@cderamus

cderamus Feb 2, 2014
Author Contributor

Ah, nice call!

… search statements.
@Kami
Copy link
Member

@Kami Kami commented Feb 2, 2014

Merged into trunk, thanks.

@asfgit asfgit closed this in 39ffb83 Feb 2, 2014
@cderamus cderamus deleted the DivvyCloud:LIBCLOUD-506_Add_Resource_Map_To_CloudStack branch Feb 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.