Add class prefix to enums

This commit is contained in:
Kanwar Saad Bin Liaqat 2019-09-19 04:13:01 +03:00
parent 7977676acb
commit d4823e24ee
No known key found for this signature in database
GPG Key ID: F5189DC439490C63
12 changed files with 69 additions and 69 deletions

View File

@ -1,7 +1,7 @@
.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/
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
.PHONY: deps
deps:

View File

@ -12,19 +12,19 @@ type BootSource string
// List of BootSource
const (
NONE BootSource = "None"
PXE BootSource = "Pxe"
FLOPPY BootSource = "Floppy"
CD BootSource = "Cd"
USB BootSource = "Usb"
HDD BootSource = "Hdd"
BIOS_SETUP BootSource = "BiosSetup"
UTILITIES BootSource = "Utilities"
DIAGS BootSource = "Diags"
UEFI_SHELL BootSource = "UefiShell"
UEFI_TARGET BootSource = "UefiTarget"
SD_CARD BootSource = "SDCard"
UEFI_HTTP BootSource = "UefiHttp"
REMOTE_DRIVE BootSource = "RemoteDrive"
UEFI_BOOT_NEXT BootSource = "UefiBootNext"
BOOTSOURCE_NONE BootSource = "None"
BOOTSOURCE_PXE BootSource = "Pxe"
BOOTSOURCE_FLOPPY BootSource = "Floppy"
BOOTSOURCE_CD BootSource = "Cd"
BOOTSOURCE_USB BootSource = "Usb"
BOOTSOURCE_HDD BootSource = "Hdd"
BOOTSOURCE_BIOS_SETUP BootSource = "BiosSetup"
BOOTSOURCE_UTILITIES BootSource = "Utilities"
BOOTSOURCE_DIAGS BootSource = "Diags"
BOOTSOURCE_UEFI_SHELL BootSource = "UefiShell"
BOOTSOURCE_UEFI_TARGET BootSource = "UefiTarget"
BOOTSOURCE_SD_CARD BootSource = "SDCard"
BOOTSOURCE_UEFI_HTTP BootSource = "UefiHttp"
BOOTSOURCE_REMOTE_DRIVE BootSource = "RemoteDrive"
BOOTSOURCE_UEFI_BOOT_NEXT BootSource = "UefiBootNext"
)

View File

@ -12,6 +12,6 @@ type BootSourceOverrideEnabled string
// List of BootSourceOverrideEnabled
const (
ONCE BootSourceOverrideEnabled = "Once"
CONTINUOUS BootSourceOverrideEnabled = "Continuous"
BOOTSOURCEOVERRIDEENABLED_ONCE BootSourceOverrideEnabled = "Once"
BOOTSOURCEOVERRIDEENABLED_CONTINUOUS BootSourceOverrideEnabled = "Continuous"
)

View File

@ -12,8 +12,8 @@ type ConnectedVia string
// List of ConnectedVia
const (
NOT_CONNECTED ConnectedVia = "NotConnected"
URI ConnectedVia = "URI"
APPLET ConnectedVia = "Applet"
OEM ConnectedVia = "Oem"
CONNECTEDVIA_NOT_CONNECTED ConnectedVia = "NotConnected"
CONNECTEDVIA_URI ConnectedVia = "URI"
CONNECTEDVIA_APPLET ConnectedVia = "Applet"
CONNECTEDVIA_OEM ConnectedVia = "Oem"
)

View File

@ -12,7 +12,7 @@ type Health string
// List of Health
const (
OK Health = "OK"
WARNING Health = "Warning"
CRITICAL Health = "Critical"
HEALTH_OK Health = "OK"
HEALTH_WARNING Health = "Warning"
HEALTH_CRITICAL Health = "Critical"
)

View File

@ -12,8 +12,8 @@ type IndicatorLed string
// List of IndicatorLED
const (
UNKNOWN IndicatorLed = "Unknown"
LIT IndicatorLed = "Lit"
BLINKING IndicatorLed = "Blinking"
OFF IndicatorLed = "Off"
INDICATORLED_UNKNOWN IndicatorLed = "Unknown"
INDICATORLED_LIT IndicatorLed = "Lit"
INDICATORLED_BLINKING IndicatorLed = "Blinking"
INDICATORLED_OFF IndicatorLed = "Off"
)

View File

@ -12,10 +12,10 @@ type ManagerType string
// List of ManagerType
const (
MANAGEMENT_CONTROLLER ManagerType = "ManagementController"
ENCLOSURE_MANAGER ManagerType = "EnclosureManager"
BMC ManagerType = "BMC"
RACK_MANAGER ManagerType = "RackManager"
AUXILIARY_CONTROLLER ManagerType = "AuxiliaryController"
SERVICE ManagerType = "Service"
MANAGERTYPE_MANAGEMENT_CONTROLLER ManagerType = "ManagementController"
MANAGERTYPE_ENCLOSURE_MANAGER ManagerType = "EnclosureManager"
MANAGERTYPE_BMC ManagerType = "BMC"
MANAGERTYPE_RACK_MANAGER ManagerType = "RackManager"
MANAGERTYPE_AUXILIARY_CONTROLLER ManagerType = "AuxiliaryController"
MANAGERTYPE_SERVICE ManagerType = "Service"
)

View File

@ -12,8 +12,8 @@ type PowerState string
// List of PowerState
const (
TRUE PowerState = "true"
FALSE PowerState = "false"
POWERING_ON PowerState = "PoweringOn"
POWERING_OFF PowerState = "PoweringOff"
POWERSTATE_TRUE PowerState = "true"
POWERSTATE_FALSE PowerState = "false"
POWERSTATE_POWERING_ON PowerState = "PoweringOn"
POWERSTATE_POWERING_OFF PowerState = "PoweringOff"
)

View File

@ -12,13 +12,13 @@ type ResetType string
// List of ResetType
const (
ON ResetType = "On"
FORCE_OFF ResetType = "ForceOff"
GRACEFUL_SHUTDOWN ResetType = "GracefulShutdown"
GRACEFUL_RESTART ResetType = "GracefulRestart"
FORCE_RESTART ResetType = "ForceRestart"
NMI ResetType = "Nmi"
FORCE_ON ResetType = "ForceOn"
PUSH_POWER_BUTTON ResetType = "PushPowerButton"
POWER_CYCLE ResetType = "PowerCycle"
RESETTYPE_ON ResetType = "On"
RESETTYPE_FORCE_OFF ResetType = "ForceOff"
RESETTYPE_GRACEFUL_SHUTDOWN ResetType = "GracefulShutdown"
RESETTYPE_GRACEFUL_RESTART ResetType = "GracefulRestart"
RESETTYPE_FORCE_RESTART ResetType = "ForceRestart"
RESETTYPE_NMI ResetType = "Nmi"
RESETTYPE_FORCE_ON ResetType = "ForceOn"
RESETTYPE_PUSH_POWER_BUTTON ResetType = "PushPowerButton"
RESETTYPE_POWER_CYCLE ResetType = "PowerCycle"
)

View File

@ -12,15 +12,15 @@ type State string
// List of State
const (
ENABLED State = "Enabled"
DISABLED State = "Disabled"
STANDBY_OFFLINE State = "StandbyOffline"
STANDBY_SPARE State = "StandbySpare"
IN_TEST State = "InTest"
STARTING State = "Starting"
ABSENT State = "Absent"
UNAVAILABLE_OFFLINE State = "UnavailableOffline"
DEFERRING State = "Deferring"
QUIESCED State = "Quiesced"
UPDATING State = "Updating"
STATE_ENABLED State = "Enabled"
STATE_DISABLED State = "Disabled"
STATE_STANDBY_OFFLINE State = "StandbyOffline"
STATE_STANDBY_SPARE State = "StandbySpare"
STATE_IN_TEST State = "InTest"
STATE_STARTING State = "Starting"
STATE_ABSENT State = "Absent"
STATE_UNAVAILABLE_OFFLINE State = "UnavailableOffline"
STATE_DEFERRING State = "Deferring"
STATE_QUIESCED State = "Quiesced"
STATE_UPDATING State = "Updating"
)

View File

@ -12,6 +12,6 @@ type TransferMethod string
// List of TransferMethod
const (
STREAM TransferMethod = "Stream"
UPLOAD TransferMethod = "Upload"
TRANSFERMETHOD_STREAM TransferMethod = "Stream"
TRANSFERMETHOD_UPLOAD TransferMethod = "Upload"
)

View File

@ -12,12 +12,12 @@ type TransferProtocolType string
// List of TransferProtocolType
const (
CIFS TransferProtocolType = "CIFS"
FTP TransferProtocolType = "FTP"
SFTP TransferProtocolType = "SFTP"
HTTP TransferProtocolType = "HTTP"
HTTPS TransferProtocolType = "HTTPS"
NFS TransferProtocolType = "NFS"
SCP TransferProtocolType = "SCP"
TFTP TransferProtocolType = "TFTP"
TRANSFERPROTOCOLTYPE_CIFS TransferProtocolType = "CIFS"
TRANSFERPROTOCOLTYPE_FTP TransferProtocolType = "FTP"
TRANSFERPROTOCOLTYPE_SFTP TransferProtocolType = "SFTP"
TRANSFERPROTOCOLTYPE_HTTP TransferProtocolType = "HTTP"
TRANSFERPROTOCOLTYPE_HTTPS TransferProtocolType = "HTTPS"
TRANSFERPROTOCOLTYPE_NFS TransferProtocolType = "NFS"
TRANSFERPROTOCOLTYPE_SCP TransferProtocolType = "SCP"
TRANSFERPROTOCOLTYPE_TFTP TransferProtocolType = "TFTP"
)