Commit 3fd385a3 authored by Ryan Goodfellow's avatar Ryan Goodfellow
Browse files

more testbed modeling updates


Signed-off-by: Ryan Goodfellow's avatarRyan Goodfellow <rgoodfel@isi.edu>
parent 57961cc2
Pipeline #134554134 passed with stage
in 33 seconds
......@@ -624,3 +624,51 @@ func Mlx50GDAC() *hw.Cable {
}
}
func TenGtek40x10BreakoutDAC_3M() *hw.Cable {
return &hw.Cable{
Base: hw.Base{
Manufacturer: "10Gtek",
Model: "40x10G DAC Brekout",
SKU: "10GT40X10DAC",
},
Kind: hw.DACBreakout,
Connectors: [2]hw.End{
[]*hw.Connector{{
Base: hw.Base{Manufacturer: "10Gtek", Model: "40GDACTXR"},
Kind: hw.QSFPP,
Capacity: 40e9,
Protocols: []hw.Layer1{hw.GBase40CR4},
}},
[]*hw.Connector{
{
Base: hw.Base{Manufacturer: "10Gtek", Model: "10GDACTXR"},
Kind: hw.SFPP,
Capacity: 10e9,
Protocols: []hw.Layer1{hw.GBase10CR},
},
{
Base: hw.Base{Manufacturer: "10Gtek", Model: "10GDACTXR"},
Kind: hw.SFPP,
Capacity: 10e9,
Protocols: []hw.Layer1{hw.GBase10CR},
},
{
Base: hw.Base{Manufacturer: "10Gtek", Model: "10GDACTXR"},
Kind: hw.SFPP,
Capacity: 10e9,
Protocols: []hw.Layer1{hw.GBase10CR},
},
{
Base: hw.Base{Manufacturer: "10Gtek", Model: "10GDACTXR"},
Kind: hw.SFPP,
Capacity: 10e9,
Protocols: []hw.Layer1{hw.GBase10CR},
},
},
},
Props: map[string]interface{}{},
}
}
......@@ -140,7 +140,7 @@ func FsMpoBreakout40x10() *hw.Cable {
Base: hw.Base{
Manufacturer: "Fiberstore",
Model: "FS 40x10",
SKU: "FS40x10MPO",
SKU: "8FMTPLCOM4",
},
Kind: hw.FiberMPOBreakout,
Connectors: [2]hw.End{
......
......@@ -292,7 +292,7 @@ func XeonGold6252N() hw.Proc {
}
// XeonGold6246 is a 24 core Xeon Gold processor
// XeonGold6246 is a 12 core Xeon Gold processor
func XeonGold6246() hw.Proc {
return hw.Proc{
......
......@@ -6,6 +6,23 @@ import (
"gitlab.com/mergetb/xir/lang/go/v0.2/hw"
)
func DC_S3500_120() hw.Disk {
d := hw.Disk{
Base: hw.Base{
Manufacturer: "Intel",
Model: "DC P3500",
SKU: "DC-P3500-120",
},
Capacity: hw.Gb(120),
FormFactor: hw.SSD25,
Interface: hw.SATA3,
}
return d
}
func DC_P4610_1600() hw.Disk {
d := hw.Disk{
......@@ -239,3 +256,20 @@ func CrucialMx500() hw.Disk {
return d
}
func EXOS7E200_1024() hw.Disk {
d := hw.Disk{
Base: hw.Base{
Manufacturer: "Seagate",
Model: "EXOS 7E2000",
SKU: "ST1000NX0313",
},
Capacity: hw.Gb(1024),
FormFactor: hw.HDD25,
Interface: hw.SATA3,
}
return d
}
......@@ -138,7 +138,7 @@ func Ipmi() hw.Nic {
SKU: "AS-IPMI-100M",
Integrated: true,
},
Kind: "eth",
Kind: "ipmi",
Ports: hw.Ports(1, &hw.Port{
Capacity: hw.Mbps(100),
FormFactor: hw.RJ45,
......@@ -328,6 +328,7 @@ func ConnectX6_2x50() hw.Nic {
Model: "ConnectX-6",
SKU: "MCX623102AN-GDAT",
},
Kind: "eth",
Ports: hw.Ports(2, &hw.Port{
FormFactor: hw.SFP56,
Capacity: hw.Gbps(50),
......@@ -346,6 +347,7 @@ func ConnectX6_2x200() hw.Nic {
Model: "ConnectX-6",
SKU: "MCX653106A-HDAT",
},
Kind: "eth",
Ports: hw.Ports(2, &hw.Port{
Capacity: hw.Gbps(200),
FormFactor: hw.QSFP56,
......@@ -364,6 +366,7 @@ func ConnectX6_2x100() hw.Nic {
Model: "ConnectX-6",
SKU: "MCX653106A-ECAT",
},
Kind: "eth",
Ports: hw.Ports(2, &hw.Port{
Capacity: hw.Gbps(100),
FormFactor: hw.QSFP56,
......@@ -373,6 +376,25 @@ func ConnectX6_2x100() hw.Nic {
}
// ConnectX6_1x100 is a Mellanox 6th generation dual port 100 gbps NIC.
func ConnectX6_1x100() hw.Nic {
return hw.Nic{
Base: hw.Base{
Manufacturer: "Mellanox",
Model: "ConnectX-6",
SKU: "MCX653105A-ECAT",
},
Kind: "eth",
Ports: hw.Ports(1, &hw.Port{
Capacity: hw.Gbps(100),
FormFactor: hw.QSFP56,
Protocols: []hw.Layer1{hw.GBase100SR4},
}),
}
}
// X550_AT2 is an Intel dual port 10G BaseT NIC
func X550_AT2() hw.Nic {
......
......@@ -273,3 +273,29 @@ func Quanta66WPSU() hw.PSU {
}
}
func Supermicro450WPSU() hw.PSU {
return hw.PSU{
Base: hw.Base{
Model: "Supermicro 450W PSU",
Manufacturer: "Supermicro",
SKU: "SMPSU240W",
},
PowerRatingWatts: 450,
IO: []hw.PowerConversionRating{
{
ACinput: hw.ACPowerRating{
PowerRating: hw.PowerRating{
VoltageMin: 100,
VoltageMax: 240,
CurrentMax: 4.5,
},
FreqMin: 50,
FreqMax: 60,
},
},
},
}
}
......@@ -12,6 +12,7 @@ type Base struct {
SKU string `json:"model_name,omitempty"`
Tags []string `json:"tags,omitempty"`
Integrated bool `json:"integrated,omitempty"`
Cost float64 `json:"cost,omitempty"`
}
type Element interface {
......
......@@ -306,6 +306,7 @@ func Msn3700() *hw.Device {
Manufacturer: "Intel",
Model: "i350",
SKU: "i354",
Integrated: true,
},
Ports: hw.Ports(2, &hw.Port{
Capacity: hw.Mbps(1000),
......@@ -319,6 +320,7 @@ func Msn3700() *hw.Device {
Manufacturer: "Mellanox",
Model: "Spectrum2",
SKU: "MSN2_200",
Integrated: true,
},
StartingIndex: 1,
Ports: hw.Ports(32, &hw.Port{
......
......@@ -26,6 +26,10 @@ type TallyItem struct {
func (t Tally) Add(item, sku string, price float64) {
if price == 0.0 {
return
}
x, ok := t[item]
if ok {
x.Quantity += 1
......@@ -97,9 +101,32 @@ func calculateCost(net *xir.Net, tally Tally) {
continue
}
price, ok := x.Props["price"].(float64)
if ok {
tally.Add(x.Props["model"].(string), r.System.Device.SKU, price)
dev := r.System.Device
tally.Add(dev.Model, dev.SKU, dev.Cost)
for _, x := range dev.Procs {
tally.Add(x.Model, x.SKU, x.Cost)
}
for _, x := range dev.Memory {
tally.Add(x.Model, x.SKU, x.Cost)
}
for _, x := range dev.Nics {
tally.Add(x.Model, x.SKU, x.Cost)
}
for _, x := range dev.Disks {
tally.Add(x.Model, x.SKU, x.Cost)
}
for _, x := range dev.GPUs {
tally.Add(x.Model, x.SKU, x.Cost)
}
for _, x := range dev.PSUs {
tally.Add(x.Model, x.SKU, x.Cost)
}
}
......@@ -111,17 +138,8 @@ func calculateCost(net *xir.Net, tally Tally) {
continue
}
price, ok := x.Props["price"].(float64)
if ok {
tally.Add(x.Props["model"].(string), c.SKU, price)
} else {
c := GetCableSpec(x)
if c != nil {
price, ok := c.Props["price"].(float64)
if ok {
tally.Add(c.Model, c.SKU, price)
}
}
if c.Cost > 0.0 {
tally.Add(c.Model, c.SKU, c.Cost)
}
}
......
......@@ -480,5 +480,6 @@ func (r *Resource) Port(kind string, i int) *hw.Port {
return ports[i]
}
func (r *Resource) Swp(i int) *hw.Port { return r.Port("swp", i) }
func (r *Resource) Eth(i int) *hw.Port { return r.Port("eth", i) }
func (r *Resource) Swp(i int) *hw.Port { return r.Port("swp", i) }
func (r *Resource) Eth(i int) *hw.Port { return r.Port("eth", i) }
func (r *Resource) Ipmi(i int) *hw.Port { return r.Port("ipmi", i) }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment