Skip to content
This repository was archived by the owner on Apr 5, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
.PHONY: code-gen
code-gen:
rm -rf client
openapi-generator generate -i ./spec/openapi.yaml -g go --package-name "client" --git-repo-id go-redfish/client --git-user-id Nordix -o client/ -p enumClassPrefix=true
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate \
-i /local/spec/openapi.yaml \
-g go \
--package-name "client" \
--git-repo-id go-redfish/client \
--git-user-id Nordix \
-p enumClassPrefix=true \
-o /local/client
#openapi-generator generate -i ./spec/openapi.yaml -g go --package-name "client" --git-repo-id go-redfish/client --git-user-id Nordix -o client/ -p enumClassPrefix=true
mkdir -p api
go run api_generator.go | gofmt > api/service_interface.go
go generate api/service_interface.go
Expand Down
150 changes: 150 additions & 0 deletions api/mocks/RedfishAPI.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions api/service_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ type RedfishAPI interface {
error,
)

FirmwareInventory(context.Context,
) (client.Collection,
*http.Response,
error,
)

FirmwareInventoryDownloadImage(context.Context,
*client.FirmwareInventoryDownloadImageOpts,
) (client.RedfishError,
*http.Response,
error,
)

GetManager(context.Context,
string,
) (client.Manager,
Expand Down Expand Up @@ -46,6 +59,13 @@ type RedfishAPI interface {
error,
)

GetTask(context.Context,
string,
) (client.Task,
*http.Response,
error,
)

InsertVirtualMedia(context.Context,
string,
string,
Expand Down Expand Up @@ -89,4 +109,17 @@ type RedfishAPI interface {
*http.Response,
error,
)

UpdateService(context.Context,
) (client.UpdateService,
*http.Response,
error,
)

UpdateServiceSimpleUpdate(context.Context,
client.SimpleUpdateRequestBody,
) (client.RedfishError,
*http.Response,
error,
)
}
2 changes: 1 addition & 1 deletion client/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1.1
4.2.3-SNAPSHOT
14 changes: 14 additions & 0 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,21 @@ All URIs are relative to *http://localhost*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**EjectVirtualMedia**](docs/DefaultApi.md#ejectvirtualmedia) | **Post** /redfish/v1/Managers/{managerId}/VirtualMedia/{virtualMediaId}/Actions/VirtualMedia.EjectMedia |
*DefaultApi* | [**FirmwareInventory**](docs/DefaultApi.md#firmwareinventory) | **Get** /redfish/v1/UpdateService/FirmwareInventory |
*DefaultApi* | [**FirmwareInventoryDownloadImage**](docs/DefaultApi.md#firmwareinventorydownloadimage) | **Post** /redfish/v1/UpdateService/FirmwareInventory |
*DefaultApi* | [**GetManager**](docs/DefaultApi.md#getmanager) | **Get** /redfish/v1/Managers/{managerId} |
*DefaultApi* | [**GetManagerVirtualMedia**](docs/DefaultApi.md#getmanagervirtualmedia) | **Get** /redfish/v1/Managers/{managerId}/VirtualMedia/{virtualMediaId} |
*DefaultApi* | [**GetRoot**](docs/DefaultApi.md#getroot) | **Get** /redfish/v1 |
*DefaultApi* | [**GetSystem**](docs/DefaultApi.md#getsystem) | **Get** /redfish/v1/Systems/{systemId} |
*DefaultApi* | [**GetTask**](docs/DefaultApi.md#gettask) | **Get** /redfish/v1/TaskService/Tasks/{taskId} |
*DefaultApi* | [**InsertVirtualMedia**](docs/DefaultApi.md#insertvirtualmedia) | **Post** /redfish/v1/Managers/{managerId}/VirtualMedia/{virtualMediaId}/Actions/VirtualMedia.InsertMedia |
*DefaultApi* | [**ListManagerVirtualMedia**](docs/DefaultApi.md#listmanagervirtualmedia) | **Get** /redfish/v1/Managers/{managerId}/VirtualMedia |
*DefaultApi* | [**ListManagers**](docs/DefaultApi.md#listmanagers) | **Get** /redfish/v1/Managers |
*DefaultApi* | [**ListSystems**](docs/DefaultApi.md#listsystems) | **Get** /redfish/v1/Systems |
*DefaultApi* | [**ResetSystem**](docs/DefaultApi.md#resetsystem) | **Post** /redfish/v1/Systems/{ComputerSystemId}/Actions/ComputerSystem.Reset |
*DefaultApi* | [**SetSystem**](docs/DefaultApi.md#setsystem) | **Patch** /redfish/v1/Systems/{systemId} |
*DefaultApi* | [**UpdateService**](docs/DefaultApi.md#updateservice) | **Get** /redfish/v1/UpdateService |
*DefaultApi* | [**UpdateServiceSimpleUpdate**](docs/DefaultApi.md#updateservicesimpleupdate) | **Post** /redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate |


## Documentation For Models
Expand All @@ -55,27 +60,35 @@ Class | Method | HTTP request | Description
- [ComputerSystemActions](docs/ComputerSystemActions.md)
- [ComputerSystemReset](docs/ComputerSystemReset.md)
- [ConnectedVia](docs/ConnectedVia.md)
- [FirmwareInventory](docs/FirmwareInventory.md)
- [Health](docs/Health.md)
- [IdRef](docs/IdRef.md)
- [IndicatorLed](docs/IndicatorLed.md)
- [InlineObject](docs/InlineObject.md)
- [InsertMediaRequestBody](docs/InsertMediaRequestBody.md)
- [Manager](docs/Manager.md)
- [ManagerLinks](docs/ManagerLinks.md)
- [ManagerType](docs/ManagerType.md)
- [MemorySummary](docs/MemorySummary.md)
- [Message](docs/Message.md)
- [Payload](docs/Payload.md)
- [PowerState](docs/PowerState.md)
- [ProcessorSummary](docs/ProcessorSummary.md)
- [RedfishError](docs/RedfishError.md)
- [RedfishErrorError](docs/RedfishErrorError.md)
- [ResetRequestBody](docs/ResetRequestBody.md)
- [ResetType](docs/ResetType.md)
- [Root](docs/Root.md)
- [SimpleUpdateRequestBody](docs/SimpleUpdateRequestBody.md)
- [State](docs/State.md)
- [Status](docs/Status.md)
- [SystemLinks](docs/SystemLinks.md)
- [Task](docs/Task.md)
- [TaskState](docs/TaskState.md)
- [TransferMethod](docs/TransferMethod.md)
- [TransferProtocolType](docs/TransferProtocolType.md)
- [UpdateService](docs/UpdateService.md)
- [UpdateServiceActions](docs/UpdateServiceActions.md)
- [VirtualMedia](docs/VirtualMedia.md)
- [VirtualMediaActions](docs/VirtualMediaActions.md)
- [VirtualMediaActionsVirtualMediaEjectMedia](docs/VirtualMediaActionsVirtualMediaEjectMedia.md)
Expand All @@ -86,6 +99,7 @@ Class | Method | HTTP request | Description
Endpoints do not require authorization.



## Author


Expand Down
Loading