diff --git a/config/config.go b/config/config.go index be6004b..73a1c82 100644 --- a/config/config.go +++ b/config/config.go @@ -48,6 +48,7 @@ type Config struct { Organization string `toml:"organization"` CloudletKey CloudletKey `toml:"cloudlet"` Region string `toml:"region"` + EdgeConnectURL string `toml:"edge_connect_url"` } type Credentials struct { @@ -65,5 +66,9 @@ func (c *Config) Validate() error { return fmt.Errorf("log_file is not defined in provider config") } + if c.EdgeConnectURL == "" { + return fmt.Errorf("edge_connect_url is not defined in provider config") + } + return nil } diff --git a/config/config.toml b/config/config.toml index 506f1de..aabcc71 100644 --- a/config/config.toml +++ b/config/config.toml @@ -1,3 +1,4 @@ +edge_connect_url = "https://hub.apps.orca.platform.mg3.mdb.osc.live" organization = "edp-developer-framework" region = "EU" log_file = "./lala.log" diff --git a/provider/provider.go b/provider/provider.go index 891cd00..270f6ce 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -59,7 +59,7 @@ func NewEdgeConnectProvider(configPath, controllerID string) (execution.External } client := edgeconnect.NewClientWithCredentials( - "https://hub.apps.edge.platform.mg3.mdb.osc.live", + conf.EdgeConnectURL, creds.Username, creds.Password, edgeconnect.WithHTTPClient(&http.Client{Timeout: 30 * time.Second}),