Skip to content

Commit 563b8f4

Browse files
remove unused mac address
1 parent d0c4f46 commit 563b8f4

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

cns/imds/client.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ func (c *Client) getInstanceMetadata(ctx context.Context, imdsComputePath string
164164

165165
// NetworkInterface represents a network interface from IMDS
166166
type NetworkInterface struct {
167-
MacAddress string `json:"macAddress"`
168167
// IMDS only returns compartment fields - these are mapped to NC ID and NC version concepts
169168
InterfaceCompartmentId string `json:"interfaceCompartmentId,omitempty"`
170169
InterfaceCompartmentVersion string `json:"interfaceCompartmentVersion,omitempty"`

cns/imds/client_test.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,10 @@ func TestGetNCVersions(t *testing.T) {
105105
networkMetadata := []byte(`{
106106
"interface": [
107107
{
108-
"macAddress": "00:0D:3A:12:34:56",
109108
"interfaceCompartmentVersion": "1",
110109
"interfaceCompartmentId": "nc-12345-67890"
111110
},
112111
{
113-
"macAddress": "00:0D:3A:CD:EF:12",
114112
"interfaceCompartmentVersion": "1",
115113
"interfaceCompartmentId": ""
116114
}
@@ -145,12 +143,10 @@ func TestGetNCVersions(t *testing.T) {
145143
require.Len(t, interfaces, 2, "expected 2 interfaces")
146144

147145
// Check first interface
148-
assert.Equal(t, "00:0D:3A:12:34:56", interfaces[0].MacAddress)
149146
assert.Equal(t, "nc-12345-67890", interfaces[0].InterfaceCompartmentId)
150147
assert.Equal(t, "1", interfaces[0].InterfaceCompartmentVersion)
151148

152149
// Check second interface
153-
assert.Equal(t, "00:0D:3A:CD:EF:12", interfaces[1].MacAddress)
154150
assert.Equal(t, "", interfaces[1].InterfaceCompartmentId)
155151
assert.Equal(t, "1", interfaces[1].InterfaceCompartmentVersion)
156152
}
@@ -178,7 +174,6 @@ func TestGetNCVersionsNoNCIDs(t *testing.T) {
178174
networkMetadataNoNC := []byte(`{
179175
"interface": [
180176
{
181-
"macAddress": "00:0D:3A:12:34:56",
182177
"ipv4": {
183178
"ipAddress": [
184179
{
@@ -207,8 +202,5 @@ func TestGetNCVersionsNoNCIDs(t *testing.T) {
207202

208203
// Verify we got interfaces but they don't have compartment IDs
209204
require.Len(t, interfaces, 1, "expected 1 interface")
210-
211-
// Check that interfaces have MAC addresses but no compartment IDs
212-
assert.Equal(t, "00:0D:3A:12:34:56", interfaces[0].MacAddress)
213205
assert.Equal(t, "", interfaces[0].InterfaceCompartmentId)
214206
}

0 commit comments

Comments
 (0)