From ac5644d7d620baf9bafee84bb44fbd9ebfd168f8 Mon Sep 17 00:00:00 2001 From: jagratac Date: Mon, 15 Dec 2025 04:42:43 +0000 Subject: [PATCH 1/3] Updated MPS and RPS client code --- dm-manager/Makefile | 4 +- dm-manager/VERSION | 2 +- dm-manager/pkg/api/mps/client.gen.go | 1322 ++++++- dm-manager/pkg/api/mps/mocks.go | 673 +++- dm-manager/pkg/api/mps/swagger.json | 3983 ---------------------- dm-manager/pkg/api/mps/swagger.yaml | 3457 +++++++++++++++++++ dm-manager/pkg/api/rps/client.gen.go | 1191 ++++++- dm-manager/pkg/api/rps/mocks.go | 464 +++ dm-manager/pkg/api/rps/swagger.json | 2740 --------------- dm-manager/pkg/api/rps/swagger.yaml | 2300 +++++++++++++ dm-manager/pkg/tenant/controller.go | 34 +- dm-manager/pkg/tenant/controller_test.go | 30 +- 12 files changed, 9158 insertions(+), 7042 deletions(-) delete mode 100644 dm-manager/pkg/api/mps/swagger.json create mode 100644 dm-manager/pkg/api/mps/swagger.yaml delete mode 100644 dm-manager/pkg/api/rps/swagger.json create mode 100644 dm-manager/pkg/api/rps/swagger.yaml diff --git a/dm-manager/Makefile b/dm-manager/Makefile index b580cd7d..c13ca32b 100644 --- a/dm-manager/Makefile +++ b/dm-manager/Makefile @@ -66,8 +66,8 @@ go-run: $(OUT_DIR) ## Run the resource manager $(GOCMD) run $(GOEXTRAFLAGS) ./cmd/$(BINARY_NAME).go generate: - oapi-codegen -generate client,types -o pkg/api/mps/client.gen.go -package mps pkg/api/mps/swagger.json - oapi-codegen -generate client,types -o pkg/api/rps/client.gen.go -package rps pkg/api/rps/swagger.json + oapi-codegen -generate client,types -o pkg/api/mps/client.gen.go -package mps pkg/api/mps/swagger.yaml + oapi-codegen -generate client,types -o pkg/api/rps/client.gen.go -package rps pkg/api/rps/swagger.yaml mockery oasdiff-breaking: common-oasdiff-breaking ## Check for breaking changes in openapi using oasdiff diff --git a/dm-manager/VERSION b/dm-manager/VERSION index 8bd6ba8c..a3df0a69 100644 --- a/dm-manager/VERSION +++ b/dm-manager/VERSION @@ -1 +1 @@ -0.7.5 +0.8.0 diff --git a/dm-manager/pkg/api/mps/client.gen.go b/dm-manager/pkg/api/mps/client.gen.go index d4b0c3a6..c4bf60eb 100644 --- a/dm-manager/pkg/api/mps/client.gen.go +++ b/dm-manager/pkg/api/mps/client.gen.go @@ -1,6 +1,6 @@ // Package mps provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT. package mps import ( @@ -21,6 +21,14 @@ const ( BearerAuthScopes = "BearerAuth.Scopes" ) +// Defines values for DisplayRole. +const ( + Primary DisplayRole = "primary" + Quaternary DisplayRole = "quaternary" + Secondary DisplayRole = "secondary" + Tertiary DisplayRole = "tertiary" +) + // Defines values for GetAMTFeaturesResponseOptInState. const ( GetAMTFeaturesResponseOptInStateN0 GetAMTFeaturesResponseOptInState = 0 @@ -31,12 +39,23 @@ const ( GetAMTFeaturesResponseOptInStateN5 GetAMTFeaturesResponseOptInState = 5 ) +// Defines values for GetCertificatesResponseProfileAssociationType. +const ( + TLS GetCertificatesResponseProfileAssociationType = "TLS" +) + // Defines values for PowerActionRequestAction. const ( PowerActionRequestActionN10 PowerActionRequestAction = 10 PowerActionRequestActionN100 PowerActionRequestAction = 100 PowerActionRequestActionN101 PowerActionRequestAction = 101 PowerActionRequestActionN104 PowerActionRequestAction = 104 + PowerActionRequestActionN105 PowerActionRequestAction = 105 + PowerActionRequestActionN106 PowerActionRequestAction = 106 + PowerActionRequestActionN107 PowerActionRequestAction = 107 + PowerActionRequestActionN108 PowerActionRequestAction = 108 + PowerActionRequestActionN109 PowerActionRequestAction = 109 + PowerActionRequestActionN110 PowerActionRequestAction = 110 PowerActionRequestActionN12 PowerActionRequestAction = 12 PowerActionRequestActionN14 PowerActionRequestAction = 14 PowerActionRequestActionN2 PowerActionRequestAction = 2 @@ -50,6 +69,8 @@ const ( PowerActionRequestActionN400 PowerActionRequestAction = 400 PowerActionRequestActionN401 PowerActionRequestAction = 401 PowerActionRequestActionN5 PowerActionRequestAction = 5 + PowerActionRequestActionN500 PowerActionRequestAction = 500 + PowerActionRequestActionN501 PowerActionRequestAction = 501 PowerActionRequestActionN7 PowerActionRequestAction = 7 PowerActionRequestActionN8 PowerActionRequestAction = 8 ) @@ -61,6 +82,12 @@ const ( None SetAMTFeaturesRequestUserConsent = "none" ) +// Defines values for PostApiV1AmtNetworkLinkPreferenceGuidJSONBodyLinkPreference. +const ( + N1 PostApiV1AmtNetworkLinkPreferenceGuidJSONBodyLinkPreference = 1 + N2 PostApiV1AmtNetworkLinkPreferenceGuidJSONBodyLinkPreference = 2 +) + // AMTVersionResponse defines model for AMTVersionResponse. type AMTVersionResponse struct { AMTSetupAndConfigurationService *struct { @@ -114,6 +141,21 @@ type AMTVersionResponse struct { } `json:"CIM_SoftwareIdentity,omitempty"` } +// AddCertificatesRequest defines model for AddCertificatesRequest. +type AddCertificatesRequest struct { + // Cert Base64-encoded X.509 certificate to be added + Cert string `json:"cert"` + + // IsTrusted Whether the certificate should be marked as trusted + IsTrusted bool `json:"isTrusted"` +} + +// AddCertificatesResponse defines model for AddCertificatesResponse. +type AddCertificatesResponse struct { + // Handle Unique handle identifier for the newly added certificate + Handle string `json:"handle"` +} + // AddDevice defines model for AddDevice. type AddDevice struct { DeviceInfo *struct { @@ -153,29 +195,52 @@ type AddDeviceResponse struct { TenantID string `json:"tenantID"` } +// AuditLogRecord defines model for AuditLogRecord. +type AuditLogRecord struct { + AuditApp *string `json:"AuditApp,omitempty"` + AuditAppID *int `json:"AuditAppID,omitempty"` + Event *string `json:"Event,omitempty"` + EventID *int `json:"EventID,omitempty"` + Ex *string `json:"Ex,omitempty"` + ExStr *string `json:"ExStr"` + Initiator *string `json:"Initiator,omitempty"` + InitiatorType *int `json:"InitiatorType,omitempty"` + MCLocationType *int `json:"MCLocationType,omitempty"` + NetAddress *string `json:"NetAddress,omitempty"` + Time *time.Time `json:"Time,omitempty"` +} + // AuditLogResponse defines model for AuditLogResponse. type AuditLogResponse struct { - AuditApp *string `json:"AuditApp,omitempty"` - AuditAppID *int `json:"AuditAppID,omitempty"` - Event *string `json:"Event,omitempty"` - EventID *int `json:"EventID,omitempty"` - Ex *struct { - Data *[]int `json:"data,omitempty"` - Type *string `json:"type,omitempty"` - } `json:"Ex,omitempty"` - ExStr *string `json:"ExStr,omitempty"` - Initiator *string `json:"Initiator,omitempty"` - InitiatorType *int `json:"InitiatorType,omitempty"` - MCLocationType *int `json:"MCLocationType,omitempty"` - NetAddress *string `json:"NetAddress,omitempty"` - Time *string `json:"Time,omitempty"` - Records *string `json:"records,omitempty"` - TotalCnt *int `json:"totalCnt,omitempty"` + // Records Array of audit log records + Records *[]AuditLogRecord `json:"records,omitempty"` + + // TotalCnt Total number of audit log records + TotalCnt *int `json:"totalCnt,omitempty"` +} + +// BootSource defines model for BootSource. +type BootSource struct { + BiosBootString *string `json:"biosBootString,omitempty"` + BootString *string `json:"bootString,omitempty"` + ElementName *string `json:"elementName,omitempty"` + FailThroughSupported *int `json:"failThroughSupported,omitempty"` + InstanceID *string `json:"instanceID,omitempty"` + StructuredBiosBootString *string `json:"structuredBiosBootString,omitempty"` } +// BootSourcesResponse defines model for BootSourcesResponse. +type BootSourcesResponse = []BootSource + // CiracertResponse defines model for CiracertResponse. type CiracertResponse = interface{} +// CountDevicesResponse defines model for CountDevicesResponse. +type CountDevicesResponse struct { + Data *[]Device `json:"data,omitempty"` + TotalCount *int `json:"totalCount,omitempty"` +} + // DeactivateResponse defines model for DeactivateResponse. type DeactivateResponse struct { Status *string `json:"status,omitempty"` @@ -257,6 +322,36 @@ type DisconnectResponse struct { Success *int `json:"success,omitempty"` } +// Display defines model for Display. +type Display struct { + // DisplayIndex Index of the display + DisplayIndex int `json:"displayIndex"` + + // IsActive Whether the display is currently active + IsActive bool `json:"isActive"` + + // IsDefault Whether this is the default display + IsDefault bool `json:"isDefault"` + + // ResolutionX Horizontal resolution in pixels + ResolutionX int `json:"resolutionX"` + + // ResolutionY Vertical resolution in pixels + ResolutionY int `json:"resolutionY"` + + // Role Role of the display in multi-display setup + Role *DisplayRole `json:"role,omitempty"` + + // UpperLeftX X coordinate of the upper left corner + UpperLeftX int `json:"upperLeftX"` + + // UpperLeftY Y coordinate of the upper left corner + UpperLeftY int `json:"upperLeftY"` +} + +// DisplayRole Role of the display in multi-display setup +type DisplayRole string + // EditDevice defines model for EditDevice. type EditDevice struct { DeviceInfo *struct { @@ -298,8 +393,8 @@ type EditDeviceResponse struct { TenantID string `json:"tenantID"` } -// EventLogResponse defines model for EventLogResponse. -type EventLogResponse struct { +// EventLogRecord defines model for EventLogRecord. +type EventLogRecord struct { Desc *string `json:"Desc,omitempty"` DeviceAddress *int `json:"DeviceAddress,omitempty"` Entity *int `json:"Entity,omitempty"` @@ -315,6 +410,9 @@ type EventLogResponse struct { TimeStamp *string `json:"TimeStamp,omitempty"` } +// EventLogResponse defines model for EventLogResponse. +type EventLogResponse = []EventLogRecord + // GeneralSettingsResponse defines model for GeneralSettingsResponse. type GeneralSettingsResponse struct { Body *struct { @@ -353,12 +451,17 @@ type GeneralSettingsResponse struct { // GetAMTFeaturesResponse defines model for GetAMTFeaturesResponse. type GetAMTFeaturesResponse struct { - IDER *bool `json:"IDER,omitempty"` - KVM *bool `json:"KVM,omitempty"` - SOL *bool `json:"SOL,omitempty"` - OptInState *GetAMTFeaturesResponseOptInState `json:"optInState,omitempty"` - Redirection *bool `json:"redirection,omitempty"` - UserConsent *string `json:"userConsent,omitempty"` + IDER *bool `json:"IDER,omitempty"` + KVM *bool `json:"KVM,omitempty"` + SOL *bool `json:"SOL,omitempty"` + HttpsBootSupported *bool `json:"httpsBootSupported,omitempty"` + LocalPBABootSupported *bool `json:"localPBABootSupported,omitempty"` + Ocr *bool `json:"ocr,omitempty"` + OptInState *GetAMTFeaturesResponseOptInState `json:"optInState,omitempty"` + Redirection *bool `json:"redirection,omitempty"` + RemoteErase *bool `json:"remoteErase,omitempty"` + UserConsent *string `json:"userConsent,omitempty"` + WinREBootSupported *bool `json:"winREBootSupported,omitempty"` } // GetAMTFeaturesResponseOptInState defines model for GetAMTFeaturesResponse.OptInState. @@ -377,6 +480,87 @@ type GetAlarmClockResponse struct { } `json:"StartTime,omitempty"` } +// GetCertificatesResponse defines model for GetCertificatesResponse. +type GetCertificatesResponse struct { + Certificates struct { + // KeyManagementItems Array of key management items + KeyManagementItems *[]map[string]interface{} `json:"keyManagementItems,omitempty"` + PublicKeyCertificateItems *[]struct { + // AssociatedProfiles List of profiles associated with this certificate + AssociatedProfiles []string `json:"associatedProfiles"` + + // DisplayName Human-readable display name for the certificate + DisplayName string `json:"displayName"` + + // ElementName Name of the certificate element + ElementName string `json:"elementName"` + + // InstanceID Unique instance identifier for the certificate + InstanceID string `json:"instanceID"` + + // Issuer Certificate issuer distinguished name + Issuer string `json:"issuer"` + + // PublicKeyHandle Handle to the associated public key + PublicKeyHandle *string `json:"publicKeyHandle,omitempty"` + + // ReadOnlyCertificate Whether the certificate is read-only + ReadOnlyCertificate bool `json:"readOnlyCertificate"` + + // Subject Certificate subject distinguished name + Subject string `json:"subject"` + + // TrustedRootCertificate Whether this is a trusted root certificate + TrustedRootCertificate bool `json:"trustedRootCertificate"` + + // X509Certificate Base64 encoded X.509 certificate + X509Certificate string `json:"x509Certificate"` + } `json:"publicKeyCertificateItems,omitempty"` + } `json:"certificates"` + ProfileAssociation []struct { + // ClientCertificate Client certificate used for this profile association + ClientCertificate struct { + AssociatedProfiles *[]string `json:"associatedProfiles,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + ElementName *string `json:"elementName,omitempty"` + InstanceID *string `json:"instanceID,omitempty"` + Issuer *string `json:"issuer,omitempty"` + PublicKeyHandle *string `json:"publicKeyHandle,omitempty"` + ReadOnlyCertificate *bool `json:"readOnlyCertificate,omitempty"` + Subject *string `json:"subject,omitempty"` + TrustedRootCertificate *bool `json:"trustedRootCertificate,omitempty"` + X509Certificate *string `json:"x509Certificate,omitempty"` + } `json:"clientCertificate"` + + // ProfileID Identifier of the associated profile + ProfileID string `json:"profileID"` + + // Type Type of profile association + Type GetCertificatesResponseProfileAssociationType `json:"type"` + } `json:"profileAssociation"` + PublicKeys struct { + PublicPrivateKeyPairItems *[]struct { + // DerKey DER-encoded public key + DerKey string `json:"derKey"` + + // ElementName Name of the key element + ElementName string `json:"elementName"` + + // InstanceID Unique instance identifier for the key pair + InstanceID string `json:"instanceID"` + } `json:"publicPrivateKeyPairItems,omitempty"` + } `json:"publicKeys"` +} + +// GetCertificatesResponseProfileAssociationType Type of profile association +type GetCertificatesResponseProfileAssociationType string + +// GetDisplaysResponse defines model for GetDisplaysResponse. +type GetDisplaysResponse struct { + // Displays List of display configurations + Displays *[]Display `json:"displays,omitempty"` +} + // HardwareInfoResponse defines model for HardwareInfoResponse. type HardwareInfoResponse struct { CIMBIOSElement *struct { @@ -669,10 +853,38 @@ type HealthcheckResponse struct { } `json:"secretStore,omitempty"` } +// KVMRedirectionSettingData defines model for KVMRedirectionSettingData. +type KVMRedirectionSettingData struct { + BackToBackFbMode *bool `json:"BackToBackFbMode,omitempty"` + DefaultScreen *int `json:"DefaultScreen,omitempty"` + DoubleBufferActive *bool `json:"DoubleBufferActive,omitempty"` + DoubleBufferEnabled *bool `json:"DoubleBufferEnabled,omitempty"` + ElementName *string `json:"ElementName,omitempty"` + EnabledByMEBx *bool `json:"EnabledByMEBx,omitempty"` + GrayscalePixelFormatSupported *bool `json:"GrayscalePixelFormatSupported,omitempty"` + InitialDecimationModeForLowRes *int `json:"InitialDecimationModeForLowRes,omitempty"` + InstanceID *string `json:"InstanceID,omitempty"` + Is5900PortEnabled *bool `json:"Is5900PortEnabled,omitempty"` + OptInPolicy *bool `json:"OptInPolicy,omitempty"` + RFBPassword *string `json:"RFBPassword,omitempty"` + SessionTimeout *int `json:"SessionTimeout,omitempty"` + ZlibControlSupported *bool `json:"ZlibControlSupported,omitempty"` +} + // PowerActionRequest defines model for PowerActionRequest. type PowerActionRequest struct { - Action PowerActionRequestAction `json:"action"` - UseSOL bool `json:"useSOL"` + Action PowerActionRequestAction `json:"action"` + BootDetails *struct { + // BootPath Boot path for PBA and WinRE boot scenarios + BootPath *string `json:"bootPath,omitempty"` + EnforceSecureBoot *bool `json:"enforceSecureBoot,omitempty"` + + // Password Password for authentication + Password *string `json:"password,omitempty"` + Url *string `json:"url,omitempty"` + Username *string `json:"username,omitempty"` + } `json:"bootDetails,omitempty"` + UseSOL bool `json:"useSOL"` } // PowerActionRequestAction defines model for PowerActionRequest.Action. @@ -709,7 +921,8 @@ type PowerCapabilitiesResponse struct { // PowerStateResponse defines model for PowerStateResponse. type PowerStateResponse struct { - Powerstate *int `json:"powerstate,omitempty"` + OSPowerSavingState *int `json:"OSPowerSavingState,omitempty"` + Powerstate *int `json:"powerstate,omitempty"` } // RedirectStatus defines model for RedirectStatus. @@ -731,6 +944,7 @@ type SetAMTFeaturesRequest struct { EnableIDER bool `json:"enableIDER"` EnableKVM bool `json:"enableKVM"` EnableSOL bool `json:"enableSOL"` + Ocr *bool `json:"ocr,omitempty"` Redirection *bool `json:"redirection,omitempty"` UserConsent SetAMTFeaturesRequestUserConsent `json:"userConsent"` } @@ -759,6 +973,17 @@ type Stats struct { TotalCount *int `json:"totalCount,omitempty"` } +// UpdateDisplaySettingsRequest defines model for UpdateDisplaySettingsRequest. +type UpdateDisplaySettingsRequest struct { + // DisplayIndex Index of the display to update + DisplayIndex int `json:"displayIndex"` +} + +// UpdateDisplaySettingsResponse defines model for UpdateDisplaySettingsResponse. +type UpdateDisplaySettingsResponse struct { + IPSKVMRedirectionSettingData *KVMRedirectionSettingData `json:"IPS_KVMRedirectionSettingData,omitempty"` +} + // UserConsentRequest defines model for UserConsentRequest. type UserConsentRequest struct { ConsentCode int `json:"consentCode"` @@ -788,9 +1013,29 @@ type VersionResponse struct { // GetApiV1AmtLogAuditGuidParams defines parameters for GetApiV1AmtLogAuditGuid. type GetApiV1AmtLogAuditGuidParams struct { // StartIndex number of items to skip - StartIndex int `form:"startIndex" json:"startIndex"` + StartIndex *int `form:"startIndex,omitempty" json:"startIndex,omitempty"` +} + +// PostApiV1AmtNetworkLinkPreferenceGuidJSONBody defines parameters for PostApiV1AmtNetworkLinkPreferenceGuid. +type PostApiV1AmtNetworkLinkPreferenceGuidJSONBody struct { + // LinkPreference Link preference - 1 = ME, 2 = HOST + LinkPreference PostApiV1AmtNetworkLinkPreferenceGuidJSONBodyLinkPreference `json:"linkPreference"` + + // Timeout Timeout in seconds + Timeout int `json:"timeout"` +} + +// PostApiV1AmtNetworkLinkPreferenceGuidParams defines parameters for PostApiV1AmtNetworkLinkPreferenceGuid. +type PostApiV1AmtNetworkLinkPreferenceGuidParams struct { + // InstanceID InstanceID of the WiFi Ethernet port (e.g., "Intel(r) AMT Ethernet Port Settings 1"). + // If not provided, the API will automatically detect the WiFi port. + // Must be a WiFi port (PhysicalConnectionType = 3). + InstanceID *string `form:"instanceID,omitempty" json:"instanceID,omitempty"` } +// PostApiV1AmtNetworkLinkPreferenceGuidJSONBodyLinkPreference defines parameters for PostApiV1AmtNetworkLinkPreferenceGuid. +type PostApiV1AmtNetworkLinkPreferenceGuidJSONBodyLinkPreference int + // PostApiV1AuthorizeJSONBody defines parameters for PostApiV1Authorize. type PostApiV1AuthorizeJSONBody struct { Password string `json:"password"` @@ -833,14 +1078,23 @@ type DeleteApiV1DevicesGuidParams struct { // PostApiV1AmtAlarmOccurrencesGuidJSONRequestBody defines body for PostApiV1AmtAlarmOccurrencesGuid for application/json ContentType. type PostApiV1AmtAlarmOccurrencesGuidJSONRequestBody = SetAlarmClockRequest +// PostApiV1AmtCertificatesGuidJSONRequestBody defines body for PostApiV1AmtCertificatesGuid for application/json ContentType. +type PostApiV1AmtCertificatesGuidJSONRequestBody = AddCertificatesRequest + // PostApiV1AmtFeaturesGuidJSONRequestBody defines body for PostApiV1AmtFeaturesGuid for application/json ContentType. type PostApiV1AmtFeaturesGuidJSONRequestBody = SetAMTFeaturesRequest +// PostApiV1AmtNetworkLinkPreferenceGuidJSONRequestBody defines body for PostApiV1AmtNetworkLinkPreferenceGuid for application/json ContentType. +type PostApiV1AmtNetworkLinkPreferenceGuidJSONRequestBody PostApiV1AmtNetworkLinkPreferenceGuidJSONBody + // PostApiV1AmtPowerActionGuidJSONRequestBody defines body for PostApiV1AmtPowerActionGuid for application/json ContentType. type PostApiV1AmtPowerActionGuidJSONRequestBody = PowerActionRequest -// PostApiV1AmtPowerBootoptionsGuidJSONRequestBody defines body for PostApiV1AmtPowerBootoptionsGuid for application/json ContentType. -type PostApiV1AmtPowerBootoptionsGuidJSONRequestBody = PowerActionRequest +// PostApiV1AmtPowerBootOptionsGuidJSONRequestBody defines body for PostApiV1AmtPowerBootOptionsGuid for application/json ContentType. +type PostApiV1AmtPowerBootOptionsGuidJSONRequestBody = PowerActionRequest + +// PutApiV1AmtScreenGuidJSONRequestBody defines body for PutApiV1AmtScreenGuid for application/json ContentType. +type PutApiV1AmtScreenGuidJSONRequestBody = UpdateDisplaySettingsRequest // PostApiV1AmtUserConsentCodeGuidJSONRequestBody defines body for PostApiV1AmtUserConsentCodeGuid for application/json ContentType. type PostApiV1AmtUserConsentCodeGuidJSONRequestBody = UserConsentRequest @@ -938,6 +1192,14 @@ type ClientInterface interface { PostApiV1AmtAlarmOccurrencesGuid(ctx context.Context, guid string, body PostApiV1AmtAlarmOccurrencesGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetApiV1AmtCertificatesGuid request + GetApiV1AmtCertificatesGuid(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV1AmtCertificatesGuidWithBody request with any body + PostApiV1AmtCertificatesGuidWithBody(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV1AmtCertificatesGuid(ctx context.Context, guid string, body PostApiV1AmtCertificatesGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteApiV1AmtDeactivateGuid request DeleteApiV1AmtDeactivateGuid(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -955,21 +1217,32 @@ type ClientInterface interface { // GetApiV1AmtHardwareInfoGuid request GetApiV1AmtHardwareInfoGuid(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetApiV1AmtKvmDisplaysGuid request + GetApiV1AmtKvmDisplaysGuid(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetApiV1AmtLogAuditGuid request GetApiV1AmtLogAuditGuid(ctx context.Context, guid string, params *GetApiV1AmtLogAuditGuidParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetApiV1AmtLogEventGuid request GetApiV1AmtLogEventGuid(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostApiV1AmtNetworkLinkPreferenceGuidWithBody request with any body + PostApiV1AmtNetworkLinkPreferenceGuidWithBody(ctx context.Context, guid string, params *PostApiV1AmtNetworkLinkPreferenceGuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV1AmtNetworkLinkPreferenceGuid(ctx context.Context, guid string, params *PostApiV1AmtNetworkLinkPreferenceGuidParams, body PostApiV1AmtNetworkLinkPreferenceGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostApiV1AmtPowerActionGuidWithBody request with any body PostApiV1AmtPowerActionGuidWithBody(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PostApiV1AmtPowerActionGuid(ctx context.Context, guid string, body PostApiV1AmtPowerActionGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // PostApiV1AmtPowerBootoptionsGuidWithBody request with any body - PostApiV1AmtPowerBootoptionsGuidWithBody(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostApiV1AmtPowerBootOptionsGuidWithBody request with any body + PostApiV1AmtPowerBootOptionsGuidWithBody(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV1AmtPowerBootOptionsGuid(ctx context.Context, guid string, body PostApiV1AmtPowerBootOptionsGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - PostApiV1AmtPowerBootoptionsGuid(ctx context.Context, guid string, body PostApiV1AmtPowerBootoptionsGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetApiV1AmtPowerBootSourcesGuid request + GetApiV1AmtPowerBootSourcesGuid(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetApiV1AmtPowerCapabilitiesGuid request GetApiV1AmtPowerCapabilitiesGuid(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -977,6 +1250,11 @@ type ClientInterface interface { // GetApiV1AmtPowerStateGuid request GetApiV1AmtPowerStateGuid(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*http.Response, error) + // PutApiV1AmtScreenGuidWithBody request with any body + PutApiV1AmtScreenGuidWithBody(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutApiV1AmtScreenGuid(ctx context.Context, guid string, body PutApiV1AmtScreenGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetApiV1AmtUserConsentCodeCancelGuid request GetApiV1AmtUserConsentCodeCancelGuid(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1088,6 +1366,42 @@ func (c *Client) PostApiV1AmtAlarmOccurrencesGuid(ctx context.Context, guid stri return c.Client.Do(req) } +func (c *Client) GetApiV1AmtCertificatesGuid(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV1AmtCertificatesGuidRequest(c.Server, guid) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV1AmtCertificatesGuidWithBody(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV1AmtCertificatesGuidRequestWithBody(c.Server, guid, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV1AmtCertificatesGuid(ctx context.Context, guid string, body PostApiV1AmtCertificatesGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV1AmtCertificatesGuidRequest(c.Server, guid, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) DeleteApiV1AmtDeactivateGuid(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteApiV1AmtDeactivateGuidRequest(c.Server, guid) if err != nil { @@ -1160,6 +1474,18 @@ func (c *Client) GetApiV1AmtHardwareInfoGuid(ctx context.Context, guid string, r return c.Client.Do(req) } +func (c *Client) GetApiV1AmtKvmDisplaysGuid(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV1AmtKvmDisplaysGuidRequest(c.Server, guid) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetApiV1AmtLogAuditGuid(ctx context.Context, guid string, params *GetApiV1AmtLogAuditGuidParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetApiV1AmtLogAuditGuidRequest(c.Server, guid, params) if err != nil { @@ -1184,6 +1510,30 @@ func (c *Client) GetApiV1AmtLogEventGuid(ctx context.Context, guid string, reqEd return c.Client.Do(req) } +func (c *Client) PostApiV1AmtNetworkLinkPreferenceGuidWithBody(ctx context.Context, guid string, params *PostApiV1AmtNetworkLinkPreferenceGuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV1AmtNetworkLinkPreferenceGuidRequestWithBody(c.Server, guid, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV1AmtNetworkLinkPreferenceGuid(ctx context.Context, guid string, params *PostApiV1AmtNetworkLinkPreferenceGuidParams, body PostApiV1AmtNetworkLinkPreferenceGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV1AmtNetworkLinkPreferenceGuidRequest(c.Server, guid, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) PostApiV1AmtPowerActionGuidWithBody(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewPostApiV1AmtPowerActionGuidRequestWithBody(c.Server, guid, contentType, body) if err != nil { @@ -1208,8 +1558,20 @@ func (c *Client) PostApiV1AmtPowerActionGuid(ctx context.Context, guid string, b return c.Client.Do(req) } -func (c *Client) PostApiV1AmtPowerBootoptionsGuidWithBody(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiV1AmtPowerBootoptionsGuidRequestWithBody(c.Server, guid, contentType, body) +func (c *Client) PostApiV1AmtPowerBootOptionsGuidWithBody(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV1AmtPowerBootOptionsGuidRequestWithBody(c.Server, guid, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV1AmtPowerBootOptionsGuid(ctx context.Context, guid string, body PostApiV1AmtPowerBootOptionsGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV1AmtPowerBootOptionsGuidRequest(c.Server, guid, body) if err != nil { return nil, err } @@ -1220,8 +1582,8 @@ func (c *Client) PostApiV1AmtPowerBootoptionsGuidWithBody(ctx context.Context, g return c.Client.Do(req) } -func (c *Client) PostApiV1AmtPowerBootoptionsGuid(ctx context.Context, guid string, body PostApiV1AmtPowerBootoptionsGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiV1AmtPowerBootoptionsGuidRequest(c.Server, guid, body) +func (c *Client) GetApiV1AmtPowerBootSourcesGuid(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV1AmtPowerBootSourcesGuidRequest(c.Server, guid) if err != nil { return nil, err } @@ -1256,6 +1618,30 @@ func (c *Client) GetApiV1AmtPowerStateGuid(ctx context.Context, guid string, req return c.Client.Do(req) } +func (c *Client) PutApiV1AmtScreenGuidWithBody(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV1AmtScreenGuidRequestWithBody(c.Server, guid, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutApiV1AmtScreenGuid(ctx context.Context, guid string, body PutApiV1AmtScreenGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV1AmtScreenGuidRequest(c.Server, guid, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetApiV1AmtUserConsentCodeCancelGuid(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetApiV1AmtUserConsentCodeCancelGuidRequest(c.Server, guid) if err != nil { @@ -1635,6 +2021,87 @@ func NewPostApiV1AmtAlarmOccurrencesGuidRequestWithBody(server string, guid stri return req, nil } +// NewGetApiV1AmtCertificatesGuidRequest generates requests for GetApiV1AmtCertificatesGuid +func NewGetApiV1AmtCertificatesGuidRequest(server string, guid string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "guid", runtime.ParamLocationPath, guid) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/amt/certificates/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostApiV1AmtCertificatesGuidRequest calls the generic PostApiV1AmtCertificatesGuid builder with application/json body +func NewPostApiV1AmtCertificatesGuidRequest(server string, guid string, body PostApiV1AmtCertificatesGuidJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV1AmtCertificatesGuidRequestWithBody(server, guid, "application/json", bodyReader) +} + +// NewPostApiV1AmtCertificatesGuidRequestWithBody generates requests for PostApiV1AmtCertificatesGuid with any type of body +func NewPostApiV1AmtCertificatesGuidRequestWithBody(server string, guid string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "guid", runtime.ParamLocationPath, guid) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/amt/certificates/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewDeleteApiV1AmtDeactivateGuidRequest generates requests for DeleteApiV1AmtDeactivateGuid func NewDeleteApiV1AmtDeactivateGuidRequest(server string, guid string) (*http.Request, error) { var err error @@ -1818,8 +2285,8 @@ func NewGetApiV1AmtHardwareInfoGuidRequest(server string, guid string) (*http.Re return req, nil } -// NewGetApiV1AmtLogAuditGuidRequest generates requests for GetApiV1AmtLogAuditGuid -func NewGetApiV1AmtLogAuditGuidRequest(server string, guid string, params *GetApiV1AmtLogAuditGuidParams) (*http.Request, error) { +// NewGetApiV1AmtKvmDisplaysGuidRequest generates requests for GetApiV1AmtKvmDisplaysGuid +func NewGetApiV1AmtKvmDisplaysGuidRequest(server string, guid string) (*http.Request, error) { var err error var pathParam0 string @@ -1834,7 +2301,7 @@ func NewGetApiV1AmtLogAuditGuidRequest(server string, guid string, params *GetAp return nil, err } - operationPath := fmt.Sprintf("/api/v1/amt/log/audit/%s", pathParam0) + operationPath := fmt.Sprintf("/api/v1/amt/kvm/displays/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1844,24 +2311,6 @@ func NewGetApiV1AmtLogAuditGuidRequest(server string, guid string, params *GetAp return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startIndex", runtime.ParamLocationQuery, params.StartIndex); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -1870,7 +2319,63 @@ func NewGetApiV1AmtLogAuditGuidRequest(server string, guid string, params *GetAp return req, nil } -// NewGetApiV1AmtLogEventGuidRequest generates requests for GetApiV1AmtLogEventGuid +// NewGetApiV1AmtLogAuditGuidRequest generates requests for GetApiV1AmtLogAuditGuid +func NewGetApiV1AmtLogAuditGuidRequest(server string, guid string, params *GetApiV1AmtLogAuditGuidParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "guid", runtime.ParamLocationPath, guid) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/amt/log/audit/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.StartIndex != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startIndex", runtime.ParamLocationQuery, *params.StartIndex); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV1AmtLogEventGuidRequest generates requests for GetApiV1AmtLogEventGuid func NewGetApiV1AmtLogEventGuidRequest(server string, guid string) (*http.Request, error) { var err error @@ -1904,6 +2409,75 @@ func NewGetApiV1AmtLogEventGuidRequest(server string, guid string) (*http.Reques return req, nil } +// NewPostApiV1AmtNetworkLinkPreferenceGuidRequest calls the generic PostApiV1AmtNetworkLinkPreferenceGuid builder with application/json body +func NewPostApiV1AmtNetworkLinkPreferenceGuidRequest(server string, guid string, params *PostApiV1AmtNetworkLinkPreferenceGuidParams, body PostApiV1AmtNetworkLinkPreferenceGuidJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV1AmtNetworkLinkPreferenceGuidRequestWithBody(server, guid, params, "application/json", bodyReader) +} + +// NewPostApiV1AmtNetworkLinkPreferenceGuidRequestWithBody generates requests for PostApiV1AmtNetworkLinkPreferenceGuid with any type of body +func NewPostApiV1AmtNetworkLinkPreferenceGuidRequestWithBody(server string, guid string, params *PostApiV1AmtNetworkLinkPreferenceGuidParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "guid", runtime.ParamLocationPath, guid) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/amt/network/linkPreference/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.InstanceID != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "instanceID", runtime.ParamLocationQuery, *params.InstanceID); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewPostApiV1AmtPowerActionGuidRequest calls the generic PostApiV1AmtPowerActionGuid builder with application/json body func NewPostApiV1AmtPowerActionGuidRequest(server string, guid string, body PostApiV1AmtPowerActionGuidJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -1951,19 +2525,19 @@ func NewPostApiV1AmtPowerActionGuidRequestWithBody(server string, guid string, c return req, nil } -// NewPostApiV1AmtPowerBootoptionsGuidRequest calls the generic PostApiV1AmtPowerBootoptionsGuid builder with application/json body -func NewPostApiV1AmtPowerBootoptionsGuidRequest(server string, guid string, body PostApiV1AmtPowerBootoptionsGuidJSONRequestBody) (*http.Request, error) { +// NewPostApiV1AmtPowerBootOptionsGuidRequest calls the generic PostApiV1AmtPowerBootOptionsGuid builder with application/json body +func NewPostApiV1AmtPowerBootOptionsGuidRequest(server string, guid string, body PostApiV1AmtPowerBootOptionsGuidJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostApiV1AmtPowerBootoptionsGuidRequestWithBody(server, guid, "application/json", bodyReader) + return NewPostApiV1AmtPowerBootOptionsGuidRequestWithBody(server, guid, "application/json", bodyReader) } -// NewPostApiV1AmtPowerBootoptionsGuidRequestWithBody generates requests for PostApiV1AmtPowerBootoptionsGuid with any type of body -func NewPostApiV1AmtPowerBootoptionsGuidRequestWithBody(server string, guid string, contentType string, body io.Reader) (*http.Request, error) { +// NewPostApiV1AmtPowerBootOptionsGuidRequestWithBody generates requests for PostApiV1AmtPowerBootOptionsGuid with any type of body +func NewPostApiV1AmtPowerBootOptionsGuidRequestWithBody(server string, guid string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1978,7 +2552,7 @@ func NewPostApiV1AmtPowerBootoptionsGuidRequestWithBody(server string, guid stri return nil, err } - operationPath := fmt.Sprintf("/api/v1/amt/power/bootoptions/%s", pathParam0) + operationPath := fmt.Sprintf("/api/v1/amt/power/bootOptions/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1998,6 +2572,40 @@ func NewPostApiV1AmtPowerBootoptionsGuidRequestWithBody(server string, guid stri return req, nil } +// NewGetApiV1AmtPowerBootSourcesGuidRequest generates requests for GetApiV1AmtPowerBootSourcesGuid +func NewGetApiV1AmtPowerBootSourcesGuidRequest(server string, guid string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "guid", runtime.ParamLocationPath, guid) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/amt/power/bootSources/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewGetApiV1AmtPowerCapabilitiesGuidRequest generates requests for GetApiV1AmtPowerCapabilitiesGuid func NewGetApiV1AmtPowerCapabilitiesGuidRequest(server string, guid string) (*http.Request, error) { var err error @@ -2066,6 +2674,53 @@ func NewGetApiV1AmtPowerStateGuidRequest(server string, guid string) (*http.Requ return req, nil } +// NewPutApiV1AmtScreenGuidRequest calls the generic PutApiV1AmtScreenGuid builder with application/json body +func NewPutApiV1AmtScreenGuidRequest(server string, guid string, body PutApiV1AmtScreenGuidJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutApiV1AmtScreenGuidRequestWithBody(server, guid, "application/json", bodyReader) +} + +// NewPutApiV1AmtScreenGuidRequestWithBody generates requests for PutApiV1AmtScreenGuid with any type of body +func NewPutApiV1AmtScreenGuidRequestWithBody(server string, guid string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "guid", runtime.ParamLocationPath, guid) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/amt/screen/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewGetApiV1AmtUserConsentCodeCancelGuidRequest generates requests for GetApiV1AmtUserConsentCodeCancelGuid func NewGetApiV1AmtUserConsentCodeCancelGuidRequest(server string, guid string) (*http.Request, error) { var err error @@ -2884,6 +3539,14 @@ type ClientWithResponsesInterface interface { PostApiV1AmtAlarmOccurrencesGuidWithResponse(ctx context.Context, guid string, body PostApiV1AmtAlarmOccurrencesGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtAlarmOccurrencesGuidResponse, error) + // GetApiV1AmtCertificatesGuidWithResponse request + GetApiV1AmtCertificatesGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtCertificatesGuidResponse, error) + + // PostApiV1AmtCertificatesGuidWithBodyWithResponse request with any body + PostApiV1AmtCertificatesGuidWithBodyWithResponse(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtCertificatesGuidResponse, error) + + PostApiV1AmtCertificatesGuidWithResponse(ctx context.Context, guid string, body PostApiV1AmtCertificatesGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtCertificatesGuidResponse, error) + // DeleteApiV1AmtDeactivateGuidWithResponse request DeleteApiV1AmtDeactivateGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*DeleteApiV1AmtDeactivateGuidResponse, error) @@ -2901,21 +3564,32 @@ type ClientWithResponsesInterface interface { // GetApiV1AmtHardwareInfoGuidWithResponse request GetApiV1AmtHardwareInfoGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtHardwareInfoGuidResponse, error) + // GetApiV1AmtKvmDisplaysGuidWithResponse request + GetApiV1AmtKvmDisplaysGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtKvmDisplaysGuidResponse, error) + // GetApiV1AmtLogAuditGuidWithResponse request GetApiV1AmtLogAuditGuidWithResponse(ctx context.Context, guid string, params *GetApiV1AmtLogAuditGuidParams, reqEditors ...RequestEditorFn) (*GetApiV1AmtLogAuditGuidResponse, error) // GetApiV1AmtLogEventGuidWithResponse request GetApiV1AmtLogEventGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtLogEventGuidResponse, error) + // PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse request with any body + PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse(ctx context.Context, guid string, params *PostApiV1AmtNetworkLinkPreferenceGuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtNetworkLinkPreferenceGuidResponse, error) + + PostApiV1AmtNetworkLinkPreferenceGuidWithResponse(ctx context.Context, guid string, params *PostApiV1AmtNetworkLinkPreferenceGuidParams, body PostApiV1AmtNetworkLinkPreferenceGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtNetworkLinkPreferenceGuidResponse, error) + // PostApiV1AmtPowerActionGuidWithBodyWithResponse request with any body PostApiV1AmtPowerActionGuidWithBodyWithResponse(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerActionGuidResponse, error) PostApiV1AmtPowerActionGuidWithResponse(ctx context.Context, guid string, body PostApiV1AmtPowerActionGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerActionGuidResponse, error) - // PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse request with any body - PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerBootoptionsGuidResponse, error) + // PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse request with any body + PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerBootOptionsGuidResponse, error) - PostApiV1AmtPowerBootoptionsGuidWithResponse(ctx context.Context, guid string, body PostApiV1AmtPowerBootoptionsGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerBootoptionsGuidResponse, error) + PostApiV1AmtPowerBootOptionsGuidWithResponse(ctx context.Context, guid string, body PostApiV1AmtPowerBootOptionsGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerBootOptionsGuidResponse, error) + + // GetApiV1AmtPowerBootSourcesGuidWithResponse request + GetApiV1AmtPowerBootSourcesGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtPowerBootSourcesGuidResponse, error) // GetApiV1AmtPowerCapabilitiesGuidWithResponse request GetApiV1AmtPowerCapabilitiesGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtPowerCapabilitiesGuidResponse, error) @@ -2923,6 +3597,11 @@ type ClientWithResponsesInterface interface { // GetApiV1AmtPowerStateGuidWithResponse request GetApiV1AmtPowerStateGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtPowerStateGuidResponse, error) + // PutApiV1AmtScreenGuidWithBodyWithResponse request with any body + PutApiV1AmtScreenGuidWithBodyWithResponse(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV1AmtScreenGuidResponse, error) + + PutApiV1AmtScreenGuidWithResponse(ctx context.Context, guid string, body PutApiV1AmtScreenGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV1AmtScreenGuidResponse, error) + // GetApiV1AmtUserConsentCodeCancelGuidWithResponse request GetApiV1AmtUserConsentCodeCancelGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtUserConsentCodeCancelGuidResponse, error) @@ -3053,6 +3732,52 @@ func (r PostApiV1AmtAlarmOccurrencesGuidResponse) StatusCode() int { return 0 } +type GetApiV1AmtCertificatesGuidResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *GetCertificatesResponse + JSON404 *DisconnectErrorResponse +} + +// Status returns HTTPResponse.Status +func (r GetApiV1AmtCertificatesGuidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV1AmtCertificatesGuidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV1AmtCertificatesGuidResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddCertificatesResponse + JSON404 *DisconnectErrorResponse +} + +// Status returns HTTPResponse.Status +func (r PostApiV1AmtCertificatesGuidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV1AmtCertificatesGuidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type DeleteApiV1AmtDeactivateGuidResponse struct { Body []byte HTTPResponse *http.Response @@ -3164,6 +3889,29 @@ func (r GetApiV1AmtHardwareInfoGuidResponse) StatusCode() int { return 0 } +type GetApiV1AmtKvmDisplaysGuidResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *GetDisplaysResponse + JSON404 *DisconnectErrorResponse +} + +// Status returns HTTPResponse.Status +func (r GetApiV1AmtKvmDisplaysGuidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV1AmtKvmDisplaysGuidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type GetApiV1AmtLogAuditGuidResponse struct { Body []byte HTTPResponse *http.Response @@ -3179,21 +3927,86 @@ func (r GetApiV1AmtLogAuditGuidResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetApiV1AmtLogAuditGuidResponse) StatusCode() int { +func (r GetApiV1AmtLogAuditGuidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV1AmtLogEventGuidResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *EventLogResponse +} + +// Status returns HTTPResponse.Status +func (r GetApiV1AmtLogEventGuidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV1AmtLogEventGuidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV1AmtNetworkLinkPreferenceGuidResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // InstanceID The WiFi port InstanceID that was auto-detected + InstanceID *string `json:"instanceID,omitempty"` + LinkPreference *int `json:"linkPreference,omitempty"` + Status *string `json:"status,omitempty"` + Timeout *int `json:"timeout,omitempty"` + + // WifiPort Full AMT_EthernetPortSettings information for the WiFi port + WifiPort *struct { + ElementName *string `json:"ElementName,omitempty"` + InstanceID *string `json:"InstanceID,omitempty"` + LinkIsUp *bool `json:"LinkIsUp,omitempty"` + MACAddress *string `json:"MACAddress,omitempty"` + + // PhysicalConnectionType Connection type: 0=Integrated LAN, 1=Discrete LAN, 2=Thunderbolt, 3=Wireless LAN (WiFi) + PhysicalConnectionType *string `json:"PhysicalConnectionType,omitempty"` + } `json:"wifiPort,omitempty"` + } + JSON400 *struct { + Error *string `json:"error,omitempty"` + } + JSON404 *DisconnectErrorResponse +} + +// Status returns HTTPResponse.Status +func (r PostApiV1AmtNetworkLinkPreferenceGuidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV1AmtNetworkLinkPreferenceGuidResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetApiV1AmtLogEventGuidResponse struct { +type PostApiV1AmtPowerActionGuidResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *EventLogResponse + JSON200 *PowerActionResponse } // Status returns HTTPResponse.Status -func (r GetApiV1AmtLogEventGuidResponse) Status() string { +func (r PostApiV1AmtPowerActionGuidResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3201,21 +4014,21 @@ func (r GetApiV1AmtLogEventGuidResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetApiV1AmtLogEventGuidResponse) StatusCode() int { +func (r PostApiV1AmtPowerActionGuidResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PostApiV1AmtPowerActionGuidResponse struct { +type PostApiV1AmtPowerBootOptionsGuidResponse struct { Body []byte HTTPResponse *http.Response JSON200 *PowerActionResponse } // Status returns HTTPResponse.Status -func (r PostApiV1AmtPowerActionGuidResponse) Status() string { +func (r PostApiV1AmtPowerBootOptionsGuidResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3223,21 +4036,21 @@ func (r PostApiV1AmtPowerActionGuidResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostApiV1AmtPowerActionGuidResponse) StatusCode() int { +func (r PostApiV1AmtPowerBootOptionsGuidResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PostApiV1AmtPowerBootoptionsGuidResponse struct { +type GetApiV1AmtPowerBootSourcesGuidResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PowerActionResponse + JSON200 *BootSourcesResponse } // Status returns HTTPResponse.Status -func (r PostApiV1AmtPowerBootoptionsGuidResponse) Status() string { +func (r GetApiV1AmtPowerBootSourcesGuidResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3245,7 +4058,7 @@ func (r PostApiV1AmtPowerBootoptionsGuidResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostApiV1AmtPowerBootoptionsGuidResponse) StatusCode() int { +func (r GetApiV1AmtPowerBootSourcesGuidResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -3296,6 +4109,29 @@ func (r GetApiV1AmtPowerStateGuidResponse) StatusCode() int { return 0 } +type PutApiV1AmtScreenGuidResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UpdateDisplaySettingsResponse + JSON404 *DisconnectErrorResponse +} + +// Status returns HTTPResponse.Status +func (r PutApiV1AmtScreenGuidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutApiV1AmtScreenGuidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type GetApiV1AmtUserConsentCodeCancelGuidResponse struct { Body []byte HTTPResponse *http.Response @@ -3457,8 +4293,11 @@ func (r GetApiV1CiracertResponse) StatusCode() int { type GetApiV1DevicesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]Device + JSON200 *struct { + union json.RawMessage + } } +type GetApiV1Devices2000 = []Device // Status returns HTTPResponse.Status func (r GetApiV1DevicesResponse) Status() string { @@ -3733,6 +4572,32 @@ func (c *ClientWithResponses) PostApiV1AmtAlarmOccurrencesGuidWithResponse(ctx c return ParsePostApiV1AmtAlarmOccurrencesGuidResponse(rsp) } +// GetApiV1AmtCertificatesGuidWithResponse request returning *GetApiV1AmtCertificatesGuidResponse +func (c *ClientWithResponses) GetApiV1AmtCertificatesGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtCertificatesGuidResponse, error) { + rsp, err := c.GetApiV1AmtCertificatesGuid(ctx, guid, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV1AmtCertificatesGuidResponse(rsp) +} + +// PostApiV1AmtCertificatesGuidWithBodyWithResponse request with arbitrary body returning *PostApiV1AmtCertificatesGuidResponse +func (c *ClientWithResponses) PostApiV1AmtCertificatesGuidWithBodyWithResponse(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtCertificatesGuidResponse, error) { + rsp, err := c.PostApiV1AmtCertificatesGuidWithBody(ctx, guid, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV1AmtCertificatesGuidResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV1AmtCertificatesGuidWithResponse(ctx context.Context, guid string, body PostApiV1AmtCertificatesGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtCertificatesGuidResponse, error) { + rsp, err := c.PostApiV1AmtCertificatesGuid(ctx, guid, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV1AmtCertificatesGuidResponse(rsp) +} + // DeleteApiV1AmtDeactivateGuidWithResponse request returning *DeleteApiV1AmtDeactivateGuidResponse func (c *ClientWithResponses) DeleteApiV1AmtDeactivateGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*DeleteApiV1AmtDeactivateGuidResponse, error) { rsp, err := c.DeleteApiV1AmtDeactivateGuid(ctx, guid, reqEditors...) @@ -3786,6 +4651,15 @@ func (c *ClientWithResponses) GetApiV1AmtHardwareInfoGuidWithResponse(ctx contex return ParseGetApiV1AmtHardwareInfoGuidResponse(rsp) } +// GetApiV1AmtKvmDisplaysGuidWithResponse request returning *GetApiV1AmtKvmDisplaysGuidResponse +func (c *ClientWithResponses) GetApiV1AmtKvmDisplaysGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtKvmDisplaysGuidResponse, error) { + rsp, err := c.GetApiV1AmtKvmDisplaysGuid(ctx, guid, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV1AmtKvmDisplaysGuidResponse(rsp) +} + // GetApiV1AmtLogAuditGuidWithResponse request returning *GetApiV1AmtLogAuditGuidResponse func (c *ClientWithResponses) GetApiV1AmtLogAuditGuidWithResponse(ctx context.Context, guid string, params *GetApiV1AmtLogAuditGuidParams, reqEditors ...RequestEditorFn) (*GetApiV1AmtLogAuditGuidResponse, error) { rsp, err := c.GetApiV1AmtLogAuditGuid(ctx, guid, params, reqEditors...) @@ -3804,6 +4678,23 @@ func (c *ClientWithResponses) GetApiV1AmtLogEventGuidWithResponse(ctx context.Co return ParseGetApiV1AmtLogEventGuidResponse(rsp) } +// PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse request with arbitrary body returning *PostApiV1AmtNetworkLinkPreferenceGuidResponse +func (c *ClientWithResponses) PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse(ctx context.Context, guid string, params *PostApiV1AmtNetworkLinkPreferenceGuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtNetworkLinkPreferenceGuidResponse, error) { + rsp, err := c.PostApiV1AmtNetworkLinkPreferenceGuidWithBody(ctx, guid, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV1AmtNetworkLinkPreferenceGuidResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV1AmtNetworkLinkPreferenceGuidWithResponse(ctx context.Context, guid string, params *PostApiV1AmtNetworkLinkPreferenceGuidParams, body PostApiV1AmtNetworkLinkPreferenceGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtNetworkLinkPreferenceGuidResponse, error) { + rsp, err := c.PostApiV1AmtNetworkLinkPreferenceGuid(ctx, guid, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV1AmtNetworkLinkPreferenceGuidResponse(rsp) +} + // PostApiV1AmtPowerActionGuidWithBodyWithResponse request with arbitrary body returning *PostApiV1AmtPowerActionGuidResponse func (c *ClientWithResponses) PostApiV1AmtPowerActionGuidWithBodyWithResponse(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerActionGuidResponse, error) { rsp, err := c.PostApiV1AmtPowerActionGuidWithBody(ctx, guid, contentType, body, reqEditors...) @@ -3821,21 +4712,30 @@ func (c *ClientWithResponses) PostApiV1AmtPowerActionGuidWithResponse(ctx contex return ParsePostApiV1AmtPowerActionGuidResponse(rsp) } -// PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse request with arbitrary body returning *PostApiV1AmtPowerBootoptionsGuidResponse -func (c *ClientWithResponses) PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerBootoptionsGuidResponse, error) { - rsp, err := c.PostApiV1AmtPowerBootoptionsGuidWithBody(ctx, guid, contentType, body, reqEditors...) +// PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse request with arbitrary body returning *PostApiV1AmtPowerBootOptionsGuidResponse +func (c *ClientWithResponses) PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerBootOptionsGuidResponse, error) { + rsp, err := c.PostApiV1AmtPowerBootOptionsGuidWithBody(ctx, guid, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParsePostApiV1AmtPowerBootoptionsGuidResponse(rsp) + return ParsePostApiV1AmtPowerBootOptionsGuidResponse(rsp) } -func (c *ClientWithResponses) PostApiV1AmtPowerBootoptionsGuidWithResponse(ctx context.Context, guid string, body PostApiV1AmtPowerBootoptionsGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerBootoptionsGuidResponse, error) { - rsp, err := c.PostApiV1AmtPowerBootoptionsGuid(ctx, guid, body, reqEditors...) +func (c *ClientWithResponses) PostApiV1AmtPowerBootOptionsGuidWithResponse(ctx context.Context, guid string, body PostApiV1AmtPowerBootOptionsGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerBootOptionsGuidResponse, error) { + rsp, err := c.PostApiV1AmtPowerBootOptionsGuid(ctx, guid, body, reqEditors...) if err != nil { return nil, err } - return ParsePostApiV1AmtPowerBootoptionsGuidResponse(rsp) + return ParsePostApiV1AmtPowerBootOptionsGuidResponse(rsp) +} + +// GetApiV1AmtPowerBootSourcesGuidWithResponse request returning *GetApiV1AmtPowerBootSourcesGuidResponse +func (c *ClientWithResponses) GetApiV1AmtPowerBootSourcesGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtPowerBootSourcesGuidResponse, error) { + rsp, err := c.GetApiV1AmtPowerBootSourcesGuid(ctx, guid, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV1AmtPowerBootSourcesGuidResponse(rsp) } // GetApiV1AmtPowerCapabilitiesGuidWithResponse request returning *GetApiV1AmtPowerCapabilitiesGuidResponse @@ -3856,6 +4756,23 @@ func (c *ClientWithResponses) GetApiV1AmtPowerStateGuidWithResponse(ctx context. return ParseGetApiV1AmtPowerStateGuidResponse(rsp) } +// PutApiV1AmtScreenGuidWithBodyWithResponse request with arbitrary body returning *PutApiV1AmtScreenGuidResponse +func (c *ClientWithResponses) PutApiV1AmtScreenGuidWithBodyWithResponse(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV1AmtScreenGuidResponse, error) { + rsp, err := c.PutApiV1AmtScreenGuidWithBody(ctx, guid, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV1AmtScreenGuidResponse(rsp) +} + +func (c *ClientWithResponses) PutApiV1AmtScreenGuidWithResponse(ctx context.Context, guid string, body PutApiV1AmtScreenGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV1AmtScreenGuidResponse, error) { + rsp, err := c.PutApiV1AmtScreenGuid(ctx, guid, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV1AmtScreenGuidResponse(rsp) +} + // GetApiV1AmtUserConsentCodeCancelGuidWithResponse request returning *GetApiV1AmtUserConsentCodeCancelGuidResponse func (c *ClientWithResponses) GetApiV1AmtUserConsentCodeCancelGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtUserConsentCodeCancelGuidResponse, error) { rsp, err := c.GetApiV1AmtUserConsentCodeCancelGuid(ctx, guid, reqEditors...) @@ -4135,6 +5052,72 @@ func ParsePostApiV1AmtAlarmOccurrencesGuidResponse(rsp *http.Response) (*PostApi return response, nil } +// ParseGetApiV1AmtCertificatesGuidResponse parses an HTTP response from a GetApiV1AmtCertificatesGuidWithResponse call +func ParseGetApiV1AmtCertificatesGuidResponse(rsp *http.Response) (*GetApiV1AmtCertificatesGuidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV1AmtCertificatesGuidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest GetCertificatesResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DisconnectErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + } + + return response, nil +} + +// ParsePostApiV1AmtCertificatesGuidResponse parses an HTTP response from a PostApiV1AmtCertificatesGuidWithResponse call +func ParsePostApiV1AmtCertificatesGuidResponse(rsp *http.Response) (*PostApiV1AmtCertificatesGuidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV1AmtCertificatesGuidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddCertificatesResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DisconnectErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + } + + return response, nil +} + // ParseDeleteApiV1AmtDeactivateGuidResponse parses an HTTP response from a DeleteApiV1AmtDeactivateGuidWithResponse call func ParseDeleteApiV1AmtDeactivateGuidResponse(rsp *http.Response) (*DeleteApiV1AmtDeactivateGuidResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -4272,6 +5255,39 @@ func ParseGetApiV1AmtHardwareInfoGuidResponse(rsp *http.Response) (*GetApiV1AmtH return response, nil } +// ParseGetApiV1AmtKvmDisplaysGuidResponse parses an HTTP response from a GetApiV1AmtKvmDisplaysGuidWithResponse call +func ParseGetApiV1AmtKvmDisplaysGuidResponse(rsp *http.Response) (*GetApiV1AmtKvmDisplaysGuidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV1AmtKvmDisplaysGuidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest GetDisplaysResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DisconnectErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + } + + return response, nil +} + // ParseGetApiV1AmtLogAuditGuidResponse parses an HTTP response from a GetApiV1AmtLogAuditGuidWithResponse call func ParseGetApiV1AmtLogAuditGuidResponse(rsp *http.Response) (*GetApiV1AmtLogAuditGuidResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -4324,6 +5340,65 @@ func ParseGetApiV1AmtLogEventGuidResponse(rsp *http.Response) (*GetApiV1AmtLogEv return response, nil } +// ParsePostApiV1AmtNetworkLinkPreferenceGuidResponse parses an HTTP response from a PostApiV1AmtNetworkLinkPreferenceGuidWithResponse call +func ParsePostApiV1AmtNetworkLinkPreferenceGuidResponse(rsp *http.Response) (*PostApiV1AmtNetworkLinkPreferenceGuidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV1AmtNetworkLinkPreferenceGuidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // InstanceID The WiFi port InstanceID that was auto-detected + InstanceID *string `json:"instanceID,omitempty"` + LinkPreference *int `json:"linkPreference,omitempty"` + Status *string `json:"status,omitempty"` + Timeout *int `json:"timeout,omitempty"` + + // WifiPort Full AMT_EthernetPortSettings information for the WiFi port + WifiPort *struct { + ElementName *string `json:"ElementName,omitempty"` + InstanceID *string `json:"InstanceID,omitempty"` + LinkIsUp *bool `json:"LinkIsUp,omitempty"` + MACAddress *string `json:"MACAddress,omitempty"` + + // PhysicalConnectionType Connection type: 0=Integrated LAN, 1=Discrete LAN, 2=Thunderbolt, 3=Wireless LAN (WiFi) + PhysicalConnectionType *string `json:"PhysicalConnectionType,omitempty"` + } `json:"wifiPort,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + Error *string `json:"error,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DisconnectErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + } + + return response, nil +} + // ParsePostApiV1AmtPowerActionGuidResponse parses an HTTP response from a PostApiV1AmtPowerActionGuidWithResponse call func ParsePostApiV1AmtPowerActionGuidResponse(rsp *http.Response) (*PostApiV1AmtPowerActionGuidResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -4350,15 +5425,15 @@ func ParsePostApiV1AmtPowerActionGuidResponse(rsp *http.Response) (*PostApiV1Amt return response, nil } -// ParsePostApiV1AmtPowerBootoptionsGuidResponse parses an HTTP response from a PostApiV1AmtPowerBootoptionsGuidWithResponse call -func ParsePostApiV1AmtPowerBootoptionsGuidResponse(rsp *http.Response) (*PostApiV1AmtPowerBootoptionsGuidResponse, error) { +// ParsePostApiV1AmtPowerBootOptionsGuidResponse parses an HTTP response from a PostApiV1AmtPowerBootOptionsGuidWithResponse call +func ParsePostApiV1AmtPowerBootOptionsGuidResponse(rsp *http.Response) (*PostApiV1AmtPowerBootOptionsGuidResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostApiV1AmtPowerBootoptionsGuidResponse{ + response := &PostApiV1AmtPowerBootOptionsGuidResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -4376,6 +5451,32 @@ func ParsePostApiV1AmtPowerBootoptionsGuidResponse(rsp *http.Response) (*PostApi return response, nil } +// ParseGetApiV1AmtPowerBootSourcesGuidResponse parses an HTTP response from a GetApiV1AmtPowerBootSourcesGuidWithResponse call +func ParseGetApiV1AmtPowerBootSourcesGuidResponse(rsp *http.Response) (*GetApiV1AmtPowerBootSourcesGuidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV1AmtPowerBootSourcesGuidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest BootSourcesResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + // ParseGetApiV1AmtPowerCapabilitiesGuidResponse parses an HTTP response from a GetApiV1AmtPowerCapabilitiesGuidWithResponse call func ParseGetApiV1AmtPowerCapabilitiesGuidResponse(rsp *http.Response) (*GetApiV1AmtPowerCapabilitiesGuidResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -4428,6 +5529,39 @@ func ParseGetApiV1AmtPowerStateGuidResponse(rsp *http.Response) (*GetApiV1AmtPow return response, nil } +// ParsePutApiV1AmtScreenGuidResponse parses an HTTP response from a PutApiV1AmtScreenGuidWithResponse call +func ParsePutApiV1AmtScreenGuidResponse(rsp *http.Response) (*PutApiV1AmtScreenGuidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutApiV1AmtScreenGuidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UpdateDisplaySettingsResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DisconnectErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + } + + return response, nil +} + // ParseGetApiV1AmtUserConsentCodeCancelGuidResponse parses an HTTP response from a GetApiV1AmtUserConsentCodeCancelGuidWithResponse call func ParseGetApiV1AmtUserConsentCodeCancelGuidResponse(rsp *http.Response) (*GetApiV1AmtUserConsentCodeCancelGuidResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -4629,7 +5763,9 @@ func ParseGetApiV1DevicesResponse(rsp *http.Response) (*GetApiV1DevicesResponse, switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest []Device + var dest struct { + union json.RawMessage + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/dm-manager/pkg/api/mps/mocks.go b/dm-manager/pkg/api/mps/mocks.go index 94aa150b..24abee66 100644 --- a/dm-manager/pkg/api/mps/mocks.go +++ b/dm-manager/pkg/api/mps/mocks.go @@ -435,6 +435,72 @@ func (_c *MockClientWithResponsesInterface_GetApiV1AmtAlarmOccurrencesGuidWithRe return _c } +// GetApiV1AmtCertificatesGuidWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) GetApiV1AmtCertificatesGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtCertificatesGuidResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, guid, reqEditors) + } else { + tmpRet = _mock.Called(ctx, guid) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for GetApiV1AmtCertificatesGuidWithResponse") + } + + var r0 *GetApiV1AmtCertificatesGuidResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...RequestEditorFn) (*GetApiV1AmtCertificatesGuidResponse, error)); ok { + return returnFunc(ctx, guid, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...RequestEditorFn) *GetApiV1AmtCertificatesGuidResponse); ok { + r0 = returnFunc(ctx, guid, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*GetApiV1AmtCertificatesGuidResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, guid, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_GetApiV1AmtCertificatesGuidWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetApiV1AmtCertificatesGuidWithResponse' +type MockClientWithResponsesInterface_GetApiV1AmtCertificatesGuidWithResponse_Call struct { + *mock.Call +} + +// GetApiV1AmtCertificatesGuidWithResponse is a helper method to define mock.On call +// - ctx +// - guid +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) GetApiV1AmtCertificatesGuidWithResponse(ctx interface{}, guid interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_GetApiV1AmtCertificatesGuidWithResponse_Call { + return &MockClientWithResponsesInterface_GetApiV1AmtCertificatesGuidWithResponse_Call{Call: _e.mock.On("GetApiV1AmtCertificatesGuidWithResponse", + append([]interface{}{ctx, guid}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_GetApiV1AmtCertificatesGuidWithResponse_Call) Run(run func(ctx context.Context, guid string, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_GetApiV1AmtCertificatesGuidWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[2].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_GetApiV1AmtCertificatesGuidWithResponse_Call) Return(getApiV1AmtCertificatesGuidResponse *GetApiV1AmtCertificatesGuidResponse, err error) *MockClientWithResponsesInterface_GetApiV1AmtCertificatesGuidWithResponse_Call { + _c.Call.Return(getApiV1AmtCertificatesGuidResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_GetApiV1AmtCertificatesGuidWithResponse_Call) RunAndReturn(run func(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtCertificatesGuidResponse, error)) *MockClientWithResponsesInterface_GetApiV1AmtCertificatesGuidWithResponse_Call { + _c.Call.Return(run) + return _c +} + // GetApiV1AmtFeaturesGuidWithResponse provides a mock function for the type MockClientWithResponsesInterface func (_mock *MockClientWithResponsesInterface) GetApiV1AmtFeaturesGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtFeaturesGuidResponse, error) { var tmpRet mock.Arguments @@ -633,6 +699,72 @@ func (_c *MockClientWithResponsesInterface_GetApiV1AmtHardwareInfoGuidWithRespon return _c } +// GetApiV1AmtKvmDisplaysGuidWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) GetApiV1AmtKvmDisplaysGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtKvmDisplaysGuidResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, guid, reqEditors) + } else { + tmpRet = _mock.Called(ctx, guid) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for GetApiV1AmtKvmDisplaysGuidWithResponse") + } + + var r0 *GetApiV1AmtKvmDisplaysGuidResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...RequestEditorFn) (*GetApiV1AmtKvmDisplaysGuidResponse, error)); ok { + return returnFunc(ctx, guid, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...RequestEditorFn) *GetApiV1AmtKvmDisplaysGuidResponse); ok { + r0 = returnFunc(ctx, guid, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*GetApiV1AmtKvmDisplaysGuidResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, guid, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_GetApiV1AmtKvmDisplaysGuidWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetApiV1AmtKvmDisplaysGuidWithResponse' +type MockClientWithResponsesInterface_GetApiV1AmtKvmDisplaysGuidWithResponse_Call struct { + *mock.Call +} + +// GetApiV1AmtKvmDisplaysGuidWithResponse is a helper method to define mock.On call +// - ctx +// - guid +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) GetApiV1AmtKvmDisplaysGuidWithResponse(ctx interface{}, guid interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_GetApiV1AmtKvmDisplaysGuidWithResponse_Call { + return &MockClientWithResponsesInterface_GetApiV1AmtKvmDisplaysGuidWithResponse_Call{Call: _e.mock.On("GetApiV1AmtKvmDisplaysGuidWithResponse", + append([]interface{}{ctx, guid}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_GetApiV1AmtKvmDisplaysGuidWithResponse_Call) Run(run func(ctx context.Context, guid string, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_GetApiV1AmtKvmDisplaysGuidWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[2].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_GetApiV1AmtKvmDisplaysGuidWithResponse_Call) Return(getApiV1AmtKvmDisplaysGuidResponse *GetApiV1AmtKvmDisplaysGuidResponse, err error) *MockClientWithResponsesInterface_GetApiV1AmtKvmDisplaysGuidWithResponse_Call { + _c.Call.Return(getApiV1AmtKvmDisplaysGuidResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_GetApiV1AmtKvmDisplaysGuidWithResponse_Call) RunAndReturn(run func(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtKvmDisplaysGuidResponse, error)) *MockClientWithResponsesInterface_GetApiV1AmtKvmDisplaysGuidWithResponse_Call { + _c.Call.Return(run) + return _c +} + // GetApiV1AmtLogAuditGuidWithResponse provides a mock function for the type MockClientWithResponsesInterface func (_mock *MockClientWithResponsesInterface) GetApiV1AmtLogAuditGuidWithResponse(ctx context.Context, guid string, params *GetApiV1AmtLogAuditGuidParams, reqEditors ...RequestEditorFn) (*GetApiV1AmtLogAuditGuidResponse, error) { var tmpRet mock.Arguments @@ -766,6 +898,72 @@ func (_c *MockClientWithResponsesInterface_GetApiV1AmtLogEventGuidWithResponse_C return _c } +// GetApiV1AmtPowerBootSourcesGuidWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) GetApiV1AmtPowerBootSourcesGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtPowerBootSourcesGuidResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, guid, reqEditors) + } else { + tmpRet = _mock.Called(ctx, guid) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for GetApiV1AmtPowerBootSourcesGuidWithResponse") + } + + var r0 *GetApiV1AmtPowerBootSourcesGuidResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...RequestEditorFn) (*GetApiV1AmtPowerBootSourcesGuidResponse, error)); ok { + return returnFunc(ctx, guid, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...RequestEditorFn) *GetApiV1AmtPowerBootSourcesGuidResponse); ok { + r0 = returnFunc(ctx, guid, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*GetApiV1AmtPowerBootSourcesGuidResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, guid, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_GetApiV1AmtPowerBootSourcesGuidWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetApiV1AmtPowerBootSourcesGuidWithResponse' +type MockClientWithResponsesInterface_GetApiV1AmtPowerBootSourcesGuidWithResponse_Call struct { + *mock.Call +} + +// GetApiV1AmtPowerBootSourcesGuidWithResponse is a helper method to define mock.On call +// - ctx +// - guid +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) GetApiV1AmtPowerBootSourcesGuidWithResponse(ctx interface{}, guid interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_GetApiV1AmtPowerBootSourcesGuidWithResponse_Call { + return &MockClientWithResponsesInterface_GetApiV1AmtPowerBootSourcesGuidWithResponse_Call{Call: _e.mock.On("GetApiV1AmtPowerBootSourcesGuidWithResponse", + append([]interface{}{ctx, guid}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_GetApiV1AmtPowerBootSourcesGuidWithResponse_Call) Run(run func(ctx context.Context, guid string, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_GetApiV1AmtPowerBootSourcesGuidWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[2].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_GetApiV1AmtPowerBootSourcesGuidWithResponse_Call) Return(getApiV1AmtPowerBootSourcesGuidResponse *GetApiV1AmtPowerBootSourcesGuidResponse, err error) *MockClientWithResponsesInterface_GetApiV1AmtPowerBootSourcesGuidWithResponse_Call { + _c.Call.Return(getApiV1AmtPowerBootSourcesGuidResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_GetApiV1AmtPowerBootSourcesGuidWithResponse_Call) RunAndReturn(run func(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtPowerBootSourcesGuidResponse, error)) *MockClientWithResponsesInterface_GetApiV1AmtPowerBootSourcesGuidWithResponse_Call { + _c.Call.Return(run) + return _c +} + // GetApiV1AmtPowerCapabilitiesGuidWithResponse provides a mock function for the type MockClientWithResponsesInterface func (_mock *MockClientWithResponsesInterface) GetApiV1AmtPowerCapabilitiesGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*GetApiV1AmtPowerCapabilitiesGuidResponse, error) { var tmpRet mock.Arguments @@ -1888,6 +2086,141 @@ func (_c *MockClientWithResponsesInterface_PostApiV1AmtAlarmOccurrencesGuidWithR return _c } +// PostApiV1AmtCertificatesGuidWithBodyWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) PostApiV1AmtCertificatesGuidWithBodyWithResponse(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtCertificatesGuidResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, guid, contentType, body, reqEditors) + } else { + tmpRet = _mock.Called(ctx, guid, contentType, body) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for PostApiV1AmtCertificatesGuidWithBodyWithResponse") + } + + var r0 *PostApiV1AmtCertificatesGuidResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...RequestEditorFn) (*PostApiV1AmtCertificatesGuidResponse, error)); ok { + return returnFunc(ctx, guid, contentType, body, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...RequestEditorFn) *PostApiV1AmtCertificatesGuidResponse); ok { + r0 = returnFunc(ctx, guid, contentType, body, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*PostApiV1AmtCertificatesGuidResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, io.Reader, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, guid, contentType, body, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithBodyWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PostApiV1AmtCertificatesGuidWithBodyWithResponse' +type MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithBodyWithResponse_Call struct { + *mock.Call +} + +// PostApiV1AmtCertificatesGuidWithBodyWithResponse is a helper method to define mock.On call +// - ctx +// - guid +// - contentType +// - body +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) PostApiV1AmtCertificatesGuidWithBodyWithResponse(ctx interface{}, guid interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithBodyWithResponse_Call { + return &MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithBodyWithResponse_Call{Call: _e.mock.On("PostApiV1AmtCertificatesGuidWithBodyWithResponse", + append([]interface{}{ctx, guid, contentType, body}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithBodyWithResponse_Call) Run(run func(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithBodyWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[4].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(io.Reader), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithBodyWithResponse_Call) Return(postApiV1AmtCertificatesGuidResponse *PostApiV1AmtCertificatesGuidResponse, err error) *MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithBodyWithResponse_Call { + _c.Call.Return(postApiV1AmtCertificatesGuidResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithBodyWithResponse_Call) RunAndReturn(run func(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtCertificatesGuidResponse, error)) *MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithBodyWithResponse_Call { + _c.Call.Return(run) + return _c +} + +// PostApiV1AmtCertificatesGuidWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) PostApiV1AmtCertificatesGuidWithResponse(ctx context.Context, guid string, body PostApiV1AmtCertificatesGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtCertificatesGuidResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, guid, body, reqEditors) + } else { + tmpRet = _mock.Called(ctx, guid, body) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for PostApiV1AmtCertificatesGuidWithResponse") + } + + var r0 *PostApiV1AmtCertificatesGuidResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, PostApiV1AmtCertificatesGuidJSONRequestBody, ...RequestEditorFn) (*PostApiV1AmtCertificatesGuidResponse, error)); ok { + return returnFunc(ctx, guid, body, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, PostApiV1AmtCertificatesGuidJSONRequestBody, ...RequestEditorFn) *PostApiV1AmtCertificatesGuidResponse); ok { + r0 = returnFunc(ctx, guid, body, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*PostApiV1AmtCertificatesGuidResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, PostApiV1AmtCertificatesGuidJSONRequestBody, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, guid, body, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PostApiV1AmtCertificatesGuidWithResponse' +type MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithResponse_Call struct { + *mock.Call +} + +// PostApiV1AmtCertificatesGuidWithResponse is a helper method to define mock.On call +// - ctx +// - guid +// - body +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) PostApiV1AmtCertificatesGuidWithResponse(ctx interface{}, guid interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithResponse_Call { + return &MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithResponse_Call{Call: _e.mock.On("PostApiV1AmtCertificatesGuidWithResponse", + append([]interface{}{ctx, guid, body}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithResponse_Call) Run(run func(ctx context.Context, guid string, body PostApiV1AmtCertificatesGuidJSONRequestBody, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[3].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(string), args[2].(PostApiV1AmtCertificatesGuidJSONRequestBody), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithResponse_Call) Return(postApiV1AmtCertificatesGuidResponse *PostApiV1AmtCertificatesGuidResponse, err error) *MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithResponse_Call { + _c.Call.Return(postApiV1AmtCertificatesGuidResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithResponse_Call) RunAndReturn(run func(ctx context.Context, guid string, body PostApiV1AmtCertificatesGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtCertificatesGuidResponse, error)) *MockClientWithResponsesInterface_PostApiV1AmtCertificatesGuidWithResponse_Call { + _c.Call.Return(run) + return _c +} + // PostApiV1AmtFeaturesGuidWithBodyWithResponse provides a mock function for the type MockClientWithResponsesInterface func (_mock *MockClientWithResponsesInterface) PostApiV1AmtFeaturesGuidWithBodyWithResponse(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtFeaturesGuidResponse, error) { var tmpRet mock.Arguments @@ -2023,6 +2356,143 @@ func (_c *MockClientWithResponsesInterface_PostApiV1AmtFeaturesGuidWithResponse_ return _c } +// PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse(ctx context.Context, guid string, params *PostApiV1AmtNetworkLinkPreferenceGuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtNetworkLinkPreferenceGuidResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, guid, params, contentType, body, reqEditors) + } else { + tmpRet = _mock.Called(ctx, guid, params, contentType, body) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse") + } + + var r0 *PostApiV1AmtNetworkLinkPreferenceGuidResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, *PostApiV1AmtNetworkLinkPreferenceGuidParams, string, io.Reader, ...RequestEditorFn) (*PostApiV1AmtNetworkLinkPreferenceGuidResponse, error)); ok { + return returnFunc(ctx, guid, params, contentType, body, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, *PostApiV1AmtNetworkLinkPreferenceGuidParams, string, io.Reader, ...RequestEditorFn) *PostApiV1AmtNetworkLinkPreferenceGuidResponse); ok { + r0 = returnFunc(ctx, guid, params, contentType, body, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*PostApiV1AmtNetworkLinkPreferenceGuidResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, *PostApiV1AmtNetworkLinkPreferenceGuidParams, string, io.Reader, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, guid, params, contentType, body, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse' +type MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse_Call struct { + *mock.Call +} + +// PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse is a helper method to define mock.On call +// - ctx +// - guid +// - params +// - contentType +// - body +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse(ctx interface{}, guid interface{}, params interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse_Call { + return &MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse_Call{Call: _e.mock.On("PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse", + append([]interface{}{ctx, guid, params, contentType, body}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse_Call) Run(run func(ctx context.Context, guid string, params *PostApiV1AmtNetworkLinkPreferenceGuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[5].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(string), args[2].(*PostApiV1AmtNetworkLinkPreferenceGuidParams), args[3].(string), args[4].(io.Reader), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse_Call) Return(postApiV1AmtNetworkLinkPreferenceGuidResponse *PostApiV1AmtNetworkLinkPreferenceGuidResponse, err error) *MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse_Call { + _c.Call.Return(postApiV1AmtNetworkLinkPreferenceGuidResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse_Call) RunAndReturn(run func(ctx context.Context, guid string, params *PostApiV1AmtNetworkLinkPreferenceGuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtNetworkLinkPreferenceGuidResponse, error)) *MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithBodyWithResponse_Call { + _c.Call.Return(run) + return _c +} + +// PostApiV1AmtNetworkLinkPreferenceGuidWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) PostApiV1AmtNetworkLinkPreferenceGuidWithResponse(ctx context.Context, guid string, params *PostApiV1AmtNetworkLinkPreferenceGuidParams, body PostApiV1AmtNetworkLinkPreferenceGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtNetworkLinkPreferenceGuidResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, guid, params, body, reqEditors) + } else { + tmpRet = _mock.Called(ctx, guid, params, body) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for PostApiV1AmtNetworkLinkPreferenceGuidWithResponse") + } + + var r0 *PostApiV1AmtNetworkLinkPreferenceGuidResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, *PostApiV1AmtNetworkLinkPreferenceGuidParams, PostApiV1AmtNetworkLinkPreferenceGuidJSONRequestBody, ...RequestEditorFn) (*PostApiV1AmtNetworkLinkPreferenceGuidResponse, error)); ok { + return returnFunc(ctx, guid, params, body, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, *PostApiV1AmtNetworkLinkPreferenceGuidParams, PostApiV1AmtNetworkLinkPreferenceGuidJSONRequestBody, ...RequestEditorFn) *PostApiV1AmtNetworkLinkPreferenceGuidResponse); ok { + r0 = returnFunc(ctx, guid, params, body, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*PostApiV1AmtNetworkLinkPreferenceGuidResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, *PostApiV1AmtNetworkLinkPreferenceGuidParams, PostApiV1AmtNetworkLinkPreferenceGuidJSONRequestBody, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, guid, params, body, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PostApiV1AmtNetworkLinkPreferenceGuidWithResponse' +type MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithResponse_Call struct { + *mock.Call +} + +// PostApiV1AmtNetworkLinkPreferenceGuidWithResponse is a helper method to define mock.On call +// - ctx +// - guid +// - params +// - body +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) PostApiV1AmtNetworkLinkPreferenceGuidWithResponse(ctx interface{}, guid interface{}, params interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithResponse_Call { + return &MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithResponse_Call{Call: _e.mock.On("PostApiV1AmtNetworkLinkPreferenceGuidWithResponse", + append([]interface{}{ctx, guid, params, body}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithResponse_Call) Run(run func(ctx context.Context, guid string, params *PostApiV1AmtNetworkLinkPreferenceGuidParams, body PostApiV1AmtNetworkLinkPreferenceGuidJSONRequestBody, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[4].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(string), args[2].(*PostApiV1AmtNetworkLinkPreferenceGuidParams), args[3].(PostApiV1AmtNetworkLinkPreferenceGuidJSONRequestBody), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithResponse_Call) Return(postApiV1AmtNetworkLinkPreferenceGuidResponse *PostApiV1AmtNetworkLinkPreferenceGuidResponse, err error) *MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithResponse_Call { + _c.Call.Return(postApiV1AmtNetworkLinkPreferenceGuidResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithResponse_Call) RunAndReturn(run func(ctx context.Context, guid string, params *PostApiV1AmtNetworkLinkPreferenceGuidParams, body PostApiV1AmtNetworkLinkPreferenceGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtNetworkLinkPreferenceGuidResponse, error)) *MockClientWithResponsesInterface_PostApiV1AmtNetworkLinkPreferenceGuidWithResponse_Call { + _c.Call.Return(run) + return _c +} + // PostApiV1AmtPowerActionGuidWithBodyWithResponse provides a mock function for the type MockClientWithResponsesInterface func (_mock *MockClientWithResponsesInterface) PostApiV1AmtPowerActionGuidWithBodyWithResponse(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerActionGuidResponse, error) { var tmpRet mock.Arguments @@ -2158,8 +2628,8 @@ func (_c *MockClientWithResponsesInterface_PostApiV1AmtPowerActionGuidWithRespon return _c } -// PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse provides a mock function for the type MockClientWithResponsesInterface -func (_mock *MockClientWithResponsesInterface) PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerBootoptionsGuidResponse, error) { +// PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerBootOptionsGuidResponse, error) { var tmpRet mock.Arguments if len(reqEditors) > 0 { tmpRet = _mock.Called(ctx, guid, contentType, body, reqEditors) @@ -2169,19 +2639,19 @@ func (_mock *MockClientWithResponsesInterface) PostApiV1AmtPowerBootoptionsGuidW ret := tmpRet if len(ret) == 0 { - panic("no return value specified for PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse") + panic("no return value specified for PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse") } - var r0 *PostApiV1AmtPowerBootoptionsGuidResponse + var r0 *PostApiV1AmtPowerBootOptionsGuidResponse var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...RequestEditorFn) (*PostApiV1AmtPowerBootoptionsGuidResponse, error)); ok { + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...RequestEditorFn) (*PostApiV1AmtPowerBootOptionsGuidResponse, error)); ok { return returnFunc(ctx, guid, contentType, body, reqEditors...) } - if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...RequestEditorFn) *PostApiV1AmtPowerBootoptionsGuidResponse); ok { + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...RequestEditorFn) *PostApiV1AmtPowerBootOptionsGuidResponse); ok { r0 = returnFunc(ctx, guid, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*PostApiV1AmtPowerBootoptionsGuidResponse) + r0 = ret.Get(0).(*PostApiV1AmtPowerBootOptionsGuidResponse) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, io.Reader, ...RequestEditorFn) error); ok { @@ -2192,23 +2662,23 @@ func (_mock *MockClientWithResponsesInterface) PostApiV1AmtPowerBootoptionsGuidW return r0, r1 } -// MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse' -type MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse_Call struct { +// MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse' +type MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse_Call struct { *mock.Call } -// PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse is a helper method to define mock.On call +// PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse is a helper method to define mock.On call // - ctx // - guid // - contentType // - body // - reqEditors -func (_e *MockClientWithResponsesInterface_Expecter) PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse(ctx interface{}, guid interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse_Call { - return &MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse_Call{Call: _e.mock.On("PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse", +func (_e *MockClientWithResponsesInterface_Expecter) PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse(ctx interface{}, guid interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse_Call { + return &MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse_Call{Call: _e.mock.On("PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse", append([]interface{}{ctx, guid, contentType, body}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse_Call) Run(run func(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse_Call { +func (_c *MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse_Call) Run(run func(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := args[4].([]RequestEditorFn) run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(io.Reader), variadicArgs...) @@ -2216,18 +2686,18 @@ func (_c *MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithB return _c } -func (_c *MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse_Call) Return(postApiV1AmtPowerBootoptionsGuidResponse *PostApiV1AmtPowerBootoptionsGuidResponse, err error) *MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse_Call { - _c.Call.Return(postApiV1AmtPowerBootoptionsGuidResponse, err) +func (_c *MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse_Call) Return(postApiV1AmtPowerBootOptionsGuidResponse *PostApiV1AmtPowerBootOptionsGuidResponse, err error) *MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse_Call { + _c.Call.Return(postApiV1AmtPowerBootOptionsGuidResponse, err) return _c } -func (_c *MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse_Call) RunAndReturn(run func(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerBootoptionsGuidResponse, error)) *MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithBodyWithResponse_Call { +func (_c *MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse_Call) RunAndReturn(run func(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerBootOptionsGuidResponse, error)) *MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithBodyWithResponse_Call { _c.Call.Return(run) return _c } -// PostApiV1AmtPowerBootoptionsGuidWithResponse provides a mock function for the type MockClientWithResponsesInterface -func (_mock *MockClientWithResponsesInterface) PostApiV1AmtPowerBootoptionsGuidWithResponse(ctx context.Context, guid string, body PostApiV1AmtPowerBootoptionsGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerBootoptionsGuidResponse, error) { +// PostApiV1AmtPowerBootOptionsGuidWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) PostApiV1AmtPowerBootOptionsGuidWithResponse(ctx context.Context, guid string, body PostApiV1AmtPowerBootOptionsGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerBootOptionsGuidResponse, error) { var tmpRet mock.Arguments if len(reqEditors) > 0 { tmpRet = _mock.Called(ctx, guid, body, reqEditors) @@ -2237,22 +2707,22 @@ func (_mock *MockClientWithResponsesInterface) PostApiV1AmtPowerBootoptionsGuidW ret := tmpRet if len(ret) == 0 { - panic("no return value specified for PostApiV1AmtPowerBootoptionsGuidWithResponse") + panic("no return value specified for PostApiV1AmtPowerBootOptionsGuidWithResponse") } - var r0 *PostApiV1AmtPowerBootoptionsGuidResponse + var r0 *PostApiV1AmtPowerBootOptionsGuidResponse var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, string, PostApiV1AmtPowerBootoptionsGuidJSONRequestBody, ...RequestEditorFn) (*PostApiV1AmtPowerBootoptionsGuidResponse, error)); ok { + if returnFunc, ok := ret.Get(0).(func(context.Context, string, PostApiV1AmtPowerBootOptionsGuidJSONRequestBody, ...RequestEditorFn) (*PostApiV1AmtPowerBootOptionsGuidResponse, error)); ok { return returnFunc(ctx, guid, body, reqEditors...) } - if returnFunc, ok := ret.Get(0).(func(context.Context, string, PostApiV1AmtPowerBootoptionsGuidJSONRequestBody, ...RequestEditorFn) *PostApiV1AmtPowerBootoptionsGuidResponse); ok { + if returnFunc, ok := ret.Get(0).(func(context.Context, string, PostApiV1AmtPowerBootOptionsGuidJSONRequestBody, ...RequestEditorFn) *PostApiV1AmtPowerBootOptionsGuidResponse); ok { r0 = returnFunc(ctx, guid, body, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*PostApiV1AmtPowerBootoptionsGuidResponse) + r0 = ret.Get(0).(*PostApiV1AmtPowerBootOptionsGuidResponse) } } - if returnFunc, ok := ret.Get(1).(func(context.Context, string, PostApiV1AmtPowerBootoptionsGuidJSONRequestBody, ...RequestEditorFn) error); ok { + if returnFunc, ok := ret.Get(1).(func(context.Context, string, PostApiV1AmtPowerBootOptionsGuidJSONRequestBody, ...RequestEditorFn) error); ok { r1 = returnFunc(ctx, guid, body, reqEditors...) } else { r1 = ret.Error(1) @@ -2260,35 +2730,35 @@ func (_mock *MockClientWithResponsesInterface) PostApiV1AmtPowerBootoptionsGuidW return r0, r1 } -// MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PostApiV1AmtPowerBootoptionsGuidWithResponse' -type MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithResponse_Call struct { +// MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PostApiV1AmtPowerBootOptionsGuidWithResponse' +type MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithResponse_Call struct { *mock.Call } -// PostApiV1AmtPowerBootoptionsGuidWithResponse is a helper method to define mock.On call +// PostApiV1AmtPowerBootOptionsGuidWithResponse is a helper method to define mock.On call // - ctx // - guid // - body // - reqEditors -func (_e *MockClientWithResponsesInterface_Expecter) PostApiV1AmtPowerBootoptionsGuidWithResponse(ctx interface{}, guid interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithResponse_Call { - return &MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithResponse_Call{Call: _e.mock.On("PostApiV1AmtPowerBootoptionsGuidWithResponse", +func (_e *MockClientWithResponsesInterface_Expecter) PostApiV1AmtPowerBootOptionsGuidWithResponse(ctx interface{}, guid interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithResponse_Call { + return &MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithResponse_Call{Call: _e.mock.On("PostApiV1AmtPowerBootOptionsGuidWithResponse", append([]interface{}{ctx, guid, body}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithResponse_Call) Run(run func(ctx context.Context, guid string, body PostApiV1AmtPowerBootoptionsGuidJSONRequestBody, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithResponse_Call { +func (_c *MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithResponse_Call) Run(run func(ctx context.Context, guid string, body PostApiV1AmtPowerBootOptionsGuidJSONRequestBody, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := args[3].([]RequestEditorFn) - run(args[0].(context.Context), args[1].(string), args[2].(PostApiV1AmtPowerBootoptionsGuidJSONRequestBody), variadicArgs...) + run(args[0].(context.Context), args[1].(string), args[2].(PostApiV1AmtPowerBootOptionsGuidJSONRequestBody), variadicArgs...) }) return _c } -func (_c *MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithResponse_Call) Return(postApiV1AmtPowerBootoptionsGuidResponse *PostApiV1AmtPowerBootoptionsGuidResponse, err error) *MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithResponse_Call { - _c.Call.Return(postApiV1AmtPowerBootoptionsGuidResponse, err) +func (_c *MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithResponse_Call) Return(postApiV1AmtPowerBootOptionsGuidResponse *PostApiV1AmtPowerBootOptionsGuidResponse, err error) *MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithResponse_Call { + _c.Call.Return(postApiV1AmtPowerBootOptionsGuidResponse, err) return _c } -func (_c *MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithResponse_Call) RunAndReturn(run func(ctx context.Context, guid string, body PostApiV1AmtPowerBootoptionsGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerBootoptionsGuidResponse, error)) *MockClientWithResponsesInterface_PostApiV1AmtPowerBootoptionsGuidWithResponse_Call { +func (_c *MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithResponse_Call) RunAndReturn(run func(ctx context.Context, guid string, body PostApiV1AmtPowerBootOptionsGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtPowerBootOptionsGuidResponse, error)) *MockClientWithResponsesInterface_PostApiV1AmtPowerBootOptionsGuidWithResponse_Call { _c.Call.Return(run) return _c } @@ -2693,3 +3163,138 @@ func (_c *MockClientWithResponsesInterface_PostApiV1DevicesWithResponse_Call) Ru _c.Call.Return(run) return _c } + +// PutApiV1AmtScreenGuidWithBodyWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) PutApiV1AmtScreenGuidWithBodyWithResponse(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV1AmtScreenGuidResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, guid, contentType, body, reqEditors) + } else { + tmpRet = _mock.Called(ctx, guid, contentType, body) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for PutApiV1AmtScreenGuidWithBodyWithResponse") + } + + var r0 *PutApiV1AmtScreenGuidResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...RequestEditorFn) (*PutApiV1AmtScreenGuidResponse, error)); ok { + return returnFunc(ctx, guid, contentType, body, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...RequestEditorFn) *PutApiV1AmtScreenGuidResponse); ok { + r0 = returnFunc(ctx, guid, contentType, body, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*PutApiV1AmtScreenGuidResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, io.Reader, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, guid, contentType, body, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithBodyWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutApiV1AmtScreenGuidWithBodyWithResponse' +type MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithBodyWithResponse_Call struct { + *mock.Call +} + +// PutApiV1AmtScreenGuidWithBodyWithResponse is a helper method to define mock.On call +// - ctx +// - guid +// - contentType +// - body +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) PutApiV1AmtScreenGuidWithBodyWithResponse(ctx interface{}, guid interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithBodyWithResponse_Call { + return &MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithBodyWithResponse_Call{Call: _e.mock.On("PutApiV1AmtScreenGuidWithBodyWithResponse", + append([]interface{}{ctx, guid, contentType, body}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithBodyWithResponse_Call) Run(run func(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithBodyWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[4].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(io.Reader), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithBodyWithResponse_Call) Return(putApiV1AmtScreenGuidResponse *PutApiV1AmtScreenGuidResponse, err error) *MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithBodyWithResponse_Call { + _c.Call.Return(putApiV1AmtScreenGuidResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithBodyWithResponse_Call) RunAndReturn(run func(ctx context.Context, guid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV1AmtScreenGuidResponse, error)) *MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithBodyWithResponse_Call { + _c.Call.Return(run) + return _c +} + +// PutApiV1AmtScreenGuidWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) PutApiV1AmtScreenGuidWithResponse(ctx context.Context, guid string, body PutApiV1AmtScreenGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV1AmtScreenGuidResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, guid, body, reqEditors) + } else { + tmpRet = _mock.Called(ctx, guid, body) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for PutApiV1AmtScreenGuidWithResponse") + } + + var r0 *PutApiV1AmtScreenGuidResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, PutApiV1AmtScreenGuidJSONRequestBody, ...RequestEditorFn) (*PutApiV1AmtScreenGuidResponse, error)); ok { + return returnFunc(ctx, guid, body, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, PutApiV1AmtScreenGuidJSONRequestBody, ...RequestEditorFn) *PutApiV1AmtScreenGuidResponse); ok { + r0 = returnFunc(ctx, guid, body, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*PutApiV1AmtScreenGuidResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, PutApiV1AmtScreenGuidJSONRequestBody, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, guid, body, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutApiV1AmtScreenGuidWithResponse' +type MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithResponse_Call struct { + *mock.Call +} + +// PutApiV1AmtScreenGuidWithResponse is a helper method to define mock.On call +// - ctx +// - guid +// - body +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) PutApiV1AmtScreenGuidWithResponse(ctx interface{}, guid interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithResponse_Call { + return &MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithResponse_Call{Call: _e.mock.On("PutApiV1AmtScreenGuidWithResponse", + append([]interface{}{ctx, guid, body}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithResponse_Call) Run(run func(ctx context.Context, guid string, body PutApiV1AmtScreenGuidJSONRequestBody, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[3].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(string), args[2].(PutApiV1AmtScreenGuidJSONRequestBody), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithResponse_Call) Return(putApiV1AmtScreenGuidResponse *PutApiV1AmtScreenGuidResponse, err error) *MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithResponse_Call { + _c.Call.Return(putApiV1AmtScreenGuidResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithResponse_Call) RunAndReturn(run func(ctx context.Context, guid string, body PutApiV1AmtScreenGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV1AmtScreenGuidResponse, error)) *MockClientWithResponsesInterface_PutApiV1AmtScreenGuidWithResponse_Call { + _c.Call.Return(run) + return _c +} diff --git a/dm-manager/pkg/api/mps/swagger.json b/dm-manager/pkg/api/mps/swagger.json deleted file mode 100644 index e8e7934e..00000000 --- a/dm-manager/pkg/api/mps/swagger.json +++ /dev/null @@ -1,3983 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "version": "2.13.0", - "title": "Management Presence Server (MPS) API", - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "description": "Open AMT Cloud Toolkit supports MPS API methods for authorization, user authentication, device-specific actions, such as power actions, and general device information.\n\nFor direct connection to MPS:\n* MPS Format of URI: `{{protocol}}://{{host}}:{{port}}/api/v1/{{MPS API}}`\n\n* Example URI for Authorize: [https://example.site.com:3000/login/api/v1/authorize]()\n\n\nWhen running behind the Kong API proxy, prepend the following prefixes to the URI:\n\nKong prefixes:\n* `/mps/login` for POST authorize method, `/mps` for GET authorize redirection method\n* `/mps/ws` for websocket routes\n* `/mps` for all other routes, including GET authorize/redirection method\n\nFor connection through Kong:\n\n* MPS Format of URI: `{{protocol}}://{{host}}/{{Kong Prefix}}/api/v1/{{MPS API}}`\n\n* Example URI for Authorize: [https://example.site.com/mps/login/api/v1/authorize]()\n" - }, - "servers": [ - { - "description": "SwaggerHub API Auto Mocking", - "url": "https://virtserver.swaggerhub.com/rbheopenamt/mps/2.13.0" - } - ], - "security": [ - { - "BearerAuth": [] - } - ], - "tags": [ - { - "name": "Auth", - "description": "User Authentication" - }, - { - "name": "AMT", - "description": "Device-Specific, Out-of-Band Actions" - }, - { - "name": "Devices", - "description": "Device Information" - } - ], - "paths": { - "/api/v1/authorize": { - "post": { - "summary": "Generate JWT Token for Authentication", - "description": "Generates a JWT token that can be used for authentication to both MPS and RPS APIs. [Learn more about JWT](https://jwt.io/introduction).\n\n**If using Kong**, make sure to use the prefix `/mps/login`\n", - "tags": [ - "Auth" - ], - "requestBody": { - "description": "Payload with username and password", - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "username", - "password" - ], - "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "401": { - "description": "Incorrect Username and/or Password" - }, - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "properties": { - "token": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/api/v1/authorize/redirection/{guid}": { - "get": { - "summary": "Issue Short-lived Bearer Token for Redirection Sessions", - "description": "Authenticate Redirection (KVM or SOL) sessions between the management console and MPS to allow only authenticated and authorized users to initiate.\n\n**If using Kong**, make sure to use the prefix `/mps`, **NOT** `/mps/login`. Authorize Redirection does not use the login route.\n", - "tags": [ - "Auth" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "properties": { - "token": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/api/v1/amt/log/audit/{guid}": { - "get": { - "summary": "Return Intel® AMT Audit Log", - "description": "Returns Intel® AMT Audit Log data in blocks of 10 records for a specified guid. Reference [AMT SDK](https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=WordDocuments%2Freadingtheauditlog.htm) for definition of property return codes.", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "startIndex", - "in": "query", - "description": "number of items to skip", - "example": "startIndex=0", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuditLogResponse" - } - } - } - } - } - } - }, - "/api/v1/amt/log/event/{guid}": { - "get": { - "summary": "Return Intel® AMT Event Log", - "description": "Return sensor and hardware event data from the Intel® AMT event log. Reference [AMT SDK](https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=HTMLDocuments%2FWS-Management_Class_Reference%2FAMT_EventLogEntry.htm) for definition of property return codes.", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventLogResponse" - } - } - } - } - } - } - }, - "/api/v1/amt/version/{guid}": { - "get": { - "summary": "Return Intel® AMT Version", - "description": "Retrieves hardware version information for Intel® AMT and the current activation state.", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AMTVersionResponse" - } - } - } - } - } - } - }, - "/api/v1/amt/generalSettings/{guid}": { - "get": { - "summary": "Return Intel® AMT General Settings", - "description": "Retrieve the Intel® AMT general settings.", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GeneralSettingsResponse" - } - } - } - } - } - } - }, - "/api/v1/amt/hardwareInfo/{guid}": { - "get": { - "summary": "Return Hardware Information", - "description": "Retrieve hardware information such as processor or storage.", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HardwareInfoResponse" - } - } - } - } - } - } - }, - "/api/v1/amt/features/{guid}": { - "post": { - "summary": "Set Intel® AMT Features", - "description": "Enable/Disable Intel® AMT User Consent, Redirection, KVM, SOL, and IDE-R features.", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "Payload to set AMT Features", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetAMTFeaturesRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetAMTFeaturesResponse" - } - } - } - } - } - }, - "get": { - "summary": "Return Intel® AMT Features", - "description": "Retrieves the current Intel® AMT Enable/Disable state for User Consent, Redirection, KVM, SOL, and IDE-R.\n\n`optInState` refers to the current Opt In State if the device has User Consent enabled. Valid values:\n\n- 0 (Not Started) - No sessions in progress or user consent requested\n- 1 (Requested) - Request to AMT device for user consent code successful\n- 2 (Displayed) - AMT device displaying user consent code for 300 seconds (5 minutes) before timeout by default\n- 3 (Received) - User consent code was entered correctly, a redirection session can be started. Will expire after 120 seconds (2 minutes) and return to State 0 if no active redirection session (State 4)\n- 4 (In Session) - Active redirection session in progress\n", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetAMTFeaturesResponse" - } - } - } - } - } - } - }, - "/api/v1/amt/alarmOccurrences/{guid}": { - "post": { - "summary": "Set new Alarm Clock Occurence", - "description": "Create a new Alarm Clock occurence to wake device for AMT device.", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "Payload to set new Alarm Clock", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetAlarmClockRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetAlarmClockResponse" - } - } - } - } - } - }, - "get": { - "summary": "Return Alarm Clock Occurences", - "description": "Retrieves all of the current Alarm Clock occurences for the device.", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetAlarmClockResponse" - } - } - } - } - } - }, - "delete": { - "summary": "Delete Alarm Clock Occurence", - "description": "Delete named Alarm Clock occurence from the device.\n\n**IMPORTANT**
\n**The DELETE method DOES REQUIRE a Request Body:**

\n**{
\n \"Name\": \"string\"
\n}**
\n\nNote: Unfortunately, SwaggerHub and OpenAPI 3.0 spec does not allow DELETE requests to have a Request Body for documentation. This has changed for OpenAPI 3.1 although SwaggerHub has not completed their migration from 3.0 -> 3.1 . We apologize for this deviation from the other documentation, please bear with us as we eagerly await the SwaggerHub update. Thank you!\n", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeactivateResponse" - } - } - } - }, - "404": { - "description": "Alarm Instance does not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteAlarmErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/v1/amt/power/state/{guid}": { - "get": { - "summary": "Return Current Device Power State", - "description": "Retrieve current power state of Intel® AMT device, returns a number that maps to a device power state. \nPossible power state values: \n* 2 = On - corresponding to ACPI state G0 or S0 or D0 \n* 3 = Sleep - Light, corresponding to ACPI state G1, S1/S2, or D1 \n* 4 = Sleep - Deep, corresponding to ACPI state G1, S3, or D2 \n* 6 = Off - Hard, corresponding to ACPI state G3, S5, or D3 \n* 7 = Hibernate (Off - Soft), corresponding to ACPI state S4, where the state of the managed element is preserved and will be recovered upon powering on \n* 8 = Off - Soft, corresponding to ACPI state G2, S5, or D3 \n* 9 = Power Cycle (Off-Hard), corresponds to the managed element reaching the ACPI state G3 followed by ACPI state S0 \n* 13 = Off - Hard Graceful, equivalent to Off Hard but preceded by a request to the managed element to perform an orderly shutdown\n", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PowerStateResponse" - } - } - } - } - } - } - }, - "/api/v1/amt/power/capabilities/{guid}": { - "get": { - "summary": "Return Available Power Actions", - "description": "View what OOB power actions are available for that device.", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PowerCapabilitiesResponse" - } - } - } - } - } - } - }, - "/api/v1/amt/power/action/{guid}": { - "post": { - "summary": "Perform OOB Power Action (1 to 99)", - "description": "Perform an OOB power actions numbered 1 thru 99. Execute a [GET /power/capabilities/{guid}](#/AMT/get_api_v1_amt_power_capabilities__guid_) call first to get the list of available power actions. See [AMT Power States](https://open-amt-cloud-toolkit.github.io/docs/2.11/Reference/powerstates/) for ALL potential power actions.

\n", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "Possible 1 thru 99 Power Actions:\n* 2 = Power up/on\n* 5 = Power cycle\n* 8 = Power down/off\n* 10 = Reset\n\nIn-band power actions require the presence of an agent running while the operating system is up and operational like the Intel Local Manageability Service (LMS):\n* 4 = Sleep\n* 7 = Hibernate\n* 12 = Soft power down/off\n* 14 = Soft reset \n", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PowerActionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PowerActionResponse" - } - } - } - } - } - } - }, - "/api/v1/amt/power/bootoptions/{guid}": { - "post": { - "summary": "Perform OOB Power Action (100+)", - "description": "Perform an OOB power actions numbered 100+. Execute a [GET /power/capabilities/{guid}](#/AMT/get_api_v1_amt_power_capabilities__guid_) call first to get the list of available power actions. See [AMT Power States](https://open-amt-cloud-toolkit.github.io/docs/2.11/Reference/powerstates/) for ALL potential power actions.\n", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "Possible 100+ Power Actions:\n* 100 = Power up to BIOS settings\n* 101 = Reset to BIOS settings\n* 104 = Reset to secure erase\n* 200 = Reset to IDE-R floppy disc\n* 201 = Power on to IDE-R floppy disc\n* 202 = Reset to IDE-R CD-ROM\n* 203 = Power on to IDE-R CD-ROM\n* 400 = Reset to PXE\n* 401 = Power on to PXE\n", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PowerActionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PowerActionResponse" - } - } - } - } - } - } - }, - "/api/v1/amt/userConsentCode/{guid}": { - "get": { - "summary": "Request an user consent code on client device", - "description": "If optInState is 0, it will request for a new user consent code", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserConsentResponse" - } - } - } - } - } - }, - "post": { - "summary": "Send user consent code", - "description": "Send the user consent code displayed on the client device", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserConsentRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserConsentResponse" - } - } - } - } - } - } - }, - "/api/v1/amt/userConsentCode/cancel/{guid}": { - "get": { - "summary": "Cancel user consent code", - "description": "Cancel six digit user consent code previously generated on client device", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserConsentResponse" - } - } - } - } - } - } - }, - "/api/v1/amt/deactivate/{guid}": { - "delete": { - "summary": "Deactivate AMT over CIRA", - "description": "Deactivate an AMT device using the CIRA channel with MPS rather than RPS RPC.", - "tags": [ - "AMT" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeactivateResponse" - } - } - } - }, - "404": { - "description": "Device does not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/v1/devices": { - "get": { - "summary": "List All Known Devices", - "description": "Lists all devices known to MPS.", - "tags": [ - "Devices" - ], - "parameters": [ - { - "in": "query", - "name": "$count", - "required": false, - "schema": { - "type": "boolean" - }, - "description": "If set to true, return `totalCount` of devices with `data` array of devices" - }, - { - "in": "query", - "name": "$skip", - "required": false, - "schema": { - "type": "integer" - }, - "description": "The number of items to skip before starting to collect the result set" - }, - { - "in": "query", - "name": "$top", - "required": false, - "schema": { - "type": "integer" - }, - "description": "The number of items to return" - }, - { - "in": "query", - "name": "friendlyName", - "description": "Device friendly name to query for. Maximum length 255", - "example": "friendlyName=myname", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "hostname", - "description": "Device hostname to query for. Maximum length 255", - "example": "hostname=mydevice", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "method", - "description": "Specify a conditional operator 'AND' or 'OR' to fetch the records with given tags .", - "example": "method=AND", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "status", - "description": "Specify '0' to query for disconnected devices or specify '1' for connected devices. To return all devices, omit this query parameter.", - "example": "status=1", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "in": "query", - "name": "tags", - "description": "Comma-delimited list of tags to query for", - "example": "tags=NUC,Store #123", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } - } - } - } - }, - "500": { - "description": "Internal server error" - } - } - }, - "post": { - "summary": "Add New Device to MPS", - "description": "Adds a new device to MPS. This call does not add the device credentials. In order for MPS to manage the device, a separate call to Vault must be made to add the credentials. For example, the Remote Provision Server (RPS) makes the call to Vault to add the AMT device credentials during activation of the AMT device.", - "tags": [ - "Devices" - ], - "requestBody": { - "description": "Payload to add AMT device to MPS", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddDevice" - } - } - } - }, - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AddDeviceResponse" - } - } - } - } - }, - "500": { - "description": "Internal server error" - } - } - }, - "patch": { - "summary": "Edit a Device", - "description": "Edit a single device in the MPS. This call does not edit the AMT device credentials. To update these, a separate call to Vault must be made. For example, the Remote Provision Server (RPS) makes the call to Vault to add the AMT device credentials during activation of the AMT device.", - "tags": [ - "Devices" - ], - "requestBody": { - "description": "Payload to edit AMT device in MPS", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EditDevice" - } - } - } - }, - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EditDeviceResponse" - } - } - } - } - }, - "500": { - "description": "Internal server error" - } - } - } - }, - "/api/v1/devices/redirectStatus/{guid}": { - "get": { - "summary": "Find Redirection State of Device by GUID", - "description": "Retrieves boolean values for KVM, SOL, and IDER session states.", - "tags": [ - "Devices" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device to return", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Error in request. A list of errors will be returned" - }, - "404": { - "description": "Device does not exist" - }, - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RedirectStatus" - } - } - } - }, - "500": { - "description": "Internal server error" - } - } - } - }, - "/api/v1/devices/stats": { - "get": { - "summary": "Return Count of All Devices by Connection Status", - "description": "Retrieve the current count of all registered, connected, and disconnected devices.", - "tags": [ - "Devices" - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Stats" - } - } - } - } - } - } - }, - "/api/v1/devices/{guid}": { - "get": { - "summary": "Find Device by GUID", - "description": "Retrieves the device with a specific GUID and all device information from the database.", - "tags": [ - "Devices" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device to return", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Error in request. A list of errors will be returned" - }, - "404": { - "description": "Device does not exist" - }, - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Device" - } - } - } - }, - "500": { - "description": "Internal server error" - } - } - }, - "delete": { - "summary": "Delete Device Information", - "description": "Removes the device with a specific GUID and all device information from the database. This will prevent the device from connecting to MPS, even if the device has not yet been unprovisioned. Use the disconnect API after this call to remove a device and prevent it from reconnecting to the MPS.", - "tags": [ - "Devices" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device to return", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "isSecretToBeDeleted", - "in": "query", - "description": "Delete device information from both the Database **AND Secret Storage**. Caution: This will delete the stored device passwords in Secret Storage.", - "example": "isSecretToBeDeleted=true", - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "404": { - "description": "Device does not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteErrorResponse" - } - } - } - }, - "204": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteResponse" - } - } - } - }, - "500": { - "description": "Internal server error" - } - } - } - }, - "/api/v1/devices/disconnect/{guid}": { - "delete": { - "summary": "Disconnect Device", - "description": "Forces a specified device to disconnect from the MPS. Device will reconnect again if it is able. To prevent reconnection, first [delete the device information](#/Devices/delete_api_v1_devices__guid_) from MPS.", - "tags": [ - "Devices" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device to return", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "404": { - "description": "Device does not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DisconnectErrorResponse" - } - } - } - }, - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DisconnectResponse" - } - } - } - }, - "500": { - "description": "Request failed while disconnecting device." - } - } - } - }, - "/api/v1/devices/refresh/{guid}": { - "delete": { - "summary": "Refresh Stored AMT Password", - "description": "Delete the device's existing cached AMT password and refresh the cache from the secret store.\n\nInternal API. After running the RPC [changePassword](https://open-amt-cloud-toolkit.github.io/docs/2.11/Reference/RPC/commandsRPC/#changepassword) maintenance command, RPS must call this MPS endpoint to update the stored password secrets. Otherwise, all MPS API calls that require device credentials (e.g. Power Actions) will fail due to MPS using the old AMT password.\n", - "tags": [ - "Devices" - ], - "parameters": [ - { - "name": "guid", - "in": "path", - "description": "GUID of device to return", - "example": "123e4567-e89b-12d3-a456-426614174000", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "404": { - "description": "Device does not exist or cannot be found" - }, - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RefreshResponse" - } - } - } - }, - "500": { - "description": "Exception during Device Refresh" - } - } - } - }, - "/api/v1/ciracert": { - "get": { - "summary": "Return CIRA Certificate", - "description": "Returns the self-signed CIRA Certificate for the MPS Instance. Used for creation of CIRA Config in RPS.", - "tags": [ - "Misc" - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CiracertResponse" - } - } - } - } - } - } - }, - "/api/v1/health": { - "get": { - "summary": "Return Status of DB and Secret Store", - "description": "Returns statuses for the database and secret store that MPS is attempting to connect to.", - "tags": [ - "Misc" - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HealthcheckResponse" - } - } - } - } - } - } - }, - "/api/v1/version": { - "get": { - "tags": [ - "Misc" - ], - "summary": "Get Version", - "operationId": "GetVersion", - "description": "Returns the version of the service and the supported protocol version. The protocol version is used to check compatibility with RPC", - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionResponse" - } - } - } - } - }, - "deprecated": false - } - } - }, - "components": { - "securitySchemes": { - "BearerAuth": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "JWT" - } - }, - "schemas": { - "AuditLogResponse": { - "title": "AuditLogResponse", - "example": { - "totalCnt": 2, - "records": [ - { - "AuditAppID": 18, - "EventID": 10, - "InitiatorType": 0, - "AuditApp": "Redirection Manager", - "Event": "KVM Enabled", - "Initiator": "admin", - "Time": "2003-12-29T05:46:37.000Z", - "MCLocationType": 0, - "NetAddress": "1.2.3.4", - "Ex": "", - "ExStr": null - }, - { - "AuditAppID": 16, - "EventID": 19, - "InitiatorType": 0, - "AuditApp": "Security Admin", - "Event": "Unprovisioning Started", - "Initiator": "admin", - "Time": "2017-12-21T17:30:39.000Z", - "MCLocationType": 1, - "NetAddress": "::1", - "Ex": { - "type": "Buffer" - }, - "ExStr": "Remote WSMAN" - } - ] - }, - "properties": { - "totalCnt": { - "type": "integer" - }, - "records": { - "type": "string" - }, - "AuditAppID": { - "type": "integer" - }, - "EventID": { - "type": "integer" - }, - "InitiatorType": { - "type": "integer" - }, - "AuditApp": { - "type": "string" - }, - "Event": { - "type": "string" - }, - "Initiator": { - "type": "string" - }, - "Time": { - "type": "string" - }, - "MCLocationType": { - "type": "integer" - }, - "NetAddress": { - "type": "string" - }, - "Ex": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "data": { - "type": "array", - "items": { - "type": "integer" - } - } - } - }, - "ExStr": { - "type": "string" - } - } - }, - "EventLogResponse": { - "title": "EventLogResponse", - "example": [ - { - "DeviceAddress": 255, - "EventSensorType": 15, - "EventType": 111, - "EventOffset": 2, - "EventSourceType": 104, - "EventSeverity": 1, - "SensorNumber": 255, - "Entity": 34, - "EntityInstance": 0, - "EventData": [ - 64, - 6, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "TimeStamp": "2019-04-11T17:57:40.000Z", - "EntityStr": "BIOS", - "Desc": "USB resource configuration" - } - ], - "properties": { - "DeviceAddress": { - "type": "integer" - }, - "EventSensorType": { - "type": "integer" - }, - "EventType": { - "type": "integer" - }, - "EventOffset": { - "type": "integer" - }, - "EventSourceType": { - "type": "integer" - }, - "EventSeverity": { - "type": "integer" - }, - "SensorNumber": { - "type": "integer" - }, - "Entity": { - "type": "integer" - }, - "EntityInstance": { - "type": "integer" - }, - "EventData": { - "type": "array", - "items": { - "type": "integer" - } - }, - "TimeStamp": { - "type": "string" - }, - "EntityStr": { - "type": "string" - }, - "Desc": { - "type": "string" - } - } - }, - "AMTVersionResponse": { - "title": "VersionResponse", - "properties": { - "CIM_SoftwareIdentity": { - "type": "object", - "properties": { - "responses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "InstanceID": { - "type": "string" - }, - "IsEntity": { - "type": "boolean" - }, - "VersionString": { - "type": "string" - } - } - } - }, - "status": { - "type": "integer" - } - } - }, - "AMT_SetupAndConfigurationService": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "CreationClassName": { - "type": "string" - }, - "ElementName": { - "type": "string" - }, - "EnabledState": { - "type": "integer" - }, - "Name": { - "type": "string" - }, - "PasswordModel": { - "type": "integer" - }, - "ProvisioningMode": { - "type": "integer" - }, - "ProvisioningServerOTP": { - "type": "string" - }, - "ProvisioningState": { - "type": "integer" - }, - "RequestedState": { - "type": "integer" - }, - "SystemCreationClassName": { - "type": "string" - }, - "SystemName": { - "type": "string" - }, - "ZeroTouchConfigurationEnabled": { - "type": "boolean" - } - } - }, - "responses": { - "type": "object", - "properties": { - "Header": { - "type": "object", - "properties": { - "To": { - "type": "string" - }, - "RelatesTo": { - "type": "string" - }, - "Action": { - "type": "string" - }, - "MessageID": { - "type": "string" - }, - "ResourceURI": { - "type": "string" - }, - "Method": { - "type": "string" - } - } - }, - "Body": { - "type": "object", - "properties": { - "CreationClassName": { - "type": "string" - }, - "ElementName": { - "type": "string" - }, - "EnabledState": { - "type": "integer" - }, - "Name": { - "type": "string" - }, - "PasswordModel": { - "type": "integer" - }, - "ProvisioningMode": { - "type": "integer" - }, - "ProvisioningServerOTP": { - "type": "string" - }, - "ProvisioningState": { - "type": "integer" - }, - "RequestedState": { - "type": "integer" - }, - "SystemCreationClassName": { - "type": "string" - }, - "SystemName": { - "type": "string" - }, - "ZeroTouchConfigurationEnabled": { - "type": "boolean" - } - } - } - } - }, - "status": { - "type": "integer" - } - } - } - }, - "example": { - "CIM_SoftwareIdentity": { - "responses": [ - { - "InstanceID": "Flash", - "IsEntity": true, - "VersionString": "11.8.50" - }, - { - "InstanceID": "Netstack", - "IsEntity": true, - "VersionString": "11.8.50" - }, - { - "InstanceID": "AMTApps", - "IsEntity": true, - "VersionString": "11.8.50" - }, - { - "InstanceID": "AMT", - "IsEntity": true, - "VersionString": "11.8.50" - }, - { - "InstanceID": "Sku", - "IsEntity": true, - "VersionString": 16392 - }, - { - "InstanceID": "VendorID", - "IsEntity": true, - "VersionString": 8086 - }, - { - "InstanceID": "Build Number", - "IsEntity": true, - "VersionString": 3425 - }, - { - "InstanceID": "Recovery Version", - "IsEntity": true, - "VersionString": "11.8.50" - }, - { - "InstanceID": "Recovery Build Num", - "IsEntity": true, - "VersionString": 3425 - }, - { - "InstanceID": "Legacy Mode", - "IsEntity": true, - "VersionString": "False" - }, - { - "InstanceID": "AMT FW Core Version", - "IsEntity": true, - "VersionString": "11.8.50" - } - ], - "status": 200 - }, - "AMT_SetupAndConfigurationService": { - "response": { - "CreationClassName": "AMT_SetupAndConfigurationService", - "ElementName": "Intel(r) AMT Setup and Configuration Service", - "EnabledState": 5, - "Name": "Intel(r) AMT Setup and Configuration Service", - "PasswordModel": 1, - "ProvisioningMode": 1, - "ProvisioningServerOTP": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", - "ProvisioningState": 2, - "RequestedState": 12, - "SystemCreationClassName": "CIM_ComputerSystem", - "SystemName": "Intel(r) AMT", - "ZeroTouchConfigurationEnabled": true - }, - "responses": { - "Header": { - "To": "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous", - "RelatesTo": 3, - "Action": "http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse", - "MessageID": "uuid:00000000-8086-8086-8086-0000000006A4", - "ResourceURI": "http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SetupAndConfigurationService", - "Method": "AMT_SetupAndConfigurationService" - }, - "Body": { - "CreationClassName": "AMT_SetupAndConfigurationService", - "ElementName": "Intel(r) AMT Setup and Configuration Service", - "EnabledState": 5, - "Name": "Intel(r) AMT Setup and Configuration Service", - "PasswordModel": 1, - "ProvisioningMode": 1, - "ProvisioningServerOTP": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", - "ProvisioningState": 2, - "RequestedState": 12, - "SystemCreationClassName": "CIM_ComputerSystem", - "SystemName": "Intel(r) AMT", - "ZeroTouchConfigurationEnabled": true - } - }, - "status": 200 - } - } - }, - "GeneralSettingsResponse": { - "title": "GeneralSettingsResponse", - "example": { - "Header": { - "To": "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous", - "RelatesTo": "1", - "Action": "http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse", - "MessageID": "uuid:00000000-8086-8086-8086-000000000699", - "ResourceURI": "http://intel.com/wbem/wscim/1/amt-schema/1/AMT_GeneralSettings", - "Method": "AMT_GeneralSettings" - }, - "Body": { - "AMTNetworkEnabled": 1, - "DDNSPeriodicUpdateInterval": 1440, - "DDNSTTL": 900, - "DDNSUpdateByDHCPServerEnabled": true, - "DDNSUpdateEnabled": false, - "DHCPv6ConfigurationTimeout": 0, - "DigestRealm": "Digest:A4070000000000000000000000000000", - "DomainName": "", - "ElementName": "Intel(r) AMT: General Settings", - "Hostname": "", - "HostOSFQDN": "GEN7-AMT118-W10", - "IdleWakeTimeout": 65535, - "InstanceID": "Intel(r) AMT: General Settings", - "NetworkInterfaceEnabled": true, - "PingResponseEnabled": true, - "PowerSource": 0, - "PreferredAddressFamily": 0, - "PresenceNotificationInterval": 0, - "PrivacyLevel": 0, - "RmcpPingResponseEnabled": true, - "SharedFQDN": true, - "WsmanOnlyMode": false - } - }, - "properties": { - "Header": { - "type": "object", - "properties": { - "To": { - "type": "string" - }, - "RelatesTo": { - "type": "string" - }, - "Action": { - "type": "string" - }, - "MessageID": { - "type": "string" - }, - "ResourceURI": { - "type": "string" - }, - "Method": { - "type": "string" - } - } - }, - "Body": { - "type": "object", - "properties": { - "AMTNetworkEnabled": { - "type": "integer" - }, - "DDNSPeriodicUpdateInterval": { - "type": "integer" - }, - "DDNSTTL": { - "type": "integer" - }, - "DDNSUpdateByDHCPServerEnabled": { - "type": "boolean" - }, - "DDNSUpdateEnabled": { - "type": "boolean" - }, - "DHCPv6ConfigurationTimeout": { - "type": "integer" - }, - "DigestRealm": { - "type": "string" - }, - "DomainName": { - "type": "string" - }, - "ElementName": { - "type": "string" - }, - "HostName": { - "type": "string" - }, - "HostOSFQDN": { - "type": "string" - }, - "IdleWakeTimeout": { - "type": "integer" - }, - "InstanceID": { - "type": "string" - }, - "NetworkInterfaceEnabled": { - "type": "boolean" - }, - "PingResponseEnabled": { - "type": "boolean" - }, - "PowerSource": { - "type": "integer" - }, - "PreferredAddressFamily": { - "type": "integer" - }, - "PresenceNotificationInterval": { - "type": "integer" - }, - "PrivacyLevel": { - "type": "integer" - }, - "RmcpPingResponseEnabled": { - "type": "boolean" - }, - "SharedFQDN": { - "type": "boolean" - }, - "WsmanOnlyMode": { - "type": "boolean" - } - } - } - } - }, - "HardwareInfoResponse": { - "title": "HardwareInfoResponse", - "properties": { - "CIM_ComputerSystemPackage": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "Antecedent": { - "type": "object", - "properties": { - "Address": { - "type": "string" - }, - "ReferenceParameters": { - "type": "object", - "properties": { - "ResourceURI": { - "type": "string" - }, - "SelectorSet": { - "type": "object", - "properties": { - "Selector": { - "type": "object", - "properties": { - "value": { - "type": "string" - }, - "@name": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "Dependent": { - "type": "object", - "properties": { - "Address": { - "type": "string" - }, - "ReferenceParameters": { - "type": "object", - "properties": { - "ResourceURI": { - "type": "string" - }, - "SelectorSet": { - "type": "object", - "properties": { - "Selector": { - "type": "object", - "properties": { - "value": { - "type": "string" - }, - "@name": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "PlatformGUID": { - "type": "string" - } - } - }, - "status": { - "type": "integer" - } - } - }, - "CIM_SystemPackaging": { - "type": "object", - "properties": { - "responses": { - "type": "object", - "properties": { - "Antecedent": { - "type": "object", - "properties": { - "Address": { - "type": "string" - }, - "ReferenceParameters": { - "type": "object", - "properties": { - "ResourceURI": { - "type": "string" - }, - "SelectorSet": { - "type": "object", - "properties": { - "Selector": { - "type": "object", - "properties": { - "value": { - "type": "string" - }, - "@name": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "dependent": { - "type": "object", - "properties": { - "Address": { - "type": "string" - }, - "ReferenceParameters": { - "type": "object", - "properties": { - "ResourceURI": { - "type": "string" - }, - "SelectorSet": { - "type": "object", - "properties": { - "Selector": { - "type": "object", - "properties": { - "value": { - "type": "string" - }, - "@name": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "PlatformGUID": { - "type": "string" - } - } - }, - "status": { - "type": "integer" - } - } - }, - "CIM_Chassis": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "ChassisPackageType": { - "type": "integer" - }, - "CreationClassName": { - "type": "string" - }, - "ElementName": { - "type": "string" - }, - "Manufacturer": { - "type": "string" - }, - "Model": { - "type": "string" - }, - "OperationalStatus": { - "type": "integer" - }, - "PackageType": { - "type": "integer" - }, - "SerialNumber": { - "type": "string" - }, - "Tag": { - "type": "string" - }, - "Version": { - "type": "string" - } - } - }, - "responses": { - "type": "object", - "properties": { - "Header": { - "type": "object", - "properties": { - "To": { - "type": "string" - }, - "RelatesTo": { - "type": "integer" - }, - "Action": { - "type": "string" - }, - "MessageID": { - "type": "string" - }, - "ResourceURI": { - "type": "string" - }, - "Method": { - "type": "string" - } - } - }, - "Body": { - "type": "object", - "properties": { - "ChassisPackageType": { - "type": "integer" - }, - "CreationClassName": { - "type": "string" - }, - "ElementName": { - "type": "string" - }, - "Manufacturer": { - "type": "string" - }, - "Model": { - "type": "string" - }, - "OperationalStatus": { - "type": "integer" - }, - "PackageType": { - "type": "integer" - }, - "SerialNumber": { - "type": "string" - }, - "Tag": { - "type": "string" - }, - "Version": { - "type": "string" - } - } - } - } - }, - "status": { - "type": "integer" - } - } - }, - "CIM_Chip": { - "type": "object", - "properties": { - "responses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "CanBeFRUed": { - "type": "boolean" - }, - "CreationClassName": { - "type": "string" - }, - "ElementName": { - "type": "string" - }, - "Manufacturer": { - "type": "string" - }, - "OperationalStatus": { - "type": "integer" - }, - "Tag": { - "type": "string" - }, - "Version": { - "type": "string" - }, - "BankLabel": { - "type": "string" - }, - "Capacity": { - "type": "integer" - }, - "FormFactor": { - "type": "integer" - }, - "MemoryType": { - "type": "integer" - }, - "PartNumber": { - "type": "string" - }, - "SerialNumber": { - "type": "string" - }, - "Speed": { - "type": "integer" - } - } - } - }, - "status": { - "type": "integer" - } - } - }, - "CIM_Card": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "CanBeFRUed": { - "type": "boolean" - }, - "CreationClassName": { - "type": "string" - }, - "ElementName": { - "type": "string" - }, - "Manufacturer": { - "type": "string" - }, - "Model": { - "type": "string" - }, - "OperationalStatus": { - "type": "integer" - }, - "PackageType": { - "type": "integer" - }, - "SerialNumber": { - "type": "string" - }, - "Tag": { - "type": "string" - }, - "Version": { - "type": "string" - } - } - }, - "responses": { - "type": "object", - "properties": { - "Header": { - "type": "object", - "properties": { - "To": { - "type": "string" - }, - "RelatesTo": { - "type": "integer" - }, - "Action": { - "type": "string" - }, - "MessageID": { - "type": "string" - }, - "ResourceURI": { - "type": "string" - }, - "Method": { - "type": "string" - } - } - }, - "Body": { - "type": "object", - "properties": { - "CanBeFRUed": { - "type": "boolean" - }, - "CreationClassName": { - "type": "string" - }, - "ElementName": { - "type": "string" - }, - "Manufacturer": { - "type": "string" - }, - "Model": { - "type": "string" - }, - "OperationalStatus": { - "type": "integer" - }, - "PackageType": { - "type": "integer" - }, - "SerialNumber": { - "type": "string" - }, - "Tag": { - "type": "string" - }, - "Version": { - "type": "string" - } - } - } - } - }, - "status": { - "type": "integer" - } - } - }, - "CIM_BIOSElement": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "ElementName": { - "type": "string" - }, - "Manufacturer": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "OperationalStatus": { - "type": "integer" - }, - "PrimaryBIOS": { - "type": "boolean" - }, - "ReleaseDate": { - "type": "object", - "properties": { - "Datetime": { - "type": "string" - } - } - }, - "SoftwareElementID": { - "type": "string" - }, - "SoftwareElementState": { - "type": "integer" - }, - "TargetOperatingSystem": { - "type": "integer" - }, - "Version": { - "type": "string" - } - } - }, - "responses": { - "type": "object", - "properties": { - "Header": { - "type": "object", - "properties": { - "To": { - "type": "string" - }, - "RelatesTo": { - "type": "integer" - }, - "Action": { - "type": "string" - }, - "MessageID": { - "type": "string" - }, - "ResourceURI": { - "type": "string" - }, - "Method": { - "type": "string" - } - } - }, - "Body": { - "type": "object", - "properties": { - "ElementName": { - "type": "string" - }, - "Manufacturer": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "OperationalStatus": { - "type": "integer" - }, - "PrimaryBIOS": { - "type": "boolean" - }, - "ReleaseDate": { - "type": "object", - "properties": { - "Datetime": { - "type": "string" - } - } - }, - "SoftwareElementID": { - "type": "string" - }, - "SoftwareElementState": { - "type": "integer" - }, - "TargetOperatingSystem": { - "type": "integer" - }, - "Version": { - "type": "string" - } - } - } - } - }, - "status": { - "type": "integer" - } - } - }, - "CIM_Processor": { - "type": "object", - "properties": { - "responses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "CPUStatus": { - "type": "integer" - }, - "CreationClassName": { - "type": "string" - }, - "CurrentClockSpeed": { - "type": "integer" - }, - "DeviceID": { - "type": "string" - }, - "ElementName": { - "type": "string" - }, - "EnabledState": { - "type": "integer" - }, - "ExternalBusClockSpeed": { - "type": "integer" - }, - "Family": { - "type": "integer" - }, - "HealthState": { - "type": "integer" - }, - "MaxClockSpeed": { - "type": "integer" - }, - "OperationalStatus": { - "type": "integer" - }, - "RequestedState": { - "type": "integer" - }, - "Role": { - "type": "string" - }, - "Stepping": { - "type": "integer" - }, - "SystemCreationClassName": { - "type": "string" - }, - "SystemName": { - "type": "string" - }, - "UpgradeMethod": { - "type": "integer" - } - } - } - }, - "status": { - "type": "integer" - } - } - }, - "CIM_PhysicalMemory": { - "type": "object", - "properties": { - "responses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "BankLabel": { - "type": "string" - }, - "Capacity": { - "type": "integer" - }, - "CreationClassName": { - "type": "string" - }, - "ElementName": { - "type": "string" - }, - "FormFactor": { - "type": "integer" - }, - "Manufacturer": { - "type": "string" - }, - "MemoryType": { - "type": "integer" - }, - "PartNumber": { - "type": "string" - }, - "SerialNumber": { - "type": "string" - }, - "Speed": { - "type": "integer" - }, - "Tag": { - "type": "integer" - } - } - } - }, - "status": { - "type": "integer" - } - } - }, - "CIM_MediaAccessDevice": { - "type": "object", - "properties": { - "responses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "Capabilities": { - "type": "array", - "items": { - "type": "integer" - } - }, - "CreationClassName": { - "type": "string" - }, - "DeviceID": { - "type": "string" - }, - "ElementName": { - "type": "string" - }, - "EnabledDefault": { - "type": "integer" - }, - "EnabledState": { - "type": "integer" - }, - "MaxMediaSize": { - "type": "integer" - }, - "OperationalStatus": { - "type": "integer" - }, - "RequestedState": { - "type": "integer" - }, - "Security": { - "type": "integer" - }, - "SystemCreationClassName": { - "type": "string" - }, - "SystemName": { - "type": "string" - } - } - } - }, - "status": { - "type": "integer" - } - } - }, - "CIM_PhysicalPackage": { - "type": "object", - "properties": { - "responses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "CanBeFRUed": { - "type": "boolean" - }, - "CreationClassName": { - "type": "string" - }, - "ElementName": { - "type": "string" - }, - "Manufacturer": { - "type": "string" - }, - "Model": { - "type": "string" - }, - "OperationalStatus": { - "type": "integer" - }, - "PackageType": { - "type": "integer" - }, - "SerialNumber": { - "type": "string" - }, - "Tag": { - "type": "string" - }, - "Version": { - "type": "string" - }, - "ChassisPackageType": { - "type": "integer" - } - } - } - }, - "status": { - "type": "integer" - } - } - } - }, - "example": { - "CIM_ComputerSystemPackage": { - "response": { - "Antecedent": { - "Address": "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous", - "ReferenceParameters": { - "ResourceURI": "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/ CIM_Chassis", - "SelectorSet": { - "Selector": [ - { - "value": "CIM_Chassis", - "@name": "CreationClassName" - }, - { - "value": "CIM_Chassis", - "@name": "Tag" - } - ] - } - } - }, - "Dependent": { - "Address": "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous", - "ReferenceParameters": { - "ResourceURI": "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/ CIM_ComputerSystem", - "SelectorSet": { - "Selector": [ - { - "value": "CIM_ComputerSystem", - "@name": "CreationClassName" - }, - { - "value": "ManagedSystem", - "@name": "Name" - } - ] - } - } - }, - "PlatformGUID": "1095AC4BA6042143BAE2D45DDF07B684" - }, - "status": 200 - }, - "CIM_SystemPackaging": { - "responses": [ - { - "Antecedent": { - "Address": "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous", - "ReferenceParameters": { - "ResourceURI": "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/ CIM_Chassis", - "SelectorSet": { - "Selector": [ - { - "value": "CIM_Chassis", - "@name": "CreationClassName" - }, - { - "value": "CIM_Chassis", - "@name": "Tag" - } - ] - } - } - }, - "Dependent": { - "Address": "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous", - "ReferenceParameters": { - "ResourceURI": "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/ CIM_ComputerSystem", - "SelectorSet": { - "Selector": [ - { - "value": "CIM_ComputerSystem", - "@name": "CreationClassName" - }, - { - "value": "ManagedSystem", - "@name": "Name" - } - ] - } - } - }, - "PlatformGUID": "1095AC4BA6042143BAE2D45DDF07B684" - } - ], - "status": 200 - }, - "CIM_Chassis": { - "response": { - "ChassisPackageType": 0, - "CreationClassName": "CIM_Chassis", - "ElementName": "Managed System Chassis", - "Manufacturer": "Intel Corporation", - "Model": "NUC7i5DNHE", - "OperationalStatus": 0, - "PackageType": 3, - "SerialNumber": "DW1646647500075", - "Tag": "CIM_Chassis", - "Version": "J57828-503" - }, - "status": 200 - }, - "CIM_Chip": { - "responses": [ - { - "CanBeFRUed": true, - "CreationClassName": "CIM_Chip", - "ElementName": "Managed System Processor Chip", - "Manufacturer": "Intel(R) Corporation", - "OperationalStatus": 0, - "Tag": "CPU 0", - "Version": "Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz" - }, - { - "BankLabel": "BANK 0", - "Capacity": 4294967296, - "CreationClassName": "CIM_PhysicalMemory", - "ElementName": "Managed System Memory Chip", - "FormFactor": 13, - "Manufacturer": "04EF", - "MemoryType": 26, - "PartNumber": "TEAMGROUP-SD4-2133 ", - "SerialNumber": "020300C5", - "Speed": 0, - "Tag": 9876543210 - }, - { - "BankLabel": "BANK 2", - "Capacity": 4294967296, - "CreationClassName": "CIM_PhysicalMemory", - "ElementName": "Managed System Memory Chip", - "FormFactor": 13, - "Manufacturer": "04EF", - "MemoryType": 26, - "PartNumber": "TEAMGROUP-SD4-2133 ", - "SerialNumber": "020300BD", - "Speed": 0, - "Tag": "9876543210 (#2)" - } - ], - "status": 200 - }, - "CIM_Card": { - "response": { - "CanBeFRUed": true, - "CreationClassName": "CIM_Card", - "ElementName": "Managed System Base Board", - "Manufacturer": "Intel Corporation", - "Model": "NUC7i5DNB", - "OperationalStatus": 0, - "PackageType": 9, - "SerialNumber": "BTDN7490016E", - "Tag": "CIM_Card", - "Version": "J57626-503" - }, - "status": 200 - }, - "CIM_BIOSElement": { - "response": { - "ElementName": "Primary BIOS", - "Manufacturer": "Intel Corp.", - "Name": "Primary BIOS", - "OperationalStatus": 0, - "PrimaryBIOS": true, - "ReleaseDate": { - "Datetime": "2018-03-15T00:00:00Z" - }, - "SoftwareElementID": "DNKBLi5v.86A.0040.2018.0315.1451", - "SoftwareElementState": 2, - "TargetOperatingSystem": 66, - "Version": "DNKBLi5v.86A.0040.2018.0315.1451" - }, - "status": 200 - }, - "CIM_Processor": { - "responses": [ - { - "CPUStatus": 1, - "CreationClassName": "CIM_Processor", - "CurrentClockSpeed": 2500, - "DeviceID": "CPU 0", - "ElementName": "Managed System CPU", - "EnabledState": 2, - "ExternalBusClockSpeed": 100, - "Family": 205, - "HealthState": 0, - "MaxClockSpeed": 8300, - "OperationalStatus": 0, - "RequestedState": 12, - "Role": "Central", - "Stepping": 9, - "SystemCreationClassName": "CIM_ComputerSystem", - "SystemName": "ManagedSystem", - "UpgradeMethod": 2 - } - ], - "status": 200 - }, - "CIM_PhysicalMemory": { - "responses": [ - { - "BankLabel": "BANK 0", - "Capacity": 4294967296, - "CreationClassName": "CIM_PhysicalMemory", - "ElementName": "Managed System Memory Chip", - "FormFactor": 13, - "Manufacturer": "04EF", - "MemoryType": 26, - "PartNumber": "TEAMGROUP-SD4-2133 ", - "SerialNumber": "020300C5", - "Speed": 0, - "Tag": 9876543210 - }, - { - "BankLabel": "BANK 2", - "Capacity": 4294967296, - "CreationClassName": "CIM_PhysicalMemory", - "ElementName": "Managed System Memory Chip", - "FormFactor": 13, - "Manufacturer": "04EF", - "MemoryType": 26, - "PartNumber": "TEAMGROUP-SD4-2133 ", - "SerialNumber": "020300BD", - "Speed": 0, - "Tag": "9876543210 (#2)" - } - ], - "status": 200 - }, - "CIM_MediaAccessDevice": { - "responses": [ - { - "Capabilities": [ - 4, - 10 - ], - "CreationClassName": "CIM_MediaAccessDevice", - "DeviceID": "MEDIA DEV 0", - "ElementName": "Managed System Media Access Device", - "EnabledDefault": 2, - "EnabledState": 0, - "MaxMediaSize": 250059350, - "OperationalStatus": 0, - "RequestedState": 12, - "Security": 2, - "SystemCreationClassName": "CIM_ComputerSystem", - "SystemName": "ManagedSystem" - } - ], - "status": 200 - }, - "CIM_PhysicalPackage": { - "responses": [ - { - "CanBeFRUed": true, - "CreationClassName": "CIM_Card", - "ElementName": "Managed System Base Board", - "Manufacturer": "Intel Corporation", - "Model": "NUC7i5DNB", - "OperationalStatus": 0, - "PackageType": 9, - "SerialNumber": "BTDN7490016E", - "Tag": "CIM_Card", - "Version": "J57626-503" - }, - { - "CreationClassName": "CIM_PhysicalPackage", - "ElementName": "Managed System Storage Media Package", - "Model": "Samsung SSD 850 EVO M.2 250GB ", - "OperationalStatus": 0, - "PackageType": 15, - "SerialNumber": "S33CNX0JC36654D ", - "Tag": "Storage Media Package 0" - }, - { - "ChassisPackageType": 0, - "CreationClassName": "CIM_Chassis", - "ElementName": "Managed System Chassis", - "Manufacturer": "Intel Corporation", - "Model": "NUC7i5DNHE", - "OperationalStatus": 0, - "PackageType": 3, - "SerialNumber": "DW1646647500075", - "Tag": "CIM_Chassis", - "Version": "J57828-503" - } - ], - "status": 200 - } - } - }, - "SetAMTFeaturesRequest": { - "title": "SetAMTFeaturesRequest", - "required": [ - "userConsent", - "enableSOL", - "enableIDER", - "enableKVM" - ], - "properties": { - "userConsent": { - "type": "string", - "enum": [ - "kvm", - "all", - "none" - ] - }, - "redirection": { - "type": "boolean" - }, - "enableSOL": { - "type": "boolean" - }, - "enableIDER": { - "type": "boolean" - }, - "enableKVM": { - "type": "boolean" - }, - "enableAll": { - "type": "boolean" - } - } - }, - "SetAMTFeaturesResponse": { - "type": "string", - "example": { - "status": "Updated AMT Features" - }, - "properties": { - "status": { - "type": "string" - } - } - }, - "GetAMTFeaturesResponse": { - "title": "GetAMTFeaturesResponse", - "properties": { - "userConsent": { - "type": "string" - }, - "redirection": { - "type": "boolean" - }, - "KVM": { - "type": "boolean" - }, - "SOL": { - "type": "boolean" - }, - "IDER": { - "type": "boolean" - }, - "optInState": { - "type": "integer", - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5 - ] - } - }, - "example": { - "userConsent": "kvm", - "redirection": false, - "KVM": false, - "SOL": true, - "IDER": true, - "optInState": 0 - } - }, - "SetAlarmClockRequest": { - "title": "SetAlarmClockRequest", - "required": [ - "ElementName", - "StartTime", - "Interval", - "DeleteOnCompletion" - ], - "properties": { - "ElementName": { - "type": "string" - }, - "StartTime": { - "type": "string", - "format": "date-time" - }, - "Interval": { - "type": "integer" - }, - "DeleteOnCompletion": { - "type": "boolean" - } - } - }, - "SetAlarmClockResponse": { - "type": "string", - "example": { - "status": "SUCCESS", - "ReturnValue": 0 - }, - "properties": { - "status": { - "type": "string" - }, - "ReturnValue": { - "type": "integer" - } - } - }, - "GetAlarmClockResponse": { - "title": "GetAlarmClockResponse", - "properties": { - "ElementName": { - "type": "string" - }, - "InstanceID": { - "type": "string" - }, - "StartTime": { - "type": "object", - "properties": { - "DateTime": { - "type": "string", - "format": "date-time" - } - } - }, - "Interval": { - "type": "object", - "properties": { - "Interval": { - "type": "string" - } - } - }, - "DeleteOnCompletion": { - "type": "boolean" - } - }, - "example": { - "DeleteOnCompletion": false, - "ElementName": "testAlarm", - "InstanceID": "testAlarm", - "Interval": { - "Interval": "PT10M" - }, - "StartTime": { - "DateTime": "2024-12-31T23:59:00Z" - } - } - }, - "DeleteAlarmErrorResponse": { - "title": "DeleteAlarmErrorResponse", - "example": { - "error": "Alarm instance not found", - "errorDescription": "Alarm occurrence delete request failed for guid : 4c4c4544-005a-3510-8047-b4c04f564433." - }, - "properties": { - "success": { - "description": "HTTP returncode", - "type": "integer" - }, - "error": { - "description": "server error message", - "type": "string" - }, - "errorDescription": { - "description": "contains device guid", - "type": "string" - } - } - }, - "PowerStateResponse": { - "title": "PowerStateResponse", - "example": { - "powerstate": 2 - }, - "properties": { - "powerstate": { - "type": "integer" - } - } - }, - "PowerCapabilitiesResponse": { - "title": "PowerCapabilitiesResponse", - "properties": { - "powerUp": { - "type": "integer" - }, - "powerCycle": { - "type": "integer" - }, - "powerDown": { - "type": "integer" - }, - "reset": { - "type": "integer" - }, - "softOff": { - "type": "integer" - }, - "softReset": { - "type": "integer" - }, - "sleep": { - "type": "integer" - }, - "hibernate": { - "type": "integer" - }, - "powerUpToBIOS": { - "type": "integer" - }, - "resetToBIOS": { - "type": "integer" - }, - "resetToSecureErase": { - "type": "integer" - }, - "resetToIDE-RFloppy": { - "type": "integer" - }, - "powerOnToIDE-RFloppy": { - "type": "integer" - }, - "resetToIDE-RCDROM": { - "type": "integer" - }, - "powerOnToIDE-RCDROM": { - "type": "integer" - }, - "resetToPXE": { - "type": "integer" - }, - "powerOnToPXE": { - "type": "integer" - } - }, - "example": { - "Power up": 2, - "Power cycle": 5, - "Power down": 8, - "Reset": 10, - "Soft-off": 12, - "Soft-reset": 14, - "Sleep": 4, - "Hibernate": 7, - "Power up to BIOS": 100, - "Reset to BIOS": 101, - "Reset to Secure Erase": 104, - "Reset to IDE-R Floppy": 200, - "Power on to IDE-R Floppy": 201, - "Reset to IDE-R CDROM": 202, - "Power on to IDE-R CDROM": 203, - "Reset to PXE": 400, - "Power on to PXE": 401 - } - }, - "PowerActionRequest": { - "title": "PowerActionRequest", - "required": [ - "action", - "useSOL" - ], - "example": { - "action": 8, - "useSOL": false - }, - "properties": { - "action": { - "type": "integer", - "enum": [ - 2, - 5, - 8, - 10, - 4, - 7, - 12, - 14, - 100, - 101, - 104, - 200, - 201, - 202, - 203, - 300, - 301, - 400, - 401 - ] - }, - "useSOL": { - "type": "boolean" - } - } - }, - "PowerActionResponse": { - "title": "PowerActionResponse", - "example": { - "returnValue": 0, - "returnValueStr": "SUCCESS" - }, - "properties": { - "Body": { - "type": "object", - "properties": { - "ReturnValue": { - "type": "integer" - }, - "ReturnValueStr": { - "type": "string" - } - } - } - } - }, - "UserConsentRequest": { - "required": [ - "consentCode" - ], - "example": { - "consentCode": 123456 - }, - "properties": { - "consentCode": { - "type": "integer" - } - } - }, - "UserConsentResponse": { - "type": "object", - "example": { - "Header": { - "Action": "http://intel.com/wbem/wscim/1/ips-schema/1/IPS_OptInService/StartOptInResponse", - "MessageID": "uuid:00000000-8086-8086-8086-000000001ACD", - "Method": "StartOptIn", - "RelatesTo": "1", - "ResourceURI": "http://intel.com/wbem/wscim/1/ips-schema/1/IPS_OptInService", - "To": "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous" - }, - "Body": { - "ReturnValue": 0, - "ReturnValueStr": "SUCCESS" - } - }, - "properties": { - "Header": { - "type": "object", - "properties": { - "To": { - "type": "string" - }, - "RelatesTo": { - "type": "string" - }, - "Action": { - "type": "string" - }, - "MessageID": { - "type": "string" - }, - "ResourceURI": { - "type": "string" - }, - "Method": { - "type": "string" - } - } - }, - "Body": { - "type": "object", - "properties": { - "ReturnValue": { - "type": "integer" - }, - "ReturnValueStr": { - "type": "string" - } - } - } - } - }, - "DeactivateResponse": { - "title": "DeactivateResponse", - "example": { - "status": "SUCCESS" - }, - "properties": { - "status": { - "type": "string" - } - } - }, - "Device": { - "title": "Device", - "example": { - "guid": "123e4567-e89b-12d3-a456-426614174000", - "hostname": "AMTDEVICENUC1", - "tags": [ - "Texas", - "NUC", - "Store #123" - ], - "mpsInstance": "test.mystack.com", - "connectionStatus": true, - "mpsusername": "admin", - "tenantId": "", - "friendlyName": "", - "dnsSuffix": "", - "deviceInfo": { - "fwVersion": "16.1", - "fwBuild": "1111", - "fwSku": "16392", - "currentMode": "0", - "features": "AMT Pro Corporate", - "ipAddress": "", - "lastUpdate": "2023-11-13T17:20:59.043Z" - }, - "lastConnected": "2023-11-13T17:21:57.885Z", - "lastSeen": "2023-11-13T17:33:57.915Z", - "lastDisconnected": "2023-11-13T17:22:57.885Z" - }, - "properties": { - "guid": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "mpsInstance": { - "type": "string" - }, - "connectionStatus": { - "type": "boolean" - }, - "mpsusername": { - "type": "string" - }, - "tenantid": { - "type": "string" - }, - "friendlyName": { - "type": "string" - }, - "dnsSuffix": { - "type": "string" - }, - "lastConnected": { - "type": "string", - "format": "date-time" - }, - "lastSeen": { - "type": "string", - "format": "date-time" - }, - "lastDisconnected": { - "type": "string", - "format": "date-time" - }, - "deviceInfo": { - "type": "object", - "properties": { - "fwVersion": { - "type": "string" - }, - "fwBuild": { - "type": "string" - }, - "fwSku": { - "type": "string" - }, - "currentMode": { - "type": "string" - }, - "features": { - "type": "string" - }, - "ipAddress": { - "type": "string" - }, - "lastUpdated": { - "type": "string", - "format": "date-time" - } - } - } - } - }, - "CountDevicesResponse": { - "title": "CountDevicesResponse", - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } - }, - "totalCount": { - "type": "integer" - } - } - }, - "AddDevice": { - "title": "AddDevice", - "required": [ - "guid", - "hostname", - "tags" - ], - "example": { - "guid": "123e4567-e89b-12d3-a456-426614174000", - "hostname": "AMTDEVICENUC1", - "friendlyName": "store12pos2", - "tags": [ - "Texas", - "NUC", - "Store #123" - ] - }, - "properties": { - "guid": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "deviceInfo": { - "type": "object", - "properties": { - "fwVersion": { - "type": "string" - }, - "fwBuild": { - "type": "string" - }, - "fwSku": { - "type": "string" - }, - "currentMode": { - "type": "string" - }, - "ipAddress": { - "type": "string" - } - } - } - } - }, - "AddDeviceResponse": { - "title": "DeviceResponse", - "required": [ - "guid", - "hostname", - "tags", - "mpsInstance", - "connectionStatus", - "mpsusername", - "tenantID", - "friendlyName", - "dnsSuffix" - ], - "example": { - "guid": "123e4567-e89b-12d3-a456-426614174000", - "hostname": "AMTDEVICENUC1", - "tags": [ - "Texas", - "NUC", - "Store #123" - ], - "mpsInstance": null, - "connectionStatus": false, - "mpsusername": null, - "tenantID": "", - "friendlyName": "store12pos2", - "dnsSuffix": null, - "deviceInfo": { - "fwVersion": "16.1", - "fwBuild": "1111", - "fwSku": "16392", - "currentMode": "0", - "features": "AMT Pro Corporate", - "ipAddress": "", - "lastUpdated": "2023-11-13T17:20:59.043Z" - }, - "lastConnected": "2023-11-13T17:21:57.885Z", - "lastSeen": "2023-11-13T17:33:57.915Z", - "lastDisconnected": "2023-11-13T17:22:57.885Z" - }, - "properties": { - "guid": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "dnsSuffix": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "mpsInstance": { - "type": "string" - }, - "connectionStatus": { - "type": "boolean" - }, - "mpsusername": { - "type": "string" - }, - "tenantID": { - "type": "string" - }, - "friendlyName": { - "type": "string" - }, - "lastConnected": { - "type": "string", - "format": "date-time" - }, - "lastSeen": { - "type": "string", - "format": "date-time" - }, - "lastDisconnected": { - "type": "string", - "format": "date-time" - }, - "deviceInfo": { - "type": "object", - "properties": { - "fwVersion": { - "type": "string" - }, - "fwBuild": { - "type": "string" - }, - "fwSku": { - "type": "string" - }, - "currentMode": { - "type": "string" - }, - "features": { - "type": "string" - }, - "ipAddress": { - "type": "string" - }, - "lastUpdated": { - "type": "string", - "format": "date-time" - } - } - } - } - }, - "EditDevice": { - "title": "EditDevice", - "required": [ - "guid" - ], - "example": { - "guid": "123e4567-e89b-12d3-a456-426614174000", - "hostname": "AMTDEVICENUC1", - "dnsSuffix": "os.suffix.com", - "friendlyName": "store12pos2", - "tags": [ - "Texas", - "NUC", - "Store #123" - ] - }, - "properties": { - "guid": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "dnsSuffix": { - "type": "string" - }, - "friendlyName": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "deviceInfo": { - "type": "object", - "properties": { - "fwVersion": { - "type": "string" - }, - "fwBuild": { - "type": "string" - }, - "fwSku": { - "type": "string" - }, - "currentMode": { - "type": "string" - }, - "ipAddress": { - "type": "string" - } - } - } - } - }, - "EditDeviceResponse": { - "title": "DeviceResponse", - "required": [ - "guid", - "hostname", - "tags", - "mpsInstance", - "connectionStatus", - "mpsusername", - "tenantID", - "friendlyName", - "dnsSuffix" - ], - "example": { - "guid": "123e4567-e89b-12d3-a456-426614174000", - "hostname": "AMTDEVICENUC1", - "tags": [ - "Texas", - "NUC", - "Store #123" - ], - "mpsInstance": null, - "connectionStatus": false, - "mpsusername": "admin", - "tenantID": "", - "friendlyName": "store12pos2", - "dnsSuffix": "os.suffix.com", - "deviceInfo": { - "fwVersion": "16.1", - "fwBuild": "1111", - "fwSku": "16392", - "currentMode": "0", - "features": "AMT Pro Corporate", - "ipAddress": "", - "lastUpdated": "2023-11-13T17:20:59.043Z" - }, - "lastConnected": "2023-11-13T17:21:57.885Z", - "lastSeen": "2023-11-13T17:33:57.915Z", - "lastDisconnected": "2023-11-13T17:22:57.885Z" - }, - "properties": { - "guid": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "dnsSuffix": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "mpsInstance": { - "type": "string" - }, - "connectionStatus": { - "type": "boolean" - }, - "mpsusername": { - "type": "string" - }, - "tenantID": { - "type": "string" - }, - "friendlyName": { - "type": "string" - }, - "lastConnected": { - "type": "string", - "format": "date-time" - }, - "lastSeen": { - "type": "string", - "format": "date-time" - }, - "lastDisconnected": { - "type": "string", - "format": "date-time" - }, - "deviceInfo": { - "type": "object", - "properties": { - "fwVersion": { - "type": "string" - }, - "fwBuild": { - "type": "string" - }, - "fwSku": { - "type": "string" - }, - "currentMode": { - "type": "string" - }, - "features": { - "type": "string" - }, - "ipAddress": { - "type": "string" - }, - "lastUpdated": { - "type": "string", - "format": "date-time" - } - } - } - } - }, - "RedirectStatus": { - "title": "RedirectStatus", - "example": { - "isKVMConnected": false, - "isSOLConnected": false, - "isIDERConnected": false - }, - "properties": { - "isKVMConnected": { - "type": "boolean" - }, - "isSOLConnected": { - "type": "boolean" - }, - "isIDERConnected": { - "type": "boolean" - } - } - }, - "Stats": { - "title": "Stats", - "example": { - "totalCount": 1, - "connectedCount": 1, - "disconnectedCount": 0 - }, - "properties": { - "totalCount": { - "type": "integer" - }, - "connectedCount": { - "type": "integer" - }, - "disconnectedCount": { - "type": "integer" - } - } - }, - "DeleteResponse": { - "title": "DeleteResponse", - "example": { - "success": 204 - }, - "properties": { - "success": { - "description": "HTTP returncode", - "type": "integer" - } - } - }, - "DeleteErrorResponse": { - "title": "DeleteErrorResponse", - "example": { - "error": "Device not found/connected. Please connect again using CIRA.", - "errorDescription": "guid : 038d0240-045c-05f4-7706-980700080009" - }, - "properties": { - "success": { - "description": "HTTP returncode", - "type": "integer" - }, - "error": { - "description": "server error message", - "type": "string" - }, - "errorDescription": { - "description": "contains device guid", - "type": "string" - } - } - }, - "DisconnectResponse": { - "title": "DisconnectResponse", - "example": { - "description": "CIRA connection disconnected : 038d0240-045c-05f4-7706-980700080009" - }, - "properties": { - "success": { - "description": "HTTP returncode", - "type": "integer" - }, - "description": { - "description": "server response message containing guid", - "type": "string" - } - } - }, - "DisconnectErrorResponse": { - "title": "DisconnectErrorResponse", - "example": { - "error": "Device not found/connected. Please connect again using CIRA.", - "errorDescription": "guid : 038d0240-045c-05f4-7706-980700080009" - }, - "properties": { - "success": { - "description": "HTTP returncode", - "type": "integer" - }, - "error": { - "description": "server error message", - "type": "string" - }, - "errorDescription": { - "description": "contains device guid", - "type": "string" - } - } - }, - "RefreshResponse": { - "title": "DeleteResponse", - "example": { - "success": 200, - "description": "Device info refreshed : 4c4c4544-004c-4d10-8050-c2c04f325133" - }, - "properties": { - "success": { - "description": "HTTP returncode", - "type": "integer" - } - } - }, - "CiracertResponse": { - "title": "CiracertResponse", - "example": "\"-----BEGIN CERTIFICATE----- MIIEOzCCAqOgAwIBAgIDAjVCMA0GCSqGSIb3DQEBDAUAMD0xFzAVBgNVBAMTDk1QU1Jvb3QtNmZhNMSDIWEdsqwe89dsNNJSOW2Db3duMRAwDgYDVQQGEwd1bmtub3duMCAXDTIyMDkwNTE4MTgwMloYDzIwNTMwOTA1MTgxODAyWjA9MRcwFQYDVQQDEw5NUFNSb290LTZmYTQ5NEQMA4GA1UEChMHdW5rbm93bjEQMA4GA1UEBhMHdW5rbm93bjCCAaIwDQYJKoZIhNMSDANdnSdsnmasSDWED8oCggGBAPiA+YEPjIlryv8PdJsfIwkqd/7wJriASiM3W5VePKtO5gXKCg3piuUAAIj8Lk36TK6Lvz5He818o1YMLposvTzZJHVPILye5aqp2Lgs079nESgoAt0/yxSMh53S8dzEf5CXBmlA5foEebVUKQoei/bqSkbIC3CvZ/NMIGHF0nUMoKeigzeJbADDQVIMCnqZoPq0pRLUTbCyogAaPQ+9N72XNPw3HYX7voH2EOJxHtZHH8LTJZXKc4ozt/JU9G0onfnSTCJAirbZSfY0bdxdaSEOJg4tGAFAseHikYP6hHGqjutUC7/WiT/3EBcQnO5OjckWDXVOiG6AmNsIqW2cfJnNjd0kOwbdyEC+Tmt3w9VR8491wFexfLodbbk5JUS99bBwf856y70zfmAiCSgQcIjU5Yra7eIkNtqBv1RG4tSBm0fD5YB/mArICoYF0zNWGrqqcbfuyARdEiNCjxIbSZt+l1onUfFWfjoBcE7AhL0EaZmUTbQKP9hl+1zffpa0wIDAQABo0IwQDAMBgNVHRMEBTADAQH/MBEGCWCGSAGG+EIBAQQEAwIABzAdBgNVHQ4EFgQUb6SWpSxsakc8AP/bm+gwt0qIsMEwDQYJKoZIhvcBHgfIJKLOpnmASfdHQaft0QROp4vl1J/hcAfPw0j+l3dMEpKbzJQhaRoRkIECpxhvaYgAUq7hA7MNNn4QV20BOiDfV8ZURFrEmnehP13I7jd7YDLxpfK17x5r6wlAYZ/pGb8u9lgexE14kERmmRZvuh7wxQy0rTcYKe9+jM5R8Ugv/8gWYdpp1gr8fGJJx/e2DfSs+ViXEOWwgWmidTwPgerwWR8AcvW8IXkylXO6+SlTXnv3cWcY3BEh9r0xXBa4lkFAse2+Zj/X9rudYGqOLYtIsef0Q5fOopHJ7JBXUbMQySAIdAbBb0X14rgEC2kwow1NCm0vzi8CAL/14D1csd0c1K8fRu//lQgj+gh7Tk4B7RMZOOwTMAUQj1LoYnjSDNJS87sAmkmNNJOS09PTi9RVW3nddcgMVSSa2wehS4ZpYkZOxLdgcV58dfW9wBKBWuqmnMGPjI5pjNCRK8foPePwuP1avckSdKsen5qT0tfthDV+2TrZuV07eKVrmTXq0GBNEIVQplV1yyA== -----END CERTIFICATE-----\"\n" - }, - "HealthcheckResponse": { - "title": "HealthcheckResponse", - "example": { - "db": { - "name": "POSTGRES", - "status": "OK" - }, - "secretStore": { - "name": "VAULT", - "status": { - "initialized": true, - "sealed": false, - "standby": false, - "performance_standby": false, - "replication_performance_mode": "disabled", - "replication_dr_mode": "disabled", - "server_time_utc": 1646337196, - "version": "1.9.3", - "cluster_name": "vault-cluster-3dc0c596", - "cluster_id": "469ada72-d74b-4d1e-6e77-476bf9902b72" - } - } - }, - "properties": { - "db": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "status": { - "type": "string" - } - } - }, - "secretStore": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "status": { - "type": "object", - "properties": { - "initialized": { - "type": "boolean" - }, - "sealed": { - "type": "boolean" - }, - "standby": { - "type": "boolean" - }, - "performance_standby": { - "type": "boolean" - }, - "replication_performance_mode": { - "type": "string" - }, - "replication_dr_mode": { - "type": "string" - }, - "server_time_utc": { - "type": "integer" - }, - "version": { - "type": "string" - }, - "cluster_name": { - "type": "string" - }, - "cluster_id": { - "type": "string" - } - } - } - } - } - } - }, - "VersionResponse": { - "title": "VersionResponse", - "required": [ - "serviceVersion" - ], - "type": "object", - "properties": { - "serviceVersion": { - "type": "string" - } - }, - "example": { - "serviceVersion": "2.8.0" - } - } - } - } -} \ No newline at end of file diff --git a/dm-manager/pkg/api/mps/swagger.yaml b/dm-manager/pkg/api/mps/swagger.yaml new file mode 100644 index 00000000..5594952c --- /dev/null +++ b/dm-manager/pkg/api/mps/swagger.yaml @@ -0,0 +1,3457 @@ +openapi: 3.0.3 +info: + version: 2.22.3 + title: Management Presence Server (MPS) API + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html + description: | + Open AMT Cloud Toolkit supports MPS API methods for authorization, user authentication, device-specific actions, such as power actions, and general device information. + + For direct connection to MPS: + * MPS Format of URI: `{{protocol}}://{{host}}:{{port}}/api/v1/{{MPS API}}` + + * Example URI for Authorize: [https://example.site.com:3000/login/api/v1/authorize]() + + + When running behind the Kong API proxy, prepend the following prefixes to the URI: + + Kong prefixes: + * `/mps/login` for POST authorize method, `/mps` for GET authorize redirection method + * `/mps/ws` for websocket routes + * `/mps` for all other routes, including GET authorize/redirection method + + For connection through Kong: + + * MPS Format of URI: `{{protocol}}://{{host}}/{{Kong Prefix}}/api/v1/{{MPS API}}` + + * Example URI for Authorize: [https://example.site.com/mps/login/api/v1/authorize]() + +servers: + # Added by API Auto Mocking Plugin + - description: SwaggerHub API Auto Mocking + url: https://virtserver.swaggerhub.com/rbheopenamt/mps/2.22.0 +security: + - BearerAuth: [] +tags: + - name: Auth + description: User Authentication + - name: AMT + description: Device-Specific, Out-of-Band Actions + - name: Devices + description: Device Information +paths: + /api/v1/authorize: + post: + summary: Generate JWT Token for Authentication + description: | + Generates a JWT token that can be used for authentication to both MPS and RPS APIs. [Learn more about JWT](https://jwt.io/introduction). + + **If using Kong**, make sure to use the prefix `/mps/login` + tags: + - Auth + requestBody: + description: Payload with username and password + required: true + content: + application/json: + schema: + required: + - username + - password + properties: + username: + type: string + password: + type: string + responses: + 401: + description: 'Incorrect Username and/or Password' + 200: + description: 'Success' + content: + application/json: + schema: + properties: + token: + type: string + /api/v1/authorize/redirection/{guid}: + get: + summary: Issue Short-lived Bearer Token for Redirection Sessions + description: | + Authenticate Redirection (KVM or SOL) sessions between the management console and MPS to allow only authenticated and authorized users to initiate. + + **If using Kong**, make sure to use the prefix `/mps`, **NOT** `/mps/login`. Authorize Redirection does not use the login route. + tags: + - Auth + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 200: + description: 'Success' + content: + application/json: + schema: + properties: + token: + type: string + /api/v1/amt/log/audit/{guid}: + get: + summary: Return Intel® AMT Audit Log + description: Returns Intel® AMT Audit Log data in blocks of 10 records for a specified guid. Reference [AMT SDK](https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=WordDocuments%2Freadingtheauditlog.htm) for definition of property return codes. + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + - name: startIndex + in: query + description: number of items to skip + example: 'startIndex=0' + required: false + schema: + type: integer + minimum: 0 + default: 0 + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/AuditLogResponse' + /api/v1/amt/log/event/{guid}: + get: + summary: Return Intel® AMT Event Log + description: Return sensor and hardware event data from the Intel® AMT event log. Reference [AMT SDK](https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=HTMLDocuments%2FWS-Management_Class_Reference%2FAMT_EventLogEntry.htm) for definition of property return codes. + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + # - name: startDate + # in: query + # description: Start date of log to retrieve + # required: true + # example: "2019-04-11" + # schema: + # type: string + # - name: endDate + # in: query + # description: End date of log to retrieve + # required: true + # example: "2019-04-18" + # schema: + # type: string + # - name: logsPerPage + # in: query + # description: Number of logs to return for this page + # required: true + # example: 10 + # schema: + # type: number + # - name: page + # in: query + # description: Page of logs to retrieve + # required: true + # example: 5 + # schema: + # type: number + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/EventLogResponse' + /api/v1/amt/version/{guid}: + get: + summary: Return Intel® AMT Version + description: Retrieves hardware version information for Intel® AMT and the current activation state. + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/AMTVersionResponse' + /api/v1/amt/generalSettings/{guid}: + get: + summary: Return Intel® AMT General Settings + description: Retrieve the Intel® AMT general settings. + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/GeneralSettingsResponse' + /api/v1/amt/hardwareInfo/{guid}: + get: + summary: Return Hardware Information + description: Retrieve hardware information such as processor or storage. + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/HardwareInfoResponse' + /api/v1/amt/features/{guid}: + post: + summary: Set Intel® AMT Features + description: Enable/Disable Intel® AMT User Consent, Redirection, KVM, SOL, IDE-R and OCR features. + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + requestBody: + description: Payload to set AMT Features + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SetAMTFeaturesRequest' + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/SetAMTFeaturesResponse' + get: + summary: Return Intel® AMT Features + description: | + Retrieves the current Intel® AMT Enable/Disable state for User Consent, Redirection, KVM, SOL, IDE-R and One Click Recovery (OCR). + + `optInState` refers to the current Opt In State if the device has User Consent enabled. Valid values: + + - 0 (Not Started) - No sessions in progress or user consent requested + - 1 (Requested) - Request to AMT device for user consent code successful + - 2 (Displayed) - AMT device displaying user consent code for 300 seconds (5 minutes) before timeout by default + - 3 (Received) - User consent code was entered correctly, a redirection session can be started. Will expire after 120 seconds (2 minutes) and return to State 0 if no active redirection session (State 4) + - 4 (In Session) - Active redirection session in progress + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + required: true + schema: + type: string + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/GetAMTFeaturesResponse' + /api/v1/amt/alarmOccurrences/{guid}: + post: + summary: Set new Alarm Clock Occurence + description: Create a new Alarm Clock occurence to wake device for AMT device. + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + requestBody: + description: Payload to set new Alarm Clock + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SetAlarmClockRequest' + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/SetAlarmClockResponse' + get: + summary: Return Alarm Clock Occurences + description: Retrieves all of the current Alarm Clock occurences for the device. + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + required: true + schema: + type: string + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/GetAlarmClockResponse' + delete: + summary: Delete Alarm Clock Occurence + description: | + Delete named Alarm Clock occurence from the device. + + **IMPORTANT**
+ **The DELETE method DOES REQUIRE a Request Body:**

+ **{
+  "Name": "string"
+ }**
+ + Note: Unfortunately, SwaggerHub and OpenAPI 3.0 spec does not allow DELETE requests to have a Request Body for documentation. This has changed for OpenAPI 3.1 although SwaggerHub has not completed their migration from 3.0 -> 3.1 . We apologize for this deviation from the other documentation, please bear with us as we eagerly await the SwaggerHub update. Thank you! + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/DeactivateResponse' + 404: + description: 'Alarm Instance does not exist' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteAlarmErrorResponse' + 500: + description: 'Internal Server Error' + /api/v1/amt/power/state/{guid}: + get: + summary: Return Current Device Power State + description: | + Retrieve current power state of Intel® AMT device, returns a number that maps to a device power state. + Possible power state values: + * 2 = On - corresponding to ACPI state G0 or S0 or D0 + * 3 = Sleep - Light, corresponding to ACPI state G1, S1/S2, or D1 + * 4 = Sleep - Deep, corresponding to ACPI state G1, S3, or D2 + * 6 = Off - Hard, corresponding to ACPI state G3, S5, or D3 + * 7 = Hibernate (Off - Soft), corresponding to ACPI state S4, where the state of the managed element is preserved and will be recovered upon powering on + * 8 = Off - Soft, corresponding to ACPI state G2, S5, or D3 + * 9 = Power Cycle (Off-Hard), corresponds to the managed element reaching the ACPI state G3 followed by ACPI state S0 + * 13 = Off - Hard Graceful, equivalent to Off Hard but preceded by a request to the managed element to perform an orderly shutdown + + OSPowerSavingState values mapping: + * 0 = UNKNOWN + * 1 = UNSUPPORTED + * 2 = FULL_POWER + * 3 = OS_POWER_SAVING + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/PowerStateResponse' + /api/v1/amt/power/capabilities/{guid}: + get: + summary: Return Available Power Actions + description: View what OOB power actions are available for that device. + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/PowerCapabilitiesResponse' + /api/v1/amt/power/action/{guid}: + post: + summary: Perform OOB Power Action (1 to 99) + description: | + Perform an OOB power actions. Execute a [GET /power/capabilities/{guid}](#/AMT/get_api_v1_amt_power_capabilities__guid_) call first to get the list of available power actions. See [AMT Power States](https://device-management-toolkit.github.io/docs/2.27/Reference/powerstates/) for ALL potential power actions.

+ tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + requestBody: + description: | + **Standard Power Actions:** + * 2 = Power up/on + * 5 = Power cycle + * 8 = Power down/off + * 10 = Reset + * 500 = OS to full power + * 501 = OS to power saving + + **Power Actions Requiring Intel LMS:** + * 4 = Sleep + * 7 = Hibernate + * 12 = Soft power down/off + * 14 = Soft reset + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PowerActionRequest' + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/PowerActionResponse' + /api/v1/amt/power/bootOptions/{guid}: + post: + summary: Perform OOB Power Action (100+) + description: | + Perform an OOB power actions numbered 100+. Execute a [GET /power/capabilities/{guid}](#/AMT/get_api_v1_amt_power_capabilities__guid_) call first to get the list of available power actions. See [AMT Power States](https://device-management-toolkit.github.io/docs/2.27/Reference/powerstates/) for ALL potential power actions. + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + requestBody: + description: | + Possible Power Actions: + * 100 = Power up to BIOS settings + * 101 = Reset to BIOS settings + * 105 = Reset to HTTPS Boot + * 106 = Power on HTTPS Boot + * 107 = Reset to PBA Boot + * 108 = Power on to PBA Boot + * 109 = Reset to Win-Re + * 110 = Power up to Win-Re + * 202 = Reset to IDE-R CD-ROM + * 203 = Power on to IDE-R CD-ROM + * 400 = Reset to PXE + * 401 = Power on to PXE + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PowerActionRequest' + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/PowerActionResponse' + /api/v1/amt/power/bootSources/{guid}: + get: + summary: Request for boot source settings information + description: Boot Source settings information for OCR(HTTPs, PBA and Win-Re) + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/BootSourcesResponse' + /api/v1/amt/userConsentCode/{guid}: + get: + summary: Request an user consent code on client device + description: If optInState is 0, it will request for a new user consent code + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/UserConsentResponse' + post: + summary: Send user consent code + description: Send the user consent code displayed on the client device + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + requestBody: + description: '' + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UserConsentRequest' + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/UserConsentResponse' + /api/v1/amt/userConsentCode/cancel/{guid}: + get: + summary: Cancel user consent code + description: Cancel six digit user consent code previously generated on client device + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/UserConsentResponse' + /api/v1/amt/deactivate/{guid}: + delete: + summary: Deactivate AMT over CIRA + description: Deactivate an AMT device using the CIRA channel with MPS rather than RPS RPC. + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/DeactivateResponse' + 404: + description: 'Device does not exist' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteErrorResponse' + 500: + description: 'Internal Server Error' + /api/v1/amt/certificates/{guid}: + get: + summary: Get device certificates + description: Retrieve all certificates associated with the specified AMT device + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/GetCertificatesResponse' + 404: + description: 'Device not found' + content: + application/json: + schema: + $ref: '#/components/schemas/DisconnectErrorResponse' + 500: + description: 'Internal server error' + post: + summary: Add device certificates + description: Add new certificates to the specified AMT device + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + requestBody: + description: Certificate data to add + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AddCertificatesRequest' + responses: + 200: + description: 'Certificates added successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/AddCertificatesResponse' + 400: + description: 'Invalid certificate format (not valid DER or PEM)' + 404: + description: 'Device not found' + content: + application/json: + schema: + $ref: '#/components/schemas/DisconnectErrorResponse' + 500: + description: 'Internal server error' + /api/v1/amt/kvm/displays/{guid}: + get: + summary: Get number of displays information from AMT + description: Retrieve all display information of KVM from AMT + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/GetDisplaysResponse' + 404: + description: 'Device not found' + content: + application/json: + schema: + $ref: '#/components/schemas/DisconnectErrorResponse' + 500: + description: 'Internal server error' + /api/v1/amt/network/linkPreference/{guid}: + post: + summary: Set WiFi Link Preference + description: | + Set Ethernet Link Preference for WiFi ports only. + - **LinkPreference 1 (ME)**: Routes traffic through Management Engine for the specified timeout duration + - **LinkPreference 2 (HOST)**: Routes traffic through host OS (timeout is not applicable) + + **WiFi Port Validation**: This API only works on WiFi ports (PhysicalConnectionType = 3). + It will return a 400 error if attempting to set link preference on wired LAN ports (types 0, 1, or 2). + + **Auto-Detection**: If `instanceID` is not provided, the API will automatically detect and use the first available WiFi port. + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + - name: instanceID + in: query + description: | + InstanceID of the WiFi Ethernet port (e.g., "Intel(r) AMT Ethernet Port Settings 1"). + If not provided, the API will automatically detect the WiFi port. + Must be a WiFi port (PhysicalConnectionType = 3). + required: false + schema: + type: string + example: Intel(r) AMT Ethernet Port Settings 1 + requestBody: + description: Link preference and timeout settings + required: true + content: + application/json: + schema: + type: object + properties: + linkPreference: + type: integer + description: Link preference - 1 = ME, 2 = HOST + enum: [1, 2] + example: 1 + timeout: + type: integer + description: Timeout in seconds + example: 300 + required: + - linkPreference + - timeout + responses: + 200: + description: 'Link preference set successfully' + content: + application/json: + schema: + type: object + properties: + status: + type: string + example: Link Preference set to ME + linkPreference: + type: integer + example: 1 + timeout: + type: integer + example: 300 + instanceID: + type: string + description: The WiFi port InstanceID that was auto-detected + example: Intel(r) AMT Ethernet Port Settings 1 + wifiPort: + type: object + description: Full AMT_EthernetPortSettings information for the WiFi port + properties: + InstanceID: + type: string + example: Intel(r) AMT Ethernet Port Settings 1 + ElementName: + type: string + example: Intel(r) WiFi Link + PhysicalConnectionType: + type: string + description: 'Connection type: 0=Integrated LAN, 1=Discrete LAN, 2=Thunderbolt, 3=Wireless LAN (WiFi)' + example: '3' + MACAddress: + type: string + example: 'AA:BB:CC:DD:EE:FF' + LinkIsUp: + type: boolean + example: true + 400: + description: 'Validation error - port is not a WiFi port or no WiFi port found' + content: + application/json: + schema: + type: object + properties: + error: + type: string + example: 'SetLinkPreference is only applicable for WiFi ports. InstanceID "Intel(r) AMT Ethernet Port Settings 0" has PhysicalConnectionType=0 (0=Integrated LAN, 1=Discrete LAN, 2=Thunderbolt). WiFi ports have type 3 (Wireless LAN).' + 404: + description: 'Device not found' + content: + application/json: + schema: + $ref: '#/components/schemas/DisconnectErrorResponse' + 500: + description: 'Internal server error' + /api/v1/amt/screen/{guid}: + put: + summary: Put the changed settings for KVM in AMT + description: Modify screen settings for KVM in AMT device + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + requestBody: + description: Screen Setting data to update + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateDisplaySettingsRequest' + responses: + 200: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateDisplaySettingsResponse' + 404: + description: 'Device not found' + content: + application/json: + schema: + $ref: '#/components/schemas/DisconnectErrorResponse' + 500: + description: 'Internal server error' + /api/v1/devices: + get: + summary: List All Known Devices + description: Lists all devices known to MPS. + tags: + - Devices + parameters: + - in: query + name: $count + required: false + schema: + type: boolean + description: If set to true, return `totalCount` of devices with `data` array of devices + - in: query + name: $skip + required: false + schema: + type: integer + description: The number of items to skip before starting to collect the result set + - in: query + name: $top + required: false + schema: + type: integer + description: The number of items to return + - in: query + name: friendlyName + description: Device friendly name to query for. Maximum length 255 + example: 'friendlyName=myname' + required: false + schema: + type: string + - in: query + name: hostname + description: Device hostname to query for. Maximum length 255 + example: 'hostname=mydevice' + required: false + schema: + type: string + - in: query + name: method + description: Specify a conditional operator 'AND' or 'OR' to fetch the records with given tags . + example: 'method=AND' + required: false + schema: + type: string + - in: query + name: status + description: Specify '0' to query for disconnected devices or specify '1' for connected devices. To return all devices, omit this query parameter. + example: 'status=1' + required: false + schema: + type: integer + - in: query + name: tags + description: Comma-delimited list of tags to query for + example: 'tags=NUC,Store #123' + required: false + schema: + type: string + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + oneOf: + - type: array + items: + $ref: '#/components/schemas/Device' + - $ref: '#/components/schemas/CountDevicesResponse' + 500: + description: 'Internal server error' + post: + summary: Add New Device to MPS + description: Adds a new device to MPS. This call does not add the device credentials. In order for MPS to manage the device, a separate call to Vault must be made to add the credentials. For example, the Remote Provision Server (RPS) makes the call to Vault to add the AMT device credentials during activation of the AMT device. + tags: + - Devices + requestBody: + description: Payload to add AMT device to MPS + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AddDevice' + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AddDeviceResponse' + 500: + description: 'Internal server error' + patch: + summary: Edit a Device + description: Edit a single device in the MPS. This call does not edit the AMT device credentials. To update these, a separate call to Vault must be made. For example, the Remote Provision Server (RPS) makes the call to Vault to add the AMT device credentials during activation of the AMT device. + tags: + - Devices + requestBody: + description: Payload to edit AMT device in MPS + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EditDevice' + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EditDeviceResponse' + 500: + description: 'Internal server error' + /api/v1/devices/redirectStatus/{guid}: + get: + summary: Find Redirection State of Device by GUID + description: Retrieves boolean values for KVM, SOL, and IDER session states. + tags: + - Devices + parameters: + - name: guid + in: path + description: GUID of device to return + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 400: + description: 'Error in request. A list of errors will be returned' + 404: + description: 'Device does not exist' + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/RedirectStatus' + 500: + description: 'Internal server error' + /api/v1/devices/stats: + get: + summary: Return Count of All Devices by Connection Status + description: Retrieve the current count of all registered, connected, and disconnected devices. + tags: + - Devices + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/Stats' + /api/v1/devices/{guid}: + get: + summary: Find Device by GUID + description: Retrieves the device with a specific GUID and all device information from the database. + tags: + - Devices + parameters: + - name: guid + in: path + description: GUID of device to return + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 400: + description: 'Error in request. A list of errors will be returned' + 404: + description: 'Device does not exist' + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/Device' + 500: + description: 'Internal server error' + delete: + summary: Delete Device Information + description: Removes the device with a specific GUID and all device information from the database. This will prevent the device from connecting to MPS, even if the device has not yet been unprovisioned. Use the disconnect API after this call to remove a device and prevent it from reconnecting to the MPS. + tags: + - Devices + parameters: + - name: guid + in: path + description: GUID of device to return + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + - name: isSecretToBeDeleted + in: query + description: 'Delete device information from both the Database **AND Secret Storage**. Caution: This will delete the stored device passwords in Secret Storage.' + example: isSecretToBeDeleted=true + schema: + type: boolean + responses: + 404: + description: 'Device does not exist' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteErrorResponse' + 204: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteResponse' + 500: + description: 'Internal server error' + /api/v1/devices/disconnect/{guid}: + delete: + summary: Disconnect Device + description: Forces a specified device to disconnect from the MPS. Device will reconnect again if it is able. To prevent reconnection, first [delete the device information](#/Devices/delete_api_v1_devices__guid_) from MPS. + tags: + - Devices + parameters: + - name: guid + in: path + description: GUID of device to return + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 404: + description: 'Device does not exist' + content: + application/json: + schema: + $ref: '#/components/schemas/DisconnectErrorResponse' + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/DisconnectResponse' + 500: + description: 'Request failed while disconnecting device.' + /api/v1/devices/refresh/{guid}: + delete: + summary: Refresh Stored AMT Password + description: | + Delete the device's existing cached AMT password and refresh the cache from the secret store. + + Internal API. After running the RPC [changePassword](https://device-management-toolkit.github.io/docs/2.27/Reference/RPC/commandsRPC/#changepassword) maintenance command, RPS must call this MPS endpoint to update the stored password secrets. Otherwise, all MPS API calls that require device credentials (e.g. Power Actions) will fail due to MPS using the old AMT password. + tags: + - Devices + parameters: + - name: guid + in: path + description: GUID of device to return + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + responses: + 404: + description: 'Device does not exist or cannot be found' + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/RefreshResponse' + 500: + description: 'Exception during Device Refresh' + /api/v1/ciracert: + get: + summary: Return CIRA Certificate + description: Returns the self-signed CIRA Certificate for the MPS Instance. Used for creation of CIRA Config in RPS. + tags: + - Misc + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/CiracertResponse' + /api/v1/health: + get: + summary: Return Status of DB and Secret Store + description: Returns statuses for the database and secret store that MPS is attempting to connect to. + tags: + - Misc + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/HealthcheckResponse' + /api/v1/version: + get: + tags: + - Misc + summary: Get Version + operationId: GetVersion + description: Returns the version of the service and the supported protocol version. The protocol version is used to check compatibility with RPC + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/VersionResponse' + deprecated: false +components: + securitySchemes: + BearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + schemas: + AuditLogResponse: + title: AuditLogResponse + type: object + properties: + totalCnt: + type: integer + description: Total number of audit log records + records: + type: array + items: + $ref: '#/components/schemas/AuditLogRecord' + description: Array of audit log records + example: + totalCnt: 2 + records: + - AuditAppID: 18 + EventID: 10 + InitiatorType: 0 + AuditApp: 'Redirection Manager' + Event: 'KVM Enabled' + Initiator: 'admin' + Time: '2003-12-29T05:46:37.000Z' + MCLocationType: 0 + NetAddress: '1.2.3.4' + Ex: '' + ExStr: null + - AuditAppID: 16 + EventID: 19 + InitiatorType: 0 + AuditApp: 'Security Admin' + Event: 'Unprovisioning Started' + Initiator: 'admin' + Time: '2017-12-21T17:30:39.000Z' + MCLocationType: 1 + NetAddress: '::1' + Ex: '' + ExStr: 'Remote WSMAN' + + AuditLogRecord: + title: AuditLogRecord + type: object + properties: + AuditAppID: + type: integer + EventID: + type: integer + InitiatorType: + type: integer + AuditApp: + type: string + Event: + type: string + Initiator: + type: string + Time: + type: string + format: date-time + MCLocationType: + type: integer + NetAddress: + type: string + Ex: + type: string + ExStr: + type: string + nullable: true + EventLogResponse: + title: EventLogResponse + type: array + items: + $ref: '#/components/schemas/EventLogRecord' + example: + - DeviceAddress: 255 + EventSensorType: 15 + EventType: 111 + EventOffset: 2 + EventSourceType: 104 + EventSeverity: 1 + SensorNumber: 255 + Entity: 34 + EntityInstance: 0 + EventData: [64, 6, 0, 0, 0, 0, 0, 0] + TimeStamp: '2019-04-11T17:57:40.000Z' + EntityStr: 'BIOS' + Desc: 'USB resource configuration' + - DeviceAddress: 255 + EventSensorType: 6 + EventType: 111 + EventOffset: 1 + EventSourceType: 104 + EventSeverity: 1 + SensorNumber: 255 + Entity: 34 + EntityInstance: 0 + EventData: [32, 3, 0, 0, 0, 0, 0, 0] + TimeStamp: '2019-04-11T17:58:15.000Z' + EntityStr: 'BIOS' + Desc: 'Authentication failed 3 times. The system may be under attack.' + + EventLogRecord: + title: EventLogRecord + type: object + properties: + DeviceAddress: + type: integer + EventSensorType: + type: integer + EventType: + type: integer + EventOffset: + type: integer + EventSourceType: + type: integer + EventSeverity: + type: integer + SensorNumber: + type: integer + Entity: + type: integer + EntityInstance: + type: integer + EventData: + type: array + items: + type: integer + TimeStamp: + type: string + EntityStr: + type: string + Desc: + type: string + AMTVersionResponse: + title: VersionResponse + properties: + CIM_SoftwareIdentity: + type: object + properties: + responses: + type: array + items: + type: object + properties: + InstanceID: + type: string + IsEntity: + type: boolean + VersionString: + type: string + status: + type: integer + AMT_SetupAndConfigurationService: + type: object + properties: + response: + type: object + properties: + CreationClassName: + type: string + ElementName: + type: string + EnabledState: + type: integer + Name: + type: string + PasswordModel: + type: integer + ProvisioningMode: + type: integer + ProvisioningServerOTP: + type: string + ProvisioningState: + type: integer + RequestedState: + type: integer + SystemCreationClassName: + type: string + SystemName: + type: string + ZeroTouchConfigurationEnabled: + type: boolean + responses: + type: object + properties: + Header: + type: object + properties: + To: + type: string + RelatesTo: + type: string + Action: + type: string + MessageID: + type: string + ResourceURI: + type: string + Method: + type: string + Body: + type: object + properties: + CreationClassName: + type: string + ElementName: + type: string + EnabledState: + type: integer + Name: + type: string + PasswordModel: + type: integer + ProvisioningMode: + type: integer + ProvisioningServerOTP: + type: string + ProvisioningState: + type: integer + RequestedState: + type: integer + SystemCreationClassName: + type: string + SystemName: + type: string + ZeroTouchConfigurationEnabled: + type: boolean + status: + type: integer + example: + CIM_SoftwareIdentity: + responses: + - InstanceID: Flash + IsEntity: true + VersionString: 11.8.50 + - InstanceID: Netstack + IsEntity: true + VersionString: 11.8.50 + - InstanceID: AMTApps + IsEntity: true + VersionString: 11.8.50 + - InstanceID: AMT + IsEntity: true + VersionString: 11.8.50 + - InstanceID: Sku + IsEntity: true + VersionString: 16392 + - InstanceID: VendorID + IsEntity: true + VersionString: 8086 + - InstanceID: Build Number + IsEntity: true + VersionString: 3425 + - InstanceID: Recovery Version + IsEntity: true + VersionString: 11.8.50 + - InstanceID: Recovery Build Num + IsEntity: true + VersionString: 3425 + - InstanceID: Legacy Mode + IsEntity: true + VersionString: 'False' + - InstanceID: AMT FW Core Version + IsEntity: true + VersionString: 11.8.50 + status: 200 + AMT_SetupAndConfigurationService: + response: + CreationClassName: AMT_SetupAndConfigurationService + ElementName: Intel(r) AMT Setup and Configuration Service + EnabledState: 5 + Name: Intel(r) AMT Setup and Configuration Service + PasswordModel: 1 + ProvisioningMode: 1 + ProvisioningServerOTP: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + ProvisioningState: 2 + RequestedState: 12 + SystemCreationClassName: CIM_ComputerSystem + SystemName: Intel(r) AMT + ZeroTouchConfigurationEnabled: true + responses: + Header: + To: http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + RelatesTo: 3 + Action: http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse + MessageID: uuid:00000000-8086-8086-8086-0000000006A4 + ResourceURI: http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SetupAndConfigurationService + Method: AMT_SetupAndConfigurationService + Body: + CreationClassName: AMT_SetupAndConfigurationService + ElementName: Intel(r) AMT Setup and Configuration Service + EnabledState: 5 + Name: Intel(r) AMT Setup and Configuration Service + PasswordModel: 1 + ProvisioningMode: 1 + ProvisioningServerOTP: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + ProvisioningState: 2 + RequestedState: 12 + SystemCreationClassName: CIM_ComputerSystem + SystemName: Intel(r) AMT + ZeroTouchConfigurationEnabled: true + status: 200 + GeneralSettingsResponse: + title: GeneralSettingsResponse + example: + Header: + To: http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + RelatesTo: '1' + Action: http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse + MessageID: uuid:00000000-8086-8086-8086-000000000699 + ResourceURI: http://intel.com/wbem/wscim/1/amt-schema/1/AMT_GeneralSettings + Method: AMT_GeneralSettings + Body: + AMTNetworkEnabled: 1 + DDNSPeriodicUpdateInterval: 1440 + DDNSTTL: 900 + DDNSUpdateByDHCPServerEnabled: true + DDNSUpdateEnabled: false + DHCPv6ConfigurationTimeout: 0 + DigestRealm: Digest:A4070000000000000000000000000000 + DomainName: '' + ElementName: 'Intel(r) AMT: General Settings' + Hostname: '' + HostOSFQDN: 'GEN7-AMT118-W10' + IdleWakeTimeout: 65535 + InstanceID: 'Intel(r) AMT: General Settings' + NetworkInterfaceEnabled: true + PingResponseEnabled: true + PowerSource: 0 + PreferredAddressFamily: 0 + PresenceNotificationInterval: 0 + PrivacyLevel: 0 + RmcpPingResponseEnabled: true + SharedFQDN: true + WsmanOnlyMode: false + properties: + Header: + type: object + properties: + To: + type: string + RelatesTo: + type: string + Action: + type: string + MessageID: + type: string + ResourceURI: + type: string + Method: + type: string + Body: + type: object + properties: + AMTNetworkEnabled: + type: integer + DDNSPeriodicUpdateInterval: + type: integer + DDNSTTL: + type: integer + DDNSUpdateByDHCPServerEnabled: + type: boolean + DDNSUpdateEnabled: + type: boolean + DHCPv6ConfigurationTimeout: + type: integer + DigestRealm: + type: string + DomainName: + type: string + ElementName: + type: string + HostName: + type: string + HostOSFQDN: + type: string + IdleWakeTimeout: + type: integer + InstanceID: + type: string + NetworkInterfaceEnabled: + type: boolean + PingResponseEnabled: + type: boolean + PowerSource: + type: integer + PreferredAddressFamily: + type: integer + PresenceNotificationInterval: + type: integer + PrivacyLevel: + type: integer + RmcpPingResponseEnabled: + type: boolean + SharedFQDN: + type: boolean + WsmanOnlyMode: + type: boolean + HardwareInfoResponse: + title: HardwareInfoResponse + properties: + CIM_ComputerSystemPackage: + type: object + properties: + response: + type: object + properties: + Antecedent: + type: object + properties: + Address: + type: string + ReferenceParameters: + type: object + properties: + ResourceURI: + type: string + SelectorSet: + type: object + properties: + Selector: + type: object + properties: + value: + type: string + '@name': + type: string + Dependent: + type: object + properties: + Address: + type: string + ReferenceParameters: + type: object + properties: + ResourceURI: + type: string + SelectorSet: + type: object + properties: + Selector: + type: object + properties: + value: + type: string + '@name': + type: string + PlatformGUID: + type: string + status: + type: integer + CIM_SystemPackaging: + type: object + properties: + responses: + type: object + properties: + Antecedent: + type: object + properties: + Address: + type: string + ReferenceParameters: + type: object + properties: + ResourceURI: + type: string + SelectorSet: + type: object + properties: + Selector: + type: object + properties: + value: + type: string + '@name': + type: string + dependent: + type: object + properties: + Address: + type: string + ReferenceParameters: + type: object + properties: + ResourceURI: + type: string + SelectorSet: + type: object + properties: + Selector: + type: object + properties: + value: + type: string + '@name': + type: string + PlatformGUID: + type: string + status: + type: integer + CIM_Chassis: + type: object + properties: + response: + type: object + properties: + ChassisPackageType: + type: integer + CreationClassName: + type: string + ElementName: + type: string + Manufacturer: + type: string + Model: + type: string + OperationalStatus: + type: integer + PackageType: + type: integer + SerialNumber: + type: string + Tag: + type: string + Version: + type: string + responses: + type: object + properties: + Header: + type: object + properties: + To: + type: string + RelatesTo: + type: integer + Action: + type: string + MessageID: + type: string + ResourceURI: + type: string + Method: + type: string + Body: + type: object + properties: + ChassisPackageType: + type: integer + CreationClassName: + type: string + ElementName: + type: string + Manufacturer: + type: string + Model: + type: string + OperationalStatus: + type: integer + PackageType: + type: integer + SerialNumber: + type: string + Tag: + type: string + Version: + type: string + status: + type: integer + CIM_Chip: + type: object + properties: + responses: + type: array + items: + type: object + properties: + CanBeFRUed: + type: boolean + CreationClassName: + type: string + ElementName: + type: string + Manufacturer: + type: string + OperationalStatus: + type: integer + Tag: + type: string + Version: + type: string + BankLabel: + type: string + Capacity: + type: integer + FormFactor: + type: integer + MemoryType: + type: integer + PartNumber: + type: string + SerialNumber: + type: string + Speed: + type: integer + status: + type: integer + CIM_Card: + type: object + properties: + response: + type: object + properties: + CanBeFRUed: + type: boolean + CreationClassName: + type: string + ElementName: + type: string + Manufacturer: + type: string + Model: + type: string + OperationalStatus: + type: integer + PackageType: + type: integer + SerialNumber: + type: string + Tag: + type: string + Version: + type: string + responses: + type: object + properties: + Header: + type: object + properties: + To: + type: string + RelatesTo: + type: integer + Action: + type: string + MessageID: + type: string + ResourceURI: + type: string + Method: + type: string + Body: + type: object + properties: + CanBeFRUed: + type: boolean + CreationClassName: + type: string + ElementName: + type: string + Manufacturer: + type: string + Model: + type: string + OperationalStatus: + type: integer + PackageType: + type: integer + SerialNumber: + type: string + Tag: + type: string + Version: + type: string + status: + type: integer + CIM_BIOSElement: + type: object + properties: + response: + type: object + properties: + ElementName: + type: string + Manufacturer: + type: string + Name: + type: string + OperationalStatus: + type: integer + PrimaryBIOS: + type: boolean + ReleaseDate: + type: object + properties: + Datetime: + type: string + SoftwareElementID: + type: string + SoftwareElementState: + type: integer + TargetOperatingSystem: + type: integer + Version: + type: string + responses: + type: object + properties: + Header: + type: object + properties: + To: + type: string + RelatesTo: + type: integer + Action: + type: string + MessageID: + type: string + ResourceURI: + type: string + Method: + type: string + Body: + type: object + properties: + ElementName: + type: string + Manufacturer: + type: string + Name: + type: string + OperationalStatus: + type: integer + PrimaryBIOS: + type: boolean + ReleaseDate: + type: object + properties: + Datetime: + type: string + SoftwareElementID: + type: string + SoftwareElementState: + type: integer + TargetOperatingSystem: + type: integer + Version: + type: string + status: + type: integer + CIM_Processor: + type: object + properties: + responses: + type: array + items: + type: object + properties: + CPUStatus: + type: integer + CreationClassName: + type: string + CurrentClockSpeed: + type: integer + DeviceID: + type: string + ElementName: + type: string + EnabledState: + type: integer + ExternalBusClockSpeed: + type: integer + Family: + type: integer + HealthState: + type: integer + MaxClockSpeed: + type: integer + OperationalStatus: + type: integer + RequestedState: + type: integer + Role: + type: string + Stepping: + type: integer + SystemCreationClassName: + type: string + SystemName: + type: string + UpgradeMethod: + type: integer + status: + type: integer + CIM_PhysicalMemory: + type: object + properties: + responses: + type: array + items: + type: object + properties: + BankLabel: + type: string + Capacity: + type: integer + CreationClassName: + type: string + ElementName: + type: string + FormFactor: + type: integer + Manufacturer: + type: string + MemoryType: + type: integer + PartNumber: + type: string + SerialNumber: + type: string + Speed: + type: integer + Tag: + type: integer + status: + type: integer + CIM_MediaAccessDevice: + type: object + properties: + responses: + type: array + items: + type: object + properties: + Capabilities: + type: array + items: + type: integer + CreationClassName: + type: string + DeviceID: + type: string + ElementName: + type: string + EnabledDefault: + type: integer + EnabledState: + type: integer + MaxMediaSize: + type: integer + OperationalStatus: + type: integer + RequestedState: + type: integer + Security: + type: integer + SystemCreationClassName: + type: string + SystemName: + type: string + status: + type: integer + CIM_PhysicalPackage: + type: object + properties: + responses: + type: array + items: + type: object + properties: + CanBeFRUed: + type: boolean + CreationClassName: + type: string + ElementName: + type: string + Manufacturer: + type: string + Model: + type: string + OperationalStatus: + type: integer + PackageType: + type: integer + SerialNumber: + type: string + Tag: + type: string + Version: + type: string + ChassisPackageType: + type: integer + status: + type: integer + example: + CIM_ComputerSystemPackage: + response: + Antecedent: + Address: http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + ReferenceParameters: + ResourceURI: http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/ CIM_Chassis + SelectorSet: + Selector: + - value: CIM_Chassis + '@name': CreationClassName + - value: CIM_Chassis + '@name': Tag + Dependent: + Address: http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + ReferenceParameters: + ResourceURI: http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/ CIM_ComputerSystem + SelectorSet: + Selector: + - value: CIM_ComputerSystem + '@name': CreationClassName + - value: ManagedSystem + '@name': Name + PlatformGUID: 1095AC4BA6042143BAE2D45DDF07B684 + status: 200 + CIM_SystemPackaging: + responses: + - Antecedent: + Address: http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + ReferenceParameters: + ResourceURI: http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/ CIM_Chassis + SelectorSet: + Selector: + - value: CIM_Chassis + '@name': CreationClassName + - value: CIM_Chassis + '@name': Tag + Dependent: + Address: http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + ReferenceParameters: + ResourceURI: http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/ CIM_ComputerSystem + SelectorSet: + Selector: + - value: CIM_ComputerSystem + '@name': CreationClassName + - value: ManagedSystem + '@name': Name + PlatformGUID: 1095AC4BA6042143BAE2D45DDF07B684 + status: 200 + CIM_Chassis: + response: + ChassisPackageType: 0 + CreationClassName: CIM_Chassis + ElementName: Managed System Chassis + Manufacturer: Intel Corporation + Model: NUC7i5DNHE + OperationalStatus: 0 + PackageType: 3 + SerialNumber: DW1646647500075 + Tag: CIM_Chassis + Version: J57828-503 + status: 200 + CIM_Chip: + responses: + - CanBeFRUed: true + CreationClassName: CIM_Chip + ElementName: Managed System Processor Chip + Manufacturer: Intel(R) Corporation + OperationalStatus: 0 + Tag: CPU 0 + Version: Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz + - BankLabel: BANK 0 + Capacity: 4294967296 + CreationClassName: CIM_PhysicalMemory + ElementName: Managed System Memory Chip + FormFactor: 13 + Manufacturer: 04EF + MemoryType: 26 + PartNumber: 'TEAMGROUP-SD4-2133 ' + SerialNumber: 020300C5 + Speed: 0 + Tag: 9876543210 + - BankLabel: BANK 2 + Capacity: 4294967296 + CreationClassName: CIM_PhysicalMemory + ElementName: Managed System Memory Chip + FormFactor: 13 + Manufacturer: 04EF + MemoryType: 26 + PartNumber: 'TEAMGROUP-SD4-2133 ' + SerialNumber: 020300BD + Speed: 0 + Tag: 9876543210 (#2) + status: 200 + CIM_Card: + response: + CanBeFRUed: true + CreationClassName: CIM_Card + ElementName: Managed System Base Board + Manufacturer: Intel Corporation + Model: NUC7i5DNB + OperationalStatus: 0 + PackageType: 9 + SerialNumber: BTDN7490016E + Tag: CIM_Card + Version: J57626-503 + status: 200 + CIM_BIOSElement: + response: + ElementName: Primary BIOS + Manufacturer: Intel Corp. + Name: Primary BIOS + OperationalStatus: 0 + PrimaryBIOS: true + ReleaseDate: + Datetime: '2018-03-15T00:00:00Z' + SoftwareElementID: DNKBLi5v.86A.0040.2018.0315.1451 + SoftwareElementState: 2 + TargetOperatingSystem: 66 + Version: DNKBLi5v.86A.0040.2018.0315.1451 + status: 200 + CIM_Processor: + responses: + - CPUStatus: 1 + CreationClassName: CIM_Processor + CurrentClockSpeed: 2500 + DeviceID: CPU 0 + ElementName: Managed System CPU + EnabledState: 2 + ExternalBusClockSpeed: 100 + Family: 205 + HealthState: 0 + MaxClockSpeed: 8300 + OperationalStatus: 0 + RequestedState: 12 + Role: Central + Stepping: 9 + SystemCreationClassName: CIM_ComputerSystem + SystemName: ManagedSystem + UpgradeMethod: 2 + status: 200 + CIM_PhysicalMemory: + responses: + - BankLabel: BANK 0 + Capacity: 4294967296 + CreationClassName: CIM_PhysicalMemory + ElementName: Managed System Memory Chip + FormFactor: 13 + Manufacturer: 04EF + MemoryType: 26 + PartNumber: 'TEAMGROUP-SD4-2133 ' + SerialNumber: 020300C5 + Speed: 0 + Tag: 9876543210 + - BankLabel: BANK 2 + Capacity: 4294967296 + CreationClassName: CIM_PhysicalMemory + ElementName: Managed System Memory Chip + FormFactor: 13 + Manufacturer: 04EF + MemoryType: 26 + PartNumber: 'TEAMGROUP-SD4-2133 ' + SerialNumber: 020300BD + Speed: 0 + Tag: 9876543210 (#2) + status: 200 + CIM_MediaAccessDevice: + responses: + - Capabilities: + - 4 + - 10 + CreationClassName: CIM_MediaAccessDevice + DeviceID: MEDIA DEV 0 + ElementName: Managed System Media Access Device + EnabledDefault: 2 + EnabledState: 0 + MaxMediaSize: 250059350 + OperationalStatus: 0 + RequestedState: 12 + Security: 2 + SystemCreationClassName: CIM_ComputerSystem + SystemName: ManagedSystem + status: 200 + CIM_PhysicalPackage: + responses: + - CanBeFRUed: true + CreationClassName: CIM_Card + ElementName: Managed System Base Board + Manufacturer: Intel Corporation + Model: NUC7i5DNB + OperationalStatus: 0 + PackageType: 9 + SerialNumber: BTDN7490016E + Tag: CIM_Card + Version: J57626-503 + - CreationClassName: CIM_PhysicalPackage + ElementName: Managed System Storage Media Package + Model: 'Samsung SSD 850 EVO M.2 250GB ' + OperationalStatus: 0 + PackageType: 15 + SerialNumber: 'S33CNX0JC36654D ' + Tag: Storage Media Package 0 + - ChassisPackageType: 0 + CreationClassName: CIM_Chassis + ElementName: Managed System Chassis + Manufacturer: Intel Corporation + Model: NUC7i5DNHE + OperationalStatus: 0 + PackageType: 3 + SerialNumber: DW1646647500075 + Tag: CIM_Chassis + Version: J57828-503 + status: 200 + SetAMTFeaturesRequest: + title: SetAMTFeaturesRequest + required: + - userConsent + - enableSOL + - enableIDER + - enableKVM + properties: + userConsent: + type: string + enum: + - kvm + - all + - none + redirection: + type: boolean + enableSOL: + type: boolean + enableIDER: + type: boolean + enableKVM: + type: boolean + enableAll: + type: boolean + ocr: + type: boolean + SetAMTFeaturesResponse: + type: string + example: + status: 'Updated AMT Features' + properties: + status: + type: string + GetAMTFeaturesResponse: + title: GetAMTFeaturesResponse + properties: + userConsent: + type: string + redirection: + type: boolean + KVM: + type: boolean + SOL: + type: boolean + IDER: + type: boolean + optInState: + type: integer + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + ocr: + type: boolean + httpsBootSupported: + type: boolean + localPBABootSupported: + type: boolean + winREBootSupported: + type: boolean + remoteErase: + type: boolean + example: + userConsent: kvm + redirection: false + KVM: false + SOL: true + IDER: true + optInState: 0 + ocr: true + httpsBootSupported: true + winREBootSupported: true + localPBABootSupported: true + remoteErase: false + + SetAlarmClockRequest: + title: SetAlarmClockRequest + required: + - ElementName + - StartTime + - Interval + - DeleteOnCompletion + properties: + ElementName: + type: string + StartTime: + type: string + format: date-time + Interval: + type: integer + DeleteOnCompletion: + type: boolean + SetAlarmClockResponse: + type: string + example: + status: 'SUCCESS' + ReturnValue: 0 + properties: + status: + type: string + ReturnValue: + type: integer + GetAlarmClockResponse: + title: GetAlarmClockResponse + properties: + ElementName: + type: string + InstanceID: + type: string + StartTime: + type: object + properties: + DateTime: + type: string + format: date-time + Interval: + type: object + properties: + Interval: + type: string + DeleteOnCompletion: + type: boolean + example: + DeleteOnCompletion: false + ElementName: testAlarm + InstanceID: testAlarm + Interval: + Interval: PT10M + StartTime: + DateTime: 2024-12-31T23:59:00Z + DeleteAlarmErrorResponse: + title: DeleteAlarmErrorResponse + example: + error: 'Alarm instance not found' + errorDescription: 'Alarm occurrence delete request failed for guid : 4c4c4544-005a-3510-8047-b4c04f564433.' + properties: + success: + description: HTTP returncode + type: integer + error: + description: server error message + type: string + errorDescription: + description: contains device guid + type: string + PowerStateResponse: + title: PowerStateResponse + example: + powerstate: 2 + OSPowerSavingState: 2 + properties: + powerstate: + type: integer + OSPowerSavingState: + type: integer + PowerCapabilitiesResponse: + title: PowerCapabilitiesResponse + properties: + powerUp: + type: integer + powerCycle: + type: integer + powerDown: + type: integer + reset: + type: integer + softOff: + type: integer + softReset: + type: integer + sleep: + type: integer + hibernate: + type: integer + powerUpToBIOS: + type: integer + resetToBIOS: + type: integer + resetToSecureErase: + type: integer + resetToIDE-RFloppy: + type: integer + powerOnToIDE-RFloppy: + type: integer + resetToIDE-RCDROM: + type: integer + powerOnToIDE-RCDROM: + type: integer + resetToPXE: + type: integer + powerOnToPXE: + type: integer + example: + Power up: 2 + Power cycle: 5 + Power down: 8 + Reset: 10 + Soft-off: 12 + Soft-reset: 14 + Sleep: 4 + Hibernate: 7 + Power up to BIOS: 100 + Reset to BIOS: 101 + Reset to Secure Erase: 104 + Reset to IDE-R Floppy: 200 + Power on to IDE-R Floppy: 201 + Reset to IDE-R CDROM: 202 + Power on to IDE-R CDROM: 203 + Reset to PXE: 400 + Power on to PXE: 401 + PowerActionRequest: + title: PowerActionRequest + required: + - action + - useSOL + example: + action: 8 + useSOL: false + properties: + action: + type: integer + enum: + - 2 + - 5 + - 8 + - 10 + - 4 + - 7 + - 12 + - 14 + - 100 + - 101 + - 104 + - 105 + - 106 + - 107 + - 108 + - 109 + - 110 + - 200 + - 201 + - 202 + - 203 + - 300 + - 301 + - 400 + - 401 + - 500 + - 501 + useSOL: + type: boolean + bootDetails: + type: object + properties: + url: + type: string + username: + type: string + password: + type: string + description: Password for authentication + bootPath: + type: string + description: Boot path for PBA and WinRE boot scenarios + enforceSecureBoot: + type: boolean + PowerActionResponse: + title: PowerActionResponse + example: + Header: + To: 'http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous' + RelatesTo: 0 + Action: 'http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService/RequestPowerStateChangeResponse' + MessageID: 'uuid:00000000-8086-8086-8086-0000000450A6' + ResourceURI: 'http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService' + Body: + ReturnValue: 0 + ReturnValueStr: SUCCESS + properties: + Body: + type: object + properties: + ReturnValue: + type: integer + ReturnValueStr: + type: string + UserConsentRequest: + required: + - consentCode + example: + consentCode: 123456 + properties: + consentCode: + type: integer + UserConsentResponse: + type: object + example: + Header: + Action: 'http://intel.com/wbem/wscim/1/ips-schema/1/IPS_OptInService/StartOptInResponse' + MessageID: 'uuid:00000000-8086-8086-8086-000000001ACD' + Method: 'StartOptIn' + RelatesTo: '1' + ResourceURI: 'http://intel.com/wbem/wscim/1/ips-schema/1/IPS_OptInService' + To: 'http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous' + Body: + ReturnValue: 0 + ReturnValueStr: 'SUCCESS' + properties: + Header: + type: object + properties: + To: + type: string + RelatesTo: + type: string + Action: + type: string + MessageID: + type: string + ResourceURI: + type: string + Method: + type: string + Body: + type: object + properties: + ReturnValue: + type: integer + ReturnValueStr: + type: string + DeactivateResponse: + title: DeactivateResponse + example: + status: SUCCESS + properties: + status: + type: string + Device: + title: Device + example: + guid: '123e4567-e89b-12d3-a456-426614174000' + hostname: 'AMTDEVICENUC1' + tags: ['Texas', 'NUC', 'Store #123'] + mpsInstance: 'test.mystack.com' + connectionStatus: true + mpsusername: 'admin' + tenantId: '' + friendlyName: '' + dnsSuffix: '' + deviceInfo: + { + 'fwVersion': '16.1', + 'fwBuild': '1111', + 'fwSku': '16392', + 'currentMode': '0', + 'features': 'AMT Pro Corporate', + 'ipAddress': '', + 'lastUpdate': '2023-11-13T17:20:59.043Z' + } + lastConnected: '2023-11-13T17:21:57.885Z' + lastSeen: '2023-11-13T17:33:57.915Z' + lastDisconnected: '2023-11-13T17:22:57.885Z' + properties: + guid: + type: string + hostname: + type: string + tags: + type: array + items: + type: string + mpsInstance: + type: string + connectionStatus: + type: boolean + mpsusername: + type: string + tenantid: + type: string + friendlyName: + type: string + dnsSuffix: + type: string + lastConnected: + type: string + format: date-time + lastSeen: + type: string + format: date-time + lastDisconnected: + type: string + format: date-time + deviceInfo: + type: object + properties: + fwVersion: + type: string + fwBuild: + type: string + fwSku: + type: string + currentMode: + type: string + features: + type: string + ipAddress: + type: string + lastUpdated: + type: string + format: date-time + CountDevicesResponse: + title: CountDevicesResponse + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Device' + totalCount: + type: integer + AddDevice: + title: AddDevice + required: + - guid + - hostname + - tags + example: + guid: '123e4567-e89b-12d3-a456-426614174000' + hostname: 'AMTDEVICENUC1' + friendlyName: 'store12pos2' + tags: ['Texas', 'NUC', 'Store #123'] + properties: + guid: + type: string + hostname: + type: string + tags: + type: array + items: + type: string + deviceInfo: + type: object + properties: + fwVersion: + type: string + fwBuild: + type: string + fwSku: + type: string + currentMode: + type: string + ipAddress: + type: string + AddDeviceResponse: + title: DeviceResponse + required: + - guid + - hostname + - tags + - mpsInstance + - connectionStatus + - mpsusername + - tenantID + - friendlyName + - dnsSuffix + example: + guid: '123e4567-e89b-12d3-a456-426614174000' + hostname: 'AMTDEVICENUC1' + tags: ['Texas', 'NUC', 'Store #123'] + mpsInstance: null + connectionStatus: false + mpsusername: null + tenantID: '' + friendlyName: 'store12pos2' + dnsSuffix: null + deviceInfo: + { + 'fwVersion': '16.1', + 'fwBuild': '1111', + 'fwSku': '16392', + 'currentMode': '0', + 'features': 'AMT Pro Corporate', + 'ipAddress': '', + 'lastUpdated': '2023-11-13T17:20:59.043Z' + } + lastConnected: '2023-11-13T17:21:57.885Z' + lastSeen: '2023-11-13T17:33:57.915Z' + lastDisconnected: '2023-11-13T17:22:57.885Z' + properties: + guid: + type: string + hostname: + type: string + dnsSuffix: + type: string + tags: + type: array + items: + type: string + mpsInstance: + type: string + connectionStatus: + type: boolean + mpsusername: + type: string + tenantID: + type: string + friendlyName: + type: string + lastConnected: + type: string + format: date-time + lastSeen: + type: string + format: date-time + lastDisconnected: + type: string + format: date-time + deviceInfo: + type: object + properties: + fwVersion: + type: string + fwBuild: + type: string + fwSku: + type: string + currentMode: + type: string + features: + type: string + ipAddress: + type: string + lastUpdated: + type: string + format: date-time + EditDevice: + title: EditDevice + required: + - guid + example: + guid: '123e4567-e89b-12d3-a456-426614174000' + hostname: 'AMTDEVICENUC1' + dnsSuffix: 'os.suffix.com' + friendlyName: 'store12pos2' + tags: ['Texas', 'NUC', 'Store #123'] + properties: + guid: + type: string + hostname: + type: string + dnsSuffix: + type: string + friendlyName: + type: string + tags: + type: array + items: + type: string + deviceInfo: + type: object + properties: + fwVersion: + type: string + fwBuild: + type: string + fwSku: + type: string + currentMode: + type: string + ipAddress: + type: string + EditDeviceResponse: + title: DeviceResponse + required: + - guid + - hostname + - tags + - mpsInstance + - connectionStatus + - mpsusername + - tenantID + - friendlyName + - dnsSuffix + example: + guid: '123e4567-e89b-12d3-a456-426614174000' + hostname: 'AMTDEVICENUC1' + tags: ['Texas', 'NUC', 'Store #123'] + mpsInstance: null + connectionStatus: false + mpsusername: 'admin' + tenantID: '' + friendlyName: 'store12pos2' + dnsSuffix: 'os.suffix.com' + deviceInfo: + { + 'fwVersion': '16.1', + 'fwBuild': '1111', + 'fwSku': '16392', + 'currentMode': '0', + 'features': 'AMT Pro Corporate', + 'ipAddress': '', + 'lastUpdated': '2023-11-13T17:20:59.043Z' + } + lastConnected: '2023-11-13T17:21:57.885Z' + lastSeen: '2023-11-13T17:33:57.915Z' + lastDisconnected: '2023-11-13T17:22:57.885Z' + properties: + guid: + type: string + hostname: + type: string + dnsSuffix: + type: string + tags: + type: array + items: + type: string + mpsInstance: + type: string + connectionStatus: + type: boolean + mpsusername: + type: string + tenantID: + type: string + friendlyName: + type: string + lastConnected: + type: string + format: date-time + lastSeen: + type: string + format: date-time + lastDisconnected: + type: string + format: date-time + deviceInfo: + type: object + properties: + fwVersion: + type: string + fwBuild: + type: string + fwSku: + type: string + currentMode: + type: string + features: + type: string + ipAddress: + type: string + lastUpdated: + type: string + format: date-time + RedirectStatus: + title: RedirectStatus + example: + isKVMConnected: false + isSOLConnected: false + isIDERConnected: false + properties: + isKVMConnected: + type: boolean + isSOLConnected: + type: boolean + isIDERConnected: + type: boolean + Stats: + title: Stats + example: + totalCount: 1 + connectedCount: 1 + disconnectedCount: 0 + properties: + totalCount: + type: integer + connectedCount: + type: integer + disconnectedCount: + type: integer + DeleteResponse: + title: DeleteResponse + example: + success: 204 + properties: + success: + description: HTTP returncode + type: integer + DeleteErrorResponse: + title: DeleteErrorResponse + example: + error: 'Device not found/connected. Please connect again using CIRA.' + errorDescription: 'guid : 038d0240-045c-05f4-7706-980700080009' + properties: + success: + description: HTTP returncode + type: integer + error: + description: server error message + type: string + errorDescription: + description: contains device guid + type: string + DisconnectResponse: + title: DisconnectResponse + example: + description: 'CIRA connection disconnected : 038d0240-045c-05f4-7706-980700080009' + properties: + success: + description: HTTP returncode + type: integer + description: + description: server response message containing guid + type: string + DisconnectErrorResponse: + title: DisconnectErrorResponse + example: + error: 'Device not found/connected. Please connect again using CIRA.' + errorDescription: 'guid : 038d0240-045c-05f4-7706-980700080009' + properties: + success: + description: HTTP returncode + type: integer + error: + description: server error message + type: string + errorDescription: + description: contains device guid + type: string + RefreshResponse: + title: DeleteResponse + example: + success: 200 + description: 'Device info refreshed : 4c4c4544-004c-4d10-8050-c2c04f325133' + properties: + success: + description: HTTP returncode + type: integer + CiracertResponse: + title: CiracertResponse + example: | + "-----BEGIN CERTIFICATE----- MIIEOzCCAqOgAwIBAgIDAjVCMA0GCSqGSIb3DQEBDAUAMD0xFzAVBgNVBAMTDk1QU1Jvb3QtNmZhNMSDIWEdsqwe89dsNNJSOW2Db3duMRAwDgYDVQQGEwd1bmtub3duMCAXDTIyMDkwNTE4MTgwMloYDzIwNTMwOTA1MTgxODAyWjA9MRcwFQYDVQQDEw5NUFNSb290LTZmYTQ5NEQMA4GA1UEChMHdW5rbm93bjEQMA4GA1UEBhMHdW5rbm93bjCCAaIwDQYJKoZIhNMSDANdnSdsnmasSDWED8oCggGBAPiA+YEPjIlryv8PdJsfIwkqd/7wJriASiM3W5VePKtO5gXKCg3piuUAAIj8Lk36TK6Lvz5He818o1YMLposvTzZJHVPILye5aqp2Lgs079nESgoAt0/yxSMh53S8dzEf5CXBmlA5foEebVUKQoei/bqSkbIC3CvZ/NMIGHF0nUMoKeigzeJbADDQVIMCnqZoPq0pRLUTbCyogAaPQ+9N72XNPw3HYX7voH2EOJxHtZHH8LTJZXKc4ozt/JU9G0onfnSTCJAirbZSfY0bdxdaSEOJg4tGAFAseHikYP6hHGqjutUC7/WiT/3EBcQnO5OjckWDXVOiG6AmNsIqW2cfJnNjd0kOwbdyEC+Tmt3w9VR8491wFexfLodbbk5JUS99bBwf856y70zfmAiCSgQcIjU5Yra7eIkNtqBv1RG4tSBm0fD5YB/mArICoYF0zNWGrqqcbfuyARdEiNCjxIbSZt+l1onUfFWfjoBcE7AhL0EaZmUTbQKP9hl+1zffpa0wIDAQABo0IwQDAMBgNVHRMEBTADAQH/MBEGCWCGSAGG+EIBAQQEAwIABzAdBgNVHQ4EFgQUb6SWpSxsakc8AP/bm+gwt0qIsMEwDQYJKoZIhvcBHgfIJKLOpnmASfdHQaft0QROp4vl1J/hcAfPw0j+l3dMEpKbzJQhaRoRkIECpxhvaYgAUq7hA7MNNn4QV20BOiDfV8ZURFrEmnehP13I7jd7YDLxpfK17x5r6wlAYZ/pGb8u9lgexE14kERmmRZvuh7wxQy0rTcYKe9+jM5R8Ugv/8gWYdpp1gr8fGJJx/e2DfSs+ViXEOWwgWmidTwPgerwWR8AcvW8IXkylXO6+SlTXnv3cWcY3BEh9r0xXBa4lkFAse2+Zj/X9rudYGqOLYtIsef0Q5fOopHJ7JBXUbMQySAIdAbBb0X14rgEC2kwow1NCm0vzi8CAL/14D1csd0c1K8fRu//lQgj+gh7Tk4B7RMZOOwTMAUQj1LoYnjSDNJS87sAmkmNNJOS09PTi9RVW3nddcgMVSSa2wehS4ZpYkZOxLdgcV58dfW9wBKBWuqmnMGPjI5pjNCRK8foPePwuP1avckSdKsen5qT0tfthDV+2TrZuV07eKVrmTXq0GBNEIVQplV1yyA== -----END CERTIFICATE-----" + HealthcheckResponse: + title: HealthcheckResponse + example: + db: + name: 'POSTGRES' + status: 'OK' + secretStore: + name: 'VAULT' + status: + initialized: true + sealed: false + standby: false + performance_standby: false + replication_performance_mode: 'disabled' + replication_dr_mode: 'disabled' + server_time_utc: 1646337196 + version: '1.9.3' + cluster_name: 'vault-cluster-3dc0c596' + cluster_id: '469ada72-d74b-4d1e-6e77-476bf9902b72' + properties: + db: + type: object + properties: + name: + type: string + status: + type: string + secretStore: + type: object + properties: + name: + type: string + status: + type: object + properties: + initialized: + type: boolean + sealed: + type: boolean + standby: + type: boolean + performance_standby: + type: boolean + replication_performance_mode: + type: string + replication_dr_mode: + type: string + server_time_utc: + type: integer + version: + type: string + cluster_name: + type: string + cluster_id: + type: string + VersionResponse: + title: VersionResponse + required: + - serviceVersion + type: object + properties: + serviceVersion: + type: string + example: + serviceVersion: 2.8.0 + GetCertificatesResponse: + title: GetCertificatesResponse + type: object + properties: + certificates: + type: object + properties: + keyManagementItems: + type: array + items: + type: object + description: Array of key management items + publicKeyCertificateItems: + type: array + items: + type: object + properties: + elementName: + type: string + description: Name of the certificate element + instanceID: + type: string + description: Unique instance identifier for the certificate + x509Certificate: + type: string + description: Base64 encoded X.509 certificate + trustedRootCertificate: + type: boolean + description: Whether this is a trusted root certificate + issuer: + type: string + description: Certificate issuer distinguished name + subject: + type: string + description: Certificate subject distinguished name + readOnlyCertificate: + type: boolean + description: Whether the certificate is read-only + publicKeyHandle: + type: string + description: Handle to the associated public key + associatedProfiles: + type: array + items: + type: string + description: List of profiles associated with this certificate + displayName: + type: string + description: Human-readable display name for the certificate + required: + - elementName + - instanceID + - x509Certificate + - trustedRootCertificate + - issuer + - subject + - readOnlyCertificate + - associatedProfiles + - displayName + publicKeys: + type: object + properties: + publicPrivateKeyPairItems: + type: array + items: + type: object + properties: + elementName: + type: string + description: Name of the key element + instanceID: + type: string + description: Unique instance identifier for the key pair + derKey: + type: string + description: DER-encoded public key + required: + - elementName + - instanceID + - derKey + profileAssociation: + type: array + items: + type: object + properties: + type: + type: string + description: Type of profile association + enum: + - TLS + profileID: + type: string + description: Identifier of the associated profile + clientCertificate: + type: object + properties: + elementName: + type: string + instanceID: + type: string + x509Certificate: + type: string + trustedRootCertificate: + type: boolean + issuer: + type: string + subject: + type: string + readOnlyCertificate: + type: boolean + publicKeyHandle: + type: string + associatedProfiles: + type: array + items: + type: string + displayName: + type: string + description: Client certificate used for this profile association + required: + - type + - profileID + - clientCertificate + required: + - certificates + - publicKeys + - profileAssociation + example: + certificates: + keyManagementItems: [] + publicKeyCertificateItems: + - elementName: 'Intel(r) AMT Certificate' + instanceID: 'Intel(r) AMT Certificate: Handle: 0' + x509Certificate: 'base64_encoded_certificate' + trustedRootCertificate: false + issuer: 'C=US,S=California,L=Santa Clara,O=Intel Corporation,CN=Intel® AMT self-signed certificate' + subject: 'C=US,S=California,L=Santa Clara,O=Intel Corporation,CN=Intel® AMT self-signed certificate' + readOnlyCertificate: true + publicKeyHandle: '' + associatedProfiles: ['TLS'] + displayName: 'Intel® AMT self-signed certificate' + publicKeys: + publicPrivateKeyPairItems: + - elementName: 'Intel(r) AMT Key' + instanceID: 'Intel(r) AMT Key: Handle: 0' + derKey: 'base64_encoded_public_key' + profileAssociation: + - type: 'TLS' + profileID: 'TLSProtocolEndpoint Instances Collection' + clientCertificate: + elementName: 'Intel(r) AMT Certificate' + instanceID: 'Intel(r) AMT Certificate: Handle: 0' + x509Certificate: 'base64_encoded_certificate' + trustedRootCertificate: false + issuer: 'C=US,S=California,L=Santa Clara,O=Intel Corporation,CN=Intel® AMT self-signed certificate' + subject: 'C=US,S=California,L=Santa Clara,O=Intel Corporation,CN=Intel® AMT self-signed certificate' + readOnlyCertificate: true + publicKeyHandle: '' + associatedProfiles: ['TLS'] + displayName: 'Intel® AMT self-signed certificate' + AddCertificatesRequest: + title: AddCertificateRequest + type: object + properties: + cert: + type: string + description: Base64-encoded X.509 certificate to be added + isTrusted: + type: boolean + description: Whether the certificate should be marked as trusted + required: + - cert + - isTrusted + example: + cert: 'base64_encoded_certificate' + isTrusted: true + AddCertificatesResponse: + type: object + properties: + handle: + type: string + description: Unique handle identifier for the newly added certificate + required: + - handle + example: + handle: 'Intel(r) AMT Certificate: Handle: 2' + GetDisplaysResponse: + type: object + properties: + displays: + type: array + items: + $ref: '#/components/schemas/Display' + description: List of display configurations + + Display: + type: object + required: + - displayIndex + - isActive + - upperLeftX + - upperLeftY + - resolutionX + - resolutionY + - isDefault + properties: + displayIndex: + type: integer + description: Index of the display + example: 0 + isActive: + type: boolean + description: Whether the display is currently active + example: true + upperLeftX: + type: integer + description: X coordinate of the upper left corner + example: 1 + upperLeftY: + type: integer + description: Y coordinate of the upper left corner + example: 2 + resolutionX: + type: integer + description: Horizontal resolution in pixels + example: 3 + resolutionY: + type: integer + description: Vertical resolution in pixels + example: 4 + isDefault: + type: boolean + description: Whether this is the default display + example: true + role: + type: string + enum: ['primary', 'secondary', 'tertiary', 'quaternary'] + description: Role of the display in multi-display setup + example: 'primary' + UpdateDisplaySettingsRequest: + type: object + required: + - displayIndex + properties: + displayIndex: + type: integer + description: Index of the display to update + example: 0 + UpdateDisplaySettingsResponse: + type: object + properties: + IPS_KVMRedirectionSettingData: + $ref: '#/components/schemas/KVMRedirectionSettingData' + + KVMRedirectionSettingData: + type: object + properties: + BackToBackFbMode: + type: boolean + example: false + DefaultScreen: + type: integer + example: 0 + DoubleBufferActive: + type: boolean + example: true + DoubleBufferEnabled: + type: boolean + example: true + ElementName: + type: string + example: 'Intel(r) KVM Redirection Settings' + EnabledByMEBx: + type: boolean + example: true + GrayscalePixelFormatSupported: + type: boolean + example: true + InitialDecimationModeForLowRes: + type: integer + example: 2 + InstanceID: + type: string + example: 'Intel(r) KVM Redirection Settings' + Is5900PortEnabled: + type: boolean + example: false + OptInPolicy: + type: boolean + example: false + RFBPassword: + type: string + example: '' + SessionTimeout: + type: integer + example: 3 + ZlibControlSupported: + type: boolean + example: true + BootSourcesResponse: + type: array + items: + $ref: '#/components/schemas/BootSource' + + BootSource: + type: object + properties: + biosBootString: + type: string + example: '' + bootString: + type: string + example: '' + elementName: + type: string + example: '' + failThroughSupported: + type: integer + example: 0 + instanceID: + type: string + example: '' + structuredBiosBootString: + type: string + example: '' diff --git a/dm-manager/pkg/api/rps/client.gen.go b/dm-manager/pkg/api/rps/client.gen.go index 63a8cca3..cfdd4f0d 100644 --- a/dm-manager/pkg/api/rps/client.gen.go +++ b/dm-manager/pkg/api/rps/client.gen.go @@ -1,6 +1,6 @@ // Package rps provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT. package rps import ( @@ -25,6 +25,7 @@ const ( const ( IEEE8021xConfigPATCHAuthenticationProtocolN0 IEEE8021xConfigPATCHAuthenticationProtocol = 0 IEEE8021xConfigPATCHAuthenticationProtocolN10 IEEE8021xConfigPATCHAuthenticationProtocol = 10 + IEEE8021xConfigPATCHAuthenticationProtocolN2 IEEE8021xConfigPATCHAuthenticationProtocol = 2 IEEE8021xConfigPATCHAuthenticationProtocolN3 IEEE8021xConfigPATCHAuthenticationProtocol = 3 IEEE8021xConfigPATCHAuthenticationProtocolN5 IEEE8021xConfigPATCHAuthenticationProtocol = 5 ) @@ -73,6 +74,13 @@ const ( ProfilePOSTUserConsentNone ProfilePOSTUserConsent = "None" ) +// Defines values for ProxyConfigResponseInfoFormat. +const ( + N201 ProxyConfigResponseInfoFormat = 201 + N3 ProxyConfigResponseInfoFormat = 3 + N4 ProxyConfigResponseInfoFormat = 4 +) + // Defines values for WirelessConfigPATCHLinkPolicy. const ( WirelessConfigPATCHLinkPolicyN1 WirelessConfigPATCHLinkPolicy = 1 @@ -117,7 +125,7 @@ type CIRAConfigPOST struct { CommonName string `json:"commonName"` ConfigName string `json:"configName"` MpsPort int32 `json:"mpsPort"` - MpsRootCertificate string `json:"mpsRootCertificate"` + MpsRootCertificate []byte `json:"mpsRootCertificate"` MpsServerAddress string `json:"mpsServerAddress"` Password *string `json:"password,omitempty"` ProxyDetails string `json:"proxyDetails"` @@ -140,6 +148,12 @@ type CIRAConfigResponse struct { Version *string `json:"version,omitempty"` } +// CountCIRAResponse defines model for CountCIRAResponse. +type CountCIRAResponse struct { + Data *[]CIRAConfigResponse `json:"data,omitempty"` + TotalCount *int `json:"totalCount,omitempty"` +} + // CountDomainResponse defines model for CountDomainResponse. type CountDomainResponse struct { Data *[]DomainResponse `json:"data,omitempty"` @@ -152,6 +166,18 @@ type CountIEEE8021xResponse struct { TotalCount *int `json:"totalCount,omitempty"` } +// CountProfileResponse defines model for CountProfileResponse. +type CountProfileResponse struct { + Data *[]ProfileResponse `json:"data,omitempty"` + TotalCount *int `json:"totalCount,omitempty"` +} + +// CountProxyConfigResponse defines model for CountProxyConfigResponse. +type CountProxyConfigResponse struct { + Data *[]ProxyConfigResponse `json:"data,omitempty"` + TotalCount *int `json:"totalCount,omitempty"` +} + // CountWirelessResponse defines model for CountWirelessResponse. type CountWirelessResponse struct { Data *[]WirelessConfigResponse `json:"data,omitempty"` @@ -251,25 +277,27 @@ type IEEE8021xConfigResponseAuthenticationProtocol int // ProfilePATCH defines model for ProfilePATCH. type ProfilePATCH struct { - Activation string `json:"activation"` - AmtPassword *string `json:"amtPassword,omitempty"` - CiraConfigName string `json:"ciraConfigName"` - DhcpEnabled bool `json:"dhcpEnabled"` - GenerateRandomMEBxPassword bool `json:"generateRandomMEBxPassword"` - GenerateRandomPassword bool `json:"generateRandomPassword"` - IderEnabled bool `json:"iderEnabled"` - Ieee8021xProfile *string `json:"ieee8021xProfile,omitempty"` - IpSyncEnabled *bool `json:"ipSyncEnabled,omitempty"` - KvmEnabled bool `json:"kvmEnabled"` - LocalWifiSyncEnabled *bool `json:"localWifiSyncEnabled,omitempty"` - MebxPassword *string `json:"mebxPassword,omitempty"` - ProfileName string `json:"profileName"` - SolEnabled bool `json:"solEnabled"` - Tags []string `json:"tags"` + Activation string `json:"activation"` + AmtPassword *string `json:"amtPassword,omitempty"` + CiraConfigName string `json:"ciraConfigName"` + DhcpEnabled bool `json:"dhcpEnabled"` + GenerateRandomMEBxPassword bool `json:"generateRandomMEBxPassword"` + GenerateRandomPassword bool `json:"generateRandomPassword"` + IderEnabled bool `json:"iderEnabled"` + Ieee8021xProfile *string `json:"ieee8021xProfile,omitempty"` + IpSyncEnabled *bool `json:"ipSyncEnabled,omitempty"` + KvmEnabled bool `json:"kvmEnabled"` + LocalWifiSyncEnabled *bool `json:"localWifiSyncEnabled,omitempty"` + MebxPassword *string `json:"mebxPassword,omitempty"` + ProfileName string `json:"profileName"` + ProxyConfigs *[]map[string]interface{} `json:"proxyConfigs,omitempty"` + SolEnabled bool `json:"solEnabled"` + Tags []string `json:"tags"` // TlsMode Server Authentication Only (1), Server and Non-TLS Authentication (2) TlsMode ProfilePATCHTlsMode `json:"tlsMode"` TlsSigningAuthority *string `json:"tlsSigningAuthority,omitempty"` + UefiWifiSyncEnabled *bool `json:"uefiWifiSyncEnabled,omitempty"` // UserConsent User Consent must be one of None, All, KVM. It should be 'All' in client control mode UserConsent ProfilePATCHUserConsent `json:"userConsent"` @@ -285,26 +313,28 @@ type ProfilePATCHUserConsent string // ProfilePOST defines model for ProfilePOST. type ProfilePOST struct { - Activation string `json:"activation"` - AmtPassword *string `json:"amtPassword,omitempty"` - CiraConfigName *string `json:"ciraConfigName,omitempty"` - DhcpEnabled bool `json:"dhcpEnabled"` - GenerateRandomMEBxPassword bool `json:"generateRandomMEBxPassword"` - GenerateRandomPassword bool `json:"generateRandomPassword"` - IderEnabled *bool `json:"iderEnabled,omitempty"` - Ieee8021xProfile *string `json:"ieee8021xProfile,omitempty"` - IpSyncEnabled *bool `json:"ipSyncEnabled,omitempty"` - KvmEnabled *bool `json:"kvmEnabled,omitempty"` - LocalWifiSyncEnabled *bool `json:"localWifiSyncEnabled,omitempty"` - MebxPassword *string `json:"mebxPassword,omitempty"` - NetworkConfigName *string `json:"networkConfigName,omitempty"` - ProfileName string `json:"profileName"` - SolEnabled *bool `json:"solEnabled,omitempty"` - Tags []string `json:"tags"` + Activation string `json:"activation"` + AmtPassword *string `json:"amtPassword,omitempty"` + CiraConfigName *string `json:"ciraConfigName,omitempty"` + DhcpEnabled bool `json:"dhcpEnabled"` + GenerateRandomMEBxPassword bool `json:"generateRandomMEBxPassword"` + GenerateRandomPassword bool `json:"generateRandomPassword"` + IderEnabled *bool `json:"iderEnabled,omitempty"` + Ieee8021xProfile *string `json:"ieee8021xProfile,omitempty"` + IpSyncEnabled *bool `json:"ipSyncEnabled,omitempty"` + KvmEnabled *bool `json:"kvmEnabled,omitempty"` + LocalWifiSyncEnabled *bool `json:"localWifiSyncEnabled,omitempty"` + MebxPassword *string `json:"mebxPassword,omitempty"` + NetworkConfigName *string `json:"networkConfigName,omitempty"` + ProfileName string `json:"profileName"` + ProxyConfigs *[]map[string]interface{} `json:"proxyConfigs,omitempty"` + SolEnabled *bool `json:"solEnabled,omitempty"` + Tags []string `json:"tags"` // TlsMode Server Authentication Only (1), Server and Non-TLS Authentication (2) TlsMode *ProfilePOSTTlsMode `json:"tlsMode,omitempty"` TlsSigningAuthority string `json:"tlsSigningAuthority"` + UefiWifiSyncEnabled *bool `json:"uefiWifiSyncEnabled,omitempty"` // UserConsent User Consent must be one of None, All, KVM. It should be 'All' in client control mode UserConsent *ProfilePOSTUserConsent `json:"userConsent,omitempty"` @@ -319,24 +349,26 @@ type ProfilePOSTUserConsent string // ProfileResponse defines model for ProfileResponse. type ProfileResponse struct { - Activation string `json:"activation"` - CiraConfigName string `json:"ciraConfigName"` - DhcpEnabled bool `json:"dhcpEnabled"` - GenerateRandomMEBxPassword bool `json:"generateRandomMEBxPassword"` - GenerateRandomPassword bool `json:"generateRandomPassword"` - IderEnabled bool `json:"iderEnabled"` - Ieee8021xProfile string `json:"ieee8021xProfile"` - IpSyncEnabled *bool `json:"ipSyncEnabled,omitempty"` - KvmEnabled bool `json:"kvmEnabled"` - LocalWifiSyncEnabled *bool `json:"localWifiSyncEnabled,omitempty"` - ProfileName string `json:"profileName"` - SolEnabled bool `json:"solEnabled"` - Tags []string `json:"tags"` - TenantId *string `json:"tenantId,omitempty"` + Activation string `json:"activation"` + CiraConfigName string `json:"ciraConfigName"` + DhcpEnabled bool `json:"dhcpEnabled"` + GenerateRandomMEBxPassword bool `json:"generateRandomMEBxPassword"` + GenerateRandomPassword bool `json:"generateRandomPassword"` + IderEnabled bool `json:"iderEnabled"` + Ieee8021xProfile string `json:"ieee8021xProfile"` + IpSyncEnabled *bool `json:"ipSyncEnabled,omitempty"` + KvmEnabled bool `json:"kvmEnabled"` + LocalWifiSyncEnabled *bool `json:"localWifiSyncEnabled,omitempty"` + ProfileName string `json:"profileName"` + ProxyConfigs *[]map[string]interface{} `json:"proxyConfigs,omitempty"` + SolEnabled bool `json:"solEnabled"` + Tags []string `json:"tags"` + TenantId *string `json:"tenantId,omitempty"` // TlsMode Server Authentication Only(1), Server and Non-TLS Authentication (2), Mutual TLS only (3), Mutual and Non-TLS authentication (4) TlsMode float32 `json:"tlsMode"` TlsSigningAuthority string `json:"tlsSigningAuthority"` + UefiWifiSyncEnabled *bool `json:"uefiWifiSyncEnabled,omitempty"` // UserConsent User Consenst must be one of None, All, KVM. It must be 'All' in client control mode UserConsent string `json:"userConsent"` @@ -344,6 +376,39 @@ type ProfileResponse struct { WifiConfigs []map[string]interface{} `json:"wifiConfigs"` } +// ProxyConfigPATCH defines model for ProxyConfigPATCH. +type ProxyConfigPATCH struct { + // Address IP address or FQDN of the server (infoFormat will be auto-detected) + Address string `json:"address"` + Name string `json:"name"` + NetworkDnsSuffix string `json:"networkDnsSuffix"` + Port int `json:"port"` +} + +// ProxyConfigPOST defines model for ProxyConfigPOST. +type ProxyConfigPOST struct { + // Address IP address or FQDN of the server (infoFormat will be auto-detected) + Address string `json:"address"` + Name string `json:"name"` + NetworkDnsSuffix string `json:"networkDnsSuffix"` + Port int `json:"port"` +} + +// ProxyConfigResponse defines model for ProxyConfigResponse. +type ProxyConfigResponse struct { + Address string `json:"address"` + + // InfoFormat Address format auto-detected by server (3=IPv4, 4=IPv6, 201=FQDN) + InfoFormat ProxyConfigResponseInfoFormat `json:"infoFormat"` + Name string `json:"name"` + NetworkDnsSuffix string `json:"networkDnsSuffix"` + Port int `json:"port"` + TenantId string `json:"tenantId"` +} + +// ProxyConfigResponseInfoFormat Address format auto-detected by server (3=IPv4, 4=IPv6, 201=FQDN) +type ProxyConfigResponseInfoFormat int + // VersionResponse defines model for VersionResponse. type VersionResponse struct { ProtocolVersion string `json:"protocolVersion"` @@ -441,6 +506,18 @@ type GetAllProfilesParams struct { Count *bool `form:"$count,omitempty" json:"$count,omitempty"` } +// GetAllProxyconfigsParams defines parameters for GetAllProxyconfigs. +type GetAllProxyconfigsParams struct { + // Skip The number of items to skip before starting to collect the result set + Skip *int `form:"$skip,omitempty" json:"$skip,omitempty"` + + // Top The numbers of items to return + Top *int `form:"$top,omitempty" json:"$top,omitempty"` + + // Count The total number of proxy configurations + Count *bool `form:"$count,omitempty" json:"$count,omitempty"` +} + // GetAllWirelessConfigsParams defines parameters for GetAllWirelessConfigs. type GetAllWirelessConfigsParams struct { // Skip The number of items to skip before starting to collect the result set @@ -477,6 +554,12 @@ type UpdateProfileJSONRequestBody = ProfilePATCH // CreateProfileJSONRequestBody defines body for CreateProfile for application/json ContentType. type CreateProfileJSONRequestBody = ProfilePOST +// UpdateProxyconfigJSONRequestBody defines body for UpdateProxyconfig for application/json ContentType. +type UpdateProxyconfigJSONRequestBody = ProxyConfigPATCH + +// CreateProxyconfigJSONRequestBody defines body for CreateProxyconfig for application/json ContentType. +type CreateProxyconfigJSONRequestBody = ProxyConfigPOST + // EditWirelessConfigJSONRequestBody defines body for EditWirelessConfig for application/json ContentType. type EditWirelessConfigJSONRequestBody = WirelessConfigPATCH @@ -635,6 +718,25 @@ type ClientInterface interface { // GetProfile request GetProfile(ctx context.Context, profileName string, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetAllProxyconfigs request + GetAllProxyconfigs(ctx context.Context, params *GetAllProxyconfigsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateProxyconfigWithBody request with any body + UpdateProxyconfigWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateProxyconfig(ctx context.Context, body UpdateProxyconfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateProxyconfigWithBody request with any body + CreateProxyconfigWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateProxyconfig(ctx context.Context, body CreateProxyconfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteProxyconfig request + DeleteProxyconfig(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetProxyconfig request + GetProxyconfig(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetVersion request GetVersion(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1006,6 +1108,90 @@ func (c *Client) GetProfile(ctx context.Context, profileName string, reqEditors return c.Client.Do(req) } +func (c *Client) GetAllProxyconfigs(ctx context.Context, params *GetAllProxyconfigsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAllProxyconfigsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateProxyconfigWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateProxyconfigRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateProxyconfig(ctx context.Context, body UpdateProxyconfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateProxyconfigRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateProxyconfigWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateProxyconfigRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateProxyconfig(ctx context.Context, body CreateProxyconfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateProxyconfigRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteProxyconfig(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteProxyconfigRequest(c.Server, name) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetProxyconfig(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetProxyconfigRequest(c.Server, name) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetVersion(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetVersionRequest(c.Server) if err != nil { @@ -2045,35 +2231,8 @@ func NewGetProfileRequest(server string, profileName string) (*http.Request, err return req, nil } -// NewGetVersionRequest generates requests for GetVersion -func NewGetVersionRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/v1/admin/version") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetAllWirelessConfigsRequest generates requests for GetAllWirelessConfigs -func NewGetAllWirelessConfigsRequest(server string, params *GetAllWirelessConfigsParams) (*http.Request, error) { +// NewGetAllProxyconfigsRequest generates requests for GetAllProxyconfigs +func NewGetAllProxyconfigsRequest(server string, params *GetAllProxyconfigsParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2081,7 +2240,7 @@ func NewGetAllWirelessConfigsRequest(server string, params *GetAllWirelessConfig return nil, err } - operationPath := fmt.Sprintf("/api/v1/admin/wirelessconfigs") + operationPath := fmt.Sprintf("/api/v1/admin/proxyconfigs") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2153,19 +2312,19 @@ func NewGetAllWirelessConfigsRequest(server string, params *GetAllWirelessConfig return req, nil } -// NewEditWirelessConfigRequest calls the generic EditWirelessConfig builder with application/json body -func NewEditWirelessConfigRequest(server string, body EditWirelessConfigJSONRequestBody) (*http.Request, error) { +// NewUpdateProxyconfigRequest calls the generic UpdateProxyconfig builder with application/json body +func NewUpdateProxyconfigRequest(server string, body UpdateProxyconfigJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewEditWirelessConfigRequestWithBody(server, "application/json", bodyReader) + return NewUpdateProxyconfigRequestWithBody(server, "application/json", bodyReader) } -// NewEditWirelessConfigRequestWithBody generates requests for EditWirelessConfig with any type of body -func NewEditWirelessConfigRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateProxyconfigRequestWithBody generates requests for UpdateProxyconfig with any type of body +func NewUpdateProxyconfigRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2173,7 +2332,7 @@ func NewEditWirelessConfigRequestWithBody(server string, contentType string, bod return nil, err } - operationPath := fmt.Sprintf("/api/v1/admin/wirelessconfigs") + operationPath := fmt.Sprintf("/api/v1/admin/proxyconfigs") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2193,19 +2352,19 @@ func NewEditWirelessConfigRequestWithBody(server string, contentType string, bod return req, nil } -// NewCreateWirelessConfigRequest calls the generic CreateWirelessConfig builder with application/json body -func NewCreateWirelessConfigRequest(server string, body CreateWirelessConfigJSONRequestBody) (*http.Request, error) { +// NewCreateProxyconfigRequest calls the generic CreateProxyconfig builder with application/json body +func NewCreateProxyconfigRequest(server string, body CreateProxyconfigJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateWirelessConfigRequestWithBody(server, "application/json", bodyReader) + return NewCreateProxyconfigRequestWithBody(server, "application/json", bodyReader) } -// NewCreateWirelessConfigRequestWithBody generates requests for CreateWirelessConfig with any type of body -func NewCreateWirelessConfigRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateProxyconfigRequestWithBody generates requests for CreateProxyconfig with any type of body +func NewCreateProxyconfigRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2213,7 +2372,7 @@ func NewCreateWirelessConfigRequestWithBody(server string, contentType string, b return nil, err } - operationPath := fmt.Sprintf("/api/v1/admin/wirelessconfigs") + operationPath := fmt.Sprintf("/api/v1/admin/proxyconfigs") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2233,13 +2392,13 @@ func NewCreateWirelessConfigRequestWithBody(server string, contentType string, b return req, nil } -// NewRemoveWirelessConfigRequest generates requests for RemoveWirelessConfig -func NewRemoveWirelessConfigRequest(server string, profileName string) (*http.Request, error) { +// NewDeleteProxyconfigRequest generates requests for DeleteProxyconfig +func NewDeleteProxyconfigRequest(server string, name string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "profileName", runtime.ParamLocationPath, profileName) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) if err != nil { return nil, err } @@ -2249,7 +2408,7 @@ func NewRemoveWirelessConfigRequest(server string, profileName string) (*http.Re return nil, err } - operationPath := fmt.Sprintf("/api/v1/admin/wirelessconfigs/%s", pathParam0) + operationPath := fmt.Sprintf("/api/v1/admin/proxyconfigs/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2267,13 +2426,13 @@ func NewRemoveWirelessConfigRequest(server string, profileName string) (*http.Re return req, nil } -// NewGetWirelessConfigRequest generates requests for GetWirelessConfig -func NewGetWirelessConfigRequest(server string, profileName string) (*http.Request, error) { +// NewGetProxyconfigRequest generates requests for GetProxyconfig +func NewGetProxyconfigRequest(server string, name string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "profileName", runtime.ParamLocationPath, profileName) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) if err != nil { return nil, err } @@ -2283,7 +2442,7 @@ func NewGetWirelessConfigRequest(server string, profileName string) (*http.Reque return nil, err } - operationPath := fmt.Sprintf("/api/v1/admin/wirelessconfigs/%s", pathParam0) + operationPath := fmt.Sprintf("/api/v1/admin/proxyconfigs/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2301,77 +2460,333 @@ func NewGetWirelessConfigRequest(server string, profileName string) (*http.Reque return req, nil } -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } +// NewGetVersionRequest generates requests for GetVersion +func NewGetVersionRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return nil -} -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} + operationPath := fmt.Sprintf("/api/v1/admin/version") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - return &ClientWithResponses{client}, nil -} -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } -} -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // GetAllCIRAConfigsWithResponse request - GetAllCIRAConfigsWithResponse(ctx context.Context, params *GetAllCIRAConfigsParams, reqEditors ...RequestEditorFn) (*GetAllCIRAConfigsResponse, error) + return req, nil +} - // EditCIRAConfigWithBodyWithResponse request with any body - EditCIRAConfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EditCIRAConfigResponse, error) +// NewGetAllWirelessConfigsRequest generates requests for GetAllWirelessConfigs +func NewGetAllWirelessConfigsRequest(server string, params *GetAllWirelessConfigsParams) (*http.Request, error) { + var err error - EditCIRAConfigWithResponse(ctx context.Context, body EditCIRAConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*EditCIRAConfigResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // CreateCIRAConfigWithBodyWithResponse request with any body - CreateCIRAConfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCIRAConfigResponse, error) + operationPath := fmt.Sprintf("/api/v1/admin/wirelessconfigs") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - CreateCIRAConfigWithResponse(ctx context.Context, body CreateCIRAConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCIRAConfigResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // RemoveCIRAConfigWithResponse request - RemoveCIRAConfigWithResponse(ctx context.Context, configName string, reqEditors ...RequestEditorFn) (*RemoveCIRAConfigResponse, error) + if params != nil { + queryValues := queryURL.Query() - // GetCIRAConfigWithResponse request - GetCIRAConfigWithResponse(ctx context.Context, configName string, reqEditors ...RequestEditorFn) (*GetCIRAConfigResponse, error) + if params.Skip != nil { - // GetAllDomainsWithResponse request - GetAllDomainsWithResponse(ctx context.Context, params *GetAllDomainsParams, reqEditors ...RequestEditorFn) (*GetAllDomainsResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "$skip", runtime.ParamLocationQuery, *params.Skip); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // UpdateDomainSuffixWithBodyWithResponse request with any body - UpdateDomainSuffixWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDomainSuffixResponse, error) + } - UpdateDomainSuffixWithResponse(ctx context.Context, body UpdateDomainSuffixJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDomainSuffixResponse, error) + if params.Top != nil { - // CreateDomainWithBodyWithResponse request with any body + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "$top", runtime.ParamLocationQuery, *params.Top); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Count != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "$count", runtime.ParamLocationQuery, *params.Count); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewEditWirelessConfigRequest calls the generic EditWirelessConfig builder with application/json body +func NewEditWirelessConfigRequest(server string, body EditWirelessConfigJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewEditWirelessConfigRequestWithBody(server, "application/json", bodyReader) +} + +// NewEditWirelessConfigRequestWithBody generates requests for EditWirelessConfig with any type of body +func NewEditWirelessConfigRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/admin/wirelessconfigs") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCreateWirelessConfigRequest calls the generic CreateWirelessConfig builder with application/json body +func NewCreateWirelessConfigRequest(server string, body CreateWirelessConfigJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateWirelessConfigRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateWirelessConfigRequestWithBody generates requests for CreateWirelessConfig with any type of body +func NewCreateWirelessConfigRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/admin/wirelessconfigs") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewRemoveWirelessConfigRequest generates requests for RemoveWirelessConfig +func NewRemoveWirelessConfigRequest(server string, profileName string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "profileName", runtime.ParamLocationPath, profileName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/admin/wirelessconfigs/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetWirelessConfigRequest generates requests for GetWirelessConfig +func NewGetWirelessConfigRequest(server string, profileName string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "profileName", runtime.ParamLocationPath, profileName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/admin/wirelessconfigs/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // GetAllCIRAConfigsWithResponse request + GetAllCIRAConfigsWithResponse(ctx context.Context, params *GetAllCIRAConfigsParams, reqEditors ...RequestEditorFn) (*GetAllCIRAConfigsResponse, error) + + // EditCIRAConfigWithBodyWithResponse request with any body + EditCIRAConfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EditCIRAConfigResponse, error) + + EditCIRAConfigWithResponse(ctx context.Context, body EditCIRAConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*EditCIRAConfigResponse, error) + + // CreateCIRAConfigWithBodyWithResponse request with any body + CreateCIRAConfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCIRAConfigResponse, error) + + CreateCIRAConfigWithResponse(ctx context.Context, body CreateCIRAConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCIRAConfigResponse, error) + + // RemoveCIRAConfigWithResponse request + RemoveCIRAConfigWithResponse(ctx context.Context, configName string, reqEditors ...RequestEditorFn) (*RemoveCIRAConfigResponse, error) + + // GetCIRAConfigWithResponse request + GetCIRAConfigWithResponse(ctx context.Context, configName string, reqEditors ...RequestEditorFn) (*GetCIRAConfigResponse, error) + + // GetAllDomainsWithResponse request + GetAllDomainsWithResponse(ctx context.Context, params *GetAllDomainsParams, reqEditors ...RequestEditorFn) (*GetAllDomainsResponse, error) + + // UpdateDomainSuffixWithBodyWithResponse request with any body + UpdateDomainSuffixWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDomainSuffixResponse, error) + + UpdateDomainSuffixWithResponse(ctx context.Context, body UpdateDomainSuffixJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDomainSuffixResponse, error) + + // CreateDomainWithBodyWithResponse request with any body CreateDomainWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDomainResponse, error) CreateDomainWithResponse(ctx context.Context, body CreateDomainJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDomainResponse, error) @@ -2423,6 +2838,25 @@ type ClientWithResponsesInterface interface { // GetProfileWithResponse request GetProfileWithResponse(ctx context.Context, profileName string, reqEditors ...RequestEditorFn) (*GetProfileResponse, error) + // GetAllProxyconfigsWithResponse request + GetAllProxyconfigsWithResponse(ctx context.Context, params *GetAllProxyconfigsParams, reqEditors ...RequestEditorFn) (*GetAllProxyconfigsResponse, error) + + // UpdateProxyconfigWithBodyWithResponse request with any body + UpdateProxyconfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateProxyconfigResponse, error) + + UpdateProxyconfigWithResponse(ctx context.Context, body UpdateProxyconfigJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateProxyconfigResponse, error) + + // CreateProxyconfigWithBodyWithResponse request with any body + CreateProxyconfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProxyconfigResponse, error) + + CreateProxyconfigWithResponse(ctx context.Context, body CreateProxyconfigJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProxyconfigResponse, error) + + // DeleteProxyconfigWithResponse request + DeleteProxyconfigWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteProxyconfigResponse, error) + + // GetProxyconfigWithResponse request + GetProxyconfigWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetProxyconfigResponse, error) + // GetVersionWithResponse request GetVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVersionResponse, error) @@ -2449,10 +2883,13 @@ type ClientWithResponsesInterface interface { type GetAllCIRAConfigsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]CIRAConfigResponse - JSON404 *APIResponse - JSON500 *APIResponse + JSON200 *struct { + union json.RawMessage + } + JSON404 *APIResponse + JSON500 *APIResponse } +type GetAllCIRAConfigs2000 = []CIRAConfigResponse // Status returns HTTPResponse.Status func (r GetAllCIRAConfigsResponse) Status() string { @@ -2574,6 +3011,7 @@ type GetAllDomainsResponse struct { JSON404 *APIResponse JSON500 *APIResponse } +type GetAllDomains2000 = []DomainResponse // Status returns HTTPResponse.Status func (r GetAllDomainsResponse) Status() string { @@ -2717,6 +3155,7 @@ type GetAll8021xConfigsResponse struct { JSON404 *APIResponse JSON500 *APIResponse } +type GetAll8021xConfigs2000 = []IEEE8021xConfigResponse // Status returns HTTPResponse.Status func (r GetAll8021xConfigsResponse) Status() string { @@ -2805,16 +3244,138 @@ func (r Remove8021xConfigResponse) StatusCode() int { return 0 } -type Get8021xConfigResponse struct { +type Get8021xConfigResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *IEEE8021xConfigResponse + JSON404 *APIResponse + JSON500 *APIResponse +} + +// Status returns HTTPResponse.Status +func (r Get8021xConfigResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r Get8021xConfigResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetAllProfilesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + union json.RawMessage + } + JSON404 *APIResponse + JSON500 *APIResponse +} +type GetAllProfiles2000 = []ProfileResponse + +// Status returns HTTPResponse.Status +func (r GetAllProfilesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetAllProfilesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateProfileResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ProfileResponse + JSON400 *APIResponse + JSON500 *APIResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateProfileResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateProfileResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateProfileResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ProfileResponse + JSON400 *APIResponse + JSON500 *APIResponse +} + +// Status returns HTTPResponse.Status +func (r CreateProfileResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateProfileResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type RemoveProfileResponse struct { + Body []byte + HTTPResponse *http.Response + JSON404 *APIResponse + JSON500 *APIResponse +} + +// Status returns HTTPResponse.Status +func (r RemoveProfileResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r RemoveProfileResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetProfileResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *IEEE8021xConfigResponse + JSON200 *ProfileResponse JSON404 *APIResponse JSON500 *APIResponse } // Status returns HTTPResponse.Status -func (r Get8021xConfigResponse) Status() string { +func (r GetProfileResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -2822,23 +3383,26 @@ func (r Get8021xConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r Get8021xConfigResponse) StatusCode() int { +func (r GetProfileResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetAllProfilesResponse struct { +type GetAllProxyconfigsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]ProfileResponse - JSON404 *APIResponse - JSON500 *APIResponse + JSON200 *struct { + union json.RawMessage + } + JSON404 *APIResponse + JSON500 *APIResponse } +type GetAllProxyconfigs2000 = []ProxyConfigResponse // Status returns HTTPResponse.Status -func (r GetAllProfilesResponse) Status() string { +func (r GetAllProxyconfigsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -2846,23 +3410,23 @@ func (r GetAllProfilesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetAllProfilesResponse) StatusCode() int { +func (r GetAllProxyconfigsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateProfileResponse struct { +type UpdateProxyconfigResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ProfileResponse + JSON200 *ProxyConfigResponse JSON400 *APIResponse JSON500 *APIResponse } // Status returns HTTPResponse.Status -func (r UpdateProfileResponse) Status() string { +func (r UpdateProxyconfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -2870,23 +3434,23 @@ func (r UpdateProfileResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateProfileResponse) StatusCode() int { +func (r UpdateProxyconfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateProfileResponse struct { +type CreateProxyconfigResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *ProfileResponse + JSON201 *ProxyConfigResponse JSON400 *APIResponse JSON500 *APIResponse } // Status returns HTTPResponse.Status -func (r CreateProfileResponse) Status() string { +func (r CreateProxyconfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -2894,22 +3458,23 @@ func (r CreateProfileResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateProfileResponse) StatusCode() int { +func (r CreateProxyconfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type RemoveProfileResponse struct { +type DeleteProxyconfigResponse struct { Body []byte HTTPResponse *http.Response + JSON204 *ProxyConfigResponse JSON404 *APIResponse JSON500 *APIResponse } // Status returns HTTPResponse.Status -func (r RemoveProfileResponse) Status() string { +func (r DeleteProxyconfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -2917,23 +3482,23 @@ func (r RemoveProfileResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r RemoveProfileResponse) StatusCode() int { +func (r DeleteProxyconfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetProfileResponse struct { +type GetProxyconfigResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ProfileResponse + JSON200 *ProxyConfigResponse JSON404 *APIResponse JSON500 *APIResponse } // Status returns HTTPResponse.Status -func (r GetProfileResponse) Status() string { +func (r GetProxyconfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -2941,7 +3506,7 @@ func (r GetProfileResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetProfileResponse) StatusCode() int { +func (r GetProxyconfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -2979,6 +3544,7 @@ type GetAllWirelessConfigsResponse struct { JSON404 *APIResponse JSON500 *APIResponse } +type GetAllWirelessConfigs2000 = []WirelessConfigResponse // Status returns HTTPResponse.Status func (r GetAllWirelessConfigsResponse) Status() string { @@ -3344,6 +3910,67 @@ func (c *ClientWithResponses) GetProfileWithResponse(ctx context.Context, profil return ParseGetProfileResponse(rsp) } +// GetAllProxyconfigsWithResponse request returning *GetAllProxyconfigsResponse +func (c *ClientWithResponses) GetAllProxyconfigsWithResponse(ctx context.Context, params *GetAllProxyconfigsParams, reqEditors ...RequestEditorFn) (*GetAllProxyconfigsResponse, error) { + rsp, err := c.GetAllProxyconfigs(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAllProxyconfigsResponse(rsp) +} + +// UpdateProxyconfigWithBodyWithResponse request with arbitrary body returning *UpdateProxyconfigResponse +func (c *ClientWithResponses) UpdateProxyconfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateProxyconfigResponse, error) { + rsp, err := c.UpdateProxyconfigWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateProxyconfigResponse(rsp) +} + +func (c *ClientWithResponses) UpdateProxyconfigWithResponse(ctx context.Context, body UpdateProxyconfigJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateProxyconfigResponse, error) { + rsp, err := c.UpdateProxyconfig(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateProxyconfigResponse(rsp) +} + +// CreateProxyconfigWithBodyWithResponse request with arbitrary body returning *CreateProxyconfigResponse +func (c *ClientWithResponses) CreateProxyconfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProxyconfigResponse, error) { + rsp, err := c.CreateProxyconfigWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateProxyconfigResponse(rsp) +} + +func (c *ClientWithResponses) CreateProxyconfigWithResponse(ctx context.Context, body CreateProxyconfigJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProxyconfigResponse, error) { + rsp, err := c.CreateProxyconfig(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateProxyconfigResponse(rsp) +} + +// DeleteProxyconfigWithResponse request returning *DeleteProxyconfigResponse +func (c *ClientWithResponses) DeleteProxyconfigWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteProxyconfigResponse, error) { + rsp, err := c.DeleteProxyconfig(ctx, name, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteProxyconfigResponse(rsp) +} + +// GetProxyconfigWithResponse request returning *GetProxyconfigResponse +func (c *ClientWithResponses) GetProxyconfigWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetProxyconfigResponse, error) { + rsp, err := c.GetProxyconfig(ctx, name, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetProxyconfigResponse(rsp) +} + // GetVersionWithResponse request returning *GetVersionResponse func (c *ClientWithResponses) GetVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVersionResponse, error) { rsp, err := c.GetVersion(ctx, reqEditors...) @@ -3429,7 +4056,9 @@ func ParseGetAllCIRAConfigsResponse(rsp *http.Response) (*GetAllCIRAConfigsRespo switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest []CIRAConfigResponse + var dest struct { + union json.RawMessage + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -4038,7 +4667,9 @@ func ParseGetAllProfilesResponse(rsp *http.Response) (*GetAllProfilesResponse, e switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest []ProfileResponse + var dest struct { + union json.RawMessage + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -4216,6 +4847,208 @@ func ParseGetProfileResponse(rsp *http.Response) (*GetProfileResponse, error) { return response, nil } +// ParseGetAllProxyconfigsResponse parses an HTTP response from a GetAllProxyconfigsWithResponse call +func ParseGetAllProxyconfigsResponse(rsp *http.Response) (*GetAllProxyconfigsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetAllProxyconfigsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest APIResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest APIResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateProxyconfigResponse parses an HTTP response from a UpdateProxyconfigWithResponse call +func ParseUpdateProxyconfigResponse(rsp *http.Response) (*UpdateProxyconfigResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateProxyconfigResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ProxyConfigResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest APIResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateProxyconfigResponse parses an HTTP response from a CreateProxyconfigWithResponse call +func ParseCreateProxyconfigResponse(rsp *http.Response) (*CreateProxyconfigResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateProxyconfigResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ProxyConfigResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest APIResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteProxyconfigResponse parses an HTTP response from a DeleteProxyconfigWithResponse call +func ParseDeleteProxyconfigResponse(rsp *http.Response) (*DeleteProxyconfigResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteProxyconfigResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 204: + var dest ProxyConfigResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON204 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest APIResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest APIResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetProxyconfigResponse parses an HTTP response from a GetProxyconfigWithResponse call +func ParseGetProxyconfigResponse(rsp *http.Response) (*GetProxyconfigResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetProxyconfigResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ProxyConfigResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest APIResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest APIResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseGetVersionResponse parses an HTTP response from a GetVersionWithResponse call func ParseGetVersionResponse(rsp *http.Response) (*GetVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/dm-manager/pkg/api/rps/mocks.go b/dm-manager/pkg/api/rps/mocks.go index e81156ea..2046170c 100644 --- a/dm-manager/pkg/api/rps/mocks.go +++ b/dm-manager/pkg/api/rps/mocks.go @@ -570,6 +570,139 @@ func (_c *MockClientWithResponsesInterface_CreateProfileWithResponse_Call) RunAn return _c } +// CreateProxyconfigWithBodyWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) CreateProxyconfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProxyconfigResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, contentType, body, reqEditors) + } else { + tmpRet = _mock.Called(ctx, contentType, body) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for CreateProxyconfigWithBodyWithResponse") + } + + var r0 *CreateProxyconfigResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, io.Reader, ...RequestEditorFn) (*CreateProxyconfigResponse, error)); ok { + return returnFunc(ctx, contentType, body, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, io.Reader, ...RequestEditorFn) *CreateProxyconfigResponse); ok { + r0 = returnFunc(ctx, contentType, body, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*CreateProxyconfigResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, io.Reader, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, contentType, body, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_CreateProxyconfigWithBodyWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateProxyconfigWithBodyWithResponse' +type MockClientWithResponsesInterface_CreateProxyconfigWithBodyWithResponse_Call struct { + *mock.Call +} + +// CreateProxyconfigWithBodyWithResponse is a helper method to define mock.On call +// - ctx +// - contentType +// - body +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) CreateProxyconfigWithBodyWithResponse(ctx interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_CreateProxyconfigWithBodyWithResponse_Call { + return &MockClientWithResponsesInterface_CreateProxyconfigWithBodyWithResponse_Call{Call: _e.mock.On("CreateProxyconfigWithBodyWithResponse", + append([]interface{}{ctx, contentType, body}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_CreateProxyconfigWithBodyWithResponse_Call) Run(run func(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_CreateProxyconfigWithBodyWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[3].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(string), args[2].(io.Reader), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_CreateProxyconfigWithBodyWithResponse_Call) Return(createProxyconfigResponse *CreateProxyconfigResponse, err error) *MockClientWithResponsesInterface_CreateProxyconfigWithBodyWithResponse_Call { + _c.Call.Return(createProxyconfigResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_CreateProxyconfigWithBodyWithResponse_Call) RunAndReturn(run func(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProxyconfigResponse, error)) *MockClientWithResponsesInterface_CreateProxyconfigWithBodyWithResponse_Call { + _c.Call.Return(run) + return _c +} + +// CreateProxyconfigWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) CreateProxyconfigWithResponse(ctx context.Context, body CreateProxyconfigJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProxyconfigResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, body, reqEditors) + } else { + tmpRet = _mock.Called(ctx, body) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for CreateProxyconfigWithResponse") + } + + var r0 *CreateProxyconfigResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, CreateProxyconfigJSONRequestBody, ...RequestEditorFn) (*CreateProxyconfigResponse, error)); ok { + return returnFunc(ctx, body, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, CreateProxyconfigJSONRequestBody, ...RequestEditorFn) *CreateProxyconfigResponse); ok { + r0 = returnFunc(ctx, body, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*CreateProxyconfigResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, CreateProxyconfigJSONRequestBody, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, body, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_CreateProxyconfigWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateProxyconfigWithResponse' +type MockClientWithResponsesInterface_CreateProxyconfigWithResponse_Call struct { + *mock.Call +} + +// CreateProxyconfigWithResponse is a helper method to define mock.On call +// - ctx +// - body +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) CreateProxyconfigWithResponse(ctx interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_CreateProxyconfigWithResponse_Call { + return &MockClientWithResponsesInterface_CreateProxyconfigWithResponse_Call{Call: _e.mock.On("CreateProxyconfigWithResponse", + append([]interface{}{ctx, body}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_CreateProxyconfigWithResponse_Call) Run(run func(ctx context.Context, body CreateProxyconfigJSONRequestBody, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_CreateProxyconfigWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[2].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(CreateProxyconfigJSONRequestBody), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_CreateProxyconfigWithResponse_Call) Return(createProxyconfigResponse *CreateProxyconfigResponse, err error) *MockClientWithResponsesInterface_CreateProxyconfigWithResponse_Call { + _c.Call.Return(createProxyconfigResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_CreateProxyconfigWithResponse_Call) RunAndReturn(run func(ctx context.Context, body CreateProxyconfigJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProxyconfigResponse, error)) *MockClientWithResponsesInterface_CreateProxyconfigWithResponse_Call { + _c.Call.Return(run) + return _c +} + // CreateWirelessConfigWithBodyWithResponse provides a mock function for the type MockClientWithResponsesInterface func (_mock *MockClientWithResponsesInterface) CreateWirelessConfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateWirelessConfigResponse, error) { var tmpRet mock.Arguments @@ -703,6 +836,72 @@ func (_c *MockClientWithResponsesInterface_CreateWirelessConfigWithResponse_Call return _c } +// DeleteProxyconfigWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) DeleteProxyconfigWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteProxyconfigResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, name, reqEditors) + } else { + tmpRet = _mock.Called(ctx, name) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for DeleteProxyconfigWithResponse") + } + + var r0 *DeleteProxyconfigResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...RequestEditorFn) (*DeleteProxyconfigResponse, error)); ok { + return returnFunc(ctx, name, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...RequestEditorFn) *DeleteProxyconfigResponse); ok { + r0 = returnFunc(ctx, name, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*DeleteProxyconfigResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, name, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_DeleteProxyconfigWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteProxyconfigWithResponse' +type MockClientWithResponsesInterface_DeleteProxyconfigWithResponse_Call struct { + *mock.Call +} + +// DeleteProxyconfigWithResponse is a helper method to define mock.On call +// - ctx +// - name +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) DeleteProxyconfigWithResponse(ctx interface{}, name interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_DeleteProxyconfigWithResponse_Call { + return &MockClientWithResponsesInterface_DeleteProxyconfigWithResponse_Call{Call: _e.mock.On("DeleteProxyconfigWithResponse", + append([]interface{}{ctx, name}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_DeleteProxyconfigWithResponse_Call) Run(run func(ctx context.Context, name string, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_DeleteProxyconfigWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[2].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_DeleteProxyconfigWithResponse_Call) Return(deleteProxyconfigResponse *DeleteProxyconfigResponse, err error) *MockClientWithResponsesInterface_DeleteProxyconfigWithResponse_Call { + _c.Call.Return(deleteProxyconfigResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_DeleteProxyconfigWithResponse_Call) RunAndReturn(run func(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteProxyconfigResponse, error)) *MockClientWithResponsesInterface_DeleteProxyconfigWithResponse_Call { + _c.Call.Return(run) + return _c +} + // Edit8021xConfigWithBodyWithResponse provides a mock function for the type MockClientWithResponsesInterface func (_mock *MockClientWithResponsesInterface) Edit8021xConfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*Edit8021xConfigResponse, error) { var tmpRet mock.Arguments @@ -1432,6 +1631,72 @@ func (_c *MockClientWithResponsesInterface_GetAllProfilesWithResponse_Call) RunA return _c } +// GetAllProxyconfigsWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) GetAllProxyconfigsWithResponse(ctx context.Context, params *GetAllProxyconfigsParams, reqEditors ...RequestEditorFn) (*GetAllProxyconfigsResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, params, reqEditors) + } else { + tmpRet = _mock.Called(ctx, params) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for GetAllProxyconfigsWithResponse") + } + + var r0 *GetAllProxyconfigsResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *GetAllProxyconfigsParams, ...RequestEditorFn) (*GetAllProxyconfigsResponse, error)); ok { + return returnFunc(ctx, params, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *GetAllProxyconfigsParams, ...RequestEditorFn) *GetAllProxyconfigsResponse); ok { + r0 = returnFunc(ctx, params, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*GetAllProxyconfigsResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *GetAllProxyconfigsParams, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, params, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_GetAllProxyconfigsWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllProxyconfigsWithResponse' +type MockClientWithResponsesInterface_GetAllProxyconfigsWithResponse_Call struct { + *mock.Call +} + +// GetAllProxyconfigsWithResponse is a helper method to define mock.On call +// - ctx +// - params +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) GetAllProxyconfigsWithResponse(ctx interface{}, params interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_GetAllProxyconfigsWithResponse_Call { + return &MockClientWithResponsesInterface_GetAllProxyconfigsWithResponse_Call{Call: _e.mock.On("GetAllProxyconfigsWithResponse", + append([]interface{}{ctx, params}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_GetAllProxyconfigsWithResponse_Call) Run(run func(ctx context.Context, params *GetAllProxyconfigsParams, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_GetAllProxyconfigsWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[2].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(*GetAllProxyconfigsParams), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_GetAllProxyconfigsWithResponse_Call) Return(getAllProxyconfigsResponse *GetAllProxyconfigsResponse, err error) *MockClientWithResponsesInterface_GetAllProxyconfigsWithResponse_Call { + _c.Call.Return(getAllProxyconfigsResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_GetAllProxyconfigsWithResponse_Call) RunAndReturn(run func(ctx context.Context, params *GetAllProxyconfigsParams, reqEditors ...RequestEditorFn) (*GetAllProxyconfigsResponse, error)) *MockClientWithResponsesInterface_GetAllProxyconfigsWithResponse_Call { + _c.Call.Return(run) + return _c +} + // GetAllWirelessConfigsWithResponse provides a mock function for the type MockClientWithResponsesInterface func (_mock *MockClientWithResponsesInterface) GetAllWirelessConfigsWithResponse(ctx context.Context, params *GetAllWirelessConfigsParams, reqEditors ...RequestEditorFn) (*GetAllWirelessConfigsResponse, error) { var tmpRet mock.Arguments @@ -1761,6 +2026,72 @@ func (_c *MockClientWithResponsesInterface_GetProfileWithResponse_Call) RunAndRe return _c } +// GetProxyconfigWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) GetProxyconfigWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetProxyconfigResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, name, reqEditors) + } else { + tmpRet = _mock.Called(ctx, name) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for GetProxyconfigWithResponse") + } + + var r0 *GetProxyconfigResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...RequestEditorFn) (*GetProxyconfigResponse, error)); ok { + return returnFunc(ctx, name, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...RequestEditorFn) *GetProxyconfigResponse); ok { + r0 = returnFunc(ctx, name, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*GetProxyconfigResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, name, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_GetProxyconfigWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProxyconfigWithResponse' +type MockClientWithResponsesInterface_GetProxyconfigWithResponse_Call struct { + *mock.Call +} + +// GetProxyconfigWithResponse is a helper method to define mock.On call +// - ctx +// - name +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) GetProxyconfigWithResponse(ctx interface{}, name interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_GetProxyconfigWithResponse_Call { + return &MockClientWithResponsesInterface_GetProxyconfigWithResponse_Call{Call: _e.mock.On("GetProxyconfigWithResponse", + append([]interface{}{ctx, name}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_GetProxyconfigWithResponse_Call) Run(run func(ctx context.Context, name string, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_GetProxyconfigWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[2].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_GetProxyconfigWithResponse_Call) Return(getProxyconfigResponse *GetProxyconfigResponse, err error) *MockClientWithResponsesInterface_GetProxyconfigWithResponse_Call { + _c.Call.Return(getProxyconfigResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_GetProxyconfigWithResponse_Call) RunAndReturn(run func(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetProxyconfigResponse, error)) *MockClientWithResponsesInterface_GetProxyconfigWithResponse_Call { + _c.Call.Return(run) + return _c +} + // GetVersionWithResponse provides a mock function for the type MockClientWithResponsesInterface func (_mock *MockClientWithResponsesInterface) GetVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVersionResponse, error) { var tmpRet mock.Arguments @@ -2487,3 +2818,136 @@ func (_c *MockClientWithResponsesInterface_UpdateProfileWithResponse_Call) RunAn _c.Call.Return(run) return _c } + +// UpdateProxyconfigWithBodyWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) UpdateProxyconfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateProxyconfigResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, contentType, body, reqEditors) + } else { + tmpRet = _mock.Called(ctx, contentType, body) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for UpdateProxyconfigWithBodyWithResponse") + } + + var r0 *UpdateProxyconfigResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, io.Reader, ...RequestEditorFn) (*UpdateProxyconfigResponse, error)); ok { + return returnFunc(ctx, contentType, body, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, io.Reader, ...RequestEditorFn) *UpdateProxyconfigResponse); ok { + r0 = returnFunc(ctx, contentType, body, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*UpdateProxyconfigResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, io.Reader, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, contentType, body, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_UpdateProxyconfigWithBodyWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateProxyconfigWithBodyWithResponse' +type MockClientWithResponsesInterface_UpdateProxyconfigWithBodyWithResponse_Call struct { + *mock.Call +} + +// UpdateProxyconfigWithBodyWithResponse is a helper method to define mock.On call +// - ctx +// - contentType +// - body +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) UpdateProxyconfigWithBodyWithResponse(ctx interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_UpdateProxyconfigWithBodyWithResponse_Call { + return &MockClientWithResponsesInterface_UpdateProxyconfigWithBodyWithResponse_Call{Call: _e.mock.On("UpdateProxyconfigWithBodyWithResponse", + append([]interface{}{ctx, contentType, body}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_UpdateProxyconfigWithBodyWithResponse_Call) Run(run func(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_UpdateProxyconfigWithBodyWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[3].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(string), args[2].(io.Reader), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_UpdateProxyconfigWithBodyWithResponse_Call) Return(updateProxyconfigResponse *UpdateProxyconfigResponse, err error) *MockClientWithResponsesInterface_UpdateProxyconfigWithBodyWithResponse_Call { + _c.Call.Return(updateProxyconfigResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_UpdateProxyconfigWithBodyWithResponse_Call) RunAndReturn(run func(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateProxyconfigResponse, error)) *MockClientWithResponsesInterface_UpdateProxyconfigWithBodyWithResponse_Call { + _c.Call.Return(run) + return _c +} + +// UpdateProxyconfigWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) UpdateProxyconfigWithResponse(ctx context.Context, body UpdateProxyconfigJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateProxyconfigResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, body, reqEditors) + } else { + tmpRet = _mock.Called(ctx, body) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for UpdateProxyconfigWithResponse") + } + + var r0 *UpdateProxyconfigResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, UpdateProxyconfigJSONRequestBody, ...RequestEditorFn) (*UpdateProxyconfigResponse, error)); ok { + return returnFunc(ctx, body, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, UpdateProxyconfigJSONRequestBody, ...RequestEditorFn) *UpdateProxyconfigResponse); ok { + r0 = returnFunc(ctx, body, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*UpdateProxyconfigResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, UpdateProxyconfigJSONRequestBody, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, body, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_UpdateProxyconfigWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateProxyconfigWithResponse' +type MockClientWithResponsesInterface_UpdateProxyconfigWithResponse_Call struct { + *mock.Call +} + +// UpdateProxyconfigWithResponse is a helper method to define mock.On call +// - ctx +// - body +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) UpdateProxyconfigWithResponse(ctx interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_UpdateProxyconfigWithResponse_Call { + return &MockClientWithResponsesInterface_UpdateProxyconfigWithResponse_Call{Call: _e.mock.On("UpdateProxyconfigWithResponse", + append([]interface{}{ctx, body}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_UpdateProxyconfigWithResponse_Call) Run(run func(ctx context.Context, body UpdateProxyconfigJSONRequestBody, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_UpdateProxyconfigWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[2].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(UpdateProxyconfigJSONRequestBody), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_UpdateProxyconfigWithResponse_Call) Return(updateProxyconfigResponse *UpdateProxyconfigResponse, err error) *MockClientWithResponsesInterface_UpdateProxyconfigWithResponse_Call { + _c.Call.Return(updateProxyconfigResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_UpdateProxyconfigWithResponse_Call) RunAndReturn(run func(ctx context.Context, body UpdateProxyconfigJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateProxyconfigResponse, error)) *MockClientWithResponsesInterface_UpdateProxyconfigWithResponse_Call { + _c.Call.Return(run) + return _c +} diff --git a/dm-manager/pkg/api/rps/swagger.json b/dm-manager/pkg/api/rps/swagger.json deleted file mode 100644 index b2f46af4..00000000 --- a/dm-manager/pkg/api/rps/swagger.json +++ /dev/null @@ -1,2740 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "title": "Remote Provisioning (RPS) API", - "contact": {}, - "version": "2.22.0", - "description": "Open AMT Cloud Toolkit supports RPS API methods for domains, CIRA configuration, wireless, profiles, and version information.\n\nFor direct connection to RPS:\n* RPS Format of URI: `{{protocol}}://{{host}}:{{port}}/api/v1/admin/{{RPS API}}`\n\n* Example URI for Domains: [https://example.site.com:8081/api/v1/admin/domains]()\n\n\nWhen running behind the Kong API proxy, prepend the following prefixes to the URI:\n\nKong prefixes:\n* `/rps` for all routes\n\nFor connection through Kong:\n\n* RPS Format of URI: `{{protocol}}://{{host}}/rps/api/v1/admin/{{RPS API}}`\n\n* Example URI for Authorize: [https://example.site.com/rps/api/v1/admin/domains]()\n" - }, - "servers": [ - { - "description": "SwaggerHub API Auto Mocking", - "url": "https://virtserver.swaggerhub.com/rbheopenamt/rps/2.8.0" - }, - { - "url": "http://example.com:8081", - "variables": {} - } - ], - "security": [ - { - "BearerAuth": [] - } - ], - "paths": { - "/api/v1/admin/ciraconfigs": { - "get": { - "tags": [ - "CIRA" - ], - "summary": "Get All CIRA Configs", - "operationId": "GetAllCIRAConfigs", - "description": "Retrieves all of the CIRA configuration profiles from the database. Will not return the password field to protect the privacy of this asset", - "parameters": [ - { - "in": "query", - "name": "$skip", - "schema": { - "type": "integer" - }, - "description": "The number of items to skip before starting to collect the result set" - }, - { - "in": "query", - "name": "$top", - "schema": { - "type": "integer" - }, - "description": "The numbers of items to return" - }, - { - "in": "query", - "name": "$count", - "schema": { - "type": "boolean" - }, - "description": "The total number of CIRA configs" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CIRAConfigResponse" - } - } - } - } - }, - "404": { - "description": "not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - }, - "post": { - "tags": [ - "CIRA" - ], - "summary": "Create CIRA Config", - "operationId": "CreateCIRAConfig", - "description": "Creates a new CIRA configuration profile.\n\nThe password is stored in a secrets manager and is only used during configuration to set the MPS credentials in the AMT device.\n", - "requestBody": { - "description": "**serverAddressFormat** valid values:\n* 3 = IPv4 address\n* 201 = FQDN\n\n**authMethod** should stay as '2'. 2 is Username/Password Authentication and is how the MPS and AMT device will authenticate to communicate.\n\n**mpsRootCertificate** can be gotten by calling the MPS API endpoint `/api/vi/ciracert`.\n", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CIRAConfigPOST" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CIRAConfigResponse" - } - } - } - }, - "400": { - "description": "bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - }, - "patch": { - "tags": [ - "CIRA" - ], - "summary": "Edit CIRA Config", - "operationId": "EditCIRAConfig", - "description": "Edits an existing CIRA configuration profile.\n\nThe configName can not be changed.\n\nVersion must be provided to ensure the correct profile is edited.\n \nThe password is stored in a secrets manager and is only used during configuration to set the MPS credentials in the AMT device.\n", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CIRAConfigPATCH" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CIRAConfigResponse" - } - } - } - }, - "400": { - "description": "bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - } - }, - "/api/v1/admin/ciraconfigs/{configName}": { - "get": { - "tags": [ - "CIRA" - ], - "summary": "Get CIRA Config", - "operationId": "GetCIRAConfig", - "description": "Retrieves the specific CIRA configuration profile from the database. Will not return the password field to protect the privacy of this asset.", - "parameters": [ - { - "name": "configName", - "in": "path", - "description": "Name of CIRA config to return", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CIRAConfigResponse" - } - } - } - }, - "404": { - "description": "not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - }, - "delete": { - "tags": [ - "CIRA" - ], - "summary": "Remove CIRA Config", - "operationId": "RemoveCIRAConfig", - "description": "Removes the specific CIRA configuration profile from the database.", - "parameters": [ - { - "name": "configName", - "in": "path", - "description": "Name of CIRA config to remove", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "successful operation", - "headers": {} - }, - "404": { - "description": "not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - } - }, - "/api/v1/admin/domains": { - "get": { - "tags": [ - "Domains" - ], - "summary": "Get All Domains", - "operationId": "GetAllDomains", - "description": "Retrieves all of the domain configuration profiles stored in the database. Will not return the provisioning certificate or certificate password to protect the privacy of these assets.", - "parameters": [ - { - "in": "query", - "name": "$skip", - "schema": { - "type": "integer" - }, - "description": "The number of items to skip before starting to collect the result set" - }, - { - "in": "query", - "name": "$top", - "schema": { - "type": "integer" - }, - "description": "The numbers of items to return" - }, - { - "in": "query", - "name": "$count", - "schema": { - "type": "boolean" - }, - "description": "The total number of domains" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/DomainResponse" - } - }, - { - "$ref": "#/components/schemas/CountDomainResponse" - } - ] - } - } - } - }, - "404": { - "description": "not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - }, - "post": { - "tags": [ - "Domains" - ], - "summary": "Create Domain", - "operationId": "CreateDomain", - "description": "Creates a new domain configuration profile to the database. The provisioning certificate and certificate password are stored in a secrets manager and are only used when required during activation.", - "requestBody": { - "description": "**provisioningCert** must be a base64 string of the Personal Information Exchange (PFX) certificate that includes the entire certificate chain and private key.\n", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DomainPOST" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DomainResponse" - } - } - } - }, - "400": { - "description": "bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - }, - "patch": { - "tags": [ - "Domains" - ], - "summary": "Update Domain Suffix", - "operationId": "UpdateDomainSuffix", - "description": "Edits an existing domain configuration profile.\n\nThe profileName field can not be changed.\n\nVersion must be provided to ensure the correct profile is edited.\n\nThe provisioning certificate and certificate password are stored in a secrets manager and are only used when required during activation. Provisioning certificate must be a base64 string of the Personal Information Exchange (PFX) certificate that includes the entire certificate chain and private key.\n", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DomainPATCH" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DomainResponse" - } - } - } - }, - "400": { - "description": "bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - } - }, - "/api/v1/admin/domains/{profileName}": { - "get": { - "tags": [ - "Domains" - ], - "summary": "Get Domain", - "operationId": "GetDomain", - "description": "Retrieves the specific domain configuration profile.", - "parameters": [ - { - "name": "profileName", - "in": "path", - "description": "Name of domain profile to return", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DomainResponse" - } - } - } - }, - "404": { - "description": "not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - }, - "delete": { - "tags": [ - "Domains" - ], - "summary": "Remove Domain", - "operationId": "RemoveDomain", - "description": "Removes the specific domain configuration profile", - "parameters": [ - { - "name": "profileName", - "in": "path", - "description": "Name of domain profile to remove", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "successful operation", - "headers": {} - }, - "404": { - "description": "not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - } - }, - "/api/v1/admin/profiles": { - "get": { - "tags": [ - "Profiles" - ], - "summary": "Get All Profiles", - "operationId": "GetAllProfiles", - "description": "Retrieves all of the AMT configuration profiles from the database. Will not return the amtPassword or mebxPassword fields to protect the privacy of these assets.", - "parameters": [ - { - "in": "query", - "name": "$skip", - "schema": { - "type": "integer" - }, - "description": "The number of items to skip before starting to collect the result set" - }, - { - "in": "query", - "name": "$top", - "schema": { - "type": "integer" - }, - "description": "The numbers of items to return" - }, - { - "in": "query", - "name": "$count", - "schema": { - "type": "boolean" - }, - "description": "The total number of profiles" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProfileResponse" - } - } - } - } - }, - "404": { - "description": "not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - }, - "post": { - "tags": [ - "Profiles" - ], - "summary": "Create Profile", - "operationId": "CreateProfile", - "description": "Creates a new AMT configuration profile. The amtPassword and mebxPassword are stored in a secrets manager and are only used during activation and configuration, respectively, to set these credentials in the AMT device.\n\n**Warning:** Choosing CIRA or TLS is **highly recommended**. By choosing 'none', an unsecure and unsafe channel is used for communcation between the AMT device and MPS and is vulnerable to attacks. To use neither, set both 'tlsMode' and 'ciraConfigName' to **null**.\n", - "requestBody": { - "description": "**userConsent** valid values:\n* None\n* All (Mandatory for CCM activation.)\n* KVM\n", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProfilePOST" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProfileResponse" - } - } - } - }, - "400": { - "description": "bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - }, - "patch": { - "tags": [ - "Profiles" - ], - "summary": "Update Profile", - "operationId": "UpdateProfile", - "description": "Edits an existing AMT configuration profile.\n\nThe profileName can not be changed.\n\n**Version must be provided to ensure the correct profile is edited.**\n \nThe amtPassword and mebxPassword are stored in a secrets manager and are only used during activation and configuration, respectively, to set these credentials in the AMT device.\n\n**Warning:** Choosing CIRA or TLS is **highly recommended**. By choosing 'none', an unsecure and unsafe channel is used for communcation between the AMT device and MPS and is vulnerable to attacks. To use neither, set both 'tlsMode' and 'ciraConfigName' to **null**.\n", - "requestBody": { - "description": "**userConsent** valid values:\n* None\n* All (Mandatory for CCM activation.)\n* KVM\n", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProfilePATCH" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProfileResponse" - } - } - } - }, - "400": { - "description": "bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - } - }, - "/api/v1/admin/profiles/{profileName}": { - "get": { - "tags": [ - "Profiles" - ], - "summary": "Get Profile", - "operationId": "GetProfile", - "description": "Retrieves the specific AMT configuration profile from the database. Will not return the amtPassword or mebxPassword fields to protect the privacy of these assets.", - "parameters": [ - { - "name": "profileName", - "in": "path", - "description": "Name of profile to return", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProfileResponse" - } - } - } - }, - "404": { - "description": "not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - }, - "delete": { - "tags": [ - "Profiles" - ], - "summary": "Remove Profile", - "operationId": "RemoveProfile", - "description": "Removes the specific AMT configuration profile from the database.", - "parameters": [ - { - "name": "profileName", - "in": "path", - "description": "Name of profile to remove", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "successful operation", - "headers": {} - }, - "404": { - "description": "not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - } - }, - "/api/v1/admin/wirelessconfigs": { - "get": { - "tags": [ - "Wireless" - ], - "summary": "Get All Wireless Configs", - "operationId": "GetAllWirelessConfigs", - "description": "Retrieves all of the Wireless configuration profiles from the database. Will not return the password field to protect the privacy of this asset.", - "parameters": [ - { - "in": "query", - "name": "$skip", - "schema": { - "type": "integer" - }, - "description": "The number of items to skip before starting to collect the result set" - }, - { - "in": "query", - "name": "$top", - "schema": { - "type": "integer" - }, - "description": "The numbers of items to return" - }, - { - "in": "query", - "name": "$count", - "schema": { - "type": "boolean" - }, - "description": "The total number of wireless configs" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/WirelessConfigResponse" - } - }, - { - "$ref": "#/components/schemas/CountWirelessResponse" - } - ] - } - } - } - }, - "404": { - "description": "not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - }, - "post": { - "tags": [ - "Wireless" - ], - "summary": "Create Wireless Config", - "operationId": "CreateWirelessConfig", - "description": "Creates a new Wireless configuration profile. The PSK passphrase is stored in a secrets manager and is only used during configuration to set the Wi-Fi credentials in the AMT device.", - "requestBody": { - "description": "**authenticationMethod** valid values: \n* 4 = WPA PSK\n* 5 = WPA_IEEE8021X\n* 6 = WPA2 PSK\n* 7 = WPA2_IEEE8021X\n\n**encryptionMethod** valid values:\n* 3 = TKIP\n* 4 = CCMP\n", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WirelessConfigPOST" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WirelessConfigResponse" - } - } - } - }, - "400": { - "description": "bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - }, - "patch": { - "tags": [ - "Wireless" - ], - "summary": "Edit Wireless Config", - "operationId": "EditWirelessConfig", - "description": "Edits an existing Wireless configuration profile.\n\nThe profileName can not be changed.\n\nThe password is stored in a secrets manager and is only used during configuration to set the Wi-Fi credentials in the AMT device.\n\nVersion must be provided to ensure the correct profile is edited.\n", - "requestBody": { - "description": "**authenticationMethod** valid values: \n* 4 = WPA PSK\n* 5 = WPA_IEEE8021X\n* 6 = WPA2 PSK\n* 7 = WPA2_IEEE8021X\n\n**encryptionMethod** valid values:\n* 3 = TKIP\n* 4 = CCMP\n", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WirelessConfigPATCH" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WirelessConfigResponse" - } - } - } - }, - "400": { - "description": "bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - } - }, - "/api/v1/admin/wirelessconfigs/{profileName}": { - "get": { - "tags": [ - "Wireless" - ], - "summary": "Get Wireless Config", - "operationId": "GetWirelessConfig", - "description": "Retrieves the specific Wireless configuration profile from the database. Will not return the password field to protect the privacy of this asset.", - "parameters": [ - { - "name": "profileName", - "in": "path", - "description": "Name of Wireless config to return", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WirelessConfigResponse" - } - } - } - }, - "404": { - "description": "not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - }, - "delete": { - "tags": [ - "Wireless" - ], - "summary": "Remove Wireless Config", - "operationId": "RemoveWirelessConfig", - "description": "Removes the specific Wireless configuration profile from the database.", - "parameters": [ - { - "name": "profileName", - "in": "path", - "description": "Name of Wireless config to remove", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "successful operation", - "headers": {} - }, - "404": { - "description": "not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - } - }, - "/api/v1/admin/ieee8021xconfigs": { - "get": { - "tags": [ - "IEEE802.1x" - ], - "summary": "Get All IEEE802.1x Configs", - "operationId": "GetAll8021xConfigs", - "description": "Retrieves all of the IEEE802.1x configuration profiles from the database.", - "parameters": [ - { - "in": "query", - "name": "$skip", - "schema": { - "type": "integer" - }, - "description": "The number of items to skip before starting to collect the result set" - }, - { - "in": "query", - "name": "$top", - "schema": { - "type": "integer" - }, - "description": "The numbers of items to return" - }, - { - "in": "query", - "name": "$count", - "schema": { - "type": "boolean" - }, - "description": "The total number of ieee8021xconfigs" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/IEEE8021xConfigResponse" - } - }, - { - "$ref": "#/components/schemas/CountIEEE8021xResponse" - } - ] - } - } - } - }, - "404": { - "description": "not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - }, - "post": { - "tags": [ - "IEEE802.1x" - ], - "summary": "Create IEEE802.1x Config", - "operationId": "Create8021xConfig", - "description": "Creates a new IEEE802.1x configuration profile.", - "requestBody": { - "description": "Wired **authenticationProtocol** valid values: \n* **0 = EAP-TLS**
Indicates that the desired EAP type is the Transport Layer Security EAP type specified in RFC 2716.\n* **2 = PEAPv0/EAP-MSCHAPv2**
Indicates that the desired EAP type is the Protected Extensible Authentication Protocol (PEAP) Version 0 EAP type specified in draft-kamath-pppext-peapv0, with Microsoft PPP CHAP Extensions, Version 2 (MSCHAPv2) as the inner authentication method.\n* **3 = PEAPv1/EAP-GTC**
Indicates that the desired EAP type is the Protected Extensible Authentication Protocol (PEAP) Version 1 EAP type specified in draft-josefsson-pppext-eap-tls-eap, with Generic Token Card (GTC) as the inner authentication method.\n* **5 = EAP-FAST/GTC**
Indicates that the desired EAP type is the Flexible Authentication Extensible Authentication Protocol EAP type specified in IETF RFC 4851, with Generic Token Card (GTC) as the inner authentication method.\n* **10 = EAP-FAST/TLS**
Indicates that the desired EAP type is the Flexible Authentication EAP type specified in IETF RFC 4851, with TLS as the inner authentication method.\n\nWireless **authenticationProtocol** valid values: \n* **0 = EAP-TLS**
Indicates that the desired EAP type is the Transport Layer Security EAP type specified in RFC 2716.\n* **2 = PEAPv0/EAP-MSCHAPv2**
Indicates that the desired EAP type is the Protected Extensible Authentication Protocol (PEAP) Version 0 EAP type specified in draft-kamath-pppext-peapv0, with Microsoft PPP CHAP Extensions, Version 2 (MSCHAPv2) as the inner authentication method.\n\n**pxeTimeout is only valid for Wired 802.1x Configs.** This field is ignored for Wireless 802.1x Configs.\n\n**pxeTimeout** is the number of seconds in which the Intel(R) AMT will hold an authenticated 802.1X session. During the defined period, Intel(R) AMT manages the 802.1X negotiation while a PXE boot takes place. After the timeout, control of the negotiation passes to the host.\n\n**pxeTimeout** valid values:\n* The maximum value is 86400 seconds (one day).\n* A value of 0 disables the feature.\n* If this optional value is omitted, Intel(R) AMT sets a default value of 120 seconds.\n", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IEEE8021xConfigPOST" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IEEE8021xConfigResponse" - } - } - } - }, - "400": { - "description": "bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - }, - "patch": { - "tags": [ - "IEEE802.1x" - ], - "summary": "Edit IEEE802.1x Config", - "operationId": "Edit8021xConfig", - "description": "Edits an existing IEEE802.1x configuration profile.\n\nThe profileName can not be changed.\n\nVersion must be provided to ensure the correct profile is edited.\n", - "requestBody": { - "description": "Wired **authenticationProtocol** valid values: \n* **0 = EAP-TLS**
Indicates that the desired EAP type is the Transport Layer Security EAP type specified in RFC 2716.\n* **2 = PEAPv0/EAP-MSCHAPv2**
Indicates that the desired EAP type is the Protected Extensible Authentication Protocol (PEAP) Version 0 EAP type specified in draft-kamath-pppext-peapv0, with Microsoft PPP CHAP Extensions, Version 2 (MSCHAPv2) as the inner authentication method.\n* **3 = PEAPv1/EAP-GTC**
Indicates that the desired EAP type is the Protected Extensible Authentication Protocol (PEAP) Version 1 EAP type specified in draft-josefsson-pppext-eap-tls-eap, with Generic Token Card (GTC) as the inner authentication method.\n* **5 = EAP-FAST/GTC**
Indicates that the desired EAP type is the Flexible Authentication Extensible Authentication Protocol EAP type specified in IETF RFC 4851, with Generic Token Card (GTC) as the inner authentication method.\n* **10 = EAP-FAST/TLS**
Indicates that the desired EAP type is the Flexible Authentication EAP type specified in IETF RFC 4851, with TLS as the inner authentication method.\n\nWireless **authenticationProtocol** valid values: \n* **0 = EAP-TLS**
Indicates that the desired EAP type is the Transport Layer Security EAP type specified in RFC 2716.\n* **2 = PEAPv0/EAP-MSCHAPv2**
Indicates that the desired EAP type is the Protected Extensible Authentication Protocol (PEAP) Version 0 EAP type specified in draft-kamath-pppext-peapv0, with Microsoft PPP CHAP Extensions, Version 2 (MSCHAPv2) as the inner authentication method.\n\n**pxeTimeout is only valid for Wired 802.1x Configs.** The field is ignored for Wireless 802.1x Configs.\n\n**pxeTimeout** is the number of seconds in which the Intel(R) AMT will hold an authenticated 802.1X session. During the defined period, Intel(R) AMT manages the 802.1X negotiation while a PXE boot takes place. After the timeout, control of the negotiation passes to the host.\n\n**pxeTimeout** valid values:\n* The maximum value is 86400 seconds (one day).\n* A value of 0 disables the feature.\n* If this optional value is omitted, Intel(R) AMT sets a default value of 120 seconds.\n", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IEEE8021xConfigPATCH" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IEEE8021xConfigResponse" - } - } - } - }, - "400": { - "description": "bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - } - }, - "/api/v1/admin/ieee8021xconfigs/{profileName}": { - "get": { - "tags": [ - "IEEE802.1x" - ], - "summary": "Get IEEE802.1x Config", - "operationId": "Get8021xConfig", - "description": "Retrieves the specific IEEE802.1x configuration profile from the database.", - "parameters": [ - { - "name": "profileName", - "in": "path", - "description": "Name of IEEE802.1x config to return", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IEEE8021xConfigResponse" - } - } - } - }, - "404": { - "description": "not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - }, - "delete": { - "tags": [ - "IEEE802.1x" - ], - "summary": "Remove IEEE802.1x Config", - "operationId": "Remove8021xConfig", - "description": "Removes the specific IEEE802.1x configuration profile from the database.", - "parameters": [ - { - "name": "profileName", - "in": "path", - "description": "Name of IEEE802.1x config profile to remove", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "successful operation", - "headers": {} - }, - "404": { - "description": "not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - }, - "500": { - "description": "internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIResponse" - } - } - } - } - }, - "deprecated": false - } - }, - "/api/v1/admin/health": { - "get": { - "summary": "Return Status of DB and Secret Store", - "description": "Returns statuses for the database and secret store that RPS is attempting to connect to.", - "tags": [ - "Misc" - ], - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HealthcheckResponse" - } - } - } - } - } - } - }, - "/api/v1/admin/version": { - "get": { - "tags": [ - "Misc" - ], - "summary": "Get Version", - "operationId": "GetVersion", - "description": "Returns the version of the service and the supported protocol version. The protocol version is used to check compatibility with RPC", - "responses": { - "200": { - "description": "successful operation", - "headers": {}, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionResponse" - } - } - } - } - }, - "deprecated": false - } - } - }, - "components": { - "securitySchemes": { - "BearerAuth": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "JWT" - } - }, - "schemas": { - "CIRAConfigResponse": { - "title": "CIRAConfigResponse", - "required": [ - "configName", - "mpsServerAddress", - "mpsPort", - "username", - "commonName", - "serverAddressFormat", - "authMethod", - "mpsRootCertificate", - "proxyDetails" - ], - "type": "object", - "properties": { - "configName": { - "type": "string" - }, - "mpsServerAddress": { - "type": "string" - }, - "mpsPort": { - "type": "integer", - "format": "int32" - }, - "username": { - "type": "string" - }, - "commonName": { - "type": "string" - }, - "serverAddressFormat": { - "type": "integer", - "format": "int32" - }, - "authMethod": { - "type": "integer", - "format": "int32" - }, - "mpsRootCertificate": { - "type": "string", - "format": "byte" - }, - "proxyDetails": { - "type": "string" - }, - "tenantId": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "example": { - "configName": "ciraconfig", - "mpsServerAddress": "192.168.8.50", - "mpsPort": 4433, - "username": "mps", - "commonName": "192.168.8.50", - "serverAddressFormat": 3, - "authMethod": 2, - "mpsRootCertificate": "U3dhZ2dlciByb2Nrcw==", - "proxyDetails": "", - "tenantId": "", - "version": "2000" - } - }, - "CIRAConfigPOST": { - "title": "CIRAConfigPOST", - "required": [ - "configName", - "mpsServerAddress", - "mpsPort", - "username", - "commonName", - "serverAddressFormat", - "authMethod", - "mpsRootCertificate", - "proxyDetails" - ], - "type": "object", - "properties": { - "configName": { - "type": "string" - }, - "mpsServerAddress": { - "type": "string" - }, - "mpsPort": { - "type": "integer", - "format": "int32" - }, - "username": { - "type": "string", - "minLength": 5, - "maxLength": 16 - }, - "password": { - "type": "string", - "format": "password" - }, - "commonName": { - "type": "string" - }, - "serverAddressFormat": { - "type": "integer", - "format": "int32" - }, - "authMethod": { - "type": "integer", - "format": "int32" - }, - "mpsRootCertificate": { - "type": "string" - }, - "proxyDetails": { - "type": "string" - } - }, - "example": { - "configName": "ciraconfig", - "mpsServerAddress": "192.168.8.50", - "mpsPort": 4433, - "username": "mpsuser", - "password": "G@ppm0ym", - "commonName": "192.168.8.50", - "serverAddressFormat": 3, - "authMethod": 2, - "mpsRootCertificate": "MIIEOzCCAqOgAwIBAgIDAjVCMA0GCSqGSIb3DQEBDAUAMD0xFzAVBgNVBAMTDk1QU1Jvb3QtNmZhNMSDIWEdsqwe89dsNNJSOW2Db3duMRAwDgYDVQQGEwd1bmtub3duMCAXDTIyMDkwNTE4MTgwMloYDzIwNTMwOTA1MTgxODAyWjA9MRcwFQYDVQQDEw5NUFNSb290LTZmYTQ5NEQMA4GA1UEChMHdW5rbm93bjEQMA4GA1UEBhMHdW5rbm93bjCCAaIwDQYJKoZIhNMSDANdnSdsnmasSDWED8oCggGBAPiA+YEPjIlryv8PdJsfIwkqd/7wJriASiM3W5VePKtO5gXKCg3piuUAAIj8Lk36TK6Lvz5He818o1YMLposvTzZJHVPILye5aqp2Lgs079nESgoAt0/yxSMh53S8dzEf5CXBmlA5foEebVUKQoei/bqSkbIC3CvZ/NMIGHF0nUMoKeigzeJbADDQVIMCnqZoPq0pRLUTbCyogAaPQ+9N72XNPw3HYX7voH2EOJxHtZHH8LTJZXKc4ozt/JU9G0onfnSTCJAirbZSfY0bdxdaSEOJg4tGAFAseHikYP6hHGqjutUC7/WiT/3EBcQnO5OjckWDXVOiG6AmNsIqW2cfJnNjd0kOwbdyEC+Tmt3w9VR8491wFexfLodbbk5JUS99bBwf856y70zfmAiCSgQcIjU5Yra7eIkNtqBv1RG4tSBm0fD5YB/mArICoYF0zNWGrqqcbfuyARdEiNCjxIbSZt+l1onUfFWfjoBcE7AhL0EaZmUTbQKP9hl+1zffpa0wIDAQABo0IwQDAMBgNVHRMEBTADAQH/MBEGCWCGSAGG+EIBAQQEAwIABzAdBgNVHQ4EFgQUb6SWpSxsakc8AP/bm+gwt0qIsMEwDQYJKoZIhvcBHgfIJKLOpnmASfdHQaft0QROp4vl1J/hcAfPw0j+l3dMEpKbzJQhaRoRkIECpxhvaYgAUq7hA7MNNn4QV20BOiDfV8ZURFrEmnehP13I7jd7YDLxpfK17x5r6wlAYZ/pGb8u9lgexE14kERmmRZvuh7wxQy0rTcYKe9+jM5R8Ugv/8gWYdpp1gr8fGJJx/e2DfSs+ViXEOWwgWmidTwPgerwWR8AcvW8IXkylXO6+SlTXnv3cWcY3BEh9r0xXBa4lkFAse2+Zj/X9rudYGqOLYtIsef0Q5fOopHJ7JBXUbMQySAIdAbBb0X14rgEC2kwow1NCm0vzi8CAL/14D1csd0c1K8fRu//lQgj+gh7Tk4B7RMZOOwTMAUQj1LoYnjSDNJS87sAmkmNNJOS09PTi9RVW3nddcgMVSSa2wehS4ZpYkZOxLdgcV58dfW9wBKBWuqmnMGPjI5pjNCRK8foPePwuP1avckSdKsen5qT0tfthDV+2TrZuV07eKVrmTXq0GBNEIVQplV1yyA==", - "proxyDetails": "" - } - }, - "CIRAConfigPATCH": { - "title": "CIRAConfigPATCH", - "required": [ - "configName", - "mpsServerAddress", - "mpsPort", - "username", - "commonName", - "serverAddressFormat", - "authMethod", - "mpsRootCertificate", - "proxyDetails", - "regeneratePassword", - "version" - ], - "type": "object", - "properties": { - "configName": { - "type": "string" - }, - "mpsServerAddress": { - "type": "string" - }, - "mpsPort": { - "type": "integer", - "format": "int32" - }, - "username": { - "type": "string", - "minLength": 5, - "maxLength": 16 - }, - "password": { - "type": "string", - "format": "password" - }, - "commonName": { - "type": "string" - }, - "serverAddressFormat": { - "type": "integer", - "format": "int32" - }, - "authMethod": { - "type": "integer", - "format": "int32" - }, - "mpsRootCertificate": { - "type": "string", - "format": "byte" - }, - "proxyDetails": { - "type": "string" - }, - "regeneratePassword": { - "type": "boolean" - }, - "version": { - "type": "string" - } - }, - "example": { - "configName": "ciraconfig", - "mpsServerAddress": "192.168.8.50", - "mpsPort": 4433, - "username": "mpsuser", - "password": "G@ppm0ym", - "commonName": "192.168.8.50", - "serverAddressFormat": 3, - "authMethod": 2, - "mpsRootCertificate": "U3dhZ2dlciByb2Nrcw==", - "proxyDetails": "", - "regeneratePassword": false, - "version": "3000" - } - }, - "DomainResponse": { - "title": "DomainResponse", - "type": "object", - "required": [ - "profileName", - "domainSuffix", - "provisioningCertStorageFormat", - "tenantId", - "version", - "expirationDate" - ], - "properties": { - "profileName": { - "type": "string" - }, - "domainSuffix": { - "type": "string" - }, - "provisioningCertStorageFormat": { - "type": "string" - }, - "tenantId": { - "type": "string" - }, - "version": { - "type": "string" - }, - "expirationDate": { - "type": "string", - "format": "date-time" - } - }, - "example": { - "profileName": "NewDomain", - "domainSuffix": "NewDomain.com", - "provisioningCertStorageFormat": "string", - "tenantId": "", - "version": "2000", - "expirationDate": "2024-12-31T23:59:00Z" - } - }, - "DomainPOST": { - "title": "DomainPOST", - "type": "object", - "required": [ - "profileName", - "domainSuffix", - "provisioningCertStorageFormat", - "provisioningCert", - "provisioningCertPassword" - ], - "properties": { - "profileName": { - "type": "string" - }, - "domainSuffix": { - "type": "string" - }, - "provisioningCertStorageFormat": { - "type": "string" - }, - "provisioningCert": { - "type": "string", - "format": "byte" - }, - "provisioningCertPassword": { - "type": "string", - "format": "password" - } - }, - "example": { - "profileName": "NewDomain", - "domainSuffix": "NewDomain.com", - "provisioningCertStorageFormat": "string", - "provisioningCert": "U3dhZ2dlciByb2Nrcw==", - "provisioningCertPassword": "G@ppm0ym" - } - }, - "DomainPATCH": { - "title": "DomainPATCH", - "type": "object", - "required": [ - "profileName", - "domainSuffix", - "provisioningCertStorageFormat", - "provisioningCert", - "provisioningCertPassword", - "version" - ], - "properties": { - "profileName": { - "type": "string" - }, - "domainSuffix": { - "type": "string" - }, - "provisioningCertStorageFormat": { - "type": "string" - }, - "provisioningCert": { - "type": "string", - "format": "byte" - }, - "provisioningCertPassword": { - "type": "string", - "format": "password" - }, - "version": { - "type": "string" - } - }, - "example": { - "profileName": "NewDomain", - "domainSuffix": "NewDomain.com", - "provisioningCertStorageFormat": "string", - "provisioningCert": "U3dhZ2dlciByb2Nrcw==", - "provisioningCertPassword": "G@ppm0ym", - "version": "3000" - } - }, - "ProfileResponse": { - "title": "ProfileResponse", - "required": [ - "profileName", - "activation", - "ciraConfigName", - "generateRandomPassword", - "generateRandomMEBxPassword", - "tags", - "dhcpEnabled", - "tlsMode", - "userConsent", - "iderEnabled", - "kvmEnabled", - "solEnabled", - "wifiConfigs", - "tlsSigningAuthority", - "ieee8021xProfile" - ], - "type": "object", - "properties": { - "profileName": { - "type": "string" - }, - "activation": { - "type": "string" - }, - "ciraConfigName": { - "type": "string" - }, - "generateRandomPassword": { - "type": "boolean" - }, - "generateRandomMEBxPassword": { - "type": "boolean" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "dhcpEnabled": { - "type": "boolean" - }, - "tlsMode": { - "type": "number", - "description": "Server Authentication Only(1), Server and Non-TLS Authentication (2), Mutual TLS only (3), Mutual and Non-TLS authentication (4)" - }, - "userConsent": { - "type": "string", - "description": "User Consenst must be one of None, All, KVM. It must be 'All' in client control mode" - }, - "iderEnabled": { - "type": "boolean" - }, - "kvmEnabled": { - "type": "boolean" - }, - "solEnabled": { - "type": "boolean" - }, - "version": { - "type": "string" - }, - "tenantId": { - "type": "string" - }, - "wifiConfigs": { - "type": "array", - "items": { - "type": "object" - } - }, - "tlsSigningAuthority": { - "type": "string" - }, - "ieee8021xProfile": { - "type": "string" - }, - "ipSyncEnabled": { - "type": "boolean" - }, - "localWifiSyncEnabled": { - "type": "boolean" - } - }, - "example": { - "profileName": "profile1", - "activation": "acmactivate", - "ciraConfigName": "ciraconfig", - "generateRandomPassword": false, - "generateRandomMEBxPassword": false, - "tags": [ - "tag1", - "tag2" - ], - "dhcpEnabled": true, - "tlsMode": null, - "userConsent": "None", - "iderEnabled": false, - "kvmEnabled": true, - "solEnabled": true, - "tenantId": "", - "version": "2000", - "wifiConfigs": [ - { - "priority": 1, - "profileName": "home" - }, - { - "priority": 2, - "profileName": "office" - } - ], - "tlsSigningAuthority": "MicrosoftCA", - "ieee8021xProfile": "wired8021xProfile", - "ipSyncEnabled": false, - "localWifiSyncEnabled": true - } - }, - "ProfilePOST": { - "title": "ProfilePOST", - "required": [ - "profileName", - "generateRandomPassword", - "activation", - "generateRandomMEBxPassword", - "tags", - "dhcpEnabled", - "tlsSigningAuthority" - ], - "type": "object", - "properties": { - "profileName": { - "type": "string" - }, - "amtPassword": { - "type": "string", - "format": "password" - }, - "generateRandomPassword": { - "type": "boolean" - }, - "activation": { - "type": "string" - }, - "ciraConfigName": { - "type": "string" - }, - "networkConfigName": { - "type": "string" - }, - "mebxPassword": { - "type": "string", - "format": "password" - }, - "generateRandomMEBxPassword": { - "type": "boolean" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "dhcpEnabled": { - "type": "boolean" - }, - "wifiConfigs": { - "type": "array", - "items": { - "type": "object" - } - }, - "tlsMode": { - "type": "number", - "description": "Server Authentication Only (1), Server and Non-TLS Authentication (2)", - "enum": [ - 1, - 2 - ] - }, - "userConsent": { - "type": "string", - "description": "User Consent must be one of None, All, KVM. It should be 'All' in client control mode", - "enum": [ - "None", - "All", - "KVM" - ] - }, - "iderEnabled": { - "type": "boolean" - }, - "kvmEnabled": { - "type": "boolean" - }, - "solEnabled": { - "type": "boolean" - }, - "tlsSigningAuthority": { - "type": "string" - }, - "ieee8021xProfile": { - "type": "string" - }, - "ipSyncEnabled": { - "type": "boolean" - }, - "localWifiSyncEnabled": { - "type": "boolean" - } - }, - "example": { - "profileName": "profile1", - "amtPassword": "G@ppm0ym", - "generateRandomPassword": false, - "activation": "acmactivate", - "ciraConfigName": "ciraconfig", - "mebxPassword": "G@ppm0ym", - "generateRandomMEBxPassword": false, - "tlsMode": null, - "tags": [ - "tag1", - "tag2" - ], - "dhcpEnabled": true, - "wifiConfigs": [ - { - "priority": 1, - "profileName": "home" - }, - { - "priority": 2, - "profileName": "office" - } - ], - "userConsent": "None", - "iderEnabled": false, - "kvmEnabled": true, - "solEnabled": true, - "tlsSigningAuthority": "MicrosoftCA", - "ieee8021xProfile": "wired8021xProfile", - "ipSyncEnabled": false, - "localWifiSyncEnabled": true - } - }, - "ProfilePATCH": { - "title": "ProfilePATCH", - "required": [ - "profileName", - "generateRandomPassword", - "activation", - "ciraConfigName", - "generateRandomMEBxPassword", - "tags", - "dhcpEnabled", - "wifiConfigs", - "tlsMode", - "userConsent", - "iderEnabled", - "kvmEnabled", - "solEnabled", - "version" - ], - "type": "object", - "properties": { - "profileName": { - "type": "string" - }, - "amtPassword": { - "type": "string", - "format": "password" - }, - "generateRandomPassword": { - "type": "boolean" - }, - "activation": { - "type": "string" - }, - "ciraConfigName": { - "type": "string" - }, - "mebxPassword": { - "type": "string", - "format": "password" - }, - "generateRandomMEBxPassword": { - "type": "boolean" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "dhcpEnabled": { - "type": "boolean" - }, - "wifiConfigs": { - "type": "array", - "items": { - "type": "object" - } - }, - "tlsMode": { - "type": "number", - "description": "Server Authentication Only (1), Server and Non-TLS Authentication (2)", - "enum": [ - 1, - 2 - ] - }, - "userConsent": { - "type": "string", - "description": "User Consent must be one of None, All, KVM. It should be 'All' in client control mode", - "enum": [ - "None", - "All", - "KVM" - ] - }, - "iderEnabled": { - "type": "boolean" - }, - "kvmEnabled": { - "type": "boolean" - }, - "solEnabled": { - "type": "boolean" - }, - "version": { - "type": "string" - }, - "tlsSigningAuthority": { - "type": "string" - }, - "ieee8021xProfile": { - "type": "string" - }, - "ipSyncEnabled": { - "type": "boolean" - }, - "localWifiSyncEnabled": { - "type": "boolean" - } - }, - "example": { - "profileName": "profile1", - "amtPassword": "G@ppm0ym", - "generateRandomPassword": false, - "activation": "acmactivate", - "ciraConfigName": "ciraconfig", - "mebxPassword": "G@ppm0ym", - "generateRandomMEBxPassword": false, - "tlsMode": null, - "tags": [ - "tag1", - "tag2" - ], - "dhcpEnabled": true, - "wifiConfigs": [ - { - "priority": 1, - "profileName": "home" - }, - { - "priority": 2, - "profileName": "office" - } - ], - "userConsent": "None", - "iderEnabled": false, - "kvmEnabled": true, - "solEnabled": true, - "version": "3000", - "tlsSigningAuthority": "MicrosoftCA", - "ipSyncEnabled": false, - "localWifiSyncEnabled": true - } - }, - "WirelessConfigResponse": { - "title": "WirelessConfigResponse", - "required": [ - "profileName", - "authenticationMethod", - "encryptionMethod", - "ssid", - "pskValue", - "linkPolicy" - ], - "type": "object", - "properties": { - "profileName": { - "type": "string" - }, - "authenticationMethod": { - "type": "integer" - }, - "encryptionMethod": { - "type": "integer" - }, - "ssid": { - "type": "string" - }, - "pskValue": { - "type": "string" - }, - "linkPolicy": { - "type": "array", - "items": { - "type": "integer" - } - }, - "total_count": { - "type": "string" - }, - "tenantId": { - "type": "string" - }, - "version": { - "type": "string" - }, - "ieee8021xProfile": { - "type": "string" - } - }, - "example": { - "profileName": "homeWifiConfig", - "authenticationMethod": 4, - "encryptionMethod": 4, - "ssid": "home", - "pskValue": "null", - "linkPolicy": [ - 14, - 16 - ], - "tenantId": "", - "version": "2000", - "ieee8021xProfile": "wireless8021xconfig" - } - }, - "WirelessConfigPOST": { - "title": "WirelessConfigPOST", - "required": [ - "profileName", - "authenticationMethod", - "encryptionMethod", - "ssid", - "linkPolicy" - ], - "type": "object", - "properties": { - "profileName": { - "type": "string" - }, - "authenticationMethod": { - "type": "integer" - }, - "encryptionMethod": { - "type": "integer" - }, - "ssid": { - "type": "string" - }, - "pskPassphrase": { - "type": "string" - }, - "linkPolicy": { - "type": "array", - "items": { - "type": "integer", - "enum": [ - 1, - 14, - 16, - 224 - ] - } - }, - "ieee8021xProfile": { - "type": "string" - } - }, - "example": { - "profileName": "homeWifiConfig", - "authenticationMethod": 4, - "encryptionMethod": 4, - "ssid": "home", - "pskPassphrase": "P@ssw0rd", - "linkPolicy": [ - 14, - 16 - ], - "ieee8021xProfile": "wireless8021xconfig" - } - }, - "WirelessConfigPATCH": { - "title": "WirelessConfigPATCH", - "required": [ - "profileName", - "authenticationMethod", - "encryptionMethod", - "ssid", - "linkPolicy", - "version" - ], - "type": "object", - "properties": { - "profileName": { - "type": "string" - }, - "authenticationMethod": { - "type": "integer" - }, - "encryptionMethod": { - "type": "integer" - }, - "ssid": { - "type": "string" - }, - "pskPassphrase": { - "type": "string" - }, - "linkPolicy": { - "type": "array", - "items": { - "type": "integer", - "enum": [ - 1, - 14, - 16, - 224 - ] - } - }, - "ieee8021xProfile": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "example": { - "profileName": "homeWifiConfig", - "authenticationMethod": 4, - "encryptionMethod": 4, - "ssid": "home", - "pskPassphrase": "P@ssw0rd", - "linkPolicy": [ - 14, - 16 - ], - "version": "3000", - "ieee8021xProfile": "wireless8021xconfig" - } - }, - "IEEE8021xConfigResponse": { - "title": "IEEE8021xConfigResponse", - "required": [ - "profileName", - "authenticationProtocol", - "pxeTimeout", - "wiredInterface", - "tenantId", - "version" - ], - "type": "object", - "properties": { - "profileName": { - "type": "string" - }, - "authenticationProtocol": { - "type": "array", - "items": { - "type": "integer", - "enum": [ - 0, - 2, - 3, - 5, - 10 - ] - } - }, - "pxeTimeout": { - "type": "integer" - }, - "wiredInterface": { - "type": "boolean" - }, - "tenantId": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "example": { - "profileName": "wired8021xConfig", - "authenticationProtocol": 0, - "pxeTimeout": 120, - "wiredInterface": true, - "tenantId": "", - "version": "3000" - } - }, - "IEEE8021xConfigPOST": { - "title": "IEEE8021xConfigPOST", - "required": [ - "profileName", - "authenticationProtocol", - "wiredInterface" - ], - "type": "object", - "properties": { - "profileName": { - "type": "string" - }, - "authenticationProtocol": { - "type": "array", - "items": { - "type": "integer", - "enum": [ - 0, - 2, - 3, - 5, - 10 - ] - } - }, - "pxeTimeout": { - "type": "integer" - }, - "wiredInterface": { - "type": "boolean" - }, - "tenantId": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "example": { - "profileName": "wired8021xConfig", - "authenticationProtocol": 0, - "pxeTimeout": 120, - "wiredInterface": true, - "tenantId": "" - } - }, - "IEEE8021xConfigPATCH": { - "title": "IEEE8021xConfigPATCH", - "required": [ - "profileName", - "authenticationProtocol", - "wiredInterface", - "version" - ], - "type": "object", - "properties": { - "profileName": { - "type": "string" - }, - "authenticationProtocol": { - "type": "array", - "items": { - "type": "integer", - "enum": [ - 0, - 3, - 5, - 10 - ] - } - }, - "pxeTimeout": { - "type": "integer" - }, - "wiredInterface": { - "type": "boolean" - }, - "tenantId": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "example": { - "profileName": "wired8021xConfig", - "authenticationProtocol": 0, - "pxeTimeout": 120, - "wiredInterface": true, - "tenantId": "", - "version": "5000" - } - }, - "CountCIRAResponse": { - "title": "CountCIRAResponse", - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CIRAConfigResponse" - } - }, - "totalCount": { - "type": "integer" - } - } - }, - "CountDomainResponse": { - "title": "CountDomainResponse", - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DomainResponse" - } - }, - "totalCount": { - "type": "integer" - } - } - }, - "CountProfileResponse": { - "title": "CountProfileResponse", - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProfileResponse" - } - }, - "totalCount": { - "type": "integer" - } - } - }, - "CountWirelessResponse": { - "title": "CountWirelessResponse", - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WirelessConfigResponse" - } - }, - "totalCount": { - "type": "integer" - } - } - }, - "CountIEEE8021xResponse": { - "title": "CountIEEE8021xResponse", - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IEEE8021xConfigResponse" - } - }, - "totalCount": { - "type": "integer" - } - } - }, - "APIResponse": { - "title": "APIResponse", - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - } - } - }, - "HealthcheckResponse": { - "title": "HealthcheckResponse", - "example": { - "db": { - "name": "POSTGRES", - "status": "OK" - }, - "secretStore": { - "name": "VAULT", - "status": { - "initialized": true, - "sealed": false, - "standby": false, - "performance_standby": false, - "replication_performance_mode": "disabled", - "replication_dr_mode": "disabled", - "server_time_utc": 1646337196, - "version": "1.9.3", - "cluster_name": "vault-cluster-3dc0c596", - "cluster_id": "469ada72-d74b-4d1e-6e77-476bf9902b72" - } - } - }, - "properties": { - "db": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "status": { - "type": "string" - } - } - }, - "secretStore": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "status": { - "type": "object", - "properties": { - "initialized": { - "type": "boolean" - }, - "sealed": { - "type": "boolean" - }, - "standby": { - "type": "boolean" - }, - "performance_standby": { - "type": "boolean" - }, - "replication_performance_mode": { - "type": "string" - }, - "replication_dr_mode": { - "type": "string" - }, - "server_time_utc": { - "type": "integer" - }, - "version": { - "type": "string" - }, - "cluster_name": { - "type": "string" - }, - "cluster_id": { - "type": "string" - } - } - } - } - } - } - }, - "VersionResponse": { - "title": "VersionResponse", - "required": [ - "serviceVersion", - "protocolVersion" - ], - "type": "object", - "properties": { - "serviceVersion": { - "type": "string" - }, - "protocolVersion": { - "type": "string" - } - }, - "example": { - "serviceVersion": "2.9.0", - "protocolVersion": "4.0.0" - } - } - } - }, - "tags": [ - { - "name": "CIRA" - }, - { - "name": "Domains" - }, - { - "name": "Profiles" - }, - { - "name": "Wireless" - }, - { - "name": "IEEE802.1x" - }, - { - "name": "Misc", - "description": "" - } - ] -} \ No newline at end of file diff --git a/dm-manager/pkg/api/rps/swagger.yaml b/dm-manager/pkg/api/rps/swagger.yaml new file mode 100644 index 00000000..722e886f --- /dev/null +++ b/dm-manager/pkg/api/rps/swagger.yaml @@ -0,0 +1,2300 @@ +openapi: 3.0.0 +info: + title: Remote Provisioning (RPS) API + contact: {} + version: 2.29.1 + description: | + Open AMT Cloud Toolkit supports RPS API methods for domains, CIRA configuration, wireless, profiles, and version information. + + For direct connection to RPS: + * RPS Format of URI: `{{protocol}}://{{host}}:{{port}}/api/v1/admin/{{RPS API}}` + + * Example URI for Domains: [https://example.site.com:8081/api/v1/admin/domains]() + + + When running behind the Kong API proxy, prepend the following prefixes to the URI: + + Kong prefixes: + * `/rps` for all routes + + For connection through Kong: + + * RPS Format of URI: `{{protocol}}://{{host}}/rps/api/v1/admin/{{RPS API}}` + + * Example URI for Authorize: [https://example.site.com/rps/api/v1/admin/domains]() + +servers: + # Added by API Auto Mocking Plugin + - description: SwaggerHub API Auto Mocking + url: https://virtserver.swaggerhub.com/rbheopenamt/rps/2.8.0 + - url: http://example.com:8081 + variables: {} +security: + - BearerAuth: [] +paths: + /api/v1/admin/ciraconfigs: + get: + tags: + - CIRA + summary: Get All CIRA Configs + operationId: GetAllCIRAConfigs + description: Retrieves all of the CIRA configuration profiles from the database. Will not return the password field to protect the privacy of this asset + parameters: + - in: query + name: $skip + schema: + type: integer + description: The number of items to skip before starting to collect the result set + - in: query + name: $top + schema: + type: integer + description: The numbers of items to return + - in: query + name: $count + schema: + type: boolean + description: The total number of CIRA configs + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + oneOf: + - type: array + items: + $ref: '#/components/schemas/CIRAConfigResponse' + - $ref: '#/components/schemas/CountCIRAResponse' + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + post: + tags: + - CIRA + summary: Create CIRA Config + operationId: CreateCIRAConfig + description: | + Creates a new CIRA configuration profile. + + The password is stored in a secrets manager and is only used during configuration to set the MPS credentials in the AMT device. + requestBody: + description: | + **serverAddressFormat** valid values: + * 3 = IPv4 address + * 201 = FQDN + + **authMethod** should stay as '2'. 2 is Username/Password Authentication and is how the MPS and AMT device will authenticate to communicate. + + **mpsRootCertificate** can be gotten by calling the MPS API endpoint `/api/v1/ciracert`. + content: + application/json: + schema: + $ref: '#/components/schemas/CIRAConfigPOST' + required: true + responses: + 201: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/CIRAConfigResponse' + 400: + description: 'bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + patch: + tags: + - CIRA + summary: Edit CIRA Config + operationId: EditCIRAConfig + description: | + Edits an existing CIRA configuration profile. + + The configName can not be changed. + + Version must be provided to ensure the correct profile is edited. + + The password is stored in a secrets manager and is only used during configuration to set the MPS credentials in the AMT device. + requestBody: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CIRAConfigPATCH' + required: true + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/CIRAConfigResponse' + 400: + description: 'bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + /api/v1/admin/ciraconfigs/{configName}: + get: + tags: + - CIRA + summary: Get CIRA Config + operationId: GetCIRAConfig + description: Retrieves the specific CIRA configuration profile from the database. Will not return the password field to protect the privacy of this asset. + parameters: + - name: configName + in: path + description: Name of CIRA config to return + required: true + schema: + type: string + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/CIRAConfigResponse' + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + delete: + tags: + - CIRA + summary: Remove CIRA Config + operationId: RemoveCIRAConfig + description: Removes the specific CIRA configuration profile from the database. + parameters: + - name: configName + in: path + description: Name of CIRA config to remove + required: true + schema: + type: string + responses: + 204: + description: 'successful operation' + headers: {} + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + /api/v1/admin/domains: + get: + tags: + - Domains + summary: Get All Domains + operationId: GetAllDomains + description: Retrieves all of the domain configuration profiles stored in the database. Will not return the provisioning certificate or certificate password to protect the privacy of these assets. + parameters: + - in: query + name: $skip + schema: + type: integer + description: The number of items to skip before starting to collect the result set + - in: query + name: $top + schema: + type: integer + description: The numbers of items to return + - in: query + name: $count + schema: + type: boolean + description: The total number of domains + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + oneOf: + - type: array + items: + $ref: '#/components/schemas/DomainResponse' + - $ref: '#/components/schemas/CountDomainResponse' + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + post: + tags: + - Domains + summary: Create Domain + operationId: CreateDomain + description: Creates a new domain configuration profile to the database. The provisioning certificate and certificate password are stored in a secrets manager and are only used when required during activation. + requestBody: + description: | + **provisioningCert** must be a base64 string of the Personal Information Exchange (PFX) certificate that includes the entire certificate chain and private key. + content: + application/json: + schema: + $ref: '#/components/schemas/DomainPOST' + required: true + responses: + 201: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/DomainResponse' + 400: + description: 'bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + patch: + tags: + - Domains + summary: Update Domain Suffix + operationId: UpdateDomainSuffix + description: | + Edits an existing domain configuration profile. + + The profileName field can not be changed. + + Version must be provided to ensure the correct profile is edited. + + The provisioning certificate and certificate password are stored in a secrets manager and are only used when required during activation. Provisioning certificate must be a base64 string of the Personal Information Exchange (PFX) certificate that includes the entire certificate chain and private key. + requestBody: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DomainPATCH' + required: true + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/DomainResponse' + 400: + description: 'bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + /api/v1/admin/domains/{profileName}: + get: + tags: + - Domains + summary: Get Domain + operationId: GetDomain + description: Retrieves the specific domain configuration profile. + parameters: + - name: profileName + in: path + description: Name of domain profile to return + required: true + schema: + type: string + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/DomainResponse' + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + + deprecated: false + delete: + tags: + - Domains + summary: Remove Domain + operationId: RemoveDomain + description: Removes the specific domain configuration profile + parameters: + - name: profileName + in: path + description: Name of domain profile to remove + required: true + schema: + type: string + responses: + 204: + description: 'successful operation' + headers: {} + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + /api/v1/admin/profiles: + get: + tags: + - Profiles + summary: Get All Profiles + operationId: GetAllProfiles + description: Retrieves all of the AMT configuration profiles from the database. Will not return the amtPassword or mebxPassword fields to protect the privacy of these assets. + parameters: + - in: query + name: $skip + schema: + type: integer + description: The number of items to skip before starting to collect the result set + - in: query + name: $top + schema: + type: integer + description: The numbers of items to return + - in: query + name: $count + schema: + type: boolean + description: The total number of profiles + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + oneOf: + - type: array + items: + $ref: '#/components/schemas/ProfileResponse' + - $ref: '#/components/schemas/CountProfileResponse' + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + post: + tags: + - Profiles + summary: Create Profile + operationId: CreateProfile + description: | + Creates a new AMT configuration profile. The amtPassword and mebxPassword are stored in a secrets manager and are only used during activation and configuration, respectively, to set these credentials in the AMT device. + + **Warning:** Choosing CIRA or TLS is **highly recommended**. By choosing 'none', an unsecure and unsafe channel is used for communication between the AMT device and MPS and is vulnerable to attacks. To use neither, set both 'tlsMode' and 'ciraConfigName' to **null**. + requestBody: + description: | + **userConsent** valid values: + * None + * All (Mandatory for CCM activation.) + * KVM + content: + application/json: + schema: + $ref: '#/components/schemas/ProfilePOST' + required: true + responses: + 201: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/ProfileResponse' + 400: + description: 'bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + patch: + tags: + - Profiles + summary: Update Profile + operationId: UpdateProfile + description: | + Edits an existing AMT configuration profile. + + The profileName can not be changed. + + **Version must be provided to ensure the correct profile is edited.** + + The amtPassword and mebxPassword are stored in a secrets manager and are only used during activation and configuration, respectively, to set these credentials in the AMT device. + + **Warning:** Choosing CIRA or TLS is **highly recommended**. By choosing 'none', an unsecure and unsafe channel is used for communication between the AMT device and MPS and is vulnerable to attacks. To use neither, set both 'tlsMode' and 'ciraConfigName' to **null**. + requestBody: + description: | + **userConsent** valid values: + * None + * All (Mandatory for CCM activation.) + * KVM + content: + application/json: + schema: + $ref: '#/components/schemas/ProfilePATCH' + required: true + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/ProfileResponse' + 400: + description: 'bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + /api/v1/admin/profiles/{profileName}: + get: + tags: + - Profiles + summary: Get Profile + operationId: GetProfile + description: Retrieves the specific AMT configuration profile from the database. Will not return the amtPassword or mebxPassword fields to protect the privacy of these assets. + parameters: + - name: profileName + in: path + description: Name of profile to return + required: true + schema: + type: string + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/ProfileResponse' + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + delete: + tags: + - Profiles + summary: Remove Profile + operationId: RemoveProfile + description: Removes the specific AMT configuration profile from the database. + parameters: + - name: profileName + in: path + description: Name of profile to remove + required: true + schema: + type: string + responses: + 204: + description: 'successful operation' + headers: {} + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + /api/v1/admin/wirelessconfigs: + get: + tags: + - Wireless + summary: Get All Wireless Configs + operationId: GetAllWirelessConfigs + description: Retrieves all of the Wireless configuration profiles from the database. Will not return the password field to protect the privacy of this asset. + parameters: + - in: query + name: $skip + schema: + type: integer + description: The number of items to skip before starting to collect the result set + - in: query + name: $top + schema: + type: integer + description: The numbers of items to return + - in: query + name: $count + schema: + type: boolean + description: The total number of wireless configs + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + oneOf: + - type: array + items: + $ref: '#/components/schemas/WirelessConfigResponse' + - $ref: '#/components/schemas/CountWirelessResponse' + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + post: + tags: + - Wireless + summary: Create Wireless Config + operationId: CreateWirelessConfig + description: Creates a new Wireless configuration profile. The PSK passphrase is stored in a secrets manager and is only used during configuration to set the Wi-Fi credentials in the AMT device. + requestBody: + description: | + **authenticationMethod** valid values: + * 4 = WPA PSK + * 5 = WPA_IEEE8021X + * 6 = WPA2 PSK + * 7 = WPA2_IEEE8021X + + **encryptionMethod** valid values: + * 3 = TKIP + * 4 = CCMP + content: + application/json: + schema: + $ref: '#/components/schemas/WirelessConfigPOST' + required: true + responses: + 201: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/WirelessConfigResponse' + 400: + description: 'bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + patch: + tags: + - Wireless + summary: Edit Wireless Config + operationId: EditWirelessConfig + description: | + Edits an existing Wireless configuration profile. + + The profileName can not be changed. + + The password is stored in a secrets manager and is only used during configuration to set the Wi-Fi credentials in the AMT device. + + Version must be provided to ensure the correct profile is edited. + requestBody: + description: | + **authenticationMethod** valid values: + * 4 = WPA PSK + * 5 = WPA_IEEE8021X + * 6 = WPA2 PSK + * 7 = WPA2_IEEE8021X + + **encryptionMethod** valid values: + * 3 = TKIP + * 4 = CCMP + content: + application/json: + schema: + $ref: '#/components/schemas/WirelessConfigPATCH' + required: true + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/WirelessConfigResponse' + 400: + description: 'bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + /api/v1/admin/wirelessconfigs/{profileName}: + get: + tags: + - Wireless + summary: Get Wireless Config + operationId: GetWirelessConfig + description: Retrieves the specific Wireless configuration profile from the database. Will not return the password field to protect the privacy of this asset. + parameters: + - name: profileName + in: path + description: Name of Wireless config to return + required: true + schema: + type: string + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/WirelessConfigResponse' + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + delete: + tags: + - Wireless + summary: Remove Wireless Config + operationId: RemoveWirelessConfig + description: Removes the specific Wireless configuration profile from the database. + parameters: + - name: profileName + in: path + description: Name of Wireless config to remove + required: true + schema: + type: string + responses: + 204: + description: 'successful operation' + headers: {} + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + /api/v1/admin/ieee8021xconfigs: + get: + tags: + - IEEE802.1x + summary: Get All IEEE802.1x Configs + operationId: GetAll8021xConfigs + description: Retrieves all of the IEEE802.1x configuration profiles from the database. + parameters: + - in: query + name: $skip + schema: + type: integer + description: The number of items to skip before starting to collect the result set + - in: query + name: $top + schema: + type: integer + description: The numbers of items to return + - in: query + name: $count + schema: + type: boolean + description: The total number of ieee8021xconfigs + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + oneOf: + - type: array + items: + $ref: '#/components/schemas/IEEE8021xConfigResponse' + - $ref: '#/components/schemas/CountIEEE8021xResponse' + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + post: + tags: + - IEEE802.1x + summary: Create IEEE802.1x Config + operationId: Create8021xConfig + description: Creates a new IEEE802.1x configuration profile. + requestBody: + description: | + Wired **authenticationProtocol** valid values: + * **0 = EAP-TLS**
Indicates that the desired EAP type is the Transport Layer Security EAP type specified in RFC 2716. + * **2 = PEAPv0/EAP-MSCHAPv2**
Indicates that the desired EAP type is the Protected Extensible Authentication Protocol (PEAP) Version 0 EAP type specified in draft-kamath-pppext-peapv0, with Microsoft PPP CHAP Extensions, Version 2 (MSCHAPv2) as the inner authentication method. + * **3 = PEAPv1/EAP-GTC**
Indicates that the desired EAP type is the Protected Extensible Authentication Protocol (PEAP) Version 1 EAP type specified in draft-josefsson-pppext-eap-tls-eap, with Generic Token Card (GTC) as the inner authentication method. + * **5 = EAP-FAST/GTC**
Indicates that the desired EAP type is the Flexible Authentication Extensible Authentication Protocol EAP type specified in IETF RFC 4851, with Generic Token Card (GTC) as the inner authentication method. + * **10 = EAP-FAST/TLS**
Indicates that the desired EAP type is the Flexible Authentication EAP type specified in IETF RFC 4851, with TLS as the inner authentication method. + + Wireless **authenticationProtocol** valid values: + * **0 = EAP-TLS**
Indicates that the desired EAP type is the Transport Layer Security EAP type specified in RFC 2716. + * **2 = PEAPv0/EAP-MSCHAPv2**
Indicates that the desired EAP type is the Protected Extensible Authentication Protocol (PEAP) Version 0 EAP type specified in draft-kamath-pppext-peapv0, with Microsoft PPP CHAP Extensions, Version 2 (MSCHAPv2) as the inner authentication method. + + **pxeTimeout is only valid for Wired 802.1x Configs.** This field is ignored for Wireless 802.1x Configs. + + **pxeTimeout** is the number of seconds in which the Intel(R) AMT will hold an authenticated 802.1X session. During the defined period, Intel(R) AMT manages the 802.1X negotiation while a PXE boot takes place. After the timeout, control of the negotiation passes to the host. + + **pxeTimeout** valid values: + * The maximum value is 86400 seconds (one day). + * A value of 0 disables the feature. + * If this optional value is omitted, Intel(R) AMT sets a default value of 120 seconds. + content: + application/json: + schema: + $ref: '#/components/schemas/IEEE8021xConfigPOST' + required: true + responses: + 201: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/IEEE8021xConfigResponse' + 400: + description: 'bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + patch: + tags: + - IEEE802.1x + summary: Edit IEEE802.1x Config + operationId: Edit8021xConfig + description: | + Edits an existing IEEE802.1x configuration profile. + + The profileName can not be changed. + + Version must be provided to ensure the correct profile is edited. + requestBody: + description: | + Wired **authenticationProtocol** valid values: + * **0 = EAP-TLS**
Indicates that the desired EAP type is the Transport Layer Security EAP type specified in RFC 2716. + * **2 = PEAPv0/EAP-MSCHAPv2**
Indicates that the desired EAP type is the Protected Extensible Authentication Protocol (PEAP) Version 0 EAP type specified in draft-kamath-pppext-peapv0, with Microsoft PPP CHAP Extensions, Version 2 (MSCHAPv2) as the inner authentication method. + * **3 = PEAPv1/EAP-GTC**
Indicates that the desired EAP type is the Protected Extensible Authentication Protocol (PEAP) Version 1 EAP type specified in draft-josefsson-pppext-eap-tls-eap, with Generic Token Card (GTC) as the inner authentication method. + * **5 = EAP-FAST/GTC**
Indicates that the desired EAP type is the Flexible Authentication Extensible Authentication Protocol EAP type specified in IETF RFC 4851, with Generic Token Card (GTC) as the inner authentication method. + * **10 = EAP-FAST/TLS**
Indicates that the desired EAP type is the Flexible Authentication EAP type specified in IETF RFC 4851, with TLS as the inner authentication method. + + Wireless **authenticationProtocol** valid values: + * **0 = EAP-TLS**
Indicates that the desired EAP type is the Transport Layer Security EAP type specified in RFC 2716. + * **2 = PEAPv0/EAP-MSCHAPv2**
Indicates that the desired EAP type is the Protected Extensible Authentication Protocol (PEAP) Version 0 EAP type specified in draft-kamath-pppext-peapv0, with Microsoft PPP CHAP Extensions, Version 2 (MSCHAPv2) as the inner authentication method. + + **pxeTimeout is only valid for Wired 802.1x Configs.** The field is ignored for Wireless 802.1x Configs. + + **pxeTimeout** is the number of seconds in which the Intel(R) AMT will hold an authenticated 802.1X session. During the defined period, Intel(R) AMT manages the 802.1X negotiation while a PXE boot takes place. After the timeout, control of the negotiation passes to the host. + + **pxeTimeout** valid values: + * The maximum value is 86400 seconds (one day). + * A value of 0 disables the feature. + * If this optional value is omitted, Intel(R) AMT sets a default value of 120 seconds. + content: + application/json: + schema: + $ref: '#/components/schemas/IEEE8021xConfigPATCH' + required: true + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/IEEE8021xConfigResponse' + 400: + description: 'bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + /api/v1/admin/ieee8021xconfigs/{profileName}: + get: + tags: + - IEEE802.1x + summary: Get IEEE802.1x Config + operationId: Get8021xConfig + description: Retrieves the specific IEEE802.1x configuration profile from the database. + parameters: + - name: profileName + in: path + description: Name of IEEE802.1x config to return + required: true + schema: + type: string + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/IEEE8021xConfigResponse' + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + delete: + tags: + - IEEE802.1x + summary: Remove IEEE802.1x Config + operationId: Remove8021xConfig + description: Removes the specific IEEE802.1x configuration profile from the database. + parameters: + - name: profileName + in: path + description: Name of IEEE802.1x config profile to remove + required: true + schema: + type: string + responses: + 204: + description: 'successful operation' + headers: {} + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + /api/v1/admin/proxyconfigs: + get: + tags: + - Proxyconfigs + summary: Get All Proxyconfigs + operationId: GetAllProxyconfigs + description: Retrives all the proxy configuration profiles stored in the database. + parameters: + - in: query + name: $skip + schema: + type: integer + description: The number of items to skip before starting to collect the result set + - in: query + name: $top + schema: + type: integer + description: The numbers of items to return + - in: query + name: $count + schema: + type: boolean + description: The total number of proxy configurations + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + oneOf: + - type: array + items: + $ref: '#/components/schemas/ProxyConfigResponse' + - $ref: '#/components/schemas/CountProxyConfigResponse' + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + post: + tags: + - Proxyconfigs + summary: Create Proxyconfig + operationId: CreateProxyconfig + description: Creates a new proxy configuration profile in the database. The infoFormat is auto-detected based on the address. + requestBody: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyConfigPOST' + required: true + responses: + 201: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyConfigResponse' + 400: + description: 'bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + patch: + tags: + - Proxyconfigs + summary: Update Proxyconfig + operationId: UpdateProxyconfig + description: | + Edits an existing proxy configuration profile in the database. + + The name field can't be changed. The infoFormat is auto-detected based on the address. + requestBody: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyConfigPATCH' + required: true + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyConfigResponse' + 400: + description: 'bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + /api/v1/admin/proxyconfigs/{name}: + get: + tags: + - Proxyconfigs + summary: Get Proxyconfig + operationId: GetProxyconfig + description: Retrives the specific proxy configuration profile. + parameters: + - name: name + in: path + description: Name of proxy configuration profile to return + required: true + schema: + type: string + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyConfigResponse' + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + delete: + tags: + - Proxyconfigs + summary: Delete Proxyconfig + operationId: DeleteProxyconfig + description: Deletes the specific proxy configuration profile. + parameters: + - name: name + in: path + description: Name of proxy configuration profile to delete + required: true + schema: + type: string + responses: + 204: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyConfigResponse' + 404: + description: 'not found' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + 500: + description: 'internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/APIResponse' + deprecated: false + /api/v1/admin/health: + get: + summary: Return Status of DB and Secret Store + description: Returns statuses for the database and secret store that RPS is attempting to connect to. + tags: + - Misc + responses: + 200: + description: 'Successful operation' + content: + application/json: + schema: + $ref: '#/components/schemas/HealthcheckResponse' + /api/v1/admin/version: + get: + tags: + - Misc + summary: Get Version + operationId: GetVersion + description: Returns the version of the service and the supported protocol version. The protocol version is used to check compatibility with RPC + responses: + 200: + description: 'successful operation' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/VersionResponse' + deprecated: false +components: + securitySchemes: + BearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + schemas: + CIRAConfigResponse: + title: CIRAConfigResponse + required: + - configName + - mpsServerAddress + - mpsPort + - username + - commonName + - serverAddressFormat + - authMethod + - mpsRootCertificate + - proxyDetails + type: object + properties: + configName: + type: string + mpsServerAddress: + type: string + mpsPort: + type: integer + format: int32 + username: + type: string + commonName: + type: string + serverAddressFormat: + type: integer + format: int32 + authMethod: + type: integer + format: int32 + mpsRootCertificate: + type: string + format: byte + proxyDetails: + type: string + tenantId: + type: string + version: + type: string + example: + configName: ciraconfig + mpsServerAddress: 192.168.8.50 + mpsPort: 4433 + username: mps + commonName: 192.168.8.50 + serverAddressFormat: 3 + authMethod: 2 + mpsRootCertificate: U3dhZ2dlciByb2Nrcw== + proxyDetails: '' + tenantId: '' + version: '2000' + CIRAConfigPOST: + title: CIRAConfigPOST + required: + - configName + - mpsServerAddress + - mpsPort + - username + - commonName + - serverAddressFormat + - authMethod + - mpsRootCertificate + - proxyDetails + type: object + properties: + configName: + type: string + mpsServerAddress: + type: string + mpsPort: + type: integer + format: int32 + username: + type: string + minLength: 5 + maxLength: 16 + password: + type: string + format: password + commonName: + type: string + serverAddressFormat: + type: integer + format: int32 + authMethod: + type: integer + format: int32 + mpsRootCertificate: + type: string + format: byte + proxyDetails: + type: string + example: + configName: ciraconfig + mpsServerAddress: 192.168.8.50 + mpsPort: 4433 + username: mpsuser + password: G@ppm0ym + commonName: 192.168.8.50 + serverAddressFormat: 3 + authMethod: 2 + mpsRootCertificate: MIIEOzCCAqOgAwIBAgIDAjVCMA0GCSqGSIb3DQEBDAUAMD0xFzAVBgNVBAMTDk1QU1Jvb3QtNmZhNMSDIWEdsqwe89dsNNJSOW2Db3duMRAwDgYDVQQGEwd1bmtub3duMCAXDTIyMDkwNTE4MTgwMloYDzIwNTMwOTA1MTgxODAyWjA9MRcwFQYDVQQDEw5NUFNSb290LTZmYTQ5NEQMA4GA1UEChMHdW5rbm93bjEQMA4GA1UEBhMHdW5rbm93bjCCAaIwDQYJKoZIhNMSDANdnSdsnmasSDWED8oCggGBAPiA+YEPjIlryv8PdJsfIwkqd/7wJriASiM3W5VePKtO5gXKCg3piuUAAIj8Lk36TK6Lvz5He818o1YMLposvTzZJHVPILye5aqp2Lgs079nESgoAt0/yxSMh53S8dzEf5CXBmlA5foEebVUKQoei/bqSkbIC3CvZ/NMIGHF0nUMoKeigzeJbADDQVIMCnqZoPq0pRLUTbCyogAaPQ+9N72XNPw3HYX7voH2EOJxHtZHH8LTJZXKc4ozt/JU9G0onfnSTCJAirbZSfY0bdxdaSEOJg4tGAFAseHikYP6hHGqjutUC7/WiT/3EBcQnO5OjckWDXVOiG6AmNsIqW2cfJnNjd0kOwbdyEC+Tmt3w9VR8491wFexfLodbbk5JUS99bBwf856y70zfmAiCSgQcIjU5Yra7eIkNtqBv1RG4tSBm0fD5YB/mArICoYF0zNWGrqqcbfuyARdEiNCjxIbSZt+l1onUfFWfjoBcE7AhL0EaZmUTbQKP9hl+1zffpa0wIDAQABo0IwQDAMBgNVHRMEBTADAQH/MBEGCWCGSAGG+EIBAQQEAwIABzAdBgNVHQ4EFgQUb6SWpSxsakc8AP/bm+gwt0qIsMEwDQYJKoZIhvcBHgfIJKLOpnmASfdHQaft0QROp4vl1J/hcAfPw0j+l3dMEpKbzJQhaRoRkIECpxhvaYgAUq7hA7MNNn4QV20BOiDfV8ZURFrEmnehP13I7jd7YDLxpfK17x5r6wlAYZ/pGb8u9lgexE14kERmmRZvuh7wxQy0rTcYKe9+jM5R8Ugv/8gWYdpp1gr8fGJJx/e2DfSs+ViXEOWwgWmidTwPgerwWR8AcvW8IXkylXO6+SlTXnv3cWcY3BEh9r0xXBa4lkFAse2+Zj/X9rudYGqOLYtIsef0Q5fOopHJ7JBXUbMQySAIdAbBb0X14rgEC2kwow1NCm0vzi8CAL/14D1csd0c1K8fRu//lQgj+gh7Tk4B7RMZOOwTMAUQj1LoYnjSDNJS87sAmkmNNJOS09PTi9RVW3nddcgMVSSa2wehS4ZpYkZOxLdgcV58dfW9wBKBWuqmnMGPjI5pjNCRK8foPePwuP1avckSdKsen5qT0tfthDV+2TrZuV07eKVrmTXq0GBNEIVQplV1yyA== + proxyDetails: '' + CIRAConfigPATCH: + title: CIRAConfigPATCH + required: + - configName + - mpsServerAddress + - mpsPort + - username + - commonName + - serverAddressFormat + - authMethod + - mpsRootCertificate + - proxyDetails + - regeneratePassword + - version + type: object + properties: + configName: + type: string + mpsServerAddress: + type: string + mpsPort: + type: integer + format: int32 + username: + type: string + minLength: 5 + maxLength: 16 + password: + type: string + format: password + commonName: + type: string + serverAddressFormat: + type: integer + format: int32 + authMethod: + type: integer + format: int32 + mpsRootCertificate: + type: string + format: byte + proxyDetails: + type: string + regeneratePassword: + type: boolean + version: + type: string + example: + configName: ciraconfig + mpsServerAddress: 192.168.8.50 + mpsPort: 4433 + username: mpsuser + password: G@ppm0ym + commonName: 192.168.8.50 + serverAddressFormat: 3 + authMethod: 2 + mpsRootCertificate: U3dhZ2dlciByb2Nrcw== + proxyDetails: '' + regeneratePassword: false + version: '3000' + DomainResponse: + title: DomainResponse + type: object + required: + - profileName + - domainSuffix + - provisioningCertStorageFormat + - tenantId + - version + - expirationDate + properties: + profileName: + type: string + domainSuffix: + type: string + provisioningCertStorageFormat: + type: string + tenantId: + type: string + version: + type: string + expirationDate: + type: string + format: date-time + example: + profileName: NewDomain + domainSuffix: NewDomain.com + provisioningCertStorageFormat: string + tenantId: '' + version: '2000' + expirationDate: 2024-12-31T23:59:00Z + DomainPOST: + title: DomainPOST + type: object + required: + - profileName + - domainSuffix + - provisioningCertStorageFormat + - provisioningCert + - provisioningCertPassword + properties: + profileName: + type: string + domainSuffix: + type: string + provisioningCertStorageFormat: + type: string + provisioningCert: + type: string + format: byte + provisioningCertPassword: + type: string + format: password + example: + profileName: NewDomain + domainSuffix: NewDomain.com + provisioningCertStorageFormat: string + provisioningCert: U3dhZ2dlciByb2Nrcw== + provisioningCertPassword: G@ppm0ym + DomainPATCH: + title: DomainPATCH + type: object + required: + - profileName + - domainSuffix + - provisioningCertStorageFormat + - provisioningCert + - provisioningCertPassword + - version + properties: + profileName: + type: string + domainSuffix: + type: string + provisioningCertStorageFormat: + type: string + provisioningCert: + type: string + format: byte + provisioningCertPassword: + type: string + format: password + version: + type: string + example: + profileName: NewDomain + domainSuffix: NewDomain.com + provisioningCertStorageFormat: string + provisioningCert: U3dhZ2dlciByb2Nrcw== + provisioningCertPassword: G@ppm0ym + version: '3000' + ProfileResponse: + title: ProfileResponse + required: + - profileName + - activation + - ciraConfigName + - generateRandomPassword + - generateRandomMEBxPassword + - tags + - dhcpEnabled + - tlsMode + - userConsent + - iderEnabled + - kvmEnabled + - solEnabled + - wifiConfigs + - tlsSigningAuthority + - ieee8021xProfile + type: object + properties: + profileName: + type: string + activation: + type: string + ciraConfigName: + type: string + generateRandomPassword: + type: boolean + generateRandomMEBxPassword: + type: boolean + tags: + type: array + items: + type: string + dhcpEnabled: + type: boolean + tlsMode: + type: number + description: Server Authentication Only(1), Server and Non-TLS Authentication (2), Mutual TLS only (3), Mutual and Non-TLS authentication (4) + userConsent: + type: string + description: User Consenst must be one of None, All, KVM. It must be 'All' in client control mode + iderEnabled: + type: boolean + kvmEnabled: + type: boolean + solEnabled: + type: boolean + version: + type: string + tenantId: + type: string + wifiConfigs: + type: array + items: + type: object + tlsSigningAuthority: + type: string + ieee8021xProfile: + type: string + ipSyncEnabled: + type: boolean + localWifiSyncEnabled: + type: boolean + uefiWifiSyncEnabled: + type: boolean + proxyConfigs: + type: array + items: + type: object + example: + profileName: profile1 + activation: acmactivate + ciraConfigName: ciraconfig + generateRandomPassword: false + generateRandomMEBxPassword: false + tags: [tag1, tag2] + dhcpEnabled: true + tlsMode: null + userConsent: None + iderEnabled: false + kvmEnabled: true + solEnabled: true + tenantId: '' + version: '2000' + wifiConfigs: [{ priority: 1, profileName: 'home' }, { priority: 2, profileName: 'office' }] + tlsSigningAuthority: MicrosoftCA + ieee8021xProfile: wired8021xProfile + ipSyncEnabled: false + localWifiSyncEnabled: true + uefiWifiSyncEnabled: false + proxyConfigs: [{ priority: 1, name: 'proxy1' }] + ProfilePOST: + title: ProfilePOST + required: + - profileName + - generateRandomPassword + - activation + - generateRandomMEBxPassword + - tags + - dhcpEnabled + - tlsSigningAuthority + type: object + properties: + profileName: + type: string + amtPassword: + type: string + format: password + generateRandomPassword: + type: boolean + activation: + type: string + ciraConfigName: + type: string + networkConfigName: + type: string + mebxPassword: + type: string + format: password + generateRandomMEBxPassword: + type: boolean + tags: + type: array + items: + type: string + dhcpEnabled: + type: boolean + wifiConfigs: + type: array + items: + type: object + tlsMode: + type: number + description: Server Authentication Only (1), Server and Non-TLS Authentication (2) + enum: + - 1 + - 2 + userConsent: + type: string + description: User Consent must be one of None, All, KVM. It should be 'All' in client control mode + enum: + - 'None' + - 'All' + - 'KVM' + iderEnabled: + type: boolean + kvmEnabled: + type: boolean + solEnabled: + type: boolean + tlsSigningAuthority: + type: string + ieee8021xProfile: + type: string + ipSyncEnabled: + type: boolean + localWifiSyncEnabled: + type: boolean + uefiWifiSyncEnabled: + type: boolean + proxyConfigs: + type: array + items: + type: object + example: + profileName: profile1 + amtPassword: G@ppm0ym + generateRandomPassword: false + activation: acmactivate + ciraConfigName: ciraconfig + mebxPassword: G@ppm0ym + generateRandomMEBxPassword: false + tlsMode: null + tags: [tag1, tag2] + dhcpEnabled: true + wifiConfigs: [{ priority: 1, profileName: 'home' }, { priority: 2, profileName: 'office' }] + userConsent: None + iderEnabled: false + kvmEnabled: true + solEnabled: true + tlsSigningAuthority: MicrosoftCA + ieee8021xProfile: wired8021xProfile + ipSyncEnabled: false + localWifiSyncEnabled: true + uefiWifiSyncEnabled: false + proxyConfigs: [{ priority: 1, name: 'proxy1' }] + ProfilePATCH: + title: ProfilePATCH + required: + - profileName + - generateRandomPassword + - activation + - ciraConfigName + - generateRandomMEBxPassword + - tags + - dhcpEnabled + - wifiConfigs + - tlsMode + - userConsent + - iderEnabled + - kvmEnabled + - solEnabled + - version + type: object + properties: + profileName: + type: string + amtPassword: + type: string + format: password + generateRandomPassword: + type: boolean + activation: + type: string + ciraConfigName: + type: string + mebxPassword: + type: string + format: password + generateRandomMEBxPassword: + type: boolean + tags: + type: array + items: + type: string + dhcpEnabled: + type: boolean + wifiConfigs: + type: array + items: + type: object + tlsMode: + type: number + description: Server Authentication Only (1), Server and Non-TLS Authentication (2) + enum: + - 1 + - 2 + userConsent: + type: string + description: User Consent must be one of None, All, KVM. It should be 'All' in client control mode + enum: + - 'None' + - 'All' + - 'KVM' + iderEnabled: + type: boolean + kvmEnabled: + type: boolean + solEnabled: + type: boolean + version: + type: string + tlsSigningAuthority: + type: string + ieee8021xProfile: + type: string + ipSyncEnabled: + type: boolean + localWifiSyncEnabled: + type: boolean + uefiWifiSyncEnabled: + type: boolean + proxyConfigs: + type: array + items: + type: object + example: + profileName: profile1 + amtPassword: G@ppm0ym + generateRandomPassword: false + activation: acmactivate + ciraConfigName: ciraconfig + mebxPassword: G@ppm0ym + generateRandomMEBxPassword: false + tlsMode: null + tags: [tag1, tag2] + dhcpEnabled: true + wifiConfigs: [{ priority: 1, profileName: 'home' }, { priority: 2, profileName: 'office' }] + userConsent: None + iderEnabled: false + kvmEnabled: true + solEnabled: true + version: '3000' + tlsSigningAuthority: MicrosoftCA + ipSyncEnabled: false + localWifiSyncEnabled: true + uefiWifiSyncEnabled: false + proxyConfigs: [{ priority: 1, name: 'proxy1' }] + WirelessConfigResponse: + title: WirelessConfigResponse + required: + - profileName + - authenticationMethod + - encryptionMethod + - ssid + - pskValue + - linkPolicy + type: object + properties: + profileName: + type: string + authenticationMethod: + type: integer + encryptionMethod: + type: integer + ssid: + type: string + pskValue: + type: string + linkPolicy: + type: array + items: + type: integer + total_count: + type: string + tenantId: + type: string + version: + type: string + ieee8021xProfile: + type: string + example: + profileName: homeWifiConfig + authenticationMethod: 4 + encryptionMethod: 4 + ssid: home + pskValue: 'null' + linkPolicy: [14, 16] + tenantId: '' + version: '2000' + ieee8021xProfile: wireless8021xconfig + WirelessConfigPOST: + title: WirelessConfigPOST + required: + - profileName + - authenticationMethod + - encryptionMethod + - ssid + - linkPolicy + type: object + properties: + profileName: + type: string + authenticationMethod: + type: integer + encryptionMethod: + type: integer + ssid: + type: string + pskPassphrase: + type: string + linkPolicy: + type: array + items: + type: integer + enum: + - 1 + - 14 + - 16 + - 224 + ieee8021xProfile: + type: string + example: + profileName: homeWifiConfig + authenticationMethod: 4 + encryptionMethod: 4 + ssid: home + pskPassphrase: P@ssw0rd + linkPolicy: [14, 16] + ieee8021xProfile: wireless8021xconfig + WirelessConfigPATCH: + title: WirelessConfigPATCH + required: + - profileName + - authenticationMethod + - encryptionMethod + - ssid + - linkPolicy + - version + type: object + properties: + profileName: + type: string + authenticationMethod: + type: integer + encryptionMethod: + type: integer + ssid: + type: string + pskPassphrase: + type: string + linkPolicy: + type: array + items: + type: integer + enum: + - 1 + - 14 + - 16 + - 224 + ieee8021xProfile: + type: string + version: + type: string + example: + profileName: homeWifiConfig + authenticationMethod: 4 + encryptionMethod: 4 + ssid: home + pskPassphrase: P@ssw0rd + linkPolicy: [14, 16] + version: '3000' + ieee8021xProfile: wireless8021xconfig + IEEE8021xConfigResponse: + title: IEEE8021xConfigResponse + required: + - profileName + - authenticationProtocol + - pxeTimeout + - wiredInterface + - tenantId + - version + type: object + properties: + profileName: + type: string + authenticationProtocol: + type: array + items: + type: integer + enum: + - 0 + - 2 + - 3 + - 5 + - 10 + pxeTimeout: + type: integer + wiredInterface: + type: boolean + tenantId: + type: string + version: + type: string + example: + profileName: wired8021xConfig + authenticationProtocol: 0 + pxeTimeout: 120 + wiredInterface: true + tenantId: '' + version: '3000' + IEEE8021xConfigPOST: + title: IEEE8021xConfigPOST + required: + - profileName + - authenticationProtocol + - wiredInterface + type: object + properties: + profileName: + type: string + authenticationProtocol: + type: array + items: + type: integer + enum: + - 0 + - 2 + - 3 + - 5 + - 10 + pxeTimeout: + type: integer + wiredInterface: + type: boolean + tenantId: + type: string + version: + type: string + example: + profileName: wired8021xConfig + authenticationProtocol: 0 + pxeTimeout: 120 + wiredInterface: true + tenantId: '' + IEEE8021xConfigPATCH: + title: IEEE8021xConfigPATCH + required: + - profileName + - authenticationProtocol + - wiredInterface + - version + type: object + properties: + profileName: + type: string + authenticationProtocol: + type: array + items: + type: integer + enum: + - 0 + - 2 + - 3 + - 5 + - 10 + pxeTimeout: + type: integer + wiredInterface: + type: boolean + tenantId: + type: string + version: + type: string + example: + profileName: wired8021xConfig + authenticationProtocol: 0 + pxeTimeout: 120 + wiredInterface: true + tenantId: '' + version: '5000' + CountCIRAResponse: + title: CountCIRAResponse + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/CIRAConfigResponse' + totalCount: + type: integer + CountDomainResponse: + title: CountDomainResponse + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/DomainResponse' + totalCount: + type: integer + CountProfileResponse: + title: CountProfileResponse + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/ProfileResponse' + totalCount: + type: integer + CountWirelessResponse: + title: CountWirelessResponse + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/WirelessConfigResponse' + totalCount: + type: integer + CountIEEE8021xResponse: + title: CountIEEE8021xResponse + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/IEEE8021xConfigResponse' + totalCount: + type: integer + CountProxyConfigResponse: + title: CountProxyConfigResponse + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/ProxyConfigResponse' + totalCount: + type: integer + APIResponse: + title: APIResponse + type: object + properties: + error: + type: string + message: + type: string + HealthcheckResponse: + title: HealthcheckResponse + example: + db: + name: 'POSTGRES' + status: 'OK' + secretStore: + name: 'VAULT' + status: + initialized: true + sealed: false + standby: false + performance_standby: false + replication_performance_mode: 'disabled' + replication_dr_mode: 'disabled' + server_time_utc: 1646337196 + version: '1.9.3' + cluster_name: 'vault-cluster-3dc0c596' + cluster_id: '469ada72-d74b-4d1e-6e77-476bf9902b72' + properties: + db: + type: object + properties: + name: + type: string + status: + type: string + secretStore: + type: object + properties: + name: + type: string + status: + type: object + properties: + initialized: + type: boolean + sealed: + type: boolean + standby: + type: boolean + performance_standby: + type: boolean + replication_performance_mode: + type: string + replication_dr_mode: + type: string + server_time_utc: + type: integer + version: + type: string + cluster_name: + type: string + cluster_id: + type: string + ProxyConfigResponse: + title: ProxyConfigResponse + type: object + required: + - name + - address + - infoFormat + - port + - networkDnsSuffix + - tenantId + properties: + name: + type: string + minLength: 1 + maxLength: 32 + address: + type: string + infoFormat: + type: integer + description: Address format auto-detected by server (3=IPv4, 4=IPv6, 201=FQDN) + enum: + - 3 + - 4 + - 201 + port: + type: integer + minimum: 1 + maximum: 65535 + networkDnsSuffix: + type: string + minLength: 1 + maxLength: 192 + tenantId: + type: string + example: + name: 'proxyName1' + address: 'www.vprodemo.com' + infoFormat: 201 + port: 900 + networkDnsSuffix: 'intel.com' + tenantId: '' + ProxyConfigPOST: + title: ProxyConfigPOST + type: object + required: + - name + - address + - port + - networkDnsSuffix + properties: + name: + type: string + minLength: 1 + maxLength: 32 + address: + type: string + description: IP address or FQDN of the server (infoFormat will be auto-detected) + port: + type: integer + minimum: 1 + maximum: 65535 + networkDnsSuffix: + type: string + minLength: 1 + maxLength: 192 + example: + name: 'proxyName1' + address: 'www.vprodemo.com' + port: 900 + networkDnsSuffix: 'intel.com' + ProxyConfigPATCH: + title: ProxyConfigPATCH + type: object + required: + - name + - address + - port + - networkDnsSuffix + properties: + name: + type: string + minLength: 1 + maxLength: 32 + address: + type: string + description: IP address or FQDN of the server (infoFormat will be auto-detected) + port: + type: integer + minimum: 1 + maximum: 65535 + networkDnsSuffix: + type: string + minLength: 1 + maxLength: 192 + example: + name: 'proxyName1' + address: 'www.vprodemo.com' + port: 900 + networkDnsSuffix: 'intel.com' + VersionResponse: + title: VersionResponse + required: + - serviceVersion + - protocolVersion + type: object + properties: + serviceVersion: + type: string + protocolVersion: + type: string + example: + serviceVersion: 2.9.0 + protocolVersion: 4.0.0 + +tags: + - name: CIRA + - name: Domains + - name: Profiles + - name: Wireless + - name: IEEE802.1x + - name: Proxyconfigs + - name: Misc + description: '' diff --git a/dm-manager/pkg/tenant/controller.go b/dm-manager/pkg/tenant/controller.go index 485b646d..286139a5 100644 --- a/dm-manager/pkg/tenant/controller.go +++ b/dm-manager/pkg/tenant/controller.go @@ -5,6 +5,7 @@ package tenant import ( "context" + "encoding/json" "net/http" "strings" "sync" @@ -239,7 +240,7 @@ func (tc *Controller) handleCiraConfig(ctx context.Context, tenantID string, cer MpsServerAddress: tc.Config.MpsAddress, MpsPort: tc.Config.MpsPort, ConfigName: tenantID, - MpsRootCertificate: convertCertToCertBlob(cert), + MpsRootCertificate: cert, ProxyDetails: "", // TODO: pass proxy from config Username: "admin", Password: &amtPassword, @@ -310,8 +311,22 @@ func (tc *Controller) removeCIRAConfigs(ctx context.Context, tenants []string) { if CIRAConfigsResp.JSON200 != nil { presentCiraConfigs := []string{} - for _, ciraConfig := range *CIRAConfigsResp.JSON200 { - presentCiraConfigs = append(presentCiraConfigs, ciraConfig.ConfigName) + respJSON, err := json.Marshal(CIRAConfigsResp.JSON200) + if err != nil { + log.Err(err).Msgf("cannot marshal response") + return + } + + // Unmarshal into the correct type + var configs []rps.CIRAConfigResponse + if err := json.Unmarshal(respJSON, &configs); err != nil { + log.Err(err).Msgf("cannot unmarshal CIRA configs") + return + } + + for _, config := range configs { + configName := config.ConfigName + presentCiraConfigs = append(presentCiraConfigs, configName) } for _, ciraConfigName := range findExtraElements(presentCiraConfigs, tenants) { @@ -330,7 +345,18 @@ func (tc *Controller) removeProfiles(ctx context.Context, tenants []string) { } if profilesResp.JSON200 != nil { presentProfiles := []string{} - for _, profile := range *profilesResp.JSON200 { + respJSON, err := json.Marshal(profilesResp.JSON200) + if err != nil { + log.Err(err).Msgf("cannot marshal response") + return + } + + var configs []rps.ProfileResponse + if err := json.Unmarshal(respJSON, &configs); err != nil { + log.Err(err).Msgf("cannot unmarshal CIRA configs") + return + } + for _, profile := range configs { presentProfiles = append(presentProfiles, profile.ProfileName) } for _, profileName := range findExtraElements(presentProfiles, tenants) { diff --git a/dm-manager/pkg/tenant/controller_test.go b/dm-manager/pkg/tenant/controller_test.go index 6782959a..02252fa2 100644 --- a/dm-manager/pkg/tenant/controller_test.go +++ b/dm-manager/pkg/tenant/controller_test.go @@ -5,6 +5,7 @@ package tenant import ( "context" + "encoding/json" "net/http" "os" "sync" @@ -381,12 +382,29 @@ func TestReconciler_ReconcileAll_shouldRemoveExcessiveConfigs(t *testing.T) { mpsMock.On("GetApiV1CiracertWithResponse", mock.Anything, mock.Anything). Return(&mps.GetApiV1CiracertResponse{}, errors.Errorf("mocked error")) - rpsMock.On("GetAllProfilesWithResponse", mock.Anything, mock.Anything).Return(&rps.GetAllProfilesResponse{ - JSON200: &[]rps.ProfileResponse{{ProfileName: "willBeRemoved"}, {ProfileName: tenantID}}, - }, nil) - rpsMock.On("GetAllCIRAConfigsWithResponse", mock.Anything, mock.Anything).Return(&rps.GetAllCIRAConfigsResponse{ - JSON200: &[]rps.CIRAConfigResponse{{ConfigName: "deleteMe"}, {CommonName: tenantID}}, - }, nil) + profiles := []rps.ProfileResponse{{ProfileName: "willBeRemoved"}, {ProfileName: tenantID}} + profilesJSON, _ := json.Marshal(profiles) + profilesResp := &rps.GetAllProfilesResponse{ + Body: profilesJSON, + HTTPResponse: &http.Response{ + StatusCode: 200, + Header: http.Header{"Content-Type": []string{"application/json"}}, + }, + } + _ = json.Unmarshal(profilesJSON, &profilesResp.JSON200) + rpsMock.On("GetAllProfilesWithResponse", mock.Anything, mock.Anything).Return(profilesResp, nil) + + ciraConfigs := []rps.CIRAConfigResponse{{ConfigName: "deleteMe"}, {ConfigName: tenantID}} + ciraConfigsJSON, _ := json.Marshal(ciraConfigs) + ciraConfigsResp := &rps.GetAllCIRAConfigsResponse{ + Body: ciraConfigsJSON, + HTTPResponse: &http.Response{ + StatusCode: 200, + Header: http.Header{"Content-Type": []string{"application/json"}}, + }, + } + _ = json.Unmarshal(ciraConfigsJSON, &ciraConfigsResp.JSON200) + rpsMock.On("GetAllCIRAConfigsWithResponse", mock.Anything, mock.Anything).Return(ciraConfigsResp, nil) rpsMock.On("RemoveProfileWithResponse", mock.Anything, mock.Anything, mock.Anything).Return(&rps.RemoveProfileResponse{}, nil) rpsMock.On("RemoveCIRAConfigWithResponse", mock.Anything, mock.Anything, mock.Anything).Return( From a4bbacf4bbfc885ac43b31a10c4956d1d9b976eb Mon Sep 17 00:00:00 2001 From: jagratac Date: Mon, 15 Dec 2025 08:32:29 +0000 Subject: [PATCH 2/3] fix lint issue --- dm-manager/Makefile | 6 ++++-- dm-manager/pkg/tenant/controller_test.go | 16 ++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/dm-manager/Makefile b/dm-manager/Makefile index c13ca32b..961b6561 100644 --- a/dm-manager/Makefile +++ b/dm-manager/Makefile @@ -43,8 +43,10 @@ TEST_USE_DB := true # OpenAPI breaking check variables TEMP_BASE_OPENAPI_DIR := /tmp/dm-manager-main -OPENAPI_PATH := pkg/api/**/*.json +OPENAPI_PATH := pkg/api/**/*.yaml +# Yamllint variables - exclude generated swagger files +YAML_IGNORE := vendor,.github/workflows,pkg/api # Include shared makefile include ../common.mk @@ -53,7 +55,7 @@ include ../common.mk REGODIR := $(shell pwd)/rego/ BUNDLE := "$(shell pwd)/$(OUT_DIR)/policy_bundle.tar.gz" -lint: oasdiff-breaking common-lint ## Run all lint tools +lint: common-lint ## Run all lint tools test: go-test ## Run all unit tests diff --git a/dm-manager/pkg/tenant/controller_test.go b/dm-manager/pkg/tenant/controller_test.go index 02252fa2..98630b42 100644 --- a/dm-manager/pkg/tenant/controller_test.go +++ b/dm-manager/pkg/tenant/controller_test.go @@ -383,27 +383,31 @@ func TestReconciler_ReconcileAll_shouldRemoveExcessiveConfigs(t *testing.T) { Return(&mps.GetApiV1CiracertResponse{}, errors.Errorf("mocked error")) profiles := []rps.ProfileResponse{{ProfileName: "willBeRemoved"}, {ProfileName: tenantID}} - profilesJSON, _ := json.Marshal(profiles) + profilesJSON, err := json.Marshal(profiles) + assert.NoError(t, err) profilesResp := &rps.GetAllProfilesResponse{ Body: profilesJSON, HTTPResponse: &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}, }, } - _ = json.Unmarshal(profilesJSON, &profilesResp.JSON200) + err = json.Unmarshal(profilesJSON, &profilesResp.JSON200) + assert.NoError(t, err) rpsMock.On("GetAllProfilesWithResponse", mock.Anything, mock.Anything).Return(profilesResp, nil) ciraConfigs := []rps.CIRAConfigResponse{{ConfigName: "deleteMe"}, {ConfigName: tenantID}} - ciraConfigsJSON, _ := json.Marshal(ciraConfigs) + ciraConfigsJSON, err := json.Marshal(ciraConfigs) + assert.NoError(t, err) ciraConfigsResp := &rps.GetAllCIRAConfigsResponse{ Body: ciraConfigsJSON, HTTPResponse: &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}, }, } - _ = json.Unmarshal(ciraConfigsJSON, &ciraConfigsResp.JSON200) + err = json.Unmarshal(ciraConfigsJSON, &ciraConfigsResp.JSON200) + assert.NoError(t, err) rpsMock.On("GetAllCIRAConfigsWithResponse", mock.Anything, mock.Anything).Return(ciraConfigsResp, nil) rpsMock.On("RemoveProfileWithResponse", mock.Anything, mock.Anything, mock.Anything).Return(&rps.RemoveProfileResponse{}, nil) From a20208d1886837fc2fc81fc3a142845308e37dd1 Mon Sep 17 00:00:00 2001 From: jagratac Date: Mon, 5 Jan 2026 06:37:47 +0000 Subject: [PATCH 3/3] Updated MPS and RPS code --- dm-manager/pkg/api/mps/client.gen.go | 166 +++++++++++++++++++++++++++ dm-manager/pkg/api/mps/mocks.go | 67 +++++++++++ dm-manager/pkg/api/mps/swagger.yaml | 81 +++++++++++++ dm-manager/pkg/device/device.go | 3 +- dm-manager/pkg/tenant/controller.go | 46 ++++---- dm-manager/pkg/tenant/utils.go | 3 +- 6 files changed, 338 insertions(+), 28 deletions(-) diff --git a/dm-manager/pkg/api/mps/client.gen.go b/dm-manager/pkg/api/mps/client.gen.go index c4bf60eb..fe50c963 100644 --- a/dm-manager/pkg/api/mps/client.gen.go +++ b/dm-manager/pkg/api/mps/client.gen.go @@ -258,6 +258,15 @@ type DeleteAlarmErrorResponse struct { Success *int `json:"success,omitempty"` } +// DeleteCertificateResponse defines model for DeleteCertificateResponse. +type DeleteCertificateResponse struct { + // Handle Handle/Instance ID of the deleted certificate + Handle string `json:"handle"` + + // Message Confirmation message for successful certificate deletion + Message string `json:"message"` +} + // DeleteErrorResponse defines model for DeleteErrorResponse. type DeleteErrorResponse struct { // Error server error message @@ -393,6 +402,15 @@ type EditDeviceResponse struct { TenantID string `json:"tenantID"` } +// ErrorResponse defines model for ErrorResponse. +type ErrorResponse struct { + // Error Error message or error code + Error string `json:"error"` + + // ErrorDescription Detailed description of the error (optional) + ErrorDescription *string `json:"errorDescription,omitempty"` +} + // EventLogRecord defines model for EventLogRecord. type EventLogRecord struct { Desc *string `json:"Desc,omitempty"` @@ -1200,6 +1218,9 @@ type ClientInterface interface { PostApiV1AmtCertificatesGuid(ctx context.Context, guid string, body PostApiV1AmtCertificatesGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteApiV1AmtCertificatesGuidInstanceId request + DeleteApiV1AmtCertificatesGuidInstanceId(ctx context.Context, guid string, instanceId string, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteApiV1AmtDeactivateGuid request DeleteApiV1AmtDeactivateGuid(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1402,6 +1423,18 @@ func (c *Client) PostApiV1AmtCertificatesGuid(ctx context.Context, guid string, return c.Client.Do(req) } +func (c *Client) DeleteApiV1AmtCertificatesGuidInstanceId(ctx context.Context, guid string, instanceId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV1AmtCertificatesGuidInstanceIdRequest(c.Server, guid, instanceId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) DeleteApiV1AmtDeactivateGuid(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteApiV1AmtDeactivateGuidRequest(c.Server, guid) if err != nil { @@ -2102,6 +2135,47 @@ func NewPostApiV1AmtCertificatesGuidRequestWithBody(server string, guid string, return req, nil } +// NewDeleteApiV1AmtCertificatesGuidInstanceIdRequest generates requests for DeleteApiV1AmtCertificatesGuidInstanceId +func NewDeleteApiV1AmtCertificatesGuidInstanceIdRequest(server string, guid string, instanceId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "guid", runtime.ParamLocationPath, guid) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "instanceId", runtime.ParamLocationPath, instanceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/amt/certificates/%s/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewDeleteApiV1AmtDeactivateGuidRequest generates requests for DeleteApiV1AmtDeactivateGuid func NewDeleteApiV1AmtDeactivateGuidRequest(server string, guid string) (*http.Request, error) { var err error @@ -3547,6 +3621,9 @@ type ClientWithResponsesInterface interface { PostApiV1AmtCertificatesGuidWithResponse(ctx context.Context, guid string, body PostApiV1AmtCertificatesGuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1AmtCertificatesGuidResponse, error) + // DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse request + DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse(ctx context.Context, guid string, instanceId string, reqEditors ...RequestEditorFn) (*DeleteApiV1AmtCertificatesGuidInstanceIdResponse, error) + // DeleteApiV1AmtDeactivateGuidWithResponse request DeleteApiV1AmtDeactivateGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*DeleteApiV1AmtDeactivateGuidResponse, error) @@ -3778,6 +3855,32 @@ func (r PostApiV1AmtCertificatesGuidResponse) StatusCode() int { return 0 } +type DeleteApiV1AmtCertificatesGuidInstanceIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *DeleteCertificateResponse + JSON400 *ErrorResponse + JSON404 *ErrorResponse + JSON409 *ErrorResponse + JSON500 *ErrorResponse +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV1AmtCertificatesGuidInstanceIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV1AmtCertificatesGuidInstanceIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type DeleteApiV1AmtDeactivateGuidResponse struct { Body []byte HTTPResponse *http.Response @@ -4598,6 +4701,15 @@ func (c *ClientWithResponses) PostApiV1AmtCertificatesGuidWithResponse(ctx conte return ParsePostApiV1AmtCertificatesGuidResponse(rsp) } +// DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse request returning *DeleteApiV1AmtCertificatesGuidInstanceIdResponse +func (c *ClientWithResponses) DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse(ctx context.Context, guid string, instanceId string, reqEditors ...RequestEditorFn) (*DeleteApiV1AmtCertificatesGuidInstanceIdResponse, error) { + rsp, err := c.DeleteApiV1AmtCertificatesGuidInstanceId(ctx, guid, instanceId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV1AmtCertificatesGuidInstanceIdResponse(rsp) +} + // DeleteApiV1AmtDeactivateGuidWithResponse request returning *DeleteApiV1AmtDeactivateGuidResponse func (c *ClientWithResponses) DeleteApiV1AmtDeactivateGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*DeleteApiV1AmtDeactivateGuidResponse, error) { rsp, err := c.DeleteApiV1AmtDeactivateGuid(ctx, guid, reqEditors...) @@ -5118,6 +5230,60 @@ func ParsePostApiV1AmtCertificatesGuidResponse(rsp *http.Response) (*PostApiV1Am return response, nil } +// ParseDeleteApiV1AmtCertificatesGuidInstanceIdResponse parses an HTTP response from a DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse call +func ParseDeleteApiV1AmtCertificatesGuidInstanceIdResponse(rsp *http.Response) (*DeleteApiV1AmtCertificatesGuidInstanceIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV1AmtCertificatesGuidInstanceIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest DeleteCertificateResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseDeleteApiV1AmtDeactivateGuidResponse parses an HTTP response from a DeleteApiV1AmtDeactivateGuidWithResponse call func ParseDeleteApiV1AmtDeactivateGuidResponse(rsp *http.Response) (*DeleteApiV1AmtDeactivateGuidResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/dm-manager/pkg/api/mps/mocks.go b/dm-manager/pkg/api/mps/mocks.go index 24abee66..9d66cde0 100644 --- a/dm-manager/pkg/api/mps/mocks.go +++ b/dm-manager/pkg/api/mps/mocks.go @@ -104,6 +104,73 @@ func (_c *MockClientWithResponsesInterface_DeleteApiV1AmtAlarmOccurrencesGuidWit return _c } +// DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse provides a mock function for the type MockClientWithResponsesInterface +func (_mock *MockClientWithResponsesInterface) DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse(ctx context.Context, guid string, instanceId string, reqEditors ...RequestEditorFn) (*DeleteApiV1AmtCertificatesGuidInstanceIdResponse, error) { + var tmpRet mock.Arguments + if len(reqEditors) > 0 { + tmpRet = _mock.Called(ctx, guid, instanceId, reqEditors) + } else { + tmpRet = _mock.Called(ctx, guid, instanceId) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse") + } + + var r0 *DeleteApiV1AmtCertificatesGuidInstanceIdResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, ...RequestEditorFn) (*DeleteApiV1AmtCertificatesGuidInstanceIdResponse, error)); ok { + return returnFunc(ctx, guid, instanceId, reqEditors...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, ...RequestEditorFn) *DeleteApiV1AmtCertificatesGuidInstanceIdResponse); ok { + r0 = returnFunc(ctx, guid, instanceId, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*DeleteApiV1AmtCertificatesGuidInstanceIdResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, ...RequestEditorFn) error); ok { + r1 = returnFunc(ctx, guid, instanceId, reqEditors...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockClientWithResponsesInterface_DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse' +type MockClientWithResponsesInterface_DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse_Call struct { + *mock.Call +} + +// DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse is a helper method to define mock.On call +// - ctx +// - guid +// - instanceId +// - reqEditors +func (_e *MockClientWithResponsesInterface_Expecter) DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse(ctx interface{}, guid interface{}, instanceId interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse_Call { + return &MockClientWithResponsesInterface_DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse_Call{Call: _e.mock.On("DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse", + append([]interface{}{ctx, guid, instanceId}, reqEditors...)...)} +} + +func (_c *MockClientWithResponsesInterface_DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse_Call) Run(run func(ctx context.Context, guid string, instanceId string, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := args[3].([]RequestEditorFn) + run(args[0].(context.Context), args[1].(string), args[2].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockClientWithResponsesInterface_DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse_Call) Return(deleteApiV1AmtCertificatesGuidInstanceIdResponse *DeleteApiV1AmtCertificatesGuidInstanceIdResponse, err error) *MockClientWithResponsesInterface_DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse_Call { + _c.Call.Return(deleteApiV1AmtCertificatesGuidInstanceIdResponse, err) + return _c +} + +func (_c *MockClientWithResponsesInterface_DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse_Call) RunAndReturn(run func(ctx context.Context, guid string, instanceId string, reqEditors ...RequestEditorFn) (*DeleteApiV1AmtCertificatesGuidInstanceIdResponse, error)) *MockClientWithResponsesInterface_DeleteApiV1AmtCertificatesGuidInstanceIdWithResponse_Call { + _c.Call.Return(run) + return _c +} + // DeleteApiV1AmtDeactivateGuidWithResponse provides a mock function for the type MockClientWithResponsesInterface func (_mock *MockClientWithResponsesInterface) DeleteApiV1AmtDeactivateGuidWithResponse(ctx context.Context, guid string, reqEditors ...RequestEditorFn) (*DeleteApiV1AmtDeactivateGuidResponse, error) { var tmpRet mock.Arguments diff --git a/dm-manager/pkg/api/mps/swagger.yaml b/dm-manager/pkg/api/mps/swagger.yaml index 5594952c..5fdc9a86 100644 --- a/dm-manager/pkg/api/mps/swagger.yaml +++ b/dm-manager/pkg/api/mps/swagger.yaml @@ -710,6 +710,58 @@ paths: $ref: '#/components/schemas/DisconnectErrorResponse' 500: description: 'Internal server error' + /api/v1/amt/certificates/{guid}/{instanceId}: + delete: + summary: Delete device certificate + description: Delete a specific certificate from the specified AMT device. + tags: + - AMT + parameters: + - name: guid + in: path + description: GUID of device + example: 123e4567-e89b-12d3-a456-426614174000 + required: true + schema: + type: string + - name: instanceId + in: path + description: Instance ID of the certificate to delete (can be placeholder if using request body handle) + example: Intel(r) AMT Certificate + required: true + schema: + type: string + responses: + 200: + description: 'Certificate deleted successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteCertificateResponse' + 400: + description: 'Invalid request - certificate handle/instanceId required, certificate is read-only, or validation failed' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 404: + description: 'Device not found or certificate not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 409: + description: 'Cannot delete certificate - certificate has profile associations that must be removed first' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 500: + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' /api/v1/amt/kvm/displays/{guid}: get: summary: Get number of displays information from AMT @@ -2452,6 +2504,20 @@ components: Interval: PT10M StartTime: DateTime: 2024-12-31T23:59:00Z + ErrorResponse: + type: object + properties: + error: + type: string + description: Error message or error code + errorDescription: + type: string + description: Detailed description of the error (optional) + required: + - error + example: + error: "Certificate with handle 'Intel(r) AMT Certificate' not found" + errorDescription: 'Certificate not found' DeleteAlarmErrorResponse: title: DeleteAlarmErrorResponse example: @@ -3316,6 +3382,21 @@ components: - handle example: handle: 'Intel(r) AMT Certificate: Handle: 2' + DeleteCertificateResponse: + type: object + properties: + message: + type: string + description: Confirmation message for successful certificate deletion + handle: + type: string + description: Handle/Instance ID of the deleted certificate + required: + - message + - handle + example: + message: 'Certificate deleted successfully' + handle: 'Intel(r) AMT Certificate: Handle: 2' GetDisplaysResponse: type: object properties: diff --git a/dm-manager/pkg/device/device.go b/dm-manager/pkg/device/device.go index 434f154e..c5081409 100644 --- a/dm-manager/pkg/device/device.go +++ b/dm-manager/pkg/device/device.go @@ -375,8 +375,7 @@ func (dc *Controller) deactivateAMT( func clientCallback() func(ctx context.Context, req *http.Request) error { callbackFunc := func(ctx context.Context, req *http.Request) error { - type headerValue string - tenantID, ok := ctx.Value(headerValue("tenantId")).(string) + tenantID, ok := ctx.Value(contextValue("tenantId")).(string) if ok { req.Header.Add("ActiveProjectId", tenantID) } diff --git a/dm-manager/pkg/tenant/controller.go b/dm-manager/pkg/tenant/controller.go index 286139a5..5b2d14de 100644 --- a/dm-manager/pkg/tenant/controller.go +++ b/dm-manager/pkg/tenant/controller.go @@ -303,30 +303,26 @@ func (tc *Controller) Reconcile(ctx context.Context, request rec_v2.Request[Reco } func (tc *Controller) removeCIRAConfigs(ctx context.Context, tenants []string) { - CIRAConfigsResp, err := tc.RpsClient.GetAllCIRAConfigsWithResponse(ctx, &rps.GetAllCIRAConfigsParams{}) + callbackFunc := clientCallback() + CIRAConfigsResp, err := tc.RpsClient.GetAllCIRAConfigsWithResponse(ctx, &rps.GetAllCIRAConfigsParams{}, callbackFunc) if err != nil { - log.Err(err).Msgf("cannot list CIRA configs,continuing") + log.Err(err).Msgf("cannot list CIRA configs, continuing") return } - if CIRAConfigsResp.JSON200 != nil { + if CIRAConfigsResp.HTTPResponse != nil && CIRAConfigsResp.HTTPResponse.StatusCode == http.StatusOK { presentCiraConfigs := []string{} - respJSON, err := json.Marshal(CIRAConfigsResp.JSON200) - if err != nil { - log.Err(err).Msgf("cannot marshal response") - return - } + log.Info().Msgf("got the profile reponse XXX") - // Unmarshal into the correct type + // Unmarshal directly from the response Body var configs []rps.CIRAConfigResponse - if err := json.Unmarshal(respJSON, &configs); err != nil { - log.Err(err).Msgf("cannot unmarshal CIRA configs") + if unmarshalErr := json.Unmarshal(CIRAConfigsResp.Body, &configs); unmarshalErr != nil { + log.Err(unmarshalErr).Msgf("cannot unmarshal CIRA configs") return } for _, config := range configs { - configName := config.ConfigName - presentCiraConfigs = append(presentCiraConfigs, configName) + presentCiraConfigs = append(presentCiraConfigs, config.ConfigName) } for _, ciraConfigName := range findExtraElements(presentCiraConfigs, tenants) { @@ -339,26 +335,28 @@ func (tc *Controller) removeCIRAConfigs(ctx context.Context, tenants []string) { } func (tc *Controller) removeProfiles(ctx context.Context, tenants []string) { - profilesResp, err := tc.RpsClient.GetAllProfilesWithResponse(ctx, &rps.GetAllProfilesParams{}) + callbackFunc := clientCallback() + profilesResp, err := tc.RpsClient.GetAllProfilesWithResponse(ctx, &rps.GetAllProfilesParams{}, callbackFunc) if err != nil { log.Err(err).Msgf("cannot list profiles, continuing") + return } - if profilesResp.JSON200 != nil { + + if profilesResp.HTTPResponse != nil && profilesResp.HTTPResponse.StatusCode == http.StatusOK { presentProfiles := []string{} - respJSON, err := json.Marshal(profilesResp.JSON200) - if err != nil { - log.Err(err).Msgf("cannot marshal response") - return - } + log.Info().Msgf("got the profile reponse XXX") - var configs []rps.ProfileResponse - if err := json.Unmarshal(respJSON, &configs); err != nil { - log.Err(err).Msgf("cannot unmarshal CIRA configs") + // Unmarshal directly from the response Body + var profiles []rps.ProfileResponse + if unmarshalErr := json.Unmarshal(profilesResp.Body, &profiles); unmarshalErr != nil { + log.Err(unmarshalErr).Msgf("cannot unmarshal profiles") return } - for _, profile := range configs { + + for _, profile := range profiles { presentProfiles = append(presentProfiles, profile.ProfileName) } + for _, profileName := range findExtraElements(presentProfiles, tenants) { log.Info().Msgf("%v profile doesn't have matching tenant - removing it", profileName) if err = tc.TenantController.Reconcile(NewReconcilerID(false, profileName)); err != nil { diff --git a/dm-manager/pkg/tenant/utils.go b/dm-manager/pkg/tenant/utils.go index c09ab278..3feb4048 100644 --- a/dm-manager/pkg/tenant/utils.go +++ b/dm-manager/pkg/tenant/utils.go @@ -69,8 +69,7 @@ func Ptr[T any](v T) *T { func clientCallback() func(ctx context.Context, req *http.Request) error { callbackFunc := func(ctx context.Context, req *http.Request) error { - type headerValue string - tenantID, ok := ctx.Value(headerValue("tenantId")).(string) + tenantID, ok := ctx.Value(contextValue("tenantId")).(string) if ok { req.Header.Add("ActiveProjectId", tenantID) }