2018-03-19 18:57:30 -04:00
|
|
|
package hcsshim
|
|
|
|
|
|
|
|
import (
|
2018-09-05 13:35:51 -04:00
|
|
|
"github.com/Microsoft/hcsshim/internal/hns"
|
2018-03-19 18:57:30 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
// Subnet is assoicated with a network and represents a list
|
|
|
|
// of subnets available to the network
|
2018-09-05 13:35:51 -04:00
|
|
|
type Subnet = hns.Subnet
|
2018-03-19 18:57:30 -04:00
|
|
|
|
|
|
|
// MacPool is assoicated with a network and represents a list
|
|
|
|
// of macaddresses available to the network
|
2018-09-05 13:35:51 -04:00
|
|
|
type MacPool = hns.MacPool
|
2018-03-19 18:57:30 -04:00
|
|
|
|
|
|
|
// HNSNetwork represents a network in HNS
|
2018-09-05 13:35:51 -04:00
|
|
|
type HNSNetwork = hns.HNSNetwork
|
2018-03-19 18:57:30 -04:00
|
|
|
|
|
|
|
// HNSNetworkRequest makes a call into HNS to update/query a single network
|
|
|
|
func HNSNetworkRequest(method, path, request string) (*HNSNetwork, error) {
|
2018-09-05 13:35:51 -04:00
|
|
|
return hns.HNSNetworkRequest(method, path, request)
|
2018-03-19 18:57:30 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// HNSListNetworkRequest makes a HNS call to query the list of available networks
|
|
|
|
func HNSListNetworkRequest(method, path, request string) ([]HNSNetwork, error) {
|
2018-09-05 13:35:51 -04:00
|
|
|
return hns.HNSListNetworkRequest(method, path, request)
|
2018-03-19 18:57:30 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// GetHNSNetworkByID
|
|
|
|
func GetHNSNetworkByID(networkID string) (*HNSNetwork, error) {
|
2018-09-05 13:35:51 -04:00
|
|
|
return hns.GetHNSNetworkByID(networkID)
|
2018-03-19 18:57:30 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// GetHNSNetworkName filtered by Name
|
|
|
|
func GetHNSNetworkByName(networkName string) (*HNSNetwork, error) {
|
2018-09-05 13:35:51 -04:00
|
|
|
return hns.GetHNSNetworkByName(networkName)
|
2018-03-19 18:57:30 -04:00
|
|
|
}
|