-
Notifications
You must be signed in to change notification settings - Fork 159
/
fixtures.go
57 lines (47 loc) · 2.02 KB
/
fixtures.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
Copyright 2020 The Kubermatic Kubernetes Platform contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package testing
import (
"github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/external"
"github.com/gophercloud/gophercloud/openstack/networking/v2/networks"
)
// IDs used when a new resource is created.
// Note that using always the same ID is not correct, but is sufficient to
// cover the current usage. For more advanced usages a pseudo-random UID
// generator should be used instead.
const (
NetworkID = "8bb661f5-76b9-45f1-9ef9-eeffcd025fe4"
SubnetID = "bec43a98-2d0a-4b1d-9df0-0f21e8f89d8a"
RouterID = "b8a25073-b35f-4b64-b205-6d21c8221d98"
PortID = "6f5c4730-aa3f-4677-bca2-3b1ead8545d9"
InterfaceInfoID = "6f5c4730-aa3f-4677-bca2-3b1ead8545d9"
SecGroupID = "babf744f-0098-4f61-8e15-f91c30b3ed05"
SecGroupRuleID = "da8d0577-eeb8-4351-b543-4bb0687f81d3"
)
// Relative paths to resource endpoints
const (
SecurityGroupsEndpoint = "/security-groups"
NetworksEndpoint = "/networks"
SubnetsEndpoint = "/subnets"
RoutersEndpoint = "/routers"
)
func AddRouterInterfaceEndpoint(routerID string) string {
return "/routers/" + routerID + "/add_router_interface"
}
var ExternalNetwork = Network{
Network: networks.Network{Name: "external-network", ID: "d32019d3-bc6e-4319-9c1d-6722fc136a22"},
NetworkExternalExt: external.NetworkExternalExt{External: true},
}
var InternalNetwork = Network{
Network: networks.Network{Name: "kubernetes-cluster-xyz", ID: NetworkID},
}