fix test failures in legacy cloud provider: add 'projects/' after upgrade
Signed-off-by: pacoxu <paco.xu@daocloud.io>
This commit is contained in:
4470
vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gen.go
generated
vendored
4470
vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gen.go
generated
vendored
File diff suppressed because it is too large
Load Diff
106
vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/meta.go
generated
vendored
106
vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/meta.go
generated
vendored
@@ -42,6 +42,8 @@ const (
|
||||
CustomOps = 1 << iota
|
||||
// AggregatedList will generated a method for AggregatedList().
|
||||
AggregatedList = 1 << iota
|
||||
// ListUsable will generate a method for ListUsable().
|
||||
ListUsable = 1 << iota
|
||||
|
||||
// ReadOnly specifies that the given resource is read-only and should not
|
||||
// have insert() or delete() methods generated for the wrapper.
|
||||
@@ -99,6 +101,14 @@ var AllServices = []*ServiceInfo{
|
||||
keyType: Global,
|
||||
serviceType: reflect.TypeOf(&alpha.GlobalAddressesService{}),
|
||||
},
|
||||
{
|
||||
Object: "Address",
|
||||
Service: "GlobalAddresses",
|
||||
Resource: "addresses",
|
||||
version: VersionBeta,
|
||||
keyType: Global,
|
||||
serviceType: reflect.TypeOf(&beta.GlobalAddressesService{}),
|
||||
},
|
||||
{
|
||||
Object: "Address",
|
||||
Service: "GlobalAddresses",
|
||||
@@ -116,7 +126,9 @@ var AllServices = []*ServiceInfo{
|
||||
"GetHealth",
|
||||
"Patch",
|
||||
"Update",
|
||||
"SetSecurityPolicy",
|
||||
},
|
||||
options: AggregatedList,
|
||||
},
|
||||
{
|
||||
Object: "BackendService",
|
||||
@@ -129,6 +141,7 @@ var AllServices = []*ServiceInfo{
|
||||
"Update",
|
||||
"SetSecurityPolicy",
|
||||
},
|
||||
options: AggregatedList,
|
||||
},
|
||||
{
|
||||
Object: "BackendService",
|
||||
@@ -141,6 +154,7 @@ var AllServices = []*ServiceInfo{
|
||||
"Update",
|
||||
"SetSecurityPolicy",
|
||||
},
|
||||
options: AggregatedList,
|
||||
},
|
||||
{
|
||||
Object: "BackendService",
|
||||
@@ -513,6 +527,50 @@ var AllServices = []*ServiceInfo{
|
||||
options: ReadOnly,
|
||||
serviceType: reflect.TypeOf(&ga.RegionsService{}),
|
||||
},
|
||||
{
|
||||
Object: "Router",
|
||||
Service: "Routers",
|
||||
Resource: "routers",
|
||||
keyType: Regional,
|
||||
version: VersionAlpha,
|
||||
options: AggregatedList,
|
||||
serviceType: reflect.TypeOf(&alpha.RoutersService{}),
|
||||
additionalMethods: []string{
|
||||
"Patch",
|
||||
"Preview",
|
||||
"GetRouterStatus",
|
||||
"TestIamPermissions",
|
||||
},
|
||||
},
|
||||
{
|
||||
Object: "Router",
|
||||
Service: "Routers",
|
||||
Resource: "routers",
|
||||
keyType: Regional,
|
||||
version: VersionBeta,
|
||||
options: AggregatedList,
|
||||
serviceType: reflect.TypeOf(&beta.RoutersService{}),
|
||||
additionalMethods: []string{
|
||||
"Patch",
|
||||
"Preview",
|
||||
"GetRouterStatus",
|
||||
"TestIamPermissions",
|
||||
},
|
||||
},
|
||||
{
|
||||
Object: "Router",
|
||||
Service: "Routers",
|
||||
Resource: "routers",
|
||||
keyType: Regional,
|
||||
version: VersionGA,
|
||||
options: AggregatedList,
|
||||
serviceType: reflect.TypeOf(&ga.RoutersService{}),
|
||||
additionalMethods: []string{
|
||||
"Patch",
|
||||
"Preview",
|
||||
"GetRouterStatus",
|
||||
},
|
||||
},
|
||||
{
|
||||
Object: "Route",
|
||||
Service: "Routes",
|
||||
@@ -535,6 +593,28 @@ var AllServices = []*ServiceInfo{
|
||||
"RemoveRule",
|
||||
},
|
||||
},
|
||||
{
|
||||
Object: "ServiceAttachment",
|
||||
Service: "ServiceAttachments",
|
||||
Resource: "serviceAttachments",
|
||||
version: VersionBeta,
|
||||
keyType: Regional,
|
||||
serviceType: reflect.TypeOf(&beta.ServiceAttachmentsService{}),
|
||||
additionalMethods: []string{
|
||||
"Patch",
|
||||
},
|
||||
},
|
||||
{
|
||||
Object: "ServiceAttachment",
|
||||
Service: "ServiceAttachments",
|
||||
Resource: "serviceAttachments",
|
||||
version: VersionAlpha,
|
||||
keyType: Regional,
|
||||
serviceType: reflect.TypeOf(&alpha.ServiceAttachmentsService{}),
|
||||
additionalMethods: []string{
|
||||
"Patch",
|
||||
},
|
||||
},
|
||||
{
|
||||
Object: "SslCertificate",
|
||||
Service: "SslCertificates",
|
||||
@@ -597,6 +677,7 @@ var AllServices = []*ServiceInfo{
|
||||
version: VersionAlpha,
|
||||
keyType: Regional,
|
||||
serviceType: reflect.TypeOf(&alpha.SubnetworksService{}),
|
||||
options: ListUsable,
|
||||
},
|
||||
{
|
||||
Object: "Subnetwork",
|
||||
@@ -605,6 +686,7 @@ var AllServices = []*ServiceInfo{
|
||||
version: VersionBeta,
|
||||
keyType: Regional,
|
||||
serviceType: reflect.TypeOf(&alpha.SubnetworksService{}),
|
||||
options: ListUsable,
|
||||
},
|
||||
{
|
||||
Object: "Subnetwork",
|
||||
@@ -613,6 +695,7 @@ var AllServices = []*ServiceInfo{
|
||||
version: VersionGA,
|
||||
keyType: Regional,
|
||||
serviceType: reflect.TypeOf(&alpha.SubnetworksService{}),
|
||||
options: ListUsable,
|
||||
},
|
||||
{
|
||||
Object: "TargetHttpProxy",
|
||||
@@ -699,6 +782,7 @@ var AllServices = []*ServiceInfo{
|
||||
keyType: Global,
|
||||
serviceType: reflect.TypeOf(&alpha.TargetHttpsProxiesService{}),
|
||||
additionalMethods: []string{
|
||||
"SetCertificateMap",
|
||||
"SetSslCertificates",
|
||||
"SetSslPolicy",
|
||||
"SetUrlMap",
|
||||
@@ -764,6 +848,28 @@ var AllServices = []*ServiceInfo{
|
||||
"RemoveInstance",
|
||||
},
|
||||
},
|
||||
{
|
||||
Object: "TargetTcpProxy",
|
||||
Service: "TargetTcpProxies",
|
||||
Resource: "targetTcpProxies",
|
||||
version: VersionAlpha,
|
||||
keyType: Global,
|
||||
serviceType: reflect.TypeOf(&alpha.TargetTcpProxiesService{}),
|
||||
additionalMethods: []string{
|
||||
"SetBackendService",
|
||||
},
|
||||
},
|
||||
{
|
||||
Object: "TargetTcpProxy",
|
||||
Service: "TargetTcpProxies",
|
||||
Resource: "targetTcpProxies",
|
||||
version: VersionBeta,
|
||||
keyType: Global,
|
||||
serviceType: reflect.TypeOf(&beta.TargetTcpProxiesService{}),
|
||||
additionalMethods: []string{
|
||||
"SetBackendService",
|
||||
},
|
||||
},
|
||||
{
|
||||
Object: "UrlMap",
|
||||
Service: "UrlMaps",
|
||||
|
14
vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/service.go
generated
vendored
14
vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/service.go
generated
vendored
@@ -99,6 +99,16 @@ func (i *ServiceInfo) ObjectAggregatedListType() string {
|
||||
return fmt.Sprintf("%v.%vAggregatedList", i.Version(), i.Object)
|
||||
}
|
||||
|
||||
// ObjectListUsableType is the compute List type for the object (contains Items field).
|
||||
func (i *ServiceInfo) ObjectListUsableType() string {
|
||||
return fmt.Sprintf("%v.Usable%vAggregatedList", i.version, i.Service)
|
||||
}
|
||||
|
||||
// FQObjectType is fully qualified name of the object (e.g. compute.Instance).
|
||||
func (i *ServiceInfo) FQListUsableObjectType() string {
|
||||
return fmt.Sprintf("%v.Usable%v", i.Version(), i.Object)
|
||||
}
|
||||
|
||||
// MockWrapType is the name of the concrete mock for this type.
|
||||
func (i *ServiceInfo) MockWrapType() string {
|
||||
return "Mock" + i.WrapType()
|
||||
@@ -221,6 +231,10 @@ func (i *ServiceInfo) AggregatedListField() string {
|
||||
return i.aggregatedListField
|
||||
}
|
||||
|
||||
func (i *ServiceInfo) ListUsable() bool {
|
||||
return i.options&ListUsable != 0
|
||||
}
|
||||
|
||||
// ServiceGroup is a grouping of the same service but at different API versions.
|
||||
type ServiceGroup struct {
|
||||
Alpha *ServiceInfo
|
||||
|
64
vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock/mock.go
generated
vendored
64
vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock/mock.go
generated
vendored
@@ -559,14 +559,14 @@ func UpdateRegionBackendServiceHook(ctx context.Context, key *meta.Key, obj *ga.
|
||||
// UpdateRegionBackendServiceHook defines the hook for updating a Region
|
||||
// BackendsService. It replaces the object with the same key in the mock with
|
||||
// the updated object.
|
||||
func UpdateAlphaRegionBackendServiceHook(ctx context.Context, key *meta.Key, obj *ga.BackendService, m *cloud.MockAlphaRegionBackendServices) error {
|
||||
func UpdateAlphaRegionBackendServiceHook(ctx context.Context, key *meta.Key, obj *alpha.BackendService, m *cloud.MockAlphaRegionBackendServices) error {
|
||||
_, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
obj.Name = key.Name
|
||||
projectID := m.ProjectRouter.ProjectID(ctx, "ga", "backendServices")
|
||||
projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "backendServices")
|
||||
obj.SelfLink = cloud.SelfLink(meta.VersionAlpha, projectID, "backendServices", key)
|
||||
|
||||
m.Objects[*key] = &cloud.MockRegionBackendServicesObj{Obj: obj}
|
||||
@@ -576,14 +576,14 @@ func UpdateAlphaRegionBackendServiceHook(ctx context.Context, key *meta.Key, obj
|
||||
// UpdateBetaRegionBackendServiceHook defines the hook for updating a Region
|
||||
// BackendsService. It replaces the object with the same key in the mock with
|
||||
// the updated object.
|
||||
func UpdateBetaRegionBackendServiceHook(ctx context.Context, key *meta.Key, obj *ga.BackendService, m *cloud.MockBetaRegionBackendServices) error {
|
||||
func UpdateBetaRegionBackendServiceHook(ctx context.Context, key *meta.Key, obj *beta.BackendService, m *cloud.MockBetaRegionBackendServices) error {
|
||||
_, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
obj.Name = key.Name
|
||||
projectID := m.ProjectRouter.ProjectID(ctx, "ga", "backendServices")
|
||||
projectID := m.ProjectRouter.ProjectID(ctx, "beta", "backendServices")
|
||||
obj.SelfLink = cloud.SelfLink(meta.VersionAlpha, projectID, "backendServices", key)
|
||||
|
||||
m.Objects[*key] = &cloud.MockRegionBackendServicesObj{Obj: obj}
|
||||
@@ -704,15 +704,15 @@ func UpdateAlphaRegionURLMapHook(ctx context.Context, key *meta.Key, obj *alpha.
|
||||
|
||||
// UpdateBetaRegionURLMapHook defines the hook for updating an alpha UrlMap.
|
||||
// It replaces the object with the same key in the mock with the updated object.
|
||||
func UpdateBetaRegionURLMapHook(ctx context.Context, key *meta.Key, obj *alpha.UrlMap, m *cloud.MockBetaRegionUrlMaps) error {
|
||||
func UpdateBetaRegionURLMapHook(ctx context.Context, key *meta.Key, obj *beta.UrlMap, m *cloud.MockBetaRegionUrlMaps) error {
|
||||
_, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
obj.Name = key.Name
|
||||
projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "urlMaps")
|
||||
obj.SelfLink = cloud.SelfLink(meta.VersionAlpha, projectID, "urlMaps", key)
|
||||
projectID := m.ProjectRouter.ProjectID(ctx, "beta", "urlMaps")
|
||||
obj.SelfLink = cloud.SelfLink(meta.VersionBeta, projectID, "urlMaps", key)
|
||||
|
||||
m.Objects[*key] = &cloud.MockRegionUrlMapsObj{Obj: obj}
|
||||
return nil
|
||||
@@ -768,7 +768,7 @@ func SetTargetAlphaForwardingRuleHook(ctx context.Context, key *meta.Key, obj *a
|
||||
}
|
||||
|
||||
// SetTargetBetaForwardingRuleHook defines the hook for setting the target proxy for an Alpha ForwardingRule.
|
||||
func SetTargetBetaForwardingRuleHook(ctx context.Context, key *meta.Key, obj *alpha.TargetReference, m *cloud.MockBetaForwardingRules) error {
|
||||
func SetTargetBetaForwardingRuleHook(ctx context.Context, key *meta.Key, obj *beta.TargetReference, m *cloud.MockBetaForwardingRules) error {
|
||||
fw, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -811,7 +811,7 @@ func SetURLMapTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *ga.Ur
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetURLMapTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy.
|
||||
// SetURLMapTargetHTTPSProxyHook defines the hook for setting the url map for a TargetHttpsProxy.
|
||||
func SetURLMapTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *ga.UrlMapReference, m *cloud.MockTargetHttpsProxies) error {
|
||||
tp, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
@@ -822,7 +822,7 @@ func SetURLMapTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *ga.U
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetURLMapTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy.
|
||||
// SetURLMapAlphaRegionTargetHTTPSProxyHook defines the hook for setting the url map for a TargetHttpsProxy.
|
||||
func SetURLMapAlphaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *alpha.UrlMapReference, m *cloud.MockAlphaRegionTargetHttpsProxies) error {
|
||||
tp, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
@@ -833,8 +833,8 @@ func SetURLMapAlphaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetURLMapBetaRegionTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy.
|
||||
func SetURLMapBetaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *alpha.UrlMapReference, m *cloud.MockBetaRegionTargetHttpsProxies) error {
|
||||
// SetURLMapBetaRegionTargetHTTPSProxyHook defines the hook for setting the url map for a TargetHttpsProxy.
|
||||
func SetURLMapBetaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *beta.UrlMapReference, m *cloud.MockBetaRegionTargetHttpsProxies) error {
|
||||
tp, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -844,7 +844,7 @@ func SetURLMapBetaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key,
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetURLMapRegionTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy.
|
||||
// SetURLMapRegionTargetHTTPSProxyHook defines the hook for setting the url map for a TargetHttpsProxy.
|
||||
func SetURLMapRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *ga.UrlMapReference, m *cloud.MockRegionTargetHttpsProxies) error {
|
||||
tp, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
@@ -900,7 +900,7 @@ func SetURLMapAlphaRegionTargetHTTPProxyHook(ctx context.Context, key *meta.Key,
|
||||
}
|
||||
|
||||
// SetURLMapBetaRegionTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy.
|
||||
func SetURLMapBetaRegionTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *alpha.UrlMapReference, m *cloud.MockBetaRegionTargetHttpProxies) error {
|
||||
func SetURLMapBetaRegionTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *beta.UrlMapReference, m *cloud.MockBetaRegionTargetHttpProxies) error {
|
||||
tp, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -921,6 +921,28 @@ func SetURLMapRegionTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetBackendServiceAlphaTargetTCPProxyHook defines the hook for setting the backend service for an alpha TargetTcpProxy.
|
||||
func SetBackendServiceAlphaTargetTCPProxyHook(ctx context.Context, key *meta.Key, ref *alpha.TargetTcpProxiesSetBackendServiceRequest, m *cloud.MockAlphaTargetTcpProxies) error {
|
||||
tp, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tp.Service = ref.Service
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetBackendServiceBetaTargetTCPProxyHook defines the hook for setting the backend service for a beta TargetTcpProxy.
|
||||
func SetBackendServiceBetaTargetTCPProxyHook(ctx context.Context, key *meta.Key, ref *beta.TargetTcpProxiesSetBackendServiceRequest, m *cloud.MockBetaTargetTcpProxies) error {
|
||||
tp, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tp.Service = ref.Service
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetSslCertificateTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
|
||||
func SetSslCertificateTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *ga.TargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockTargetHttpsProxies) error {
|
||||
tp, err := m.Get(ctx, key)
|
||||
@@ -942,7 +964,7 @@ func SetSslCertificateAlphaTargetHTTPSProxyHook(ctx context.Context, key *meta.K
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetSslCertificateAlphaTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
|
||||
// SetSslCertificateBetaTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
|
||||
func SetSslCertificateBetaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *beta.TargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockBetaTargetHttpsProxies) error {
|
||||
tp, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
@@ -953,7 +975,7 @@ func SetSslCertificateBetaTargetHTTPSProxyHook(ctx context.Context, key *meta.Ke
|
||||
}
|
||||
|
||||
// SetSslCertificateAlphaRegionTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
|
||||
func SetSslCertificateAlphaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *alpha.TargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockAlphaRegionTargetHttpsProxies) error {
|
||||
func SetSslCertificateAlphaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *alpha.RegionTargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockAlphaRegionTargetHttpsProxies) error {
|
||||
tp, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -964,7 +986,7 @@ func SetSslCertificateAlphaRegionTargetHTTPSProxyHook(ctx context.Context, key *
|
||||
}
|
||||
|
||||
// SetSslCertificateBetaRegionTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
|
||||
func SetSslCertificateBetaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *alpha.TargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockBetaRegionTargetHttpsProxies) error {
|
||||
func SetSslCertificateBetaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *beta.RegionTargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockBetaRegionTargetHttpsProxies) error {
|
||||
tp, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -975,7 +997,7 @@ func SetSslCertificateBetaRegionTargetHTTPSProxyHook(ctx context.Context, key *m
|
||||
}
|
||||
|
||||
// SetSslCertificateRegionTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
|
||||
func SetSslCertificateRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *ga.TargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockRegionTargetHttpsProxies) error {
|
||||
func SetSslCertificateRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *ga.RegionTargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockRegionTargetHttpsProxies) error {
|
||||
tp, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -985,7 +1007,7 @@ func SetSslCertificateRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetSslCertificateTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
|
||||
// SetSslPolicyTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
|
||||
func SetSslPolicyTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *ga.SslPolicyReference, m *cloud.MockTargetHttpsProxies) error {
|
||||
tp, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
@@ -996,7 +1018,7 @@ func SetSslPolicyTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *g
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetSslCertificateAlphaTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
|
||||
// SetSslPolicyAlphaTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
|
||||
func SetSslPolicyAlphaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *alpha.SslPolicyReference, m *cloud.MockAlphaTargetHttpsProxies) error {
|
||||
tp, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
@@ -1006,7 +1028,7 @@ func SetSslPolicyAlphaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, r
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetSslCertificateAlphaTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
|
||||
// SetSslPolicyBetaTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
|
||||
func SetSslPolicyBetaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *beta.SslPolicyReference, m *cloud.MockBetaTargetHttpsProxies) error {
|
||||
tp, err := m.Get(ctx, key)
|
||||
if err != nil {
|
||||
|
22
vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/utils.go
generated
vendored
22
vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/utils.go
generated
vendored
@@ -39,16 +39,20 @@ type ResourceID struct {
|
||||
|
||||
// Equal returns true if two resource IDs are equal.
|
||||
func (r *ResourceID) Equal(other *ResourceID) bool {
|
||||
if r.ProjectID != other.ProjectID || r.Resource != other.Resource {
|
||||
return false
|
||||
switch {
|
||||
case r == nil && other == nil:
|
||||
return true
|
||||
case r == nil || other == nil:
|
||||
return false
|
||||
case r.ProjectID != other.ProjectID || r.Resource != other.Resource:
|
||||
return false
|
||||
case r.Key != nil && other.Key != nil:
|
||||
return *r.Key == *other.Key
|
||||
case r.Key == nil && other.Key == nil:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
if r.Key != nil && other.Key != nil {
|
||||
return *r.Key == *other.Key
|
||||
}
|
||||
if r.Key == nil && other.Key == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// RelativeResourceName returns the relative resource name string
|
||||
|
Reference in New Issue
Block a user