summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/netconfig.go
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2023-06-08 17:39:39 +0200
committerFlorin Coras <florin.coras@gmail.com>2023-06-08 17:04:36 +0000
commit3a910ab76800b9608b05e6b188730a2290b51ae0 (patch)
tree574fb81d426eb670cbfa22a764b1bee0cba6e7fc /extras/hs-test/netconfig.go
parentd5b6f9c0ef98f148b0e728fc1e8ccd8ba3faa806 (diff)
hs-test: rename address allocator
Type: test Change-Id: I1745719315d4e0785df5a03aa4312f84c40cb18f Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'extras/hs-test/netconfig.go')
-rw-r--r--extras/hs-test/netconfig.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/extras/hs-test/netconfig.go b/extras/hs-test/netconfig.go
index 6059b7b8567..897be6cfa65 100644
--- a/extras/hs-test/netconfig.go
+++ b/extras/hs-test/netconfig.go
@@ -32,8 +32,8 @@ type (
NetInterface struct {
NetConfigBase
- addresser *Addresser
- ip4Address string // this will have form 10.10.10.1/24
+ ip4AddrAllocator *Ip4AddressAllocator
+ ip4Address string
index InterfaceIndex
hwAddress MacAddress
networkNamespace string
@@ -72,10 +72,10 @@ var (
}
)
-func newNetworkInterface(cfg NetDevConfig, a *Addresser) (*NetInterface, error) {
+func newNetworkInterface(cfg NetDevConfig, a *Ip4AddressAllocator) (*NetInterface, error) {
var newInterface *NetInterface = &NetInterface{}
var err error
- newInterface.addresser = a
+ newInterface.ip4AddrAllocator = a
newInterface.name = cfg["name"].(string)
newInterface.networkNumber = DEFAULT_NETWORK_NUM
@@ -98,7 +98,7 @@ func newNetworkInterface(cfg NetDevConfig, a *Addresser) (*NetInterface, error)
if n, ok := ip.(NetDevConfig)["network"]; ok {
newInterface.networkNumber = n.(int)
}
- newInterface.ip4Address, err = newInterface.addresser.newIp4Address(
+ newInterface.ip4Address, err = newInterface.ip4AddrAllocator.NewIp4InterfaceAddress(
newInterface.networkNumber,
)
if err != nil {