chore(provider): Removed unnecessary files and cleaned up unused functions.
Some checks failed
Go Tests / go-tests (push) Failing after 1m3s
Some checks failed
Go Tests / go-tests (push) Failing after 1m3s
This commit is contained in:
parent
25eab2277d
commit
79e75ba819
4 changed files with 1 additions and 354 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -2,3 +2,4 @@ bin/
|
||||||
release/
|
release/
|
||||||
build/
|
build/
|
||||||
edge-provider
|
edge-provider
|
||||||
|
garm-provider-edge-connect
|
||||||
|
|
|
||||||
197
lala/lala.go
197
lala/lala.go
|
|
@ -1,197 +0,0 @@
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"edp.buildth.ing/DevFW-CICD/garm-provider-edge-connect/provider"
|
|
||||||
)
|
|
||||||
|
|
||||||
var testManifest = `
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: mganter-test-tcp
|
|
||||||
labels:
|
|
||||||
run: mganter-test
|
|
||||||
spec:
|
|
||||||
type: LoadBalancer
|
|
||||||
ports:
|
|
||||||
- name: tcp80
|
|
||||||
protocol: TCP
|
|
||||||
port: 80
|
|
||||||
targetPort: 80
|
|
||||||
selector:
|
|
||||||
run: mganter-test
|
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: mganter-test-deployment
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
run: mganter-test
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
run: mganter-test
|
|
||||||
mexDeployGen: kubernetes-basic
|
|
||||||
spec:
|
|
||||||
volumes:
|
|
||||||
containers:
|
|
||||||
- name: mganter-test
|
|
||||||
image: edp.buildth.ing/devfw-cicd/nginx
|
|
||||||
imagePullPolicy: Always
|
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
||||||
protocol: TCP
|
|
||||||
`
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
ctx := context.TODO()
|
|
||||||
/*e := client.EdgeConnect{
|
|
||||||
BaseURL: "https://hub.apps.edge.platform.mg3.mdb.osc.live",
|
|
||||||
HttpClient: &http.Client{},
|
|
||||||
Credentials: client.Credentials{
|
|
||||||
Username: os.Getenv("EDGEXR_USERNAME"),
|
|
||||||
Password: os.Getenv("EDGEXR_PASSWORD"),
|
|
||||||
},
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/*e.DeleteAppInstance(ctx, client.AppInstanceKey{
|
|
||||||
Organization: "edp-developer-framework",
|
|
||||||
Name: "mganterInstanceTest",
|
|
||||||
CloudletKey: client.CloudletKey{
|
|
||||||
Organization: "TelekomOP",
|
|
||||||
Name: "Munich",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"EU")
|
|
||||||
|
|
||||||
e.DeleteApp(ctx, client.AppKey{
|
|
||||||
Organization: "edp-developer-framework",
|
|
||||||
Name: "mganter-test",
|
|
||||||
Version: "0.0.1",
|
|
||||||
}, "EU")
|
|
||||||
|
|
||||||
err := e.NewApp(ctx, client.NewAppInput{
|
|
||||||
Region: "EU",
|
|
||||||
App: client.App{
|
|
||||||
Key: client.AppKey{
|
|
||||||
Organization: "edp-developer-framework",
|
|
||||||
Name: "mganter-test",
|
|
||||||
Version: "0.0.1",
|
|
||||||
},
|
|
||||||
Deployment: "kubernetes",
|
|
||||||
ImageType: "Docker",
|
|
||||||
ImagePath: "edp.buildth.ing/devfw-cicd/nginx",
|
|
||||||
AllowServerless: true,
|
|
||||||
ServerlessConfig: struct{}{},
|
|
||||||
DefaultFlavor: client.Flavor{
|
|
||||||
Name: "EU.small",
|
|
||||||
},
|
|
||||||
DeploymentGenerator: "kubernetes-basic",
|
|
||||||
DeploymentManifest: testManifest,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
fmt.Printf("Error: %v\n", err)
|
|
||||||
|
|
||||||
app, err := e.ShowApp(ctx, client.AppKey{
|
|
||||||
Organization: "edp-developer-framework",
|
|
||||||
Name: "mganter-test",
|
|
||||||
Version: "0.0.1",
|
|
||||||
}, "EU")
|
|
||||||
fmt.Printf("Error: %v\n", err)
|
|
||||||
fmt.Printf("App: %v\n", app)
|
|
||||||
|
|
||||||
err = e.NewAppInstance(ctx, client.NewAppInstanceInput{
|
|
||||||
Region: "EU",
|
|
||||||
AppInst: client.AppInstance{
|
|
||||||
Key: client.AppInstanceKey{
|
|
||||||
Organization: "edp-developer-framework",
|
|
||||||
Name: "mganterInstanceTest",
|
|
||||||
CloudletKey: client.CloudletKey{
|
|
||||||
Organization: "TelekomOP",
|
|
||||||
Name: "Munich",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
AppKey: client.AppKey{
|
|
||||||
Organization: "edp-developer-framework",
|
|
||||||
Name: "mganter-test",
|
|
||||||
Version: "0.0.1",
|
|
||||||
},
|
|
||||||
Flavor: client.Flavor{
|
|
||||||
Name: "EU.small",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
fmt.Printf("Error: %v\n", err)*/
|
|
||||||
|
|
||||||
/*appinst, err := e.ShowAppInstance(ctx, client.AppInstanceKey{
|
|
||||||
Organization: "edp-developer-framework",
|
|
||||||
Name: "mganterInstanceTest",
|
|
||||||
CloudletKey: client.CloudletKey{
|
|
||||||
Organization: "TelekomOP",
|
|
||||||
Name: "Munich",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"EU")
|
|
||||||
|
|
||||||
fmt.Printf("appinst: %v\n", appinst)
|
|
||||||
fmt.Printf("Error: %v\n", err)*/
|
|
||||||
|
|
||||||
edgeprovider, _, _ := provider.NewEdgeConnectProvider("/home/chris/ipcei/projects/garm-provider-edge-connect/config/config.toml", "lalacontroller")
|
|
||||||
//providerinst, err := edgeprovider.GetInstance(ctx, appinst.Key.Name)
|
|
||||||
|
|
||||||
/*_, err := edgeprovider.CreateInstance(ctx, params.BootstrapInstance{
|
|
||||||
Name: "bootstrapparams-1",
|
|
||||||
PoolID: "123456",
|
|
||||||
})
|
|
||||||
|
|
||||||
_, err = edgeprovider.CreateInstance(ctx, params.BootstrapInstance{
|
|
||||||
Name: "bootstrapparams-2",
|
|
||||||
PoolID: "123456",
|
|
||||||
})*/
|
|
||||||
|
|
||||||
err := edgeprovider.RemoveAllInstances(ctx)
|
|
||||||
//lists, err := edgeprovider.ListInstances(ctx, "123456")
|
|
||||||
/*result, _ := e.ShowApps(ctx, client.AppKey{
|
|
||||||
Organization: "edp-developer-framework",
|
|
||||||
}, "EU")*/
|
|
||||||
|
|
||||||
//fmt.Printf("Lists: %v", lists)
|
|
||||||
fmt.Printf("Error: %v", err)
|
|
||||||
//ShowApps
|
|
||||||
|
|
||||||
//fmt.Printf("provider: %v\n", providerinst)
|
|
||||||
//fmt.Printf("Error: %v\n", err)
|
|
||||||
|
|
||||||
/*
|
|
||||||
token, err := e.RetrieveToken(ctx)
|
|
||||||
fmt.Printf("Token: %v\n", token)
|
|
||||||
fmt.Printf("Error: %v\n", err)
|
|
||||||
err = e.NewApp(ctx, client.NewAppInput{
|
|
||||||
Region: "EU",
|
|
||||||
App: client.App{
|
|
||||||
Key: client.AppKey{
|
|
||||||
Organization: "edp-developer-framework",
|
|
||||||
Name: "mganter-test",
|
|
||||||
Version: "0.0.1",
|
|
||||||
},
|
|
||||||
Deployment: "kubernetes",
|
|
||||||
ImageType: "Docker",
|
|
||||||
ImagePath: "nginx",
|
|
||||||
AllowServerless: true,
|
|
||||||
ServerlessConfig: struct{}{},
|
|
||||||
DefaultFlavor: client.Flavor{
|
|
||||||
Name: "EU.small",
|
|
||||||
},
|
|
||||||
DeploymentGenerator: "kubernetes-basic",
|
|
||||||
DeploymentManifest: testManifest,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
fmt.Printf("Error: %v\n", err)*/
|
|
||||||
}
|
|
||||||
49
mock.log
49
mock.log
|
|
@ -1,49 +0,0 @@
|
||||||
AWS_ACCESS_KEY_ID=CABTBZ2WB8LX94V6EDJK
|
|
||||||
AWS_REQUEST_CHECKSUM_CALCULATION=when_required
|
|
||||||
AWS_RESPONSE_CHECKSUM_VALIDATION=when_required
|
|
||||||
AWS_SECRET_ACCESS_KEY=CUlNepW5q7nfCFQqDIY4egYjmDED4Z2KrK1TriyQ
|
|
||||||
COLORTERM=truecolor
|
|
||||||
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
|
|
||||||
DISPLAY=:0
|
|
||||||
GIT_ASKPASS=/home/chris/.vscode-server/bin/7adae6a56e34cb64d08899664b814cf620465925/extensions/git/dist/askpass.sh
|
|
||||||
HOME=/home/chris
|
|
||||||
HOSTTYPE=x86_64
|
|
||||||
KUBECONFIG=kubeconfig.yaml
|
|
||||||
LANG=C.UTF-8
|
|
||||||
LESSCLOSE=/usr/bin/lesspipe %s %s
|
|
||||||
LESSOPEN=| /usr/bin/lesspipe %s
|
|
||||||
LOGNAME=chris
|
|
||||||
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.crdownload=00;90:*.dpkg-dist=00;90:*.dpkg-new=00;90:*.dpkg-old=00;90:*.dpkg-tmp=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:*.swp=00;90:*.tmp=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:
|
|
||||||
NAME=rdde02m1
|
|
||||||
NVM_BIN=/home/chris/.nvm/versions/node/v20.18.1/bin
|
|
||||||
NVM_CD_FLAGS=
|
|
||||||
NVM_DIR=/home/chris/.nvm
|
|
||||||
NVM_INC=/home/chris/.nvm/versions/node/v20.18.1/include/node
|
|
||||||
OLDPWD=/home/chris/ipcei/projects
|
|
||||||
OS_ACCESS_KEY=CABTBZ2WB8LX94V6EDJK
|
|
||||||
OS_SECRET_KEY=CUlNepW5q7nfCFQqDIY4egYjmDED4Z2KrK1TriyQ
|
|
||||||
PATH=/usr/local/go/bin:/home/chris/.vscode-server/bin/7adae6a56e34cb64d08899664b814cf620465925/bin/remote-cli:/usr/local/go/bin:/usr/local/go/bin:/home/chris/.nvm/versions/node/v20.18.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Python313/Scripts/:/mnt/c/Python313/:/mnt/c/Program Files/Common Files/Oracle/Java/javapath:/mnt/c/ProgramData/Oracle/Java/javapath:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files (x86)/dotnet/:/mnt/c/Program Files/RedHat/java-11-openjdk-11.0.16-1/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Users/cihe/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files/JetBrains/IntelliJ IDEA 2022.2.3/bin:/mnt/c/Program Files/JetBrains/IntelliJ IDEA Community Edition 2022.2.3/bin:/mnt/c/Users/cihe/AppData/Local/Programs/Python/Python310/Scripts:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/Go/bin:/mnt/c/Program Files/nodejs/:/mnt/c/Users/cihe/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files/JetBrains/IntelliJ IDEA 2022.2.3/bin:/mnt/c/Program Files/JetBrains/IntelliJ IDEA Community Edition 2022.2.3/bin:/mnt/c/Users/cihe/tools/sonarscanner/bin:/mnt/c/Users/cihe/AppData/Local/GitHubDesktop/bin:/mnt/c/Users/cihe/go/bin:/mnt/c/Users/cihe/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/cihe/AppData/Roaming/npm:/snap/bin:/home/chris/.cargo/bin:/home/chris/go/bin:/home/chris/go/bin:/home/chris/.cargo/bin:/home/chris/go/bin
|
|
||||||
PULSE_SERVER=unix:/mnt/wslg/PulseServer
|
|
||||||
PWD=/home/chris/ipcei/projects/garm-provider-edge-connect
|
|
||||||
SHELL=/bin/bash
|
|
||||||
SHLVL=1
|
|
||||||
TERM=xterm-256color
|
|
||||||
TERM_PROGRAM=vscode
|
|
||||||
TERM_PROGRAM_VERSION=1.102.1
|
|
||||||
USER=chris
|
|
||||||
VSCODE_GIT_ASKPASS_EXTRA_ARGS=
|
|
||||||
VSCODE_GIT_ASKPASS_MAIN=/home/chris/.vscode-server/bin/7adae6a56e34cb64d08899664b814cf620465925/extensions/git/dist/askpass-main.js
|
|
||||||
VSCODE_GIT_ASKPASS_NODE=/home/chris/.vscode-server/bin/7adae6a56e34cb64d08899664b814cf620465925/node
|
|
||||||
VSCODE_GIT_IPC_HANDLE=/run/user/1000/vscode-git-e78a6d970e.sock
|
|
||||||
VSCODE_IPC_HOOK_CLI=/run/user/1000/vscode-ipc-9f03a1c6-beb1-48e2-a965-568262339ebf.sock
|
|
||||||
WAYLAND_DISPLAY=wayland-0
|
|
||||||
WSL2_GUI_APPS_ENABLED=1
|
|
||||||
WSLENV=VSCODE_WSL_EXT_LOCATION/up
|
|
||||||
WSL_DISTRO_NAME=Ubuntu
|
|
||||||
WSL_INTEROP=/run/WSL/1066_interop
|
|
||||||
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
|
|
||||||
XDG_RUNTIME_DIR=/run/user/1000/
|
|
||||||
_=./mockprovider.sh
|
|
||||||
Parameters asd asd
|
|
||||||
stdin lala
|
|
||||||
=======================================================================================
|
|
||||||
|
|
@ -21,7 +21,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
@ -237,113 +236,6 @@ func (a *edgeConnectProvider) CreateInstance(ctx context.Context, bootstrapParam
|
||||||
return instance, nil
|
return instance, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetRunnerEnvs(gitHubScope GitHubScopeDetails, bootstrapParams params.BootstrapInstance) []corev1.EnvVar {
|
|
||||||
return []corev1.EnvVar{
|
|
||||||
{
|
|
||||||
Name: "RUNNER_ORG",
|
|
||||||
Value: gitHubScope.Org,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "RUNNER_REPO",
|
|
||||||
Value: gitHubScope.Repo,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "RUNNER_ENTERPRISE",
|
|
||||||
Value: gitHubScope.Enterprise,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "RUNNER_GROUP",
|
|
||||||
Value: bootstrapParams.GitHubRunnerGroup,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "RUNNER_NAME",
|
|
||||||
Value: bootstrapParams.Name,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "RUNNER_LABELS",
|
|
||||||
Value: strings.Join(bootstrapParams.Labels, ","),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "RUNNER_HOME",
|
|
||||||
Value: "/tmp",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "RUNNER_NO_DEFAULT_LABELS",
|
|
||||||
Value: "true",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "DISABLE_RUNNER_UPDATE",
|
|
||||||
Value: "true",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "RUNNER_WORKDIR",
|
|
||||||
Value: "/tmp/_work/",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "GITHUB_URL",
|
|
||||||
Value: gitHubScope.BaseURL,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "RUNNER_EPHEMERAL",
|
|
||||||
Value: "true",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "RUNNER_TOKEN",
|
|
||||||
Value: "dummy",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "METADATA_URL",
|
|
||||||
Value: bootstrapParams.MetadataURL,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "BEARER_TOKEN",
|
|
||||||
Value: bootstrapParams.InstanceToken,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "CALLBACK_URL",
|
|
||||||
Value: bootstrapParams.CallbackURL,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "JIT_CONFIG_ENABLED",
|
|
||||||
Value: fmt.Sprintf("%t", bootstrapParams.JitConfigEnabled),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func ExtractGitHubScopeDetails(gitRepoURL string) (GitHubScopeDetails, error) {
|
|
||||||
if gitRepoURL == "" {
|
|
||||||
return GitHubScopeDetails{}, fmt.Errorf("no gitRepoURL supplied")
|
|
||||||
}
|
|
||||||
u, err := url.Parse(gitRepoURL)
|
|
||||||
if err != nil {
|
|
||||||
return GitHubScopeDetails{}, fmt.Errorf("invalid URL: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if u.Scheme == "" || u.Host == "" {
|
|
||||||
return GitHubScopeDetails{}, fmt.Errorf("invalid URL: %s", gitRepoURL)
|
|
||||||
}
|
|
||||||
|
|
||||||
pathParts := strings.Split(strings.Trim(u.Path, "/"), "/")
|
|
||||||
|
|
||||||
scope := GitHubScopeDetails{
|
|
||||||
BaseURL: u.Scheme + "://" + u.Host,
|
|
||||||
}
|
|
||||||
|
|
||||||
switch {
|
|
||||||
case len(pathParts) == 1:
|
|
||||||
scope.Org = pathParts[0]
|
|
||||||
case len(pathParts) == 2 && pathParts[0] == "enterprises":
|
|
||||||
scope.Enterprise = pathParts[1]
|
|
||||||
case len(pathParts) == 2:
|
|
||||||
scope.Org = pathParts[0]
|
|
||||||
scope.Repo = pathParts[1]
|
|
||||||
default:
|
|
||||||
return GitHubScopeDetails{}, fmt.Errorf("URL does not match the expected patterns")
|
|
||||||
}
|
|
||||||
|
|
||||||
return scope, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete instance will delete the instance in a provider.
|
// Delete instance will delete the instance in a provider.
|
||||||
func (a *edgeConnectProvider) DeleteInstance(ctx context.Context, instance string) error {
|
func (a *edgeConnectProvider) DeleteInstance(ctx context.Context, instance string) error {
|
||||||
log.Printf("Executing DeleteInstance %s\n", instance)
|
log.Printf("Executing DeleteInstance %s\n", instance)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue