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

CHEF-MAGIC-MODULE-apigee-Organizations__envgroups__attachment - Resource Implementation #141

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions mmv1/products/apigee/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1373,3 +1373,101 @@ objects:
description: |
Output only. Name of the API proxy.




- !ruby/object:Api::Resource
name: OrganizationEnvgroupAttachment
base_url: '{{parent}}/attachments'
self_link: '{{name}}'
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Official Documentation':
api: 'https://cloud.google.com/apigee/docs'
async: !ruby/object:Api::OpAsync
operation: !ruby/object:Api::OpAsync::Operation
path: 'name'
base_url: '{op_id}'
wait_ms: 1000
result: !ruby/object:Api::OpAsync::Result
path: 'response'
resource_inside_response: true
status: !ruby/object:Api::OpAsync::Status
path: 'done'
complete: True
allowed:
- True
- False
error: !ruby/object:Api::OpAsync::Error
path: 'error'
message: 'message'
description: |-
EnvironmentGroupAttachment is a resource which defines an attachment of an environment to an environment group.
properties:

- !ruby/object:Api::Type::String
name: 'createdAt'
description: |
Output only. The time at which the environment group attachment was created as milliseconds since epoch.
- !ruby/object:Api::Type::String
name: 'environment'
description: |
Required. ID of the attached environment.
- !ruby/object:Api::Type::String
name: 'environmentGroupId'
description: |
Output only. ID of the environment group.
- !ruby/object:Api::Type::String
name: 'name'
description: |
ID of the environment group attachment.




- !ruby/object:Api::Resource
name: OrganizationEnvgroupAttachment
base_url: '{{parent}}/attachments'
self_link: '{{name}}'
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Official Documentation':
api: 'https://cloud.google.com/apigee/docs'
async: !ruby/object:Api::OpAsync
operation: !ruby/object:Api::OpAsync::Operation
path: 'name'
base_url: '{op_id}'
wait_ms: 1000
result: !ruby/object:Api::OpAsync::Result
path: 'response'
resource_inside_response: true
status: !ruby/object:Api::OpAsync::Status
path: 'done'
complete: True
allowed:
- True
- False
error: !ruby/object:Api::OpAsync::Error
path: 'error'
message: 'message'
description: |-
EnvironmentGroupAttachment is a resource which defines an attachment of an environment to an environment group.
properties:

- !ruby/object:Api::Type::String
name: 'createdAt'
description: |
Output only. The time at which the environment group attachment was created as milliseconds since epoch.
- !ruby/object:Api::Type::String
name: 'environment'
description: |
Required. ID of the attached environment.
- !ruby/object:Api::Type::String
name: 'environmentGroupId'
description: |
Output only. ID of the environment group.
- !ruby/object:Api::Type::String
name: 'name'
description: |
ID of the environment group attachment.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%>
<% organization_envgroup_attachment = grab_attributes(pwd)['organization_envgroup_attachment'] -%>
describe google_apigee_organization_envgroup_attachment(name: <%= doc_generation ? "' #{organization_envgroup_attachment['name']}'":"organization_envgroup_attachment['name']" -%>) do
it { should exist }
its('created_at') { should cmp <%= doc_generation ? "'#{organization_envgroup_attachment['created_at']}'" : "organization_envgroup_attachment['created_at']" -%> }
its('environment') { should cmp <%= doc_generation ? "'#{organization_envgroup_attachment['environment']}'" : "organization_envgroup_attachment['environment']" -%> }
its('environment_group_id') { should cmp <%= doc_generation ? "'#{organization_envgroup_attachment['environment_group_id']}'" : "organization_envgroup_attachment['environment_group_id']" -%> }
its('name') { should cmp <%= doc_generation ? "'#{organization_envgroup_attachment['name']}'" : "organization_envgroup_attachment['name']" -%> }

end

describe google_apigee_organization_envgroup_attachment(name: "does_not_exit") do
it { should_not exist }
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gcp_project_id = input(:gcp_project_id, value: '<%= external_attribute(pwd, 'gcp_project_id') -%>', description: 'The GCP project identifier.')

organization_envgroup_attachment = input('organization_envgroup_attachment', value: <%= JSON.pretty_generate(grab_attributes(pwd)['organization_envgroup_attachment']) -%>, description: 'organization_envgroup_attachment description')
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%>
<% organization_envgroup_attachment = grab_attributes(pwd)['organization_envgroup_attachment'] -%>
describe google_apigee_organization_envgroup_attachments(parent: <%= doc_generation ? "' #{organization_envgroup_attachment['parent']}'":"organization_envgroup_attachment['parent']" -%>) do
it { should exist }
end
Original file line number Diff line number Diff line change
Expand Up @@ -1074,4 +1074,10 @@ organization_api:
api_proxy_type : "value_apiproxytype"
project_location_repository:
name : "value_name"
parent : "value_parent"
parent : "value_parent"
organization_envgroup_attachment:
name : "value_name"
parent : "value_parent"
created_at : "value_createdat"
environment : "value_environment"
environment_group_id : "value_environmentgroupid"
Loading