Skip to content
This repository was archived by the owner on Oct 12, 2023. It is now read-only.

Need specification for example files #30

Open
zikalino opened this issue Jun 17, 2019 · 1 comment
Open

Need specification for example files #30

zikalino opened this issue Jun 17, 2019 · 1 comment
Labels
question Further information is requested

Comments

@zikalino
Copy link

Following one of the previous examples, I have generated appropriate examples as shown below. It seems that the format of the examples was changed in a meanwhile and is right now completely different.

In addition new manually made example seems to have some inconsistencies:

  • parameter resourceGroup is camelCase and fits module UX specification
  • parameter account_name seems to be converted to python_case

Therefore I think we really need to add proper specification of example files.

The old format example can still be found here: (https://github.com/VSChina/magic-modules/blob/azure_backend/products/azservicebusrecovery/examples/ansible/service_bus_disaster_recovery_config.yaml), so it's possible that I followed either this file, or similar example.


I currently generate examples with the following format:

(https://github.com/Azure/magic-module-specs/blob/master/batchapplication/examples/ansible/batch_batchaccounts_applications_put.yml)

--- !ruby/object:Provider::Ansible::Example
task: !ruby/object:Provider::Ansible::Task
  name: azure_rm_batchapplication
  description: ApplicationCreate
  code:
    resource_group: myResourceGroup
    account_name: myBatchAccount
    name: myApplication
    display_name: myAppName
    allow_updates: false

In a meanwhile example format seems to be changed and looks like this:

(https://github.com/Azure/magic-module-specs/blob/master/batchapplication/examples/ansible/basic.yaml)

--- !ruby/object:Provider::Azure::Example
resource: azure_rm_batchapplication
description: Create Batch Application
prerequisites:
  - !ruby/object:Provider::Azure::ExampleReference
    product: storageaccount
    example: basic
  - !ruby/object:Provider::Azure::ExampleReference
    product: batchaccount
    example: basic
properties:
  resourceGroup: "<%= get_resource_name('resourceGroups', 'resource_group') -%>"
  name: "<%= get_resource_name('batchApplications', 'batch_application_name', 'bap') -%>"
  account_name: "<%= get_resource_name('batchAccounts', 'batch_account_name', 'ba') -%>"
@JunyiYi JunyiYi added the question Further information is requested label Jun 20, 2019
@JunyiYi
Copy link
Contributor

JunyiYi commented Jun 20, 2019

Hi @zikalino , I can say the only valid api.yaml with all other supporting files is batchaccount. All other files are somehow out-of-date.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants