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
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
client "opendev.org/airship/go-redfish/client"
|
||||
|
||||
context "context"
|
||||
|
||||
http "net/http"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
@ -1 +1 @@
|
||||
4.1.1
|
||||
4.2.2
|
@ -1156,7 +1156,7 @@ components:
|
||||
properties:
|
||||
'#ComputerSystem.Reset':
|
||||
$ref: '#/components/schemas/ComputerSystemReset'
|
||||
VirtualMedia_Actions_VirtualMedia_EjectMedia:
|
||||
VirtualMedia_Actions__VirtualMedia_EjectMedia:
|
||||
example:
|
||||
target: target
|
||||
properties:
|
||||
@ -1173,6 +1173,6 @@ components:
|
||||
target: target
|
||||
properties:
|
||||
'#VirtualMedia.EjectMedia':
|
||||
$ref: '#/components/schemas/VirtualMedia_Actions_VirtualMedia_EjectMedia'
|
||||
$ref: '#/components/schemas/VirtualMedia_Actions__VirtualMedia_EjectMedia'
|
||||
'#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"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -157,14 +159,41 @@ func parameterToJson(obj interface{}) (string, error) {
|
||||
|
||||
// callAPI do the request.
|
||||
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) {
|
||||
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
|
||||
func (c *APIClient) prepareRequest(
|
||||
ctx context.Context,
|
||||
@ -329,6 +358,9 @@ func (c *APIClient) prepareRequest(
|
||||
}
|
||||
|
||||
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
|
||||
if len(b) == 0 {
|
||||
return nil
|
||||
}
|
||||
if s, ok := v.(*string); ok {
|
||||
*s = string(b)
|
||||
return nil
|
||||
|
@ -49,24 +49,29 @@ type APIKey struct {
|
||||
Prefix string
|
||||
}
|
||||
|
||||
// Configuration stores the configuration of the API client
|
||||
type Configuration struct {
|
||||
BasePath string `json:"basePath,omitempty"`
|
||||
Host string `json:"host,omitempty"`
|
||||
Scheme string `json:"scheme,omitempty"`
|
||||
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
|
||||
UserAgent string `json:"userAgent,omitempty"`
|
||||
Debug bool `json:"debug,omitempty"`
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// NewConfiguration returns a new Configuration object
|
||||
func NewConfiguration() *Configuration {
|
||||
cfg := &Configuration{
|
||||
BasePath: "http://localhost",
|
||||
DefaultHeader: make(map[string]string),
|
||||
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||
Debug: false,
|
||||
}
|
||||
return cfg
|
||||
}
|
||||
|
||||
// AddDefaultHeader adds a new HTTP header to the default header in the request
|
||||
func (c *Configuration) AddDefaultHeader(key string, value string) {
|
||||
c.DefaultHeader[key] = value
|
||||
}
|
||||
|
@ -8,11 +8,11 @@ Name | Type | Description | Notes
|
||||
**OdataEtag** | **string** | etag | [optional]
|
||||
**OdataId** | **string** | id |
|
||||
**OdataType** | **string** | type |
|
||||
**Description** | Pointer to **string** | description | [optional]
|
||||
**Members** | [**[]IdRef**](idRef.md) | Contains the members of this collection. |
|
||||
**MembersodataCount** | **int32** | The number of items in a collection. | [optional]
|
||||
**MembersodataNextLink** | **string** | The URI to the resource containing the next set of partial members. | [optional]
|
||||
**Name** | **string** | The name of the resource. |
|
||||
**Description** | Pointer to **string** | description | [optional] [readonly]
|
||||
**Members** | [**[]IdRef**](idRef.md) | Contains the members of this collection. | [readonly]
|
||||
**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] [readonly]
|
||||
**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)
|
||||
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **string** | The name of the resource. | [optional]
|
||||
**Name** | **string** | The name of the resource. |
|
||||
**Id** | **string** | The name of the resource. | [optional] [readonly]
|
||||
**Name** | **string** | The name of the resource. | [readonly]
|
||||
**RedfishVersion** | **string** | redfish version | [optional]
|
||||
**UUID** | **string** | | [optional]
|
||||
**OdataType** | **string** | The type of a resource. |
|
||||
**OdataId** | **string** | The unique identifier for a resource. |
|
||||
**OdataContext** | **string** | The OData description of a payload. | [optional]
|
||||
**OdataType** | **string** | The type of a resource. | [readonly]
|
||||
**OdataId** | **string** | The unique identifier for a resource. | [readonly]
|
||||
**OdataContext** | **string** | The OData description of a payload. | [optional] [readonly]
|
||||
**RedfishCopyright** | **string** | redfish copyright | [optional]
|
||||
**Bios** | [**IdRef**](idRef.md) | | [optional]
|
||||
**Processors** | [**IdRef**](idRef.md) | | [optional]
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
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]
|
||||
|
||||
[[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)
|
||||
|
||||
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
@ -56,6 +57,7 @@ No authorization required
|
||||
> Manager GetManager(ctx, managerId)
|
||||
|
||||
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
@ -87,6 +89,7 @@ No authorization required
|
||||
> VirtualMedia GetManagerVirtualMedia(ctx, managerId, virtualMediaId)
|
||||
|
||||
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
@ -119,6 +122,7 @@ No authorization required
|
||||
> Root GetRoot(ctx, )
|
||||
|
||||
|
||||
|
||||
### Required Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
@ -146,6 +150,7 @@ No authorization required
|
||||
> ComputerSystem GetSystem(ctx, systemId)
|
||||
|
||||
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
@ -177,6 +182,7 @@ No authorization required
|
||||
> RedfishError InsertVirtualMedia(ctx, managerId, virtualMediaId, insertMediaRequestBody)
|
||||
|
||||
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
@ -210,6 +216,7 @@ No authorization required
|
||||
> Collection ListManagerVirtualMedia(ctx, managerId)
|
||||
|
||||
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
@ -241,6 +248,7 @@ No authorization required
|
||||
> Collection ListManagers(ctx, )
|
||||
|
||||
|
||||
|
||||
### Required Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
@ -268,6 +276,7 @@ No authorization required
|
||||
> Collection ListSystems(ctx, )
|
||||
|
||||
|
||||
|
||||
### Required Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
@ -295,6 +304,7 @@ No authorization required
|
||||
> RedfishError ResetSystem(ctx, computerSystemId, resetRequestBody)
|
||||
|
||||
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
@ -327,6 +337,7 @@ No authorization required
|
||||
> ComputerSystem SetSystem(ctx, systemId, computerSystem)
|
||||
|
||||
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
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)
|
||||
|
||||
|
@ -4,22 +4,22 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **string** | The name of the resource. | [optional]
|
||||
**Name** | **string** | The name of the resource. |
|
||||
**Id** | **string** | The name of the resource. | [optional] [readonly]
|
||||
**Name** | **string** | The name of the resource. | [readonly]
|
||||
**UUID** | **string** | | [optional]
|
||||
**ServiceEntryPointUUID** | **string** | | [optional]
|
||||
**OdataType** | **string** | The type of a resource. |
|
||||
**OdataId** | **string** | The unique identifier for a resource. |
|
||||
**OdataContext** | **string** | The OData description of a payload. | [optional]
|
||||
**OdataType** | **string** | The type of a resource. | [readonly]
|
||||
**OdataId** | **string** | The unique identifier for a resource. | [readonly]
|
||||
**OdataContext** | **string** | The OData description of a payload. | [optional] [readonly]
|
||||
**RedfishCopyright** | **string** | redfish copyright | [optional]
|
||||
**Model** | Pointer to **string** | | [optional]
|
||||
**Model** | Pointer to **string** | | [optional] [readonly]
|
||||
**ManagerType** | [**ManagerType**](ManagerType.md) | | [optional]
|
||||
**Status** | [**Status**](Status.md) | | [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]
|
||||
**Description** | Pointer to **string** | description | [optional]
|
||||
**Description** | Pointer to **string** | description | [optional] [readonly]
|
||||
**EthernetInterfaces** | [**IdRef**](idRef.md) | | [optional]
|
||||
**FirmwareVersion** | Pointer to **string** | | [optional]
|
||||
**FirmwareVersion** | Pointer to **string** | | [optional] [readonly]
|
||||
**Links** | [**ManagerLinks**](ManagerLinks.md) | | [optional]
|
||||
**PowerState** | [**PowerState**](PowerState.md) | | [optional]
|
||||
**VirtualMedia** | [**IdRef**](idRef.md) | | [optional]
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**TotalSystemMemoryGiB** | Pointer to **float32** | | [optional]
|
||||
**TotalSystemPersistentMemoryGiB** | Pointer to **float32** | | [optional]
|
||||
**TotalSystemMemoryGiB** | Pointer to **float32** | | [optional] [readonly]
|
||||
**TotalSystemPersistentMemoryGiB** | Pointer to **float32** | | [optional] [readonly]
|
||||
**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)
|
||||
|
@ -4,12 +4,12 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Message** | **string** | | [optional]
|
||||
**MessageArgs** | **[]string** | | [optional]
|
||||
**MessageId** | **string** | |
|
||||
**RelatedProperties** | **[]string** | | [optional]
|
||||
**Resolution** | **string** | | [optional]
|
||||
**Severity** | **string** | | [optional]
|
||||
**Message** | **string** | | [optional] [readonly]
|
||||
**MessageArgs** | **[]string** | | [optional] [readonly]
|
||||
**MessageId** | **string** | | [readonly]
|
||||
**RelatedProperties** | **[]string** | | [optional] [readonly]
|
||||
**Resolution** | **string** | | [optional] [readonly]
|
||||
**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)
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Count** | Pointer to **int32** | | [optional]
|
||||
**Count** | Pointer to **int32** | | [optional] [readonly]
|
||||
**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)
|
||||
|
@ -5,8 +5,8 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**MessageExtendedInfo** | [**[]Message**](Message.md) | | [optional]
|
||||
**Code** | **string** | |
|
||||
**Message** | **string** | |
|
||||
**Code** | **string** | | [readonly]
|
||||
**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)
|
||||
|
||||
|
@ -4,12 +4,12 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **string** | The name of the resource. | [optional]
|
||||
**Name** | **string** | The name of the resource. |
|
||||
**Id** | **string** | The name of the resource. | [optional] [readonly]
|
||||
**Name** | **string** | The name of the resource. | [readonly]
|
||||
**RedfishVersion** | **string** | redfish version | [optional]
|
||||
**UUID** | **string** | | [optional]
|
||||
**OdataType** | **string** | The type of a resource. |
|
||||
**OdataId** | **string** | The unique identifier for a resource. |
|
||||
**OdataType** | **string** | The type of a resource. | [readonly]
|
||||
**OdataId** | **string** | The unique identifier for a resource. | [readonly]
|
||||
**RedfishCopyright** | **string** | redfish copyright | [optional]
|
||||
**Systems** | [**IdRef**](idRef.md) | | [optional]
|
||||
**Managers** | [**IdRef**](idRef.md) | | [optional]
|
||||
|
@ -4,18 +4,18 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **string** | The name of the resource. | [optional]
|
||||
**Name** | **string** | The name of the resource. |
|
||||
**OdataType** | **string** | The type of a resource. |
|
||||
**OdataId** | **string** | The unique identifier for a resource. |
|
||||
**OdataContext** | **string** | The OData description of a payload. | [optional]
|
||||
**Id** | **string** | The name of the resource. | [optional] [readonly]
|
||||
**Name** | **string** | The name of the resource. | [readonly]
|
||||
**OdataType** | **string** | The type of a resource. | [readonly]
|
||||
**OdataId** | **string** | The unique identifier for a resource. | [readonly]
|
||||
**OdataContext** | **string** | The OData description of a payload. | [optional] [readonly]
|
||||
**RedfishCopyright** | **string** | redfish copyright | [optional]
|
||||
**Description** | Pointer to **string** | description | [optional]
|
||||
**Description** | Pointer to **string** | description | [optional] [readonly]
|
||||
**Image** | Pointer to **string** | | [optional]
|
||||
**ImageName** | Pointer to **string** | | [optional]
|
||||
**ImageName** | Pointer to **string** | | [optional] [readonly]
|
||||
**Inserted** | Pointer to **bool** | | [optional]
|
||||
**ConnectedVia** | [**ConnectedVia**](ConnectedVia.md) | | [optional]
|
||||
**MediaTypes** | **[]string** | | [optional]
|
||||
**MediaTypes** | **[]string** | | [optional] [readonly]
|
||||
**WriteProtected** | Pointer to **bool** | | [optional]
|
||||
**UserName** | Pointer to **string** | | [optional]
|
||||
**Password** | Pointer to **string** | | [optional]
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**VirtualMediaEjectMedia** | [**VirtualMediaActionsVirtualMediaEjectMedia**](VirtualMedia_Actions_VirtualMedia_EjectMedia.md) | | [optional]
|
||||
**VirtualMediaInsertMedia** | [**VirtualMediaActionsVirtualMediaEjectMedia**](VirtualMedia_Actions_VirtualMedia_EjectMedia.md) | | [optional]
|
||||
**VirtualMediaEjectMedia** | [**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)
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
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)
|
||||
|
||||
|
@ -1,14 +1,20 @@
|
||||
#!/bin/sh
|
||||
# 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_repo_id=$2
|
||||
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
|
||||
git_user_id="Nordix"
|
||||
git_user_id="airship"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
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
|
||||
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
|
||||
@ -47,6 +53,6 @@ fi
|
||||
git pull origin master
|
||||
|
||||
# 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'
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
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
|
||||
|
@ -1,11 +1,13 @@
|
||||
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/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-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg=
|
||||
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-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
|
||||
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/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// Boot struct for Boot
|
||||
type Boot struct {
|
||||
BootSourceOverrideEnabled BootSourceOverrideEnabled `json:"BootSourceOverrideEnabled,omitempty"`
|
||||
BootSourceOverrideTarget BootSource `json:"BootSourceOverrideTarget,omitempty"`
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
// BootSource the model 'BootSource'
|
||||
type BootSource string
|
||||
|
||||
// List of BootSource
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
// BootSourceOverrideEnabled the model 'BootSourceOverrideEnabled'
|
||||
type BootSourceOverrideEnabled string
|
||||
|
||||
// List of BootSourceOverrideEnabled
|
||||
|
@ -8,8 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// A Collection of ComputerSystem resource instances.
|
||||
// Collection A Collection of ComputerSystem resource instances.
|
||||
type Collection struct {
|
||||
// context
|
||||
OdataContext string `json:"@odata.context,omitempty"`
|
||||
|
@ -8,8 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// Root redfish path.
|
||||
// ComputerSystem Root redfish path.
|
||||
type ComputerSystem struct {
|
||||
// The name of the resource.
|
||||
Id string `json:"Id,omitempty"`
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// ComputerSystemActions struct for ComputerSystemActions
|
||||
type ComputerSystemActions struct {
|
||||
ComputerSystemReset ComputerSystemReset `json:"#ComputerSystem.Reset,omitempty"`
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// ComputerSystemReset struct for ComputerSystemReset
|
||||
type ComputerSystemReset struct {
|
||||
// The unique identifier for a resource.
|
||||
Target string `json:"target,omitempty"`
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
// ConnectedVia the model 'ConnectedVia'
|
||||
type ConnectedVia string
|
||||
|
||||
// List of ConnectedVia
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
// Health the model 'Health'
|
||||
type Health string
|
||||
|
||||
// List of Health
|
||||
|
@ -8,8 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// A reference to a resource.
|
||||
// IdRef A reference to a resource.
|
||||
type IdRef struct {
|
||||
// The unique identifier for a resource.
|
||||
OdataId string `json:"@odata.id,omitempty"`
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
// IndicatorLed the model 'IndicatorLed'
|
||||
type IndicatorLed string
|
||||
|
||||
// List of IndicatorLED
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// InsertMediaRequestBody struct for InsertMediaRequestBody
|
||||
type InsertMediaRequestBody struct {
|
||||
Image string `json:"Image"`
|
||||
Inserted bool `json:"Inserted,omitempty"`
|
||||
|
@ -8,8 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// Redfish manager resource.
|
||||
// Manager Redfish manager resource.
|
||||
type Manager struct {
|
||||
// The name of the resource.
|
||||
Id string `json:"Id,omitempty"`
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// ManagerLinks struct for ManagerLinks
|
||||
type ManagerLinks struct {
|
||||
ManagerForServers []IdRef `json:"ManagerForServers,omitempty"`
|
||||
ManagerForChassis []IdRef `json:"ManagerForChassis,omitempty"`
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
// ManagerType the model 'ManagerType'
|
||||
type ManagerType string
|
||||
|
||||
// List of ManagerType
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// MemorySummary struct for MemorySummary
|
||||
type MemorySummary struct {
|
||||
TotalSystemMemoryGiB *float32 `json:"TotalSystemMemoryGiB,omitempty"`
|
||||
TotalSystemPersistentMemoryGiB *float32 `json:"TotalSystemPersistentMemoryGiB,omitempty"`
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// Message struct for Message
|
||||
type Message struct {
|
||||
Message string `json:"Message,omitempty"`
|
||||
MessageArgs []string `json:"MessageArgs,omitempty"`
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
// PowerState the model 'PowerState'
|
||||
type PowerState string
|
||||
|
||||
// List of PowerState
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// ProcessorSummary struct for ProcessorSummary
|
||||
type ProcessorSummary struct {
|
||||
Count *int32 `json:"Count,omitempty"`
|
||||
Status Status `json:"Status,omitempty"`
|
||||
|
@ -8,8 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// Contains an error payload from a Redfish Service.
|
||||
// RedfishError Contains an error payload from a Redfish Service.
|
||||
type RedfishError struct {
|
||||
Error RedfishErrorError `json:"error"`
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// RedfishErrorError struct for RedfishErrorError
|
||||
type RedfishErrorError struct {
|
||||
MessageExtendedInfo []Message `json:"@Message.ExtendedInfo,omitempty"`
|
||||
Code string `json:"code"`
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// ResetRequestBody struct for ResetRequestBody
|
||||
type ResetRequestBody struct {
|
||||
ResetType ResetType `json:"ResetType,omitempty"`
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
// ResetType the model 'ResetType'
|
||||
type ResetType string
|
||||
|
||||
// List of ResetType
|
||||
|
@ -8,8 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// Root redfish path.
|
||||
// Root Root redfish path.
|
||||
type Root struct {
|
||||
// The name of the resource.
|
||||
Id string `json:"Id,omitempty"`
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
// State the model 'State'
|
||||
type State string
|
||||
|
||||
// List of State
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// Status struct for Status
|
||||
type Status struct {
|
||||
Health Health `json:"Health,omitempty"`
|
||||
HealthRollup Health `json:"HealthRollup,omitempty"`
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// SystemLinks struct for SystemLinks
|
||||
type SystemLinks struct {
|
||||
Chassis []IdRef `json:"Chassis,omitempty"`
|
||||
ManagedBy []IdRef `json:"ManagedBy,omitempty"`
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
// TransferMethod the model 'TransferMethod'
|
||||
type TransferMethod string
|
||||
|
||||
// List of TransferMethod
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
// TransferProtocolType the model 'TransferProtocolType'
|
||||
type TransferProtocolType string
|
||||
|
||||
// List of TransferProtocolType
|
||||
|
@ -8,8 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// Redfish virtual media resource for manager.
|
||||
// VirtualMedia Redfish virtual media resource for manager.
|
||||
type VirtualMedia struct {
|
||||
// The name of the resource.
|
||||
Id string `json:"Id,omitempty"`
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// VirtualMediaActions struct for VirtualMediaActions
|
||||
type VirtualMediaActions struct {
|
||||
VirtualMediaEjectMedia VirtualMediaActionsVirtualMediaEjectMedia `json:"#VirtualMedia.EjectMedia,omitempty"`
|
||||
VirtualMediaInsertMedia VirtualMediaActionsVirtualMediaEjectMedia `json:"#VirtualMedia.InsertMedia,omitempty"`
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
package client
|
||||
|
||||
// VirtualMediaActionsVirtualMediaEjectMedia struct for VirtualMediaActionsVirtualMediaEjectMedia
|
||||
type VirtualMediaActionsVirtualMediaEjectMedia struct {
|
||||
// The unique identifier for a resource.
|
||||
Target string `json:"target,omitempty"`
|
@ -13,6 +13,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// APIResponse stores the API response returned by the server.
|
||||
type APIResponse struct {
|
||||
*http.Response `json:"-"`
|
||||
Message string `json:"message,omitempty"`
|
||||
@ -30,12 +31,14 @@ type APIResponse struct {
|
||||
Payload []byte `json:"-"`
|
||||
}
|
||||
|
||||
// NewAPIResponse returns a new APIResonse object.
|
||||
func NewAPIResponse(r *http.Response) *APIResponse {
|
||||
|
||||
response := &APIResponse{Response: r}
|
||||
return response
|
||||
}
|
||||
|
||||
// NewAPIResponseWithError returns a new APIResponse object with the provided error message.
|
||||
func NewAPIResponseWithError(errorMessage string) *APIResponse {
|
||||
|
||||
response := &APIResponse{Message: errorMessage}
|
||||
|
Loading…
Reference in New Issue
Block a user