Skip to content

Commit

Permalink
rename ManagementAPI to InternalAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
theganyo committed Apr 23, 2020
1 parent 396ad22 commit 79b6cac
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions cmd/provision/provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ func (p *provision) printConfig(cred *credential, printf shared.FormatFn, verify

config := server.Config{
Tenant: server.TenantConfig{
ManagementAPI: p.ManagementBase,
InternalAPI: p.ManagementBase, // TODO
RemoteServiceAPI: p.RemoteServiceProxyURL,
OrgName: p.Org,
EnvName: p.Env,
Expand All @@ -681,7 +681,7 @@ func (p *provision) printConfig(cred *credential, printf shared.FormatFn, verify
}

if p.IsGCPManaged {
config.Tenant.ManagementAPI = ""
config.Tenant.InternalAPI = "" // no internal API for GCP
config.Analytics.CollectionInterval = 10 * time.Second

// assumes the same mesh and tls files are mounted properly
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module github.com/apigee/apigee-remote-service-cli

go 1.13

replace github.com/apigee/apigee-remote-service-golib => github.com/theganyo/apigee-remote-service-golib v0.0.0-20200417215038-eb2754109270
replace github.com/apigee/apigee-remote-service-golib => github.com/theganyo/apigee-remote-service-golib v0.0.0-20200423221707-af08871b57d8

replace github.com/apigee/apigee-remote-service-envoy => github.com/theganyo/apigee-remote-service-envoy v0.0.2-dev.0.20200420171643-2bad5a8de6d9
replace github.com/apigee/apigee-remote-service-envoy => github.com/theganyo/apigee-remote-service-envoy v0.0.2-dev.0.20200423231709-14df7f1737c8

// replace github.com/apigee/apigee-remote-service-golib => ../apigee-remote-service-golib

Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/theganyo/apigee-remote-service-envoy v0.0.2-dev.0.20200420171643-2bad5a8de6d9 h1:6BTvZmMnnOcxgZY+uJfQfeDQ8UmPca+7mSHZq4Wk7TA=
github.com/theganyo/apigee-remote-service-envoy v0.0.2-dev.0.20200420171643-2bad5a8de6d9/go.mod h1:uxt2WUOtggVv0q25jDF4UrCSVM+K+19NjVLUmvFzUtk=
github.com/theganyo/apigee-remote-service-golib v0.0.0-20200417215038-eb2754109270 h1:3IKkxeTp+bWnUFofYkfln7+reBR+KqWp/F+lJcmriVk=
github.com/theganyo/apigee-remote-service-golib v0.0.0-20200417215038-eb2754109270/go.mod h1:1Y8IJBsjT19gv+pRgmvKNF2FoMguc181K9syiGq2IsY=
github.com/theganyo/apigee-remote-service-envoy v0.0.2-dev.0.20200423231709-14df7f1737c8 h1:jwiyjnStqDH254In15z8Ctp0bB8sLX8WCmmvwrbp5VA=
github.com/theganyo/apigee-remote-service-envoy v0.0.2-dev.0.20200423231709-14df7f1737c8/go.mod h1:f1P9ufpJ1xJQaY4DECfZa3IhV5WobKjiuvAqzupH4G4=
github.com/theganyo/apigee-remote-service-golib v0.0.0-20200423221707-af08871b57d8 h1:OL0QoIU4byNDuKyDfPsqia9aAACALKRXHh7Tymj0JZM=
github.com/theganyo/apigee-remote-service-golib v0.0.0-20200423221707-af08871b57d8/go.mod h1:1Y8IJBsjT19gv+pRgmvKNF2FoMguc181K9syiGq2IsY=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
Expand Down
10 changes: 4 additions & 6 deletions shared/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,19 +223,17 @@ func (r *RootArgs) loadConfig() error {
}

r.ServerConfig = c
r.ManagementBase = c.Tenant.ManagementAPI
r.RuntimeBase = strings.Split(c.Tenant.RemoteServiceAPI, remoteServicePath)[0]

r.Org = c.Tenant.OrgName
r.Env = c.Tenant.EnvName

switch r.ManagementBase {
case LegacySaaSManagementBase:
r.IsLegacySaaS = true
case GCPExperienceBase:
switch c.Tenant.InternalAPI {
case "":
r.ManagementBase = GCPExperienceBase
r.IsGCPManaged = true
case "https://istioservices.apigee.net/edgemicro":
r.ManagementBase = LegacySaaSManagementBase
r.IsLegacySaaS = true
default:
r.IsOPDK = true
}
Expand Down

0 comments on commit 79b6cac

Please sign in to comment.