Skip to content

Commit cd8cc99

Browse files
committed
fixtures: rename hss references to fleetdb
1 parent 574a930 commit cd8cc99

6 files changed

+378
-378
lines changed

internal/fixtures/fixtures.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package fixtures
33
import (
44
"github.com/bmc-toolbox/common"
55
"github.com/jinzhu/copier"
6-
serverservice "go.hollow.sh/serverservice/pkg/api/v1"
6+
fleetdbapi "github.com/metal-toolbox/fleetdb/pkg/api/v1"
77
)
88

99
// CopyDevice returns a pointer to a copy of the given ironlib device object
@@ -20,9 +20,9 @@ func CopyDevice(src *common.Device) *common.Device {
2020
return dst
2121
}
2222

23-
// CopyServerServiceComponentSlice returns a pointer to a copy of the server service components slice
24-
func CopyServerServiceComponentSlice(src serverservice.ServerComponentSlice) serverservice.ServerComponentSlice {
25-
dst := serverservice.ServerComponentSlice{}
23+
// CopyFleetDBComponentSlice returns a pointer to a copy of the server service components slice
24+
func CopyFleetDBComponentSlice(src fleetdbapi.ServerComponentSlice) fleetdbapi.ServerComponentSlice {
25+
dst := fleetdbapi.ServerComponentSlice{}
2626

2727
copyOptions := copier.Option{IgnoreEmpty: true, DeepCopy: true}
2828

internal/fixtures/serverservice_component_types.go renamed to internal/fixtures/fleetdb_component_types.go

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,113 @@
11
package fixtures
22

33
import (
4-
serverservice "go.hollow.sh/serverservice/pkg/api/v1"
4+
fleetdbapi "github.com/metal-toolbox/fleetdb/pkg/api/v1"
55
)
66

77
var (
8-
ServerServiceComponentTypes = serverservice.ServerComponentTypeSlice{
9-
&serverservice.ServerComponentType{
8+
FleetDBAPIComponentTypes = fleetdbapi.ServerComponentTypeSlice{
9+
&fleetdbapi.ServerComponentType{
1010
ID: "02dc2503-b64c-439b-9f25-8e130705f14a",
1111
Name: "Backplane-Expander",
1212
Slug: "backplane-expander",
1313
},
14-
&serverservice.ServerComponentType{
14+
&fleetdbapi.ServerComponentType{
1515
ID: "1e0c3417-d63c-4fd5-88f7-4c525c70da12",
1616
Name: "Mainboard",
1717
Slug: "mainboard",
1818
},
19-
&serverservice.ServerComponentType{
19+
&fleetdbapi.ServerComponentType{
2020
ID: "262e1a12-25a0-4d84-8c79-b3941603d48e",
2121
Name: "BIOS",
2222
Slug: "bios",
2323
},
24-
&serverservice.ServerComponentType{
24+
&fleetdbapi.ServerComponentType{
2525
ID: "322b8728-dcc9-44e3-a139-81220c75a339",
2626
Name: "NVMe-PCIe-SSD",
2727
Slug: "nvme-pcie-ssd",
2828
},
29-
&serverservice.ServerComponentType{
29+
&fleetdbapi.ServerComponentType{
3030
ID: "352631d2-b1ed-4d8e-85f7-9c92ddb76679",
3131
Name: "Sata-SSD",
3232
Slug: "sata-ssd",
3333
},
34-
&serverservice.ServerComponentType{
34+
&fleetdbapi.ServerComponentType{
3535
ID: "3717d747-3cc3-4800-822c-4c7a9ac2c314",
3636
Name: "Drive",
3737
Slug: "drive",
3838
},
39-
&serverservice.ServerComponentType{
39+
&fleetdbapi.ServerComponentType{
4040
ID: "3fc448ce-ea68-4f7c-beb1-c376f594db80",
4141
Name: "Chassis",
4242
Slug: "chassis",
4343
},
44-
&serverservice.ServerComponentType{
44+
&fleetdbapi.ServerComponentType{
4545
ID: "4588a8fb-2e0f-4fa1-9634-9819a319b70b",
4646
Name: "GPU",
4747
Slug: "gpu",
4848
},
49-
&serverservice.ServerComponentType{
49+
&fleetdbapi.ServerComponentType{
5050
ID: "5850ede2-d6d6-4df7-89d6-eab9110a9113",
5151
Name: "NIC",
5252
Slug: "nic",
5353
},
54-
&serverservice.ServerComponentType{
54+
&fleetdbapi.ServerComponentType{
5555
ID: "5ac890cc-dd92-4609-9615-ca4b05b62a8e",
5656
Name: "PhysicalMemory",
5757
Slug: "physicalmemory",
5858
},
59-
&serverservice.ServerComponentType{
59+
&fleetdbapi.ServerComponentType{
6060
ID: "75fc736e-fe42-4495-8e62-02d46fd08528",
6161
Name: "CPU",
6262
Slug: "cpu",
6363
},
64-
&serverservice.ServerComponentType{
64+
&fleetdbapi.ServerComponentType{
6565
ID: "79ad53a2-0c05-4912-a156-8311bd54017d",
6666
Name: "TPM",
6767
Slug: "tpm",
6868
},
69-
&serverservice.ServerComponentType{
69+
&fleetdbapi.ServerComponentType{
7070
ID: "9f5f39a4-82ed-4870-ab32-268bec45c8c8",
7171
Name: "Enclosure",
7272
Slug: "enclosure",
7373
},
74-
&serverservice.ServerComponentType{
74+
&fleetdbapi.ServerComponentType{
7575
ID: "cbfbbe99-8d79-49e0-8f5d-c5296932bbd1",
7676
Name: "Sata-HDD",
7777
Slug: "sata-hdd",
7878
},
79-
&serverservice.ServerComponentType{
79+
&fleetdbapi.ServerComponentType{
8080
ID: "ce396912-210e-4f6e-902d-9f07a8efe092",
8181
Name: "CPLD",
8282
Slug: "cpld",
8383
},
84-
&serverservice.ServerComponentType{
84+
&fleetdbapi.ServerComponentType{
8585
ID: "d51b438b-a767-459e-8eda-fd0700a46686",
8686
Name: "Power-Supply",
8787
Slug: "power-supply",
8888
},
89-
&serverservice.ServerComponentType{
89+
&fleetdbapi.ServerComponentType{
9090
ID: "e96c8557-4a71-4887-a3bb-28b6f90e5489",
9191
Name: "BMC",
9292
Slug: "bmc",
9393
},
94-
&serverservice.ServerComponentType{
94+
&fleetdbapi.ServerComponentType{
9595
ID: "eb82dbe3-df77-4409-833b-c44241885410",
9696
Name: "unknown",
9797
Slug: "unknown",
9898
},
99-
&serverservice.ServerComponentType{
99+
&fleetdbapi.ServerComponentType{
100100
ID: "ef563926-8011-4985-bc4a-7ed7e9933971",
101101
Name: "StorageController",
102102
Slug: "storagecontroller",
103103
},
104104
}
105105
)
106106

107-
func ServerServiceSlugMap() map[string]*serverservice.ServerComponentType {
108-
m := make(map[string]*serverservice.ServerComponentType)
107+
func FleetDBSlugMap() map[string]*fleetdbapi.ServerComponentType {
108+
m := make(map[string]*fleetdbapi.ServerComponentType)
109109

110-
for _, ct := range ServerServiceComponentTypes {
110+
for _, ct := range FleetDBAPIComponentTypes {
111111
m[ct.Slug] = ct
112112
}
113113

internal/fixtures/serverservice_components_E3C246D4INL.go renamed to internal/fixtures/fleetdb_components_E3C246D4INL.go

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ package fixtures
33
import (
44
"encoding/json"
55

6-
serverservice "go.hollow.sh/serverservice/pkg/api/v1"
6+
fleetdbapi "github.com/metal-toolbox/fleetdb/pkg/api/v1"
77
)
88

99
var (
1010
// To refresh this fixture, see the serverservice_components_test.go file
1111
// and/or docs/README.development
1212
// nolint:simplifycompositelit // testdata
13-
ServerServiceE3C246D4INLcomponents = serverservice.ServerComponentSlice{
14-
serverservice.ServerComponent{
13+
FleetDBAPIE3C246D4INLcomponents = fleetdbapi.ServerComponentSlice{
14+
fleetdbapi.ServerComponent{
1515
Name: "BIOS",
1616
Vendor: "american megatrends",
1717
Model: "",
1818
Serial: "0",
19-
Attributes: []serverservice.Attributes{
20-
serverservice.Attributes{
19+
Attributes: []fleetdbapi.Attributes{
20+
fleetdbapi.Attributes{
2121
Namespace: "sh.hollow.alloy.outofband.metadata",
2222
Data: json.RawMessage{
2323
123,
@@ -90,8 +90,8 @@ var (
9090
},
9191
},
9292
},
93-
VersionedAttributes: []serverservice.VersionedAttributes{
94-
serverservice.VersionedAttributes{
93+
VersionedAttributes: []fleetdbapi.VersionedAttributes{
94+
fleetdbapi.VersionedAttributes{
9595
Namespace: "sh.hollow.alloy.outofband.firmware",
9696
Data: json.RawMessage{
9797
123,
@@ -137,13 +137,13 @@ var (
137137
ComponentTypeName: "BIOS",
138138
ComponentTypeSlug: "bios",
139139
},
140-
serverservice.ServerComponent{
140+
fleetdbapi.ServerComponent{
141141
Name: "Mainboard",
142142
Vendor: "asrockrack",
143143
Model: "E3C246D4I-NL",
144144
Serial: "196231220000153",
145-
Attributes: []serverservice.Attributes{
146-
serverservice.Attributes{
145+
Attributes: []fleetdbapi.Attributes{
146+
fleetdbapi.Attributes{
147147
Namespace: "sh.hollow.alloy.outofband.metadata",
148148
Data: json.RawMessage{
149149
123,
@@ -226,13 +226,13 @@ var (
226226
ComponentTypeName: "Mainboard",
227227
ComponentTypeSlug: "mainboard",
228228
},
229-
serverservice.ServerComponent{
229+
fleetdbapi.ServerComponent{
230230
Name: "PhysicalMemory",
231231
Vendor: "micron",
232232
Model: "18ASF2G72HZ-2G6E1",
233233
Serial: "F0F9053F",
234-
Attributes: []serverservice.Attributes{
235-
serverservice.Attributes{
234+
Attributes: []fleetdbapi.Attributes{
235+
fleetdbapi.Attributes{
236236
Namespace: "sh.hollow.alloy.outofband.metadata",
237237
Data: json.RawMessage{
238238
123,
@@ -414,13 +414,13 @@ var (
414414
ComponentTypeName: "PhysicalMemory",
415415
ComponentTypeSlug: "physicalmemory",
416416
},
417-
serverservice.ServerComponent{
417+
fleetdbapi.ServerComponent{
418418
Name: "PhysicalMemory",
419419
Vendor: "micron",
420420
Model: "18ASF2G72HZ-2G6E1",
421421
Serial: "F0F90894",
422-
Attributes: []serverservice.Attributes{
423-
serverservice.Attributes{
422+
Attributes: []fleetdbapi.Attributes{
423+
fleetdbapi.Attributes{
424424
Namespace: "sh.hollow.alloy.outofband.metadata",
425425
Data: json.RawMessage{
426426
123,
@@ -602,13 +602,13 @@ var (
602602
ComponentTypeName: "PhysicalMemory",
603603
ComponentTypeSlug: "physicalmemory",
604604
},
605-
serverservice.ServerComponent{
605+
fleetdbapi.ServerComponent{
606606
Name: "NIC",
607607
Vendor: "intel",
608608
Model: "Ethernet Controller X710 for 10GbE SFP+",
609609
Serial: "b4:96:91:70:26:c8",
610-
Attributes: []serverservice.Attributes{
611-
serverservice.Attributes{
610+
Attributes: []fleetdbapi.Attributes{
611+
fleetdbapi.Attributes{
612612
Namespace: "sh.hollow.alloy.outofband.metadata",
613613
Data: json.RawMessage{
614614
91,
@@ -892,8 +892,8 @@ var (
892892
},
893893
},
894894
},
895-
VersionedAttributes: []serverservice.VersionedAttributes{
896-
serverservice.VersionedAttributes{
895+
VersionedAttributes: []fleetdbapi.VersionedAttributes{
896+
fleetdbapi.VersionedAttributes{
897897
Namespace: "sh.hollow.alloy.outofband.firmware",
898898
Data: json.RawMessage{
899899
123,
@@ -941,13 +941,13 @@ var (
941941
ComponentTypeName: "NIC",
942942
ComponentTypeSlug: "nic",
943943
},
944-
serverservice.ServerComponent{
944+
fleetdbapi.ServerComponent{
945945
Name: "Drive",
946946
Vendor: "intel",
947947
Model: "INTEL SSDSC2KB48",
948948
Serial: "PHYF001300HB480BGN",
949-
Attributes: []serverservice.Attributes{
950-
serverservice.Attributes{
949+
Attributes: []fleetdbapi.Attributes{
950+
fleetdbapi.Attributes{
951951
Namespace: "sh.hollow.alloy.outofband.metadata",
952952
Data: json.RawMessage{
953953
123,
@@ -1074,13 +1074,13 @@ var (
10741074
ComponentTypeName: "Drive",
10751075
ComponentTypeSlug: "drive",
10761076
},
1077-
serverservice.ServerComponent{
1077+
fleetdbapi.ServerComponent{
10781078
Name: "Drive",
10791079
Vendor: "intel",
10801080
Model: "INTEL SSDSC2KB48",
10811081
Serial: "PHYF001209KL480BGN",
1082-
Attributes: []serverservice.Attributes{
1083-
serverservice.Attributes{
1082+
Attributes: []fleetdbapi.Attributes{
1083+
fleetdbapi.Attributes{
10841084
Namespace: "sh.hollow.alloy.outofband.metadata",
10851085
Data: json.RawMessage{
10861086
123,
@@ -1207,13 +1207,13 @@ var (
12071207
ComponentTypeName: "Drive",
12081208
ComponentTypeSlug: "drive",
12091209
},
1210-
serverservice.ServerComponent{
1210+
fleetdbapi.ServerComponent{
12111211
Name: "CPU",
12121212
Vendor: "intel",
12131213
Model: "Intel(R) Xeon(R) E-2278G CPU @ 3.40GHz",
12141214
Serial: "0",
1215-
Attributes: []serverservice.Attributes{
1216-
serverservice.Attributes{
1215+
Attributes: []fleetdbapi.Attributes{
1216+
fleetdbapi.Attributes{
12171217
Namespace: "sh.hollow.alloy.outofband.metadata",
12181218
Data: json.RawMessage{
12191219
123,
@@ -1365,13 +1365,13 @@ var (
13651365
ComponentTypeName: "CPU",
13661366
ComponentTypeSlug: "cpu",
13671367
},
1368-
serverservice.ServerComponent{
1368+
fleetdbapi.ServerComponent{
13691369
Name: "StorageController",
13701370
Vendor: "intel",
13711371
Model: "Cannon Lake PCH SATA AHCI Controller",
13721372
Serial: "0",
1373-
Attributes: []serverservice.Attributes{
1374-
serverservice.Attributes{
1373+
Attributes: []fleetdbapi.Attributes{
1374+
fleetdbapi.Attributes{
13751375
Namespace: "sh.hollow.alloy.outofband.metadata",
13761376
Data: json.RawMessage{
13771377
123,

0 commit comments

Comments
 (0)