hnsnetwork.go 1.1 KB

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