internal/GCP: remove all remaining uses of cloudbuild
Some uses of `cloudbuild` GCP API have been left in our internal cloud API implementation for GCP. We do not use `cloudbuild` to import GCE images into GCP any more. Do not request the `cloudbuild` authentication scope when getting new GCP client. Update vendored packages accordingly. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
d56726646c
commit
0292725ce4
39 changed files with 2 additions and 18964 deletions
|
|
@ -5,7 +5,6 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
cloudbuild "cloud.google.com/go/cloudbuild/apiv1"
|
||||
compute "cloud.google.com/go/compute/apiv1"
|
||||
"cloud.google.com/go/storage"
|
||||
"golang.org/x/oauth2/google"
|
||||
|
|
@ -25,9 +24,8 @@ type GCP struct {
|
|||
|
||||
// New returns an authenticated GCP instance, allowing to interact with GCP API.
|
||||
func New(credentials []byte) (*GCP, error) {
|
||||
scopes := []string{storage.ScopeReadWrite} // file upload
|
||||
scopes = append(scopes, compute.DefaultAuthScopes()...) // permissions to image
|
||||
scopes = append(scopes, cloudbuild.DefaultAuthScopes()...) // image import
|
||||
scopes := []string{storage.ScopeReadWrite} // file upload
|
||||
scopes = append(scopes, compute.DefaultAuthScopes()...) // permissions to image
|
||||
|
||||
var getCredsFunc func() (*google.Credentials, error)
|
||||
if credentials != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue