Skip to content

Commit efda9e0

Browse files
committed
2 parents ae027fc + 3051713 commit efda9e0

19 files changed

Lines changed: 61 additions & 51 deletions

File tree

mmv1/api/async.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
package api
1515

1616
import (
17-
"log"
1817
"reflect"
1918
"strings"
2019

@@ -80,9 +79,6 @@ type OpAsync struct {
8079

8180
type OpAsyncOperation struct {
8281
BaseUrl string `yaml:"base_url,omitempty"`
83-
84-
// Use this if the resource includes the full operation url.
85-
FullUrl string `yaml:"full_url,omitempty"`
8682
}
8783

8884
// Represents the results of an Operation request
@@ -161,15 +157,3 @@ func (a *Async) MarshalYAML() (interface{}, error) {
161157

162158
return (*asyncAlias)(clonePtr), nil
163159
}
164-
165-
func (a *Async) Validate() {
166-
if a.Type == "OpAsync" {
167-
if a.Operation == nil {
168-
log.Fatalf("Missing `Operation` for OpAsync")
169-
} else {
170-
if a.Operation.BaseUrl != "" && a.Operation.FullUrl != "" {
171-
log.Fatalf("`base_url` and `full_url` cannot be set at the same time in OpAsync operation.")
172-
}
173-
}
174-
}
175-
}

mmv1/api/product.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,6 @@ func (p *Product) Validate() {
122122
for _, v := range p.Versions {
123123
v.Validate(p.Name)
124124
}
125-
126-
if p.Async != nil {
127-
p.Async.Validate()
128-
}
129125
}
130126

131127
// ====================

mmv1/api/resource.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -568,10 +568,6 @@ func (r *Resource) Validate() {
568568
for _, sample := range r.Samples {
569569
sample.Validate(r.Name)
570570
}
571-
572-
if r.Async != nil {
573-
r.Async.Validate()
574-
}
575571
}
576572

577573
// ====================

mmv1/products/chronicle/Retrohunt.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ async:
4848
actions: [create]
4949
type: OpAsync
5050
operation:
51-
full_url: 'https://{{location}}-chronicle.googleapis.com/v1/{{op_id}}'
5251
timeouts:
5352
insert_minutes: 20
5453
update_minutes: 20

mmv1/products/colab/NotebookExecution.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ create_url: 'projects/{{project}}/locations/{{location}}/notebookExecutionJobs?n
2929
async:
3030
type: 'OpAsync'
3131
operation:
32-
full_url: 'https://{{location}}-aiplatform.googleapis.com/v1/{{op_id}}'
3332
import_format:
3433
- 'projects/{{project}}/locations/{{location}}/notebookExecutionJobs/{{notebook_execution_job_id}}'
3534
custom_code:

mmv1/products/colab/Runtime.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ self_link: 'projects/{{project}}/locations/{{location}}/notebookRuntimes/{{name}
2727
create_url: 'projects/{{project}}/locations/{{location}}/notebookRuntimes:assign?notebook_runtime_id={{name}}'
2828
async:
2929
type: 'OpAsync'
30-
operation:
31-
full_url: 'https://{{location}}-aiplatform.googleapis.com/v1/{{op_id}}'
3230
custom_code:
3331
encoder: 'templates/terraform/encoders/colab_runtime.go.tmpl'
3432
post_create: 'templates/terraform/post_create/colab_runtime.go.tmpl'

mmv1/products/colab/RuntimeTemplate.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ immutable: true
3030
create_url: 'projects/{{project}}/locations/{{location}}/notebookRuntimeTemplates?notebook_runtime_template_id={{name}}'
3131
async:
3232
type: 'OpAsync'
33-
operation:
34-
full_url: 'https://{{location}}-aiplatform.googleapis.com/v1/{{op_id}}'
3533
result:
3634
resource_inside_response: true
3735
iam_policy:

mmv1/products/colab/Schedule.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ update_verb: 'PATCH'
2929
async:
3030
type: 'OpAsync'
3131
actions: ['delete']
32-
operation:
33-
full_url: 'https://{{location}}-aiplatform.googleapis.com/v1/{{op_id}}'
3432
custom_code:
3533
encoder: 'templates/terraform/encoders/colab_schedule.go.tmpl'
3634
post_create: 'templates/terraform/post_create/colab_schedule.go.tmpl'

mmv1/products/compute/InstantSnapshot.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ timeouts:
3939
async:
4040
actions: ['create', 'delete', 'update']
4141
type: 'OpAsync'
42-
operation:
43-
full_url: 'selfLink'
4442
result:
4543
resource_inside_response: false
4644
collection_url_key: 'items'

mmv1/products/compute/Snapshot.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ timeouts:
4646
async:
4747
actions: ['create', 'delete', 'update']
4848
type: 'OpAsync'
49-
operation:
50-
full_url: 'selfLink'
5149
result:
5250
resource_inside_response: false
5351
collection_url_key: 'items'

0 commit comments

Comments
 (0)