v1.16.6
v1.16.6
This commit is contained in:
@@ -13,10 +13,6 @@ type EnableRequest struct {
|
||||
// Required: true
|
||||
NID uint64 `url:"nid" json:"nid" validate:"required"`
|
||||
|
||||
// Message
|
||||
// Required: false
|
||||
Message string `url:"message,omitempty" json:"message,omitempty"`
|
||||
|
||||
// Do not check locks, iscsi-sessions or disk-present
|
||||
// Default: false
|
||||
// Required: false
|
||||
|
||||
@@ -340,6 +340,9 @@ type ItemNode struct {
|
||||
|
||||
// PCI devices attached to the node
|
||||
PCIDevices []ItemPCIDevice `json:"pci_devices"`
|
||||
|
||||
// Shared locks
|
||||
SharedLocks map[string]interface{} `json:"shared_locks"`
|
||||
}
|
||||
|
||||
type PackageInfo struct {
|
||||
@@ -429,6 +432,12 @@ type ItemNicInfo struct {
|
||||
|
||||
// VFList
|
||||
VFList []interface{} `json:"vflist"`
|
||||
|
||||
// Link state
|
||||
LinkState string `json:"linkState"`
|
||||
|
||||
// Link speed
|
||||
LinkSpeed int64 `json:"linkSpeed"`
|
||||
}
|
||||
|
||||
type ListNetAddr []ItemNetAddr
|
||||
|
||||
42
pkg/cloudbroker/node/remove_ssh_identity.go
Normal file
42
pkg/cloudbroker/node/remove_ssh_identity.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package node
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||
)
|
||||
|
||||
// RemoveSSHIdentityRequest to remove an ssh identity from a node
|
||||
type RemoveSSHIdentityRequest struct {
|
||||
// Node ID
|
||||
// Required: true
|
||||
NodeID uint64 `url:"node_id" json:"node_id" validate:"required"`
|
||||
|
||||
// Key to remove
|
||||
// Required: true
|
||||
ClientPublicKey string `url:"client_public_key" json:"client_public_key" validate:"required"`
|
||||
}
|
||||
|
||||
// RemoveSSHIdentity removes an ssh identity from a node
|
||||
func (n Node) RemoveSSHIdentity(ctx context.Context, req RemoveSSHIdentityRequest) (bool, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
return false, validators.ValidationErrors(validators.GetErrors(err))
|
||||
}
|
||||
|
||||
url := "/cloudbroker/node/remove_ssh_identity"
|
||||
|
||||
res, err := n.client.DecortApiCall(ctx, http.MethodPost, url, req)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
result, err := strconv.ParseBool(string(res))
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
Reference in New Issue
Block a user