/
supermicrox.go
785 lines (675 loc) · 18.7 KB
/
supermicrox.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
package supermicrox
import (
"bytes"
"context"
"crypto/x509"
"encoding/json"
"encoding/xml"
"fmt"
"io/ioutil"
"net/http"
"net/http/httputil"
"net/url"
"strconv"
"strings"
"github.com/bmc-toolbox/bmclib/devices"
"github.com/bmc-toolbox/bmclib/errors"
"github.com/bmc-toolbox/bmclib/internal/httpclient"
"github.com/go-logr/logr"
"github.com/bmc-toolbox/bmclib/providers/supermicro"
)
const (
// BmcType defines the bmc model that is supported by this package
BmcType = "supermicrox"
// X10 is the constant for x10 servers
X10 = "x10"
// X11 is the constant for x11 servers
X11 = "x11"
)
// SupermicroX holds the status and properties of a connection to a supermicro bmc
type SupermicroX struct {
ip string
username string
password string
httpClient *http.Client
ctx context.Context
log logr.Logger
httpClientSetupFuncs []func(*http.Client)
}
type ChassisInfo struct {
SerialNumber string `json:"SerialNumber"`
Error struct {
Code string `json:"code"`
Message string `json:"message"`
ExtendedMessage []*struct {
MessageId string `json:"MessageId"`
} `json:"@Message.ExtendedInfo"`
} `json:"error"`
}
// SupermicroXOption is a type that can configure a *SupermicroX
type SupermicroXOption func(*SupermicroX)
// WithSecureTLS enforces trusted TLS connections, with an optional CA certificate pool.
// Using this option with an nil pool uses the system CAs.
func WithSecureTLS(rootCAs *x509.CertPool) SupermicroXOption {
return func(i *SupermicroX) {
i.httpClientSetupFuncs = append(i.httpClientSetupFuncs, httpclient.SecureTLSOption(rootCAs))
}
}
// New returns a new SupermicroX instance ready to be used
func New(ctx context.Context, ip string, username string, password string, log logr.Logger) (sm *SupermicroX, err error) {
return NewWithOptions(ctx, ip, username, password, log)
}
// NewWithOptions returns a new SupermicroX with options ready to be used
func NewWithOptions(ctx context.Context, ip string, username string, password string, log logr.Logger, opts ...SupermicroXOption) (*SupermicroX, error) {
sm := &SupermicroX{
ip: ip,
username: username,
password: password,
ctx: ctx,
log: log,
}
for _, opt := range opts {
opt(sm)
}
return sm, nil
}
// CheckCredentials verify whether the credentials are valid or not
func (s *SupermicroX) CheckCredentials() (err error) {
err = s.httpLogin()
if err != nil {
return err
}
return err
}
// get calls a given json endpoint of the ilo and returns the data
func (s *SupermicroX) get(endpoint string, authentication bool) (payload []byte, err error) {
err = s.httpLogin()
if err != nil {
return nil, err
}
bmcURL := fmt.Sprintf("https://%s", s.ip)
req, err := http.NewRequest("GET", fmt.Sprintf("%s/%s", bmcURL, endpoint), nil)
if err != nil {
return nil, err
}
u, err := url.Parse(bmcURL)
if err != nil {
return nil, err
}
for _, cookie := range s.httpClient.Jar.Cookies(u) {
if cookie.Name == "SID" && cookie.Value != "" {
req.AddCookie(cookie)
}
}
if authentication {
req.SetBasicAuth(s.username, s.password)
}
reqDump, _ := httputil.DumpRequestOut(req, true)
s.log.V(2).Info("", "request", fmt.Sprintf("https://%s/%s", bmcURL, endpoint), "requestDump", string(reqDump))
resp, err := s.httpClient.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
respDump, _ := httputil.DumpResponse(resp, true)
s.log.V(2).Info("", "responseDump", string(respDump))
payload, err = ioutil.ReadAll(resp.Body)
if err != nil {
return nil, err
}
if resp.StatusCode == 404 {
return nil, errors.ErrPageNotFound
}
return payload, nil
}
// posts a urlencoded form to the given endpoint
// nolint: gocyclo
func (s *SupermicroX) post(endpoint string, urlValues *url.Values, form []byte, formDataContentType string) (statusCode int, err error) {
err = s.httpLogin()
if err != nil {
return statusCode, err
}
u, err := url.Parse(fmt.Sprintf("https://%s/cgi/%s", s.ip, endpoint))
if err != nil {
return statusCode, err
}
var req *http.Request
if formDataContentType == "" {
req, err = http.NewRequest("POST", u.String(), strings.NewReader(urlValues.Encode()))
if err != nil {
return statusCode, err
}
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
} else {
req, err = http.NewRequest("POST", u.String(), bytes.NewReader(form))
if err != nil {
return statusCode, err
}
// Set multipart form content type
req.Header.Set("Content-Type", formDataContentType)
}
for _, cookie := range s.httpClient.Jar.Cookies(u) {
if cookie.Name == "SID" && cookie.Value != "" {
req.AddCookie(cookie)
}
}
reqDump, _ := httputil.DumpRequestOut(req, true)
s.log.V(2).Info("", "url", fmt.Sprintf("https://%s/cgi/%s", s.ip, endpoint), "requestDump", string(reqDump))
resp, err := s.httpClient.Do(req)
if err != nil {
return statusCode, err
}
defer resp.Body.Close()
respDump, _ := httputil.DumpResponse(resp, true)
s.log.V(2).Info("", "responseDump", string(respDump))
statusCode = resp.StatusCode
_, err = ioutil.ReadAll(resp.Body)
if err != nil {
return statusCode, err
}
return statusCode, err
}
func (s *SupermicroX) query(requestType string) (ipmi *supermicro.IPMI, err error) {
err = s.httpLogin()
if err != nil {
return ipmi, err
}
bmcURL := fmt.Sprintf("https://%s/cgi/ipmi.cgi", s.ip)
s.log.V(1).Info("retrieving data from bmc", "step", "bmc connection", "vendor", string(supermicro.VendorID), "ip", s.ip)
req, err := http.NewRequest("POST", bmcURL, bytes.NewBufferString(requestType))
if err != nil {
return ipmi, err
}
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
u, err := url.Parse(bmcURL)
if err != nil {
return ipmi, err
}
for _, cookie := range s.httpClient.Jar.Cookies(u) {
if cookie.Name == "SID" && cookie.Value != "" {
req.AddCookie(cookie)
}
}
reqDump, _ := httputil.DumpRequestOut(req, true)
s.log.V(2).Info("trace", "url", fmt.Sprintf("https://%s/cgi/%s", bmcURL, s.ip), "requestDump", string(reqDump))
resp, err := s.httpClient.Do(req)
if err != nil {
return ipmi, err
}
defer resp.Body.Close()
payload, err := ioutil.ReadAll(resp.Body)
if err != nil {
return ipmi, err
}
respDump, _ := httputil.DumpResponse(resp, true)
s.log.V(2).Info("", "responseDump", string(respDump))
ipmi = &supermicro.IPMI{}
err = xml.Unmarshal(payload, ipmi)
if err != nil {
return ipmi, err
}
return ipmi, err
}
// Serial returns the device serial
func (s *SupermicroX) Serial() (serial string, err error) {
ipmi, err := s.query("FRU_INFO.XML=(0,0)")
if err != nil {
return "", err
}
if ipmi.FruInfo == nil || ipmi.FruInfo.Board == nil {
return "", errors.ErrInvalidSerial
}
return strings.ToLower(ipmi.FruInfo.Board.SerialNum), nil
}
// ChassisSerial returns the serial number of the chassis where the blade is attached
func (s *SupermicroX) ChassisSerial() (serial string, err error) {
chassisInfo := &ChassisInfo{}
payload, err := s.get("redfish/v1/Chassis/1", true)
if err != nil {
return "", err
}
err = json.Unmarshal(payload, chassisInfo)
if err != nil {
return "", err
}
if chassisInfo.Error.Code != "" {
e := "Code: " + chassisInfo.Error.Code + ", Message: " + chassisInfo.Error.Message
for i, s := range chassisInfo.Error.ExtendedMessage {
e += fmt.Sprintf(", Extended[%d]: %s", i, s)
}
return "", fmt.Errorf(e)
}
return strings.ToLower(chassisInfo.SerialNumber), nil
}
// HardwareType returns just Model id string - supermicrox
// TODO(ncode): Juliano of the future, please refactor everything related to HardwareType,
// so that we don't silently swallow errors like you just for this commit
func (s *SupermicroX) HardwareType() (model string) {
m, err := s.Model()
if err != nil {
s.log.V(1).Error(err, "HardwareType(): Getting the hardware type failed.")
return ""
}
return m
}
// Model returns the device model
func (s *SupermicroX) Model() (model string, err error) {
ipmi, err := s.query("FRU_INFO.XML=(0,0)")
if err != nil {
return model, err
}
if ipmi.FruInfo != nil && ipmi.FruInfo.Board != nil {
return ipmi.FruInfo.Board.PartNum, nil
}
return "", fmt.Errorf("SupermicroX Model(): Model not found!")
}
// Version returns the version of the bmc we are running
func (s *SupermicroX) Version() (bmcVersion string, err error) {
ipmi, err := s.query("GENERIC_INFO.XML=(0,0)")
if err != nil {
return bmcVersion, err
}
if ipmi.GenericInfo != nil {
if ipmi.GenericInfo.IpmiFwVersion != "" {
return ipmi.GenericInfo.IpmiFwVersion, err
} else if ipmi.GenericInfo.Generic != nil {
return ipmi.GenericInfo.Generic.IpmiFwVersion, err
}
}
return bmcVersion, err
}
// Name returns the hostname of the machine
func (s *SupermicroX) Name() (name string, err error) {
ipmi, err := s.query("CONFIG_INFO.XML=(0,0)")
if err != nil {
return name, err
}
if ipmi.ConfigInfo != nil && ipmi.ConfigInfo.Hostname != nil {
return ipmi.ConfigInfo.Hostname.Name, err
}
return name, err
}
// Status returns health string status from the bmc
func (s *SupermicroX) Status() (health string, err error) {
ipmi, err := s.query("SENSOR_INFO_FOR_SYS_HEALTH.XML=(1,ff)")
if err != nil {
return health, err
}
if ipmi.HealthInfo != nil && ipmi.HealthInfo.Health == "1" {
return "OK", err
}
return "Unhealthy", err
}
// Memory returns the total amount of memory of the server
func (s *SupermicroX) Memory() (mem int, err error) {
ipmi, err := s.query("SMBIOS_INFO.XML=(0,0)")
for _, dimm := range ipmi.Dimm {
dimm := strings.TrimSuffix(dimm.Size, " MB")
size, err := strconv.Atoi(dimm)
if err != nil {
return mem, err
}
mem += size
}
return mem / 1024, err
}
// CPU returns the cpu, cores and hyperthreads of the server
func (s *SupermicroX) CPU() (cpu string, cpuCount int, coreCount int, hyperthreadCount int, err error) {
ipmi, err := s.query("SMBIOS_INFO.XML=(0,0)")
if err != nil {
return "", 0, 0, 0, err
}
if len(ipmi.CPU) == 0 {
return "", 0, 0, 0, nil
}
entry := ipmi.CPU[0]
cpu = httpclient.StandardizeProcessorName(entry.Version)
cpuCount = len(ipmi.CPU)
coreCount, err = strconv.Atoi(entry.Core)
if err != nil {
return cpu, cpuCount, 0, 0, err
}
hyperthreadCount = coreCount
return cpu, cpuCount, coreCount, hyperthreadCount, nil
}
// BiosVersion returns the current version of the bios
func (s *SupermicroX) BiosVersion() (version string, err error) {
ipmi, err := s.query("SMBIOS_INFO.XML=(0,0)")
if err != nil {
return version, err
}
if ipmi.Bios != nil {
return ipmi.Bios.Version, err
}
return version, err
}
// PowerKw returns the current power usage in Kw
func (s *SupermicroX) PowerKw() (power float64, err error) {
ipmi, err := s.query("Get_NodeInfoReadings.XML=(0,0)")
if err != nil {
return power, err
}
if ipmi.NodeInfo != nil {
serial, err := s.Serial()
if err != nil {
return power, err
}
for _, node := range ipmi.NodeInfo.Nodes {
if strings.ToLower(node.NodeSerial) == serial {
value, err := strconv.Atoi(node.Power)
if err != nil {
return power, err
}
return float64(value) / 1000.00, err
}
}
}
return power, err
}
// PowerState returns the current power state of the machine
func (s *SupermicroX) PowerState() (state string, err error) {
ipmi, err := s.query("POWER_INFO.XML=(0,0)")
if err != nil {
return state, err
}
if ipmi.PowerInfo != nil {
return strings.ToLower(ipmi.PowerInfo.Power.Status), err
}
return "unknow", err
}
// TempC returns the current temperature of the machine
func (s *SupermicroX) TempC() (temp int, err error) {
ipmi, err := s.query("Get_NodeInfoReadings.XML=(0,0)")
if err != nil {
return temp, err
}
if ipmi.NodeInfo != nil {
serial, err := s.Serial()
if err != nil {
return temp, err
}
for _, node := range ipmi.NodeInfo.Nodes {
if strings.ToLower(node.NodeSerial) == serial {
temp, err := strconv.Atoi(node.SystemTemp)
if err != nil {
return temp, err
}
return temp, err
}
}
}
return temp, err
}
// IsBlade returns if the current hardware is a blade or not
func (s *SupermicroX) IsBlade() (isBlade bool, err error) {
ipmi, err := s.query("Get_NodeInfoReadings.XML=(0,0)")
if err != nil {
return isBlade, err
}
if ipmi.NodeInfo != nil {
for _, node := range ipmi.NodeInfo.Nodes {
if node.NodeSerial != "" {
return true, err
}
}
}
return isBlade, err
}
// Slot returns the current slot within the chassis
func (s *SupermicroX) Slot() (slot int, err error) {
slot = 1
ipmi, err := s.query("Get_NodeInfoReadings.XML=(0,0)")
if err != nil {
return slot, err
}
if ipmi.NodeInfo == nil {
return slot, errors.ErrUnableToReadData
}
serial, err := s.Serial()
if err != nil {
return slot, err
}
for _, node := range ipmi.NodeInfo.Nodes {
if strings.ToLower(node.NodeSerial) == serial {
slot = node.ID + 1
}
}
return slot, err
}
// Nics returns all found Nics in the device
func (s *SupermicroX) Nics() (nics []*devices.Nic, err error) {
ipmi, err := s.query("GENERIC_INFO.XML=(0,0)")
if err != nil {
return nics, err
}
if ipmi != nil && ipmi.GenericInfo != nil {
if ipmi.GenericInfo.BmcMac != "" {
bmcNic := &devices.Nic{
Name: "bmc",
MacAddress: ipmi.GenericInfo.BmcMac,
}
nics = append(nics, bmcNic)
} else if ipmi.GenericInfo.Generic != nil {
bmcNic := &devices.Nic{
Name: "bmc",
MacAddress: ipmi.GenericInfo.Generic.BmcMac,
}
nics = append(nics, bmcNic)
}
}
ipmi, err = s.query("Get_PlatformInfo.XML=(0,0)")
if err != nil {
return nics, err
}
// TODO: (ncode) This needs to become dynamic somehow
if ipmi.PlatformInfo != nil {
if ipmi.PlatformInfo.MbMacAddr1 != "" {
bmcNic := &devices.Nic{
Name: "eth0",
MacAddress: ipmi.PlatformInfo.MbMacAddr1,
}
nics = append(nics, bmcNic)
}
if ipmi.PlatformInfo.MbMacAddr2 != "" {
bmcNic := &devices.Nic{
Name: "eth1",
MacAddress: ipmi.PlatformInfo.MbMacAddr2,
}
nics = append(nics, bmcNic)
}
if ipmi.PlatformInfo.MbMacAddr3 != "" {
bmcNic := &devices.Nic{
Name: "eth2",
MacAddress: ipmi.PlatformInfo.MbMacAddr3,
}
nics = append(nics, bmcNic)
}
if ipmi.PlatformInfo.MbMacAddr4 != "" {
bmcNic := &devices.Nic{
Name: "eth3",
MacAddress: ipmi.PlatformInfo.MbMacAddr4,
}
nics = append(nics, bmcNic)
}
}
return nics, err
}
// License returns the iLO's license information
func (s *SupermicroX) License() (name string, licType string, err error) {
ipmi, err := s.query("BIOS_LINCENSE_ACTIVATE.XML=(0,0)")
if err != nil {
return name, licType, err
}
if ipmi.BiosLicense != nil {
switch ipmi.BiosLicense.Check {
case "0":
return "oob", "Activated", err
case "1":
return "oob", "Not Activated", err
}
}
return name, licType, err
}
// Vendor returns bmc's vendor
func (s *SupermicroX) Vendor() (vendor string) {
return supermicro.VendorID
}
// ServerSnapshot do best effort to populate the server data and returns a blade or discrete
// nolint: gocyclo
func (s *SupermicroX) ServerSnapshot() (server interface{}, err error) {
if isBlade, _ := s.IsBlade(); isBlade {
blade := &devices.Blade{}
blade.Vendor = s.Vendor()
blade.BmcAddress = s.ip
blade.BmcType = s.HardwareType()
blade.Serial, err = s.Serial()
if err != nil {
return nil, err
}
blade.BmcVersion, err = s.Version()
if err != nil {
return nil, err
}
blade.Model, err = s.Model()
if err != nil {
return nil, err
}
blade.Nics, err = s.Nics()
if err != nil {
return nil, err
}
blade.Disks, err = s.Disks()
if err != nil {
return nil, err
}
blade.BiosVersion, err = s.BiosVersion()
if err != nil {
return nil, err
}
blade.Processor, blade.ProcessorCount, blade.ProcessorCoreCount, blade.ProcessorThreadCount, err = s.CPU()
if err != nil {
return nil, err
}
blade.Memory, err = s.Memory()
if err != nil {
return nil, err
}
blade.Status, err = s.Status()
if err != nil {
return nil, err
}
blade.Name, err = s.Name()
if err != nil {
return nil, err
}
blade.TempC, err = s.TempC()
if err != nil {
return nil, err
}
blade.PowerKw, err = s.PowerKw()
if err != nil {
return nil, err
}
blade.PowerState, err = s.PowerState()
if err != nil {
return nil, err
}
blade.BmcLicenceType, blade.BmcLicenceStatus, err = s.License()
if err != nil {
return nil, err
}
blade.BladePosition, err = s.Slot()
if err != nil {
return nil, err
}
blade.ChassisSerial, err = s.ChassisSerial()
if err != nil {
return nil, err
}
server = blade
} else {
discrete := &devices.Discrete{}
discrete.Vendor = s.Vendor()
discrete.BmcAddress = s.ip
discrete.BmcType = s.HardwareType()
discrete.Serial, err = s.Serial()
if err != nil {
return nil, err
}
discrete.BmcVersion, err = s.Version()
if err != nil {
return nil, err
}
discrete.Model, err = s.Model()
if err != nil {
return nil, err
}
discrete.Nics, err = s.Nics()
if err != nil {
return nil, err
}
discrete.Disks, err = s.Disks()
if err != nil {
return nil, err
}
discrete.BiosVersion, err = s.BiosVersion()
if err != nil {
return nil, err
}
discrete.Processor, discrete.ProcessorCount, discrete.ProcessorCoreCount, discrete.ProcessorThreadCount, err = s.CPU()
if err != nil {
return nil, err
}
discrete.Memory, err = s.Memory()
if err != nil {
return nil, err
}
discrete.Status, err = s.Status()
if err != nil {
return nil, err
}
discrete.Name, err = s.Name()
if err != nil {
return nil, err
}
discrete.TempC, err = s.TempC()
if err != nil {
return nil, err
}
discrete.PowerKw, err = s.PowerKw()
if err != nil {
return nil, err
}
discrete.PowerState, err = s.PowerState()
if err != nil {
return nil, err
}
discrete.BmcLicenceType, discrete.BmcLicenceStatus, err = s.License()
if err != nil {
return nil, err
}
server = discrete
}
return server, err
}
// Disks returns a list of disks installed on the device
func (s *SupermicroX) Disks() (disks []*devices.Disk, err error) {
return disks, err
}
// UpdateCredentials updates login credentials
func (s *SupermicroX) UpdateCredentials(username string, password string) {
s.username = username
s.password = password
}
// BiosVersion returns the BIOS version from the BMC, implements the Firmware interface
func (s *SupermicroX) GetBIOSVersion(ctx context.Context) (string, error) {
return "", errors.ErrNotImplemented
}
// BMCVersion returns the BMC version, implements the Firmware interface
func (s *SupermicroX) GetBMCVersion(ctx context.Context) (string, error) {
return "", errors.ErrNotImplemented
}
// Updates the BMC firmware, implements the Firmware interface
func (s *SupermicroX) FirmwareUpdateBMC(ctx context.Context, filePath string) error {
return errors.ErrNotImplemented
}