aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/Microsoft/hcsshim/hnsnetwork.go
blob: f775fa1d07c9a66333e3d8b989e69fefa65420f0 (plain)
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
package hcsshim

import (
	"github.com/Microsoft/hcsshim/internal/hns"
)

// Subnet is assoicated with a network and represents a list
// of subnets available to the network
type Subnet = hns.Subnet

// MacPool is assoicated with a network and represents a list
// of macaddresses available to the network
type MacPool = hns.MacPool

// HNSNetwork represents a network in HNS
type HNSNetwork = hns.HNSNetwork

// HNSNetworkRequest makes a call into HNS to update/query a single network
func HNSNetworkRequest(method, path, request string) (*HNSNetwork, error) {
	return hns.HNSNetworkRequest(method, path, request)
}

// HNSListNetworkRequest makes a HNS call to query the list of available networks
func HNSListNetworkRequest(method, path, request string) ([]HNSNetwork, error) {
	return hns.HNSListNetworkRequest(method, path, request)
}

// GetHNSNetworkByID
func GetHNSNetworkByID(networkID string) (*HNSNetwork, error) {
	return hns.GetHNSNetworkByID(networkID)
}

// GetHNSNetworkName filtered by Name
func GetHNSNetworkByName(networkName string) (*HNSNetwork, error) {
	return hns.GetHNSNetworkByName(networkName)
}