Skip to content

Commit

Permalink
Add RO interface to MAC
Browse files Browse the repository at this point in the history
  • Loading branch information
Vatson112 authored and engelmi committed Nov 29, 2022
1 parent d62468a commit 4bb1b62
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nic.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ type NICData interface {
VMID() VMID
// VNICProfileID returns the ID of the VNIC profile in use by the NIC.
VNICProfileID() VNICProfileID
// Mac returns a MacAddress for a nic
Mac() string
}

// NIC represents a network interface.
Expand Down Expand Up @@ -280,6 +282,10 @@ func (n nic) VMID() VMID {
return n.vmid
}

func (n nic) Mac() string {
return n.mac
}

func (n nic) Remove(retries ...RetryStrategy) error {
return n.client.RemoveNIC(n.vmid, n.id, retries...)
}
Expand Down

0 comments on commit 4bb1b62

Please sign in to comment.