Skip to content

Commit

Permalink
Add patches
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Jutteau <[email protected]>
  • Loading branch information
jerome-jutteau committed Mar 1, 2023
1 parent d9039cd commit 744aa0e
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .osc-patches/23.03.01-Fix-BasePath-region.patch
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

38 changes: 38 additions & 0 deletions .osc-patches/23.03.01-Fix-config-env-BasePath.patch
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

0 comments on commit 744aa0e

Please sign in to comment.