Regenerated code using openapi-generator 4.2.2
Change-Id: I73c4f1f19f6ef71d9cad74d5df0d611d5ca687a9
This commit is contained in:
parent
3ab47e28ba
commit
279a313a81
@ -3,10 +3,10 @@
|
|||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
|
||||||
|
|
||||||
client "opendev.org/airship/go-redfish/client"
|
client "opendev.org/airship/go-redfish/client"
|
||||||
|
|
||||||
|
context "context"
|
||||||
|
|
||||||
http "net/http"
|
http "net/http"
|
||||||
|
|
||||||
mock "github.com/stretchr/testify/mock"
|
mock "github.com/stretchr/testify/mock"
|
||||||
|
@ -1 +1 @@
|
|||||||
4.1.1
|
4.2.2
|
@ -1156,7 +1156,7 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
'#ComputerSystem.Reset':
|
'#ComputerSystem.Reset':
|
||||||
$ref: '#/components/schemas/ComputerSystemReset'
|
$ref: '#/components/schemas/ComputerSystemReset'
|
||||||
VirtualMedia_Actions_VirtualMedia_EjectMedia:
|
VirtualMedia_Actions__VirtualMedia_EjectMedia:
|
||||||
example:
|
example:
|
||||||
target: target
|
target: target
|
||||||
properties:
|
properties:
|
||||||
@ -1173,6 +1173,6 @@ components:
|
|||||||
target: target
|
target: target
|
||||||
properties:
|
properties:
|
||||||
'#VirtualMedia.EjectMedia':
|
'#VirtualMedia.EjectMedia':
|
||||||
$ref: '#/components/schemas/VirtualMedia_Actions_VirtualMedia_EjectMedia'
|
$ref: '#/components/schemas/VirtualMedia_Actions__VirtualMedia_EjectMedia'
|
||||||
'#VirtualMedia.InsertMedia':
|
'#VirtualMedia.InsertMedia':
|
||||||
$ref: '#/components/schemas/VirtualMedia_Actions_VirtualMedia_EjectMedia'
|
$ref: '#/components/schemas/VirtualMedia_Actions__VirtualMedia_EjectMedia'
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -17,8 +17,10 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
"log"
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"net/http/httputil"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -157,14 +159,41 @@ func parameterToJson(obj interface{}) (string, error) {
|
|||||||
|
|
||||||
// callAPI do the request.
|
// callAPI do the request.
|
||||||
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
||||||
return c.cfg.HTTPClient.Do(request)
|
if c.cfg.Debug {
|
||||||
|
dump, err := httputil.DumpRequestOut(request, true)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
log.Printf("\n%s\n", string(dump))
|
||||||
|
}
|
||||||
|
|
||||||
|
resp, err := c.cfg.HTTPClient.Do(request)
|
||||||
|
if err != nil {
|
||||||
|
return resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if c.cfg.Debug {
|
||||||
|
dump, err := httputil.DumpResponse(resp, true)
|
||||||
|
if err != nil {
|
||||||
|
return resp, err
|
||||||
|
}
|
||||||
|
log.Printf("\n%s\n", string(dump))
|
||||||
|
}
|
||||||
|
|
||||||
|
return resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change base path to allow switching to mocks
|
// ChangeBasePath changes base path to allow switching to mocks
|
||||||
func (c *APIClient) ChangeBasePath(path string) {
|
func (c *APIClient) ChangeBasePath(path string) {
|
||||||
c.cfg.BasePath = path
|
c.cfg.BasePath = path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Allow modification of underlying config for alternate implementations and testing
|
||||||
|
// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
|
||||||
|
func (c *APIClient) GetConfig() *Configuration {
|
||||||
|
return c.cfg
|
||||||
|
}
|
||||||
|
|
||||||
// prepareRequest build the request
|
// prepareRequest build the request
|
||||||
func (c *APIClient) prepareRequest(
|
func (c *APIClient) prepareRequest(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
@ -329,6 +358,9 @@ func (c *APIClient) prepareRequest(
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
|
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
|
||||||
|
if len(b) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
if s, ok := v.(*string); ok {
|
if s, ok := v.(*string); ok {
|
||||||
*s = string(b)
|
*s = string(b)
|
||||||
return nil
|
return nil
|
||||||
|
@ -49,24 +49,29 @@ type APIKey struct {
|
|||||||
Prefix string
|
Prefix string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Configuration stores the configuration of the API client
|
||||||
type Configuration struct {
|
type Configuration struct {
|
||||||
BasePath string `json:"basePath,omitempty"`
|
BasePath string `json:"basePath,omitempty"`
|
||||||
Host string `json:"host,omitempty"`
|
Host string `json:"host,omitempty"`
|
||||||
Scheme string `json:"scheme,omitempty"`
|
Scheme string `json:"scheme,omitempty"`
|
||||||
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
|
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
|
||||||
UserAgent string `json:"userAgent,omitempty"`
|
UserAgent string `json:"userAgent,omitempty"`
|
||||||
|
Debug bool `json:"debug,omitempty"`
|
||||||
HTTPClient *http.Client
|
HTTPClient *http.Client
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewConfiguration returns a new Configuration object
|
||||||
func NewConfiguration() *Configuration {
|
func NewConfiguration() *Configuration {
|
||||||
cfg := &Configuration{
|
cfg := &Configuration{
|
||||||
BasePath: "http://localhost",
|
BasePath: "http://localhost",
|
||||||
DefaultHeader: make(map[string]string),
|
DefaultHeader: make(map[string]string),
|
||||||
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
Debug: false,
|
||||||
}
|
}
|
||||||
return cfg
|
return cfg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AddDefaultHeader adds a new HTTP header to the default header in the request
|
||||||
func (c *Configuration) AddDefaultHeader(key string, value string) {
|
func (c *Configuration) AddDefaultHeader(key string, value string) {
|
||||||
c.DefaultHeader[key] = value
|
c.DefaultHeader[key] = value
|
||||||
}
|
}
|
||||||
|
@ -8,11 +8,11 @@ Name | Type | Description | Notes
|
|||||||
**OdataEtag** | **string** | etag | [optional]
|
**OdataEtag** | **string** | etag | [optional]
|
||||||
**OdataId** | **string** | id |
|
**OdataId** | **string** | id |
|
||||||
**OdataType** | **string** | type |
|
**OdataType** | **string** | type |
|
||||||
**Description** | Pointer to **string** | description | [optional]
|
**Description** | Pointer to **string** | description | [optional] [readonly]
|
||||||
**Members** | [**[]IdRef**](idRef.md) | Contains the members of this collection. |
|
**Members** | [**[]IdRef**](idRef.md) | Contains the members of this collection. | [readonly]
|
||||||
**MembersodataCount** | **int32** | The number of items in a collection. | [optional]
|
**MembersodataCount** | **int32** | The number of items in a collection. | [optional] [readonly]
|
||||||
**MembersodataNextLink** | **string** | The URI to the resource containing the next set of partial members. | [optional]
|
**MembersodataNextLink** | **string** | The URI to the resource containing the next set of partial members. | [optional] [readonly]
|
||||||
**Name** | **string** | The name of the resource. |
|
**Name** | **string** | The name of the resource. | [readonly]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Id** | **string** | The name of the resource. | [optional]
|
**Id** | **string** | The name of the resource. | [optional] [readonly]
|
||||||
**Name** | **string** | The name of the resource. |
|
**Name** | **string** | The name of the resource. | [readonly]
|
||||||
**RedfishVersion** | **string** | redfish version | [optional]
|
**RedfishVersion** | **string** | redfish version | [optional]
|
||||||
**UUID** | **string** | | [optional]
|
**UUID** | **string** | | [optional]
|
||||||
**OdataType** | **string** | The type of a resource. |
|
**OdataType** | **string** | The type of a resource. | [readonly]
|
||||||
**OdataId** | **string** | The unique identifier for a resource. |
|
**OdataId** | **string** | The unique identifier for a resource. | [readonly]
|
||||||
**OdataContext** | **string** | The OData description of a payload. | [optional]
|
**OdataContext** | **string** | The OData description of a payload. | [optional] [readonly]
|
||||||
**RedfishCopyright** | **string** | redfish copyright | [optional]
|
**RedfishCopyright** | **string** | redfish copyright | [optional]
|
||||||
**Bios** | [**IdRef**](idRef.md) | | [optional]
|
**Bios** | [**IdRef**](idRef.md) | | [optional]
|
||||||
**Processors** | [**IdRef**](idRef.md) | | [optional]
|
**Processors** | [**IdRef**](idRef.md) | | [optional]
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Target** | **string** | The unique identifier for a resource. | [optional]
|
**Target** | **string** | The unique identifier for a resource. | [optional] [readonly]
|
||||||
**ResetTypeRedfishAllowableValues** | [**[]ResetType**](ResetType.md) | | [optional]
|
**ResetTypeRedfishAllowableValues** | [**[]ResetType**](ResetType.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -23,6 +23,7 @@ Method | HTTP request | Description
|
|||||||
> RedfishError EjectVirtualMedia(ctx, managerId, virtualMediaId, body)
|
> RedfishError EjectVirtualMedia(ctx, managerId, virtualMediaId, body)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
@ -56,6 +57,7 @@ No authorization required
|
|||||||
> Manager GetManager(ctx, managerId)
|
> Manager GetManager(ctx, managerId)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
@ -87,6 +89,7 @@ No authorization required
|
|||||||
> VirtualMedia GetManagerVirtualMedia(ctx, managerId, virtualMediaId)
|
> VirtualMedia GetManagerVirtualMedia(ctx, managerId, virtualMediaId)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
@ -119,6 +122,7 @@ No authorization required
|
|||||||
> Root GetRoot(ctx, )
|
> Root GetRoot(ctx, )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
|
|
||||||
This endpoint does not need any parameter.
|
This endpoint does not need any parameter.
|
||||||
@ -146,6 +150,7 @@ No authorization required
|
|||||||
> ComputerSystem GetSystem(ctx, systemId)
|
> ComputerSystem GetSystem(ctx, systemId)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
@ -177,6 +182,7 @@ No authorization required
|
|||||||
> RedfishError InsertVirtualMedia(ctx, managerId, virtualMediaId, insertMediaRequestBody)
|
> RedfishError InsertVirtualMedia(ctx, managerId, virtualMediaId, insertMediaRequestBody)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
@ -210,6 +216,7 @@ No authorization required
|
|||||||
> Collection ListManagerVirtualMedia(ctx, managerId)
|
> Collection ListManagerVirtualMedia(ctx, managerId)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
@ -241,6 +248,7 @@ No authorization required
|
|||||||
> Collection ListManagers(ctx, )
|
> Collection ListManagers(ctx, )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
|
|
||||||
This endpoint does not need any parameter.
|
This endpoint does not need any parameter.
|
||||||
@ -268,6 +276,7 @@ No authorization required
|
|||||||
> Collection ListSystems(ctx, )
|
> Collection ListSystems(ctx, )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
|
|
||||||
This endpoint does not need any parameter.
|
This endpoint does not need any parameter.
|
||||||
@ -295,6 +304,7 @@ No authorization required
|
|||||||
> RedfishError ResetSystem(ctx, computerSystemId, resetRequestBody)
|
> RedfishError ResetSystem(ctx, computerSystemId, resetRequestBody)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
@ -327,6 +337,7 @@ No authorization required
|
|||||||
> ComputerSystem SetSystem(ctx, systemId, computerSystem)
|
> ComputerSystem SetSystem(ctx, systemId, computerSystem)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**OdataId** | **string** | The unique identifier for a resource. | [optional]
|
**OdataId** | **string** | The unique identifier for a resource. | [optional] [readonly]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -4,22 +4,22 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Id** | **string** | The name of the resource. | [optional]
|
**Id** | **string** | The name of the resource. | [optional] [readonly]
|
||||||
**Name** | **string** | The name of the resource. |
|
**Name** | **string** | The name of the resource. | [readonly]
|
||||||
**UUID** | **string** | | [optional]
|
**UUID** | **string** | | [optional]
|
||||||
**ServiceEntryPointUUID** | **string** | | [optional]
|
**ServiceEntryPointUUID** | **string** | | [optional]
|
||||||
**OdataType** | **string** | The type of a resource. |
|
**OdataType** | **string** | The type of a resource. | [readonly]
|
||||||
**OdataId** | **string** | The unique identifier for a resource. |
|
**OdataId** | **string** | The unique identifier for a resource. | [readonly]
|
||||||
**OdataContext** | **string** | The OData description of a payload. | [optional]
|
**OdataContext** | **string** | The OData description of a payload. | [optional] [readonly]
|
||||||
**RedfishCopyright** | **string** | redfish copyright | [optional]
|
**RedfishCopyright** | **string** | redfish copyright | [optional]
|
||||||
**Model** | Pointer to **string** | | [optional]
|
**Model** | Pointer to **string** | | [optional] [readonly]
|
||||||
**ManagerType** | [**ManagerType**](ManagerType.md) | | [optional]
|
**ManagerType** | [**ManagerType**](ManagerType.md) | | [optional]
|
||||||
**Status** | [**Status**](Status.md) | | [optional]
|
**Status** | [**Status**](Status.md) | | [optional]
|
||||||
**DateTime** | Pointer to **string** | | [optional]
|
**DateTime** | Pointer to **string** | | [optional]
|
||||||
**DateTimeLocalOffset** | Pointer to **string** | The time offset from UTC that the DateTime property is set to in format: +06:00 . | [optional]
|
**DateTimeLocalOffset** | Pointer to **string** | The time offset from UTC that the DateTime property is set to in format: +06:00 . | [optional]
|
||||||
**Description** | Pointer to **string** | description | [optional]
|
**Description** | Pointer to **string** | description | [optional] [readonly]
|
||||||
**EthernetInterfaces** | [**IdRef**](idRef.md) | | [optional]
|
**EthernetInterfaces** | [**IdRef**](idRef.md) | | [optional]
|
||||||
**FirmwareVersion** | Pointer to **string** | | [optional]
|
**FirmwareVersion** | Pointer to **string** | | [optional] [readonly]
|
||||||
**Links** | [**ManagerLinks**](ManagerLinks.md) | | [optional]
|
**Links** | [**ManagerLinks**](ManagerLinks.md) | | [optional]
|
||||||
**PowerState** | [**PowerState**](PowerState.md) | | [optional]
|
**PowerState** | [**PowerState**](PowerState.md) | | [optional]
|
||||||
**VirtualMedia** | [**IdRef**](idRef.md) | | [optional]
|
**VirtualMedia** | [**IdRef**](idRef.md) | | [optional]
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**TotalSystemMemoryGiB** | Pointer to **float32** | | [optional]
|
**TotalSystemMemoryGiB** | Pointer to **float32** | | [optional] [readonly]
|
||||||
**TotalSystemPersistentMemoryGiB** | Pointer to **float32** | | [optional]
|
**TotalSystemPersistentMemoryGiB** | Pointer to **float32** | | [optional] [readonly]
|
||||||
**Status** | [**Status**](Status.md) | | [optional]
|
**Status** | [**Status**](Status.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Message** | **string** | | [optional]
|
**Message** | **string** | | [optional] [readonly]
|
||||||
**MessageArgs** | **[]string** | | [optional]
|
**MessageArgs** | **[]string** | | [optional] [readonly]
|
||||||
**MessageId** | **string** | |
|
**MessageId** | **string** | | [readonly]
|
||||||
**RelatedProperties** | **[]string** | | [optional]
|
**RelatedProperties** | **[]string** | | [optional] [readonly]
|
||||||
**Resolution** | **string** | | [optional]
|
**Resolution** | **string** | | [optional] [readonly]
|
||||||
**Severity** | **string** | | [optional]
|
**Severity** | **string** | | [optional] [readonly]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Count** | Pointer to **int32** | | [optional]
|
**Count** | Pointer to **int32** | | [optional] [readonly]
|
||||||
**Status** | [**Status**](Status.md) | | [optional]
|
**Status** | [**Status**](Status.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**MessageExtendedInfo** | [**[]Message**](Message.md) | | [optional]
|
**MessageExtendedInfo** | [**[]Message**](Message.md) | | [optional]
|
||||||
**Code** | **string** | |
|
**Code** | **string** | | [readonly]
|
||||||
**Message** | **string** | |
|
**Message** | **string** | | [readonly]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Id** | **string** | The name of the resource. | [optional]
|
**Id** | **string** | The name of the resource. | [optional] [readonly]
|
||||||
**Name** | **string** | The name of the resource. |
|
**Name** | **string** | The name of the resource. | [readonly]
|
||||||
**RedfishVersion** | **string** | redfish version | [optional]
|
**RedfishVersion** | **string** | redfish version | [optional]
|
||||||
**UUID** | **string** | | [optional]
|
**UUID** | **string** | | [optional]
|
||||||
**OdataType** | **string** | The type of a resource. |
|
**OdataType** | **string** | The type of a resource. | [readonly]
|
||||||
**OdataId** | **string** | The unique identifier for a resource. |
|
**OdataId** | **string** | The unique identifier for a resource. | [readonly]
|
||||||
**RedfishCopyright** | **string** | redfish copyright | [optional]
|
**RedfishCopyright** | **string** | redfish copyright | [optional]
|
||||||
**Systems** | [**IdRef**](idRef.md) | | [optional]
|
**Systems** | [**IdRef**](idRef.md) | | [optional]
|
||||||
**Managers** | [**IdRef**](idRef.md) | | [optional]
|
**Managers** | [**IdRef**](idRef.md) | | [optional]
|
||||||
|
@ -4,18 +4,18 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Id** | **string** | The name of the resource. | [optional]
|
**Id** | **string** | The name of the resource. | [optional] [readonly]
|
||||||
**Name** | **string** | The name of the resource. |
|
**Name** | **string** | The name of the resource. | [readonly]
|
||||||
**OdataType** | **string** | The type of a resource. |
|
**OdataType** | **string** | The type of a resource. | [readonly]
|
||||||
**OdataId** | **string** | The unique identifier for a resource. |
|
**OdataId** | **string** | The unique identifier for a resource. | [readonly]
|
||||||
**OdataContext** | **string** | The OData description of a payload. | [optional]
|
**OdataContext** | **string** | The OData description of a payload. | [optional] [readonly]
|
||||||
**RedfishCopyright** | **string** | redfish copyright | [optional]
|
**RedfishCopyright** | **string** | redfish copyright | [optional]
|
||||||
**Description** | Pointer to **string** | description | [optional]
|
**Description** | Pointer to **string** | description | [optional] [readonly]
|
||||||
**Image** | Pointer to **string** | | [optional]
|
**Image** | Pointer to **string** | | [optional]
|
||||||
**ImageName** | Pointer to **string** | | [optional]
|
**ImageName** | Pointer to **string** | | [optional] [readonly]
|
||||||
**Inserted** | Pointer to **bool** | | [optional]
|
**Inserted** | Pointer to **bool** | | [optional]
|
||||||
**ConnectedVia** | [**ConnectedVia**](ConnectedVia.md) | | [optional]
|
**ConnectedVia** | [**ConnectedVia**](ConnectedVia.md) | | [optional]
|
||||||
**MediaTypes** | **[]string** | | [optional]
|
**MediaTypes** | **[]string** | | [optional] [readonly]
|
||||||
**WriteProtected** | Pointer to **bool** | | [optional]
|
**WriteProtected** | Pointer to **bool** | | [optional]
|
||||||
**UserName** | Pointer to **string** | | [optional]
|
**UserName** | Pointer to **string** | | [optional]
|
||||||
**Password** | Pointer to **string** | | [optional]
|
**Password** | Pointer to **string** | | [optional]
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VirtualMediaEjectMedia** | [**VirtualMediaActionsVirtualMediaEjectMedia**](VirtualMedia_Actions_VirtualMedia_EjectMedia.md) | | [optional]
|
**VirtualMediaEjectMedia** | [**VirtualMediaActionsVirtualMediaEjectMedia**](VirtualMedia_Actions__VirtualMedia_EjectMedia.md) | | [optional]
|
||||||
**VirtualMediaInsertMedia** | [**VirtualMediaActionsVirtualMediaEjectMedia**](VirtualMedia_Actions_VirtualMedia_EjectMedia.md) | | [optional]
|
**VirtualMediaInsertMedia** | [**VirtualMediaActionsVirtualMediaEjectMedia**](VirtualMedia_Actions__VirtualMedia_EjectMedia.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Target** | **string** | The unique identifier for a resource. | [optional]
|
**Target** | **string** | The unique identifier for a resource. | [optional] [readonly]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -1,14 +1,20 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||||
#
|
#
|
||||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
|
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
|
||||||
|
|
||||||
git_user_id=$1
|
git_user_id=$1
|
||||||
git_repo_id=$2
|
git_repo_id=$2
|
||||||
release_note=$3
|
release_note=$3
|
||||||
|
git_host=$4
|
||||||
|
|
||||||
|
if [ "$git_host" = "" ]; then
|
||||||
|
git_host="opendev.org"
|
||||||
|
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$git_user_id" = "" ]; then
|
if [ "$git_user_id" = "" ]; then
|
||||||
git_user_id="Nordix"
|
git_user_id="airship"
|
||||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -28,7 +34,7 @@ git init
|
|||||||
# Adds the files in the local repository and stages them for commit.
|
# Adds the files in the local repository and stages them for commit.
|
||||||
git add .
|
git add .
|
||||||
|
|
||||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||||
git commit -m "$release_note"
|
git commit -m "$release_note"
|
||||||
|
|
||||||
# Sets the new remote
|
# Sets the new remote
|
||||||
@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined
|
|||||||
|
|
||||||
if [ "$GIT_TOKEN" = "" ]; then
|
if [ "$GIT_TOKEN" = "" ]; then
|
||||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||||
else
|
else
|
||||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@ -47,6 +53,6 @@ fi
|
|||||||
git pull origin master
|
git pull origin master
|
||||||
|
|
||||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||||
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||||
git push origin master 2>&1 | grep -v 'To https'
|
git push origin master 2>&1 | grep -v 'To https'
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
module opendev.org/airship/go-redfish/client
|
module opendev.org/airship/go-redfish/client
|
||||||
|
|
||||||
require golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a
|
require (
|
||||||
|
github.com/antihax/optional v1.0.0
|
||||||
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
|
||||||
|
)
|
||||||
|
|
||||||
go 1.13
|
go 1.13
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||||
|
github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg=
|
||||||
|
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||||
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
|
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg=
|
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg=
|
||||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA=
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
|
||||||
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
|
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
|
||||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// Boot struct for Boot
|
||||||
type Boot struct {
|
type Boot struct {
|
||||||
BootSourceOverrideEnabled BootSourceOverrideEnabled `json:"BootSourceOverrideEnabled,omitempty"`
|
BootSourceOverrideEnabled BootSourceOverrideEnabled `json:"BootSourceOverrideEnabled,omitempty"`
|
||||||
BootSourceOverrideTarget BootSource `json:"BootSourceOverrideTarget,omitempty"`
|
BootSourceOverrideTarget BootSource `json:"BootSourceOverrideTarget,omitempty"`
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// BootSource the model 'BootSource'
|
||||||
type BootSource string
|
type BootSource string
|
||||||
|
|
||||||
// List of BootSource
|
// List of BootSource
|
||||||
@ -27,4 +28,4 @@ const (
|
|||||||
BOOTSOURCE_UEFI_HTTP BootSource = "UefiHttp"
|
BOOTSOURCE_UEFI_HTTP BootSource = "UefiHttp"
|
||||||
BOOTSOURCE_REMOTE_DRIVE BootSource = "RemoteDrive"
|
BOOTSOURCE_REMOTE_DRIVE BootSource = "RemoteDrive"
|
||||||
BOOTSOURCE_UEFI_BOOT_NEXT BootSource = "UefiBootNext"
|
BOOTSOURCE_UEFI_BOOT_NEXT BootSource = "UefiBootNext"
|
||||||
)
|
)
|
||||||
|
@ -8,10 +8,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// BootSourceOverrideEnabled the model 'BootSourceOverrideEnabled'
|
||||||
type BootSourceOverrideEnabled string
|
type BootSourceOverrideEnabled string
|
||||||
|
|
||||||
// List of BootSourceOverrideEnabled
|
// List of BootSourceOverrideEnabled
|
||||||
const (
|
const (
|
||||||
BOOTSOURCEOVERRIDEENABLED_ONCE BootSourceOverrideEnabled = "Once"
|
BOOTSOURCEOVERRIDEENABLED_ONCE BootSourceOverrideEnabled = "Once"
|
||||||
BOOTSOURCEOVERRIDEENABLED_CONTINUOUS BootSourceOverrideEnabled = "Continuous"
|
BOOTSOURCEOVERRIDEENABLED_CONTINUOUS BootSourceOverrideEnabled = "Continuous"
|
||||||
)
|
)
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// Collection A Collection of ComputerSystem resource instances.
|
||||||
// A Collection of ComputerSystem resource instances.
|
|
||||||
type Collection struct {
|
type Collection struct {
|
||||||
// context
|
// context
|
||||||
OdataContext string `json:"@odata.context,omitempty"`
|
OdataContext string `json:"@odata.context,omitempty"`
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// ComputerSystem Root redfish path.
|
||||||
// Root redfish path.
|
|
||||||
type ComputerSystem struct {
|
type ComputerSystem struct {
|
||||||
// The name of the resource.
|
// The name of the resource.
|
||||||
Id string `json:"Id,omitempty"`
|
Id string `json:"Id,omitempty"`
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// ComputerSystemActions struct for ComputerSystemActions
|
||||||
type ComputerSystemActions struct {
|
type ComputerSystemActions struct {
|
||||||
ComputerSystemReset ComputerSystemReset `json:"#ComputerSystem.Reset,omitempty"`
|
ComputerSystemReset ComputerSystemReset `json:"#ComputerSystem.Reset,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// ComputerSystemReset struct for ComputerSystemReset
|
||||||
type ComputerSystemReset struct {
|
type ComputerSystemReset struct {
|
||||||
// The unique identifier for a resource.
|
// The unique identifier for a resource.
|
||||||
Target string `json:"target,omitempty"`
|
Target string `json:"target,omitempty"`
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// ConnectedVia the model 'ConnectedVia'
|
||||||
type ConnectedVia string
|
type ConnectedVia string
|
||||||
|
|
||||||
// List of ConnectedVia
|
// List of ConnectedVia
|
||||||
@ -16,4 +17,4 @@ const (
|
|||||||
CONNECTEDVIA_URI ConnectedVia = "URI"
|
CONNECTEDVIA_URI ConnectedVia = "URI"
|
||||||
CONNECTEDVIA_APPLET ConnectedVia = "Applet"
|
CONNECTEDVIA_APPLET ConnectedVia = "Applet"
|
||||||
CONNECTEDVIA_OEM ConnectedVia = "Oem"
|
CONNECTEDVIA_OEM ConnectedVia = "Oem"
|
||||||
)
|
)
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// Health the model 'Health'
|
||||||
type Health string
|
type Health string
|
||||||
|
|
||||||
// List of Health
|
// List of Health
|
||||||
@ -15,4 +16,4 @@ const (
|
|||||||
HEALTH_OK Health = "OK"
|
HEALTH_OK Health = "OK"
|
||||||
HEALTH_WARNING Health = "Warning"
|
HEALTH_WARNING Health = "Warning"
|
||||||
HEALTH_CRITICAL Health = "Critical"
|
HEALTH_CRITICAL Health = "Critical"
|
||||||
)
|
)
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// IdRef A reference to a resource.
|
||||||
// A reference to a resource.
|
|
||||||
type IdRef struct {
|
type IdRef struct {
|
||||||
// The unique identifier for a resource.
|
// The unique identifier for a resource.
|
||||||
OdataId string `json:"@odata.id,omitempty"`
|
OdataId string `json:"@odata.id,omitempty"`
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// IndicatorLed the model 'IndicatorLed'
|
||||||
type IndicatorLed string
|
type IndicatorLed string
|
||||||
|
|
||||||
// List of IndicatorLED
|
// List of IndicatorLED
|
||||||
@ -16,4 +17,4 @@ const (
|
|||||||
INDICATORLED_LIT IndicatorLed = "Lit"
|
INDICATORLED_LIT IndicatorLed = "Lit"
|
||||||
INDICATORLED_BLINKING IndicatorLed = "Blinking"
|
INDICATORLED_BLINKING IndicatorLed = "Blinking"
|
||||||
INDICATORLED_OFF IndicatorLed = "Off"
|
INDICATORLED_OFF IndicatorLed = "Off"
|
||||||
)
|
)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// InsertMediaRequestBody struct for InsertMediaRequestBody
|
||||||
type InsertMediaRequestBody struct {
|
type InsertMediaRequestBody struct {
|
||||||
Image string `json:"Image"`
|
Image string `json:"Image"`
|
||||||
Inserted bool `json:"Inserted,omitempty"`
|
Inserted bool `json:"Inserted,omitempty"`
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// Manager Redfish manager resource.
|
||||||
// Redfish manager resource.
|
|
||||||
type Manager struct {
|
type Manager struct {
|
||||||
// The name of the resource.
|
// The name of the resource.
|
||||||
Id string `json:"Id,omitempty"`
|
Id string `json:"Id,omitempty"`
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// ManagerLinks struct for ManagerLinks
|
||||||
type ManagerLinks struct {
|
type ManagerLinks struct {
|
||||||
ManagerForServers []IdRef `json:"ManagerForServers,omitempty"`
|
ManagerForServers []IdRef `json:"ManagerForServers,omitempty"`
|
||||||
ManagerForChassis []IdRef `json:"ManagerForChassis,omitempty"`
|
ManagerForChassis []IdRef `json:"ManagerForChassis,omitempty"`
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// ManagerType the model 'ManagerType'
|
||||||
type ManagerType string
|
type ManagerType string
|
||||||
|
|
||||||
// List of ManagerType
|
// List of ManagerType
|
||||||
@ -18,4 +19,4 @@ const (
|
|||||||
MANAGERTYPE_RACK_MANAGER ManagerType = "RackManager"
|
MANAGERTYPE_RACK_MANAGER ManagerType = "RackManager"
|
||||||
MANAGERTYPE_AUXILIARY_CONTROLLER ManagerType = "AuxiliaryController"
|
MANAGERTYPE_AUXILIARY_CONTROLLER ManagerType = "AuxiliaryController"
|
||||||
MANAGERTYPE_SERVICE ManagerType = "Service"
|
MANAGERTYPE_SERVICE ManagerType = "Service"
|
||||||
)
|
)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// MemorySummary struct for MemorySummary
|
||||||
type MemorySummary struct {
|
type MemorySummary struct {
|
||||||
TotalSystemMemoryGiB *float32 `json:"TotalSystemMemoryGiB,omitempty"`
|
TotalSystemMemoryGiB *float32 `json:"TotalSystemMemoryGiB,omitempty"`
|
||||||
TotalSystemPersistentMemoryGiB *float32 `json:"TotalSystemPersistentMemoryGiB,omitempty"`
|
TotalSystemPersistentMemoryGiB *float32 `json:"TotalSystemPersistentMemoryGiB,omitempty"`
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// Message struct for Message
|
||||||
type Message struct {
|
type Message struct {
|
||||||
Message string `json:"Message,omitempty"`
|
Message string `json:"Message,omitempty"`
|
||||||
MessageArgs []string `json:"MessageArgs,omitempty"`
|
MessageArgs []string `json:"MessageArgs,omitempty"`
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// PowerState the model 'PowerState'
|
||||||
type PowerState string
|
type PowerState string
|
||||||
|
|
||||||
// List of PowerState
|
// List of PowerState
|
||||||
@ -16,4 +17,4 @@ const (
|
|||||||
POWERSTATE_FALSE PowerState = "false"
|
POWERSTATE_FALSE PowerState = "false"
|
||||||
POWERSTATE_POWERING_ON PowerState = "PoweringOn"
|
POWERSTATE_POWERING_ON PowerState = "PoweringOn"
|
||||||
POWERSTATE_POWERING_OFF PowerState = "PoweringOff"
|
POWERSTATE_POWERING_OFF PowerState = "PoweringOff"
|
||||||
)
|
)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// ProcessorSummary struct for ProcessorSummary
|
||||||
type ProcessorSummary struct {
|
type ProcessorSummary struct {
|
||||||
Count *int32 `json:"Count,omitempty"`
|
Count *int32 `json:"Count,omitempty"`
|
||||||
Status Status `json:"Status,omitempty"`
|
Status Status `json:"Status,omitempty"`
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// RedfishError Contains an error payload from a Redfish Service.
|
||||||
// Contains an error payload from a Redfish Service.
|
|
||||||
type RedfishError struct {
|
type RedfishError struct {
|
||||||
Error RedfishErrorError `json:"error"`
|
Error RedfishErrorError `json:"error"`
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// RedfishErrorError struct for RedfishErrorError
|
||||||
type RedfishErrorError struct {
|
type RedfishErrorError struct {
|
||||||
MessageExtendedInfo []Message `json:"@Message.ExtendedInfo,omitempty"`
|
MessageExtendedInfo []Message `json:"@Message.ExtendedInfo,omitempty"`
|
||||||
Code string `json:"code"`
|
Code string `json:"code"`
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// ResetRequestBody struct for ResetRequestBody
|
||||||
type ResetRequestBody struct {
|
type ResetRequestBody struct {
|
||||||
ResetType ResetType `json:"ResetType,omitempty"`
|
ResetType ResetType `json:"ResetType,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// ResetType the model 'ResetType'
|
||||||
type ResetType string
|
type ResetType string
|
||||||
|
|
||||||
// List of ResetType
|
// List of ResetType
|
||||||
@ -21,4 +22,4 @@ const (
|
|||||||
RESETTYPE_FORCE_ON ResetType = "ForceOn"
|
RESETTYPE_FORCE_ON ResetType = "ForceOn"
|
||||||
RESETTYPE_PUSH_POWER_BUTTON ResetType = "PushPowerButton"
|
RESETTYPE_PUSH_POWER_BUTTON ResetType = "PushPowerButton"
|
||||||
RESETTYPE_POWER_CYCLE ResetType = "PowerCycle"
|
RESETTYPE_POWER_CYCLE ResetType = "PowerCycle"
|
||||||
)
|
)
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// Root Root redfish path.
|
||||||
// Root redfish path.
|
|
||||||
type Root struct {
|
type Root struct {
|
||||||
// The name of the resource.
|
// The name of the resource.
|
||||||
Id string `json:"Id,omitempty"`
|
Id string `json:"Id,omitempty"`
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// State the model 'State'
|
||||||
type State string
|
type State string
|
||||||
|
|
||||||
// List of State
|
// List of State
|
||||||
@ -23,4 +24,4 @@ const (
|
|||||||
STATE_DEFERRING State = "Deferring"
|
STATE_DEFERRING State = "Deferring"
|
||||||
STATE_QUIESCED State = "Quiesced"
|
STATE_QUIESCED State = "Quiesced"
|
||||||
STATE_UPDATING State = "Updating"
|
STATE_UPDATING State = "Updating"
|
||||||
)
|
)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// Status struct for Status
|
||||||
type Status struct {
|
type Status struct {
|
||||||
Health Health `json:"Health,omitempty"`
|
Health Health `json:"Health,omitempty"`
|
||||||
HealthRollup Health `json:"HealthRollup,omitempty"`
|
HealthRollup Health `json:"HealthRollup,omitempty"`
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// SystemLinks struct for SystemLinks
|
||||||
type SystemLinks struct {
|
type SystemLinks struct {
|
||||||
Chassis []IdRef `json:"Chassis,omitempty"`
|
Chassis []IdRef `json:"Chassis,omitempty"`
|
||||||
ManagedBy []IdRef `json:"ManagedBy,omitempty"`
|
ManagedBy []IdRef `json:"ManagedBy,omitempty"`
|
||||||
|
@ -8,10 +8,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// TransferMethod the model 'TransferMethod'
|
||||||
type TransferMethod string
|
type TransferMethod string
|
||||||
|
|
||||||
// List of TransferMethod
|
// List of TransferMethod
|
||||||
const (
|
const (
|
||||||
TRANSFERMETHOD_STREAM TransferMethod = "Stream"
|
TRANSFERMETHOD_STREAM TransferMethod = "Stream"
|
||||||
TRANSFERMETHOD_UPLOAD TransferMethod = "Upload"
|
TRANSFERMETHOD_UPLOAD TransferMethod = "Upload"
|
||||||
)
|
)
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// TransferProtocolType the model 'TransferProtocolType'
|
||||||
type TransferProtocolType string
|
type TransferProtocolType string
|
||||||
|
|
||||||
// List of TransferProtocolType
|
// List of TransferProtocolType
|
||||||
@ -20,4 +21,4 @@ const (
|
|||||||
TRANSFERPROTOCOLTYPE_NFS TransferProtocolType = "NFS"
|
TRANSFERPROTOCOLTYPE_NFS TransferProtocolType = "NFS"
|
||||||
TRANSFERPROTOCOLTYPE_SCP TransferProtocolType = "SCP"
|
TRANSFERPROTOCOLTYPE_SCP TransferProtocolType = "SCP"
|
||||||
TRANSFERPROTOCOLTYPE_TFTP TransferProtocolType = "TFTP"
|
TRANSFERPROTOCOLTYPE_TFTP TransferProtocolType = "TFTP"
|
||||||
)
|
)
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// VirtualMedia Redfish virtual media resource for manager.
|
||||||
// Redfish virtual media resource for manager.
|
|
||||||
type VirtualMedia struct {
|
type VirtualMedia struct {
|
||||||
// The name of the resource.
|
// The name of the resource.
|
||||||
Id string `json:"Id,omitempty"`
|
Id string `json:"Id,omitempty"`
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// VirtualMediaActions struct for VirtualMediaActions
|
||||||
type VirtualMediaActions struct {
|
type VirtualMediaActions struct {
|
||||||
VirtualMediaEjectMedia VirtualMediaActionsVirtualMediaEjectMedia `json:"#VirtualMedia.EjectMedia,omitempty"`
|
VirtualMediaEjectMedia VirtualMediaActionsVirtualMediaEjectMedia `json:"#VirtualMedia.EjectMedia,omitempty"`
|
||||||
VirtualMediaInsertMedia VirtualMediaActionsVirtualMediaEjectMedia `json:"#VirtualMedia.InsertMedia,omitempty"`
|
VirtualMediaInsertMedia VirtualMediaActionsVirtualMediaEjectMedia `json:"#VirtualMedia.InsertMedia,omitempty"`
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
// VirtualMediaActionsVirtualMediaEjectMedia struct for VirtualMediaActionsVirtualMediaEjectMedia
|
||||||
type VirtualMediaActionsVirtualMediaEjectMedia struct {
|
type VirtualMediaActionsVirtualMediaEjectMedia struct {
|
||||||
// The unique identifier for a resource.
|
// The unique identifier for a resource.
|
||||||
Target string `json:"target,omitempty"`
|
Target string `json:"target,omitempty"`
|
@ -13,6 +13,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// APIResponse stores the API response returned by the server.
|
||||||
type APIResponse struct {
|
type APIResponse struct {
|
||||||
*http.Response `json:"-"`
|
*http.Response `json:"-"`
|
||||||
Message string `json:"message,omitempty"`
|
Message string `json:"message,omitempty"`
|
||||||
@ -30,12 +31,14 @@ type APIResponse struct {
|
|||||||
Payload []byte `json:"-"`
|
Payload []byte `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewAPIResponse returns a new APIResonse object.
|
||||||
func NewAPIResponse(r *http.Response) *APIResponse {
|
func NewAPIResponse(r *http.Response) *APIResponse {
|
||||||
|
|
||||||
response := &APIResponse{Response: r}
|
response := &APIResponse{Response: r}
|
||||||
return response
|
return response
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewAPIResponseWithError returns a new APIResponse object with the provided error message.
|
||||||
func NewAPIResponseWithError(errorMessage string) *APIResponse {
|
func NewAPIResponseWithError(errorMessage string) *APIResponse {
|
||||||
|
|
||||||
response := &APIResponse{Message: errorMessage}
|
response := &APIResponse{Message: errorMessage}
|
||||||
|
Loading…
Reference in New Issue
Block a user