From c5238d1b5c6fc6f3284d65b2ed4d8c6df07ff6c4 Mon Sep 17 00:00:00 2001 From: Jaeryn Chu Date: Tue, 30 Apr 2019 16:53:07 -0700 Subject: [PATCH] Moving some Hns const variables. --- cns/hnsclient/hnsclient_windows.go | 15 +++++++++++++++ platform/os_windows.go | 13 ------------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/cns/hnsclient/hnsclient_windows.go b/cns/hnsclient/hnsclient_windows.go index 3a78ebe305..249807efda 100644 --- a/cns/hnsclient/hnsclient_windows.go +++ b/cns/hnsclient/hnsclient_windows.go @@ -10,6 +10,21 @@ import ( "github.com/Microsoft/hcsshim" ) +const ( + // Name of the external hns network + ExtHnsNetworkName = "ext" + + // Address prefix for external hns network + ExtHnsNetworkAddressPrefix = "192.168.255.0/30" + + // Gateway address for external hns network + ExtHnsNetworkGwAddress = "192.168.255.1" + + // HNS network types + hnsL2Bridge = "l2bridge" + hnsL2Tunnel = "l2tunnel" +) + // CreateHnsNetwork creates the HNS network with the provided configuration func CreateHnsNetwork(nwConfig cns.CreateHnsNetworkRequest) error { log.Printf("[Azure CNS] CreateHnsNetwork") diff --git a/platform/os_windows.go b/platform/os_windows.go index b9fc9f7a11..e8bc2c6f4a 100644 --- a/platform/os_windows.go +++ b/platform/os_windows.go @@ -50,19 +50,6 @@ const ( // Command to restart HNS service RestartHnsServiceCommand = "Restart-Service -Name hns" - - // Name of the external hns network - ExtHnsNetworkName = "ext" - - // Address prefix for external hns network - ExtHnsNetworkAddressPrefix = "192.168.255.0/30" - - // Gateway address for external hns network - ExtHnsNetworkGwAddress = "192.168.255.1" - - // HNS network types - hnsL2Bridge = "l2bridge" - hnsL2Tunnel = "l2tunnel" ) // Flag to check if sdnRemoteArpMacAddress registry key is set