hnsnetwork.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package hcsshim
  2. import (
  3. "github.com/Microsoft/hcsshim/internal/hns"
  4. )
  5. // Subnet is assoicated with a network and represents a list
  6. // of subnets available to the network
  7. type Subnet = hns.Subnet
  8. // MacPool is assoicated with a network and represents a list
  9. // of macaddresses available to the network
  10. type MacPool = hns.MacPool
  11. // HNSNetwork represents a network in HNS
  12. type HNSNetwork = hns.HNSNetwork
  13. // HNSNetworkRequest makes a call into HNS to update/query a single network
  14. func HNSNetworkRequest(method, path, request string) (*HNSNetwork, error) {
  15. return hns.HNSNetworkRequest(method, path, request)
  16. }
  17. // HNSListNetworkRequest makes a HNS call to query the list of available networks
  18. func HNSListNetworkRequest(method, path, request string) ([]HNSNetwork, error) {
  19. return hns.HNSListNetworkRequest(method, path, request)
  20. }
  21. // GetHNSNetworkByID
  22. func GetHNSNetworkByID(networkID string) (*HNSNetwork, error) {
  23. return hns.GetHNSNetworkByID(networkID)
  24. }
  25. // GetHNSNetworkName filtered by Name
  26. func GetHNSNetworkByName(networkName string) (*HNSNetwork, error) {
  27. return hns.GetHNSNetworkByName(networkName)
  28. }