Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update NAT rule #26

Merged
merged 3 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions pkg/client/clouds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestCloudsAPIService_GetAllCloudDataStores(t *testing.T) {
},
cloudID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/zones/1/data-stores"
path := mockHost + "/v1beta1/zones/1/data-stores"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -78,7 +78,7 @@ func TestCloudsAPIService_GetAllCloudDataStores(t *testing.T) {
},
cloudID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/zones/1/data-stores"
path := mockHost + "/v1beta1/zones/1/data-stores"
method := "GET"
headers := getDefaultHeaders()
m.EXPECT().prepareRequest(gomock.Any(), path, method, nil, headers,
Expand All @@ -96,7 +96,7 @@ func TestCloudsAPIService_GetAllCloudDataStores(t *testing.T) {
},
cloudID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/zones/1/data-stores"
path := mockHost + "/v1beta1/zones/1/data-stores"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -175,7 +175,7 @@ func TestCloudsAPIService_GetAllCloudResourcePools(t *testing.T) {
},
cloudID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/zones/1/resource-pools"
path := mockHost + "/v1beta1/zones/1/resource-pools"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -214,7 +214,7 @@ func TestCloudsAPIService_GetAllCloudResourcePools(t *testing.T) {
},
cloudID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/zones/1/resource-pools"
path := mockHost + "/v1beta1/zones/1/resource-pools"
method := "GET"
headers := getDefaultHeaders()
m.EXPECT().prepareRequest(gomock.Any(), path, method, nil, headers,
Expand All @@ -232,7 +232,7 @@ func TestCloudsAPIService_GetAllCloudResourcePools(t *testing.T) {
},
cloudID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/zones/1/resource-pools"
path := mockHost + "/v1beta1/zones/1/resource-pools"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -308,7 +308,7 @@ func TestCloudsAPIService_GetAllClouds(t *testing.T) {
"name": templateName,
},
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/zones"
path := mockHost + "/v1beta1/zones"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -346,7 +346,7 @@ func TestCloudsAPIService_GetAllClouds(t *testing.T) {
"name": templateName,
},
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/zones"
path := mockHost + "/v1beta1/zones"
method := "GET"
headers := getDefaultHeaders()
m.EXPECT().prepareRequest(gomock.Any(), path, method, nil, headers,
Expand All @@ -363,7 +363,7 @@ func TestCloudsAPIService_GetAllClouds(t *testing.T) {
"name": templateName,
},
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/zones"
path := mockHost + "/v1beta1/zones"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -432,7 +432,7 @@ func TestCloudsAPIService_GetAllCloudFolders(t *testing.T) {
},
cloudID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/zones/1/folders"
path := mockHost + "/v1beta1/zones/1/folders"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -471,7 +471,7 @@ func TestCloudsAPIService_GetAllCloudFolders(t *testing.T) {
},
cloudID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/zones/1/folders"
path := mockHost + "/v1beta1/zones/1/folders"
method := "GET"
headers := getDefaultHeaders()
m.EXPECT().prepareRequest(gomock.Any(), path, method, nil, headers,
Expand All @@ -489,7 +489,7 @@ func TestCloudsAPIService_GetAllCloudFolders(t *testing.T) {
},
cloudID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/zones/1/folders"
path := mockHost + "/v1beta1/zones/1/folders"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -555,7 +555,7 @@ func TestCloudsAPIService_GetAllCloudNetworks(t *testing.T) {
cloudID: 1,
provisionTypeID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/options/zoneNetworkOptions"
path := mockHost + "/v1beta1/options/zoneNetworkOptions"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -597,7 +597,7 @@ func TestCloudsAPIService_GetAllCloudNetworks(t *testing.T) {
cloudID: 1,
provisionTypeID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/options/zoneNetworkOptions"
path := mockHost + "/v1beta1/options/zoneNetworkOptions"
method := "GET"
headers := getDefaultHeaders()
m.EXPECT().prepareRequest(gomock.Any(), path, method, nil, headers,
Expand All @@ -614,7 +614,7 @@ func TestCloudsAPIService_GetAllCloudNetworks(t *testing.T) {
cloudID: 1,
provisionTypeID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/options/zoneNetworkOptions"
path := mockHost + "/v1beta1/options/zoneNetworkOptions"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -682,7 +682,7 @@ func TestCloudsAPIService_GetSpecificCloudFolder(t *testing.T) {
cloudID: 1,
folderID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/zones/1/folders/1"
path := mockHost + "/v1beta1/zones/1/folders/1"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -715,7 +715,7 @@ func TestCloudsAPIService_GetSpecificCloudFolder(t *testing.T) {
cloudID: 1,
folderID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/zones/1/folders/1"
path := mockHost + "/v1beta1/zones/1/folders/1"
method := "GET"
headers := getDefaultHeaders()
m.EXPECT().prepareRequest(gomock.Any(), path, method, nil, headers,
Expand All @@ -729,7 +729,7 @@ func TestCloudsAPIService_GetSpecificCloudFolder(t *testing.T) {
cloudID: 1,
folderID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/zones/1/folders/1"
path := mockHost + "/v1beta1/zones/1/folders/1"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down
12 changes: 6 additions & 6 deletions pkg/client/domain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestDomainAPIService_GetAllDomains(t *testing.T) {
"name": templateName,
},
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/networks/domains"
path := mockHost + "/v1beta1/networks/domains"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -73,7 +73,7 @@ func TestDomainAPIService_GetAllDomains(t *testing.T) {
"name": templateName,
},
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/networks/domains"
path := mockHost + "/v1beta1/networks/domains"
method := "GET"
headers := getDefaultHeaders()
m.EXPECT().prepareRequest(gomock.Any(), path, method, nil, headers,
Expand All @@ -90,7 +90,7 @@ func TestDomainAPIService_GetAllDomains(t *testing.T) {
"name": templateName,
},
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/networks/domains"
path := mockHost + "/v1beta1/networks/domains"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -156,7 +156,7 @@ func TestDomainAPIService_GetSpecificDomain(t *testing.T) {
name: "Normal Test case 1: Get a specific domain",
domainID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/networks/domains/1"
path := mockHost + "/v1beta1/networks/domains/1"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -188,7 +188,7 @@ func TestDomainAPIService_GetSpecificDomain(t *testing.T) {
name: "Failed Test case 2: error in prepare request",
domainID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/networks/domains/1"
path := mockHost + "/v1beta1/networks/domains/1"
method := "GET"
headers := getDefaultHeaders()
m.EXPECT().prepareRequest(gomock.Any(), path, method, nil, headers,
Expand All @@ -201,7 +201,7 @@ func TestDomainAPIService_GetSpecificDomain(t *testing.T) {
name: "Failed Test case 3: error in callAPI",
domainID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/networks/domains/1"
path := mockHost + "/v1beta1/networks/domains/1"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down
6 changes: 3 additions & 3 deletions pkg/client/environment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestEnvironmentAPIService_GetAllEnvironment(t *testing.T) {
"name": templateName,
},
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/environments"
path := mockHost + "/v1beta1/environments"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -73,7 +73,7 @@ func TestEnvironmentAPIService_GetAllEnvironment(t *testing.T) {
"name": templateName,
},
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/environments"
path := mockHost + "/v1beta1/environments"
method := "GET"
headers := getDefaultHeaders()
m.EXPECT().prepareRequest(gomock.Any(), path, method, nil, headers,
Expand All @@ -90,7 +90,7 @@ func TestEnvironmentAPIService_GetAllEnvironment(t *testing.T) {
"name": templateName,
},
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/environments"
path := mockHost + "/v1beta1/environments"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down
12 changes: 6 additions & 6 deletions pkg/client/groups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestGroupsAPIService_GetASpecificGroup(t *testing.T) {
name: "Normal Test case 1: Get a specific group",
groupID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/groups/1"
path := mockHost + "/v1beta1/groups/1"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -66,7 +66,7 @@ func TestGroupsAPIService_GetASpecificGroup(t *testing.T) {
name: "Failed Test case 2: Error in prepare requst",
groupID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/groups/1"
path := mockHost + "/v1beta1/groups/1"
method := "GET"
headers := getDefaultHeaders()
m.EXPECT().prepareRequest(gomock.Any(), path, method, nil, headers, url.Values{},
Expand All @@ -79,7 +79,7 @@ func TestGroupsAPIService_GetASpecificGroup(t *testing.T) {
name: "Failed Test case 3: Error in callAPI",
groupID: 1,
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/groups/1"
path := mockHost + "/v1beta1/groups/1"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -146,7 +146,7 @@ func TestGroupsAPIService_GetAllGroups(t *testing.T) {
"name": templateName,
},
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/groups"
path := mockHost + "/v1beta1/groups"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down Expand Up @@ -184,7 +184,7 @@ func TestGroupsAPIService_GetAllGroups(t *testing.T) {
"name": templateName,
},
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/groups"
path := mockHost + "/v1beta1/groups"
method := "GET"
headers := getDefaultHeaders()
m.EXPECT().prepareRequest(gomock.Any(), path, method, nil, headers,
Expand All @@ -201,7 +201,7 @@ func TestGroupsAPIService_GetAllGroups(t *testing.T) {
"name": templateName,
},
given: func(m *MockAPIClientHandler) {
path := mockHost + "/v1/groups"
path := mockHost + "/v1beta1/groups"
method := "GET"
headers := getDefaultHeaders()
req, _ := http.NewRequest(method, path, nil)
Expand Down
Loading