-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-add monitoring monitored project, without metrics scope resource (#…
…5235) * Added monitoring metrics scope and monitored project resources. (#5218) * Added monitoring metrics scope and monitored project resources. * Ran make upgrade-dcl * Fixed indentation * Copied tpgtools go.sum lines into mmv1 go.sum. * Apply suggestions from code review Co-authored-by: Scott Suarez <[email protected]> * Attempted to fix strange downstream change in iam.go. * Added missing custom serializer to GA version, upgraded DCL again. * Update ID format so import is possible. Co-authored-by: Scott Suarez <[email protected]> Co-authored-by: Nathan Mckinley <[email protected]> * Revert reversion of metrics scopes * Remove scope from provider. * Remove from GA, remove metrics scope from provider. * Added missing strings import for mmv1 dataproc cluster test. * Ran make serialize. * Removed unneeded overrides. Re-ran make serialize. * Removed undeletable override. Co-authored-by: Thomas Rodgers <[email protected]> Co-authored-by: Scott Suarez <[email protected]>
- Loading branch information
1 parent
126a23f
commit 8353df6
Showing
18 changed files
with
234 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ import ( | |
"reflect" | ||
"regexp" | ||
"strconv" | ||
"strings" | ||
"testing" | ||
"time" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ import ( | |
"fmt" | ||
"log" | ||
"reflect" | ||
"sort" | ||
"strings" | ||
"time" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Copyright 2021 Google LLC. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
info: | ||
title: Monitoring/MonitoredProject | ||
description: DCL Specification for the Monitoring MonitoredProject resource | ||
x-dcl-has-iam: false | ||
paths: | ||
get: | ||
description: The function used to get information about a MonitoredProject | ||
parameters: | ||
- name: MonitoredProject | ||
required: true | ||
description: A full instance of a MonitoredProject | ||
apply: | ||
description: The function used to apply information about a MonitoredProject | ||
parameters: | ||
- name: MonitoredProject | ||
required: true | ||
description: A full instance of a MonitoredProject | ||
delete: | ||
description: The function used to delete a MonitoredProject | ||
parameters: | ||
- name: MonitoredProject | ||
required: true | ||
description: A full instance of a MonitoredProject | ||
deleteAll: | ||
description: The function used to delete all MonitoredProject | ||
parameters: | ||
- name: metricsscope | ||
required: true | ||
schema: | ||
type: string | ||
list: | ||
description: The function used to list information about many MonitoredProject | ||
parameters: | ||
- name: metricsscope | ||
required: true | ||
schema: | ||
type: string | ||
components: | ||
schemas: | ||
MonitoredProject: | ||
title: MonitoredProject | ||
x-dcl-id: locations/global/metricsScopes/{{metrics_scope}}/projects/{{name}} | ||
x-dcl-locations: | ||
- global | ||
type: object | ||
required: | ||
- name | ||
- metricsScope | ||
properties: | ||
createTime: | ||
type: string | ||
format: date-time | ||
x-dcl-go-name: CreateTime | ||
readOnly: true | ||
description: Output only. The time when this `MonitoredProject` was created. | ||
x-kubernetes-immutable: true | ||
metricsScope: | ||
type: string | ||
x-dcl-go-name: MetricsScope | ||
description: 'Required. The resource name of the existing Metrics Scope | ||
that will monitor this project. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}' | ||
x-kubernetes-immutable: true | ||
x-dcl-references: | ||
- resource: Monitoring/MetricsScope | ||
field: name | ||
name: | ||
type: string | ||
x-dcl-go-name: Name | ||
description: 'Immutable. The resource name of the `MonitoredProject`. On | ||
input, the resource name includes the scoping project ID and monitored | ||
project ID. On output, it contains the equivalent project numbers. Example: | ||
`locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}/projects/{MONITORED_PROJECT_ID_OR_NUMBER}`' | ||
x-kubernetes-immutable: true |
4 changes: 4 additions & 0 deletions
4
tpgtools/api/monitoring/samples/basic.cloudresourcemanager.project.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "{{id}}", | ||
"parent": "organizations/{{org_id}}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "{{ref:basic.cloudresourcemanager.project.json:name}}", | ||
"metricsScope": "{{project}}" | ||
} |
28 changes: 28 additions & 0 deletions
28
tpgtools/api/monitoring/samples/basic_monitored_project.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright 2021 Google LLC. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
dependencies: | ||
- samples/basic.cloudresourcemanager.project.json | ||
description: A basic example of a monitoring monitored project | ||
name: basic_monitored_project | ||
resource: samples/basic.monitored_project.json | ||
type: monitored_project | ||
variables: | ||
- name: id | ||
type: resource_name | ||
- name: org_id | ||
type: org_id | ||
- name: project | ||
type: project | ||
versions: | ||
- beta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2021 Google LLC. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
- type: APPEND_TO_BASE_PATH | ||
details: | ||
string: v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
substitutions: | ||
- substitution: "project" | ||
value: ":PROJECT" |
7 changes: 7 additions & 0 deletions
7
tpgtools/overrides/monitoring/samples/monitoredproject/meta.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
substitutions: | ||
- substitution: "id" | ||
value: "id" | ||
- substitution: "org_id" | ||
value: ":ORG_ID" | ||
- substitution: "project" | ||
value: ":PROJECT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.