Skip to content

Commit

Permalink
Project import generated by Copybara.
Browse files Browse the repository at this point in the history
FolderOrigin-RevId: /usr/local/google/home/gdennis/copybara/temp/folder-destination4207505035275133087/.
  • Loading branch information
GGN Engprod Team authored and greg-dennis committed Sep 22, 2023
1 parent 52f46fa commit 14f1361
Show file tree
Hide file tree
Showing 7 changed files with 46,028 additions and 46,061 deletions.
10 changes: 0 additions & 10 deletions binding/abstract.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ func (d *AbstractDUT) Ports() map[string]*Port {
return d.Dims.Ports
}

// CustomData returns custom data for the DUT.
func (d *AbstractDUT) CustomData() map[string]any {
return d.Dims.CustomData
}

func (d *AbstractDUT) String() string {
return fmt.Sprintf("DUT%+v", *d)
}
Expand Down Expand Up @@ -167,11 +162,6 @@ func (a *AbstractATE) Ports() map[string]*Port {
return a.Dims.Ports
}

// CustomData returns custom data for the ATE.
func (a *AbstractATE) CustomData() map[string]any {
return a.Dims.CustomData
}

func (a *AbstractATE) String() string {
return fmt.Sprintf("ATE%+v", *a)
}
Expand Down
2 changes: 0 additions & 2 deletions binding/binding.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ type Device interface {
HardwareModel() string
SoftwareVersion() string
Ports() map[string]*Port
CustomData() map[string]any
}

// Dims contains the dimensions of reserved DUT or ATE.
Expand All @@ -115,7 +114,6 @@ type Dims struct {
HardwareModel string
SoftwareVersion string
Ports map[string]*Port
CustomData map[string]any
}

func (d *Dims) String() string {
Expand Down
5 changes: 0 additions & 5 deletions device.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,6 @@ func (d *Device) newPort(id string, res *binding.Port) *Port {
return &Port{dev: d, id: id, res: res}
}

// CustomData returns custom data for the specified key.
func (d *Device) CustomData(key string) any {
return d.res.CustomData()[key]
}

// Port represents a port.
type Port struct {
dev *Device
Expand Down
92,058 changes: 46,028 additions & 46,030 deletions gnmi/oc/schema.go

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions knebind/knebind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ func TestReserve(t *testing.T) {
Ports: map[string]*binding.Port{
"port1": {Name: "Ethernet1"},
},
CustomData: map[string]any{solver.KNEServiceMapKey: wantDUTServices},
}},
Services: wantDUTServices,
NodeVendor: tpb.Vendor_ARISTA,
Expand All @@ -168,7 +167,6 @@ func TestReserve(t *testing.T) {
Ports: map[string]*binding.Port{
"port1": {Name: "eth1"},
},
CustomData: map[string]any{solver.KNEServiceMapKey: wantATEServices},
}},
Services: wantATEServices,
NodeVendor: tpb.Vendor_KEYSIGHT,
Expand Down
4 changes: 0 additions & 4 deletions knebind/solver/solver.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ import (
)

const (
// KNEServiceMapKey is the key to look up the service map in the custom data of a ServiceDUT.
KNEServiceMapKey = "$KEY_SERVICE_MAP"

roleLabel = "ondatra-role"
roleDUT = "DUT"
roleATE = "ATE"
Expand Down Expand Up @@ -579,7 +576,6 @@ func (a *assign) resolveDevice(dev *opb.Device) (*deviceResolution, error) {
HardwareModel: node.GetModel(),
SoftwareVersion: node.GetOs(),
Ports: make(map[string]*binding.Port),
CustomData: map[string]any{KNEServiceMapKey: sm},
}
for _, p := range dev.GetPorts() {
dims.Ports[p.GetId()] = &binding.Port{Name: a.port2Intf[p].vendorName}
Expand Down
8 changes: 0 additions & 8 deletions knebind/solver/solver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ func TestSolve(t *testing.T) {
"port1": {Name: "Ethernet1"},
"port2": {Name: "Ethernet2"},
},
CustomData: map[string]any{KNEServiceMapKey: wantDUTServices},
}},
Services: wantDUTServices,
NodeVendor: tpb.Vendor_ARISTA,
Expand All @@ -193,7 +192,6 @@ func TestSolve(t *testing.T) {
"port1": {Name: "GigabitEthernet0/0/0/0"},
"port2": {Name: "eth2"},
},
CustomData: map[string]any{KNEServiceMapKey: wantDUTServices},
}},
Services: wantDUTServices,
NodeVendor: tpb.Vendor_CISCO,
Expand All @@ -207,7 +205,6 @@ func TestSolve(t *testing.T) {
Ports: map[string]*binding.Port{
"port1": {Name: "eth1"},
},
CustomData: map[string]any{KNEServiceMapKey: wantDUTServices},
}},
Services: wantDUTServices,
NodeVendor: tpb.Vendor_JUNIPER,
Expand All @@ -220,7 +217,6 @@ func TestSolve(t *testing.T) {
Ports: map[string]*binding.Port{
"port1": {Name: "eth1"},
},
CustomData: map[string]any{KNEServiceMapKey: wantATEServices},
}},
Services: wantATEServices,
NodeVendor: tpb.Vendor_KEYSIGHT,
Expand All @@ -231,7 +227,6 @@ func TestSolve(t *testing.T) {
Vendor: opb.Device_OPENCONFIG,
HardwareModel: "MAGNA",
Ports: map[string]*binding.Port{},
CustomData: map[string]any{KNEServiceMapKey: wantATEServices},
}},
Services: wantATEServices,
NodeVendor: tpb.Vendor_OPENCONFIG,
Expand Down Expand Up @@ -272,7 +267,6 @@ func TestSolve(t *testing.T) {
HardwareModel: "cptx",
SoftwareVersion: "evo",
Ports: map[string]*binding.Port{},
CustomData: map[string]any{KNEServiceMapKey: wantDUTServices},
}},
Services: wantDUTServices,
NodeVendor: tpb.Vendor_JUNIPER,
Expand Down Expand Up @@ -300,7 +294,6 @@ func TestSolve(t *testing.T) {
Ports: map[string]*binding.Port{
"port": {Name: "eth2"},
},
CustomData: map[string]any{KNEServiceMapKey: wantDUTServices},
}},
Services: wantDUTServices,
NodeVendor: tpb.Vendor_CISCO,
Expand Down Expand Up @@ -328,7 +321,6 @@ func TestSolve(t *testing.T) {
Ports: map[string]*binding.Port{
"port": {Name: "GigabitEthernet0/0/0/0"},
},
CustomData: map[string]any{KNEServiceMapKey: wantDUTServices},
}},
Services: wantDUTServices,
NodeVendor: tpb.Vendor_CISCO,
Expand Down

0 comments on commit 14f1361

Please sign in to comment.