-
Notifications
You must be signed in to change notification settings - Fork 112
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
datasources vcd_resource_list and vcd_resource_schema #594
datasources vcd_resource_list and vcd_resource_schema #594
Conversation
* List available resources by name, ID, or HREF * List available resources with import command
This data source provides information about resources structure
* vcd_info renamed to vcd_resource_list * vcd_structure renamed to vcd_resource_schema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great things with immediate use cases now:)
A few general comments on docs:
- Looks like HCL examples don't like
//
for comments when highlighting ( at least the old engine). I think default HCL comment#
should reender it better:
- Given that it is not a standard resource maybe "Example Usage 1...n" headers could have titles. Like "Example Usage 1 (List all organizations)" instead of just "Example Usage 1":
// * mediaItem (catalog) | ||
// * all edge gateway objects (NAT, firewall, lb) | ||
// When the parent is org or vdc, they are taken from the regular fields above | ||
"parent": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am missing a bit more docs and it is not immediately clear what should be provided. Might be that name parent_name
could be easier to grasp. Also some examples in docs could use this method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added some examples in the docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I know we are not experts in HCL scripting, but it would be good to figure out for ourselves and for others to write in documentation(examples) for e.g. how to take out value from this data and use in next resource:
output:
list_networks_hierarchy = [
"datacloud vdc-datacloud net-datacloud-r",
"datacloud vdc-datacloud net-datacloud-i",
"datacloud vdc-datacloud net-datacloud-r2",
"datacloud vdc-datacloud net-datacloud-d",
]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny thing and one huge question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now and very useful!
vcd_resource_list
data source gives information about VCD, with a list of available resources, in several formats.
vcd_resource_schema
More examples in the docs page.
This PR resumes work started in PR #415