-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jérôme Jutteau <[email protected]>
- Loading branch information
1 parent
d9039cd
commit 744aa0e
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From 53fc47b4030cc7d24eeaea67adef3c280b495c0d Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Jutteau?= <[email protected]> | ||
Date: Wed, 1 Mar 2023 12:32:28 +0100 | ||
Subject: [PATCH 1/2] Fix BasePath region | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=UTF-8 | ||
Content-Transfer-Encoding: 8bit | ||
|
||
Signed-off-by: Jérôme Jutteau <[email protected]> | ||
--- | ||
osc/config_file.go | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/osc/config_file.go b/osc/config_file.go | ||
index b35e9537..66efe5bf 100644 | ||
--- a/osc/config_file.go | ||
+++ b/osc/config_file.go | ||
@@ -139,6 +139,7 @@ func (configFile *ConfigFile) Configuration(profileName string) (*Configuration, | ||
} | ||
|
||
config := NewConfiguration() | ||
+ config.BasePath = fmt.Sprintf("https://api.%s.outscale.com/api/v1", region) | ||
config.Servers = []ServerConfiguration{ | ||
{ | ||
Url: url, | ||
-- | ||
2.38.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From d9039cddadd92d851831912529e1545c5883e5cb Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Jutteau?= <[email protected]> | ||
Date: Wed, 1 Mar 2023 12:39:48 +0100 | ||
Subject: [PATCH 2/2] Fix config env BasePath | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=UTF-8 | ||
Content-Transfer-Encoding: 8bit | ||
|
||
Signed-off-by: Jérôme Jutteau <[email protected]> | ||
--- | ||
osc/config_env.go | 4 ++++ | ||
1 file changed, 4 insertions(+) | ||
|
||
diff --git a/osc/config_env.go b/osc/config_env.go | ||
index 9fcd634f..1d4af8ce 100644 | ||
--- a/osc/config_env.go | ||
+++ b/osc/config_env.go | ||
@@ -29,6 +29,7 @@ package osc | ||
import ( | ||
"context" | ||
"errors" | ||
+ "fmt" | ||
"os" | ||
) | ||
|
||
@@ -74,6 +75,9 @@ func (configEnv *ConfigEnv) Configuration() (*Configuration, error) { | ||
} | ||
} else { | ||
config = NewConfiguration() | ||
+ if configEnv.Region != nil { | ||
+ config.BasePath = fmt.Sprintf("https://api.%s.outscale.com/api/v1", *configEnv.Region) | ||
+ } | ||
default_region := "eu-west-2" | ||
config.Servers = []ServerConfiguration{ | ||
{ | ||
-- | ||
2.38.1 | ||
|