mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-29 16:57:18 +00:00
virtcontainers: Update firecracker swagger API
Update firecracker swagger API Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
46e1880c8d
commit
67ce7283bc
@ -13,7 +13,7 @@ import (
|
||||
"github.com/go-openapi/validate"
|
||||
)
|
||||
|
||||
// Vsock vsock
|
||||
// Vsock Defines a vsock device, backed by a set of Unix Domain Sockets, on the host side. For host-initiated connections, Firecracker will be listening on the Unix socket identified by the path `uds_path`. Firecracker will create this socket, bind and listen on it. Host-initiated connections will be performed by connection to this socket and issuing a connection forwarding request to the desired guest-side vsock port (i.e. `CONNECT 52\n`, to connect to port 52). For guest-initiated connections, Firecracker will expect host software to be bound and listening on Unix sockets at `uds_path_<PORT>`. E.g. "/path/to/host_vsock.sock_52" for port number 52.
|
||||
// swagger:model Vsock
|
||||
type Vsock struct {
|
||||
|
||||
@ -22,9 +22,13 @@ type Vsock struct {
|
||||
// Minimum: 3
|
||||
GuestCid *int64 `json:"guest_cid"`
|
||||
|
||||
// id
|
||||
// Path to UNIX domain socket, used to proxy vsock connections.
|
||||
// Required: true
|
||||
ID *string `json:"id"`
|
||||
UdsPath *string `json:"uds_path"`
|
||||
|
||||
// vsock id
|
||||
// Required: true
|
||||
VsockID *string `json:"vsock_id"`
|
||||
}
|
||||
|
||||
// Validate validates this vsock
|
||||
@ -35,7 +39,11 @@ func (m *Vsock) Validate(formats strfmt.Registry) error {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateID(formats); err != nil {
|
||||
if err := m.validateUdsPath(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateVsockID(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
@ -58,9 +66,18 @@ func (m *Vsock) validateGuestCid(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Vsock) validateID(formats strfmt.Registry) error {
|
||||
func (m *Vsock) validateUdsPath(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("id", "body", m.ID); err != nil {
|
||||
if err := validate.Required("uds_path", "body", m.UdsPath); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Vsock) validateVsockID(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("vsock_id", "body", m.VsockID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -24,21 +24,18 @@ type CreateSyncActionReader struct {
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *CreateSyncActionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
|
||||
case 204:
|
||||
result := NewCreateSyncActionNoContent()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
||||
case 400:
|
||||
result := NewCreateSyncActionBadRequest()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
|
||||
default:
|
||||
result := NewCreateSyncActionDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
@ -89,6 +86,10 @@ func (o *CreateSyncActionBadRequest) Error() string {
|
||||
return fmt.Sprintf("[PUT /actions][%d] createSyncActionBadRequest %+v", 400, o.Payload)
|
||||
}
|
||||
|
||||
func (o *CreateSyncActionBadRequest) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *CreateSyncActionBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
@ -127,6 +128,10 @@ func (o *CreateSyncActionDefault) Error() string {
|
||||
return fmt.Sprintf("[PUT /actions][%d] createSyncAction default %+v", o._statusCode, o.Payload)
|
||||
}
|
||||
|
||||
func (o *CreateSyncActionDefault) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *CreateSyncActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
|
@ -24,14 +24,12 @@ type DescribeInstanceReader struct {
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *DescribeInstanceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
|
||||
case 200:
|
||||
result := NewDescribeInstanceOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
||||
default:
|
||||
result := NewDescribeInstanceDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
@ -61,6 +59,10 @@ func (o *DescribeInstanceOK) Error() string {
|
||||
return fmt.Sprintf("[GET /][%d] describeInstanceOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *DescribeInstanceOK) GetPayload() *models.InstanceInfo {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *DescribeInstanceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.InstanceInfo)
|
||||
@ -99,6 +101,10 @@ func (o *DescribeInstanceDefault) Error() string {
|
||||
return fmt.Sprintf("[GET /][%d] describeInstance default %+v", o._statusCode, o.Payload)
|
||||
}
|
||||
|
||||
func (o *DescribeInstanceDefault) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *DescribeInstanceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
|
@ -24,14 +24,12 @@ type GetMachineConfigurationReader struct {
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetMachineConfigurationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
|
||||
case 200:
|
||||
result := NewGetMachineConfigurationOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
||||
default:
|
||||
result := NewGetMachineConfigurationDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
@ -61,6 +59,10 @@ func (o *GetMachineConfigurationOK) Error() string {
|
||||
return fmt.Sprintf("[GET /machine-config][%d] getMachineConfigurationOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetMachineConfigurationOK) GetPayload() *models.MachineConfiguration {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetMachineConfigurationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.MachineConfiguration)
|
||||
@ -99,6 +101,10 @@ func (o *GetMachineConfigurationDefault) Error() string {
|
||||
return fmt.Sprintf("[GET /machine-config][%d] getMachineConfiguration default %+v", o._statusCode, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetMachineConfigurationDefault) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetMachineConfigurationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
|
@ -24,21 +24,18 @@ type GetMmdsReader struct {
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetMmdsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
|
||||
case 200:
|
||||
result := NewGetMmdsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
||||
case 400:
|
||||
result := NewGetMmdsBadRequest()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
|
||||
default:
|
||||
result := NewGetMmdsDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
@ -68,6 +65,10 @@ func (o *GetMmdsOK) Error() string {
|
||||
return fmt.Sprintf("[GET /mmds][%d] getMmdsOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetMmdsOK) GetPayload() interface{} {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetMmdsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// response payload
|
||||
@ -95,6 +96,10 @@ func (o *GetMmdsBadRequest) Error() string {
|
||||
return fmt.Sprintf("[GET /mmds][%d] getMmdsBadRequest %+v", 400, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetMmdsBadRequest) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetMmdsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
@ -133,6 +138,10 @@ func (o *GetMmdsDefault) Error() string {
|
||||
return fmt.Sprintf("[GET /mmds][%d] GetMmds default %+v", o._statusCode, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetMmdsDefault) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetMmdsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
|
@ -48,8 +48,13 @@ func (a *Client) GetMmds(params *GetMmdsParams) (*GetMmdsOK, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*GetMmdsOK), nil
|
||||
|
||||
success, ok := result.(*GetMmdsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*GetMmdsDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
@ -76,8 +81,13 @@ func (a *Client) PatchMmds(params *PatchMmdsParams) (*PatchMmdsNoContent, error)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*PatchMmdsNoContent), nil
|
||||
|
||||
success, ok := result.(*PatchMmdsNoContent)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*PatchMmdsDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
@ -104,8 +114,13 @@ func (a *Client) PutMmds(params *PutMmdsParams) (*PutMmdsNoContent, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*PutMmdsNoContent), nil
|
||||
|
||||
success, ok := result.(*PutMmdsNoContent)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*PutMmdsDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
@ -132,8 +147,13 @@ func (a *Client) CreateSyncAction(params *CreateSyncActionParams) (*CreateSyncAc
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*CreateSyncActionNoContent), nil
|
||||
|
||||
success, ok := result.(*CreateSyncActionNoContent)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*CreateSyncActionDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
@ -160,8 +180,13 @@ func (a *Client) DescribeInstance(params *DescribeInstanceParams) (*DescribeInst
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*DescribeInstanceOK), nil
|
||||
|
||||
success, ok := result.(*DescribeInstanceOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*DescribeInstanceDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
@ -190,8 +215,13 @@ func (a *Client) GetMachineConfiguration(params *GetMachineConfigurationParams)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*GetMachineConfigurationOK), nil
|
||||
|
||||
success, ok := result.(*GetMachineConfigurationOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*GetMachineConfigurationDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
@ -220,8 +250,13 @@ func (a *Client) PatchGuestDriveByID(params *PatchGuestDriveByIDParams) (*PatchG
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*PatchGuestDriveByIDNoContent), nil
|
||||
|
||||
success, ok := result.(*PatchGuestDriveByIDNoContent)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*PatchGuestDriveByIDDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
@ -250,8 +285,13 @@ func (a *Client) PatchGuestNetworkInterfaceByID(params *PatchGuestNetworkInterfa
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*PatchGuestNetworkInterfaceByIDNoContent), nil
|
||||
|
||||
success, ok := result.(*PatchGuestNetworkInterfaceByIDNoContent)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*PatchGuestNetworkInterfaceByIDDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
@ -280,8 +320,13 @@ func (a *Client) PatchMachineConfiguration(params *PatchMachineConfigurationPara
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*PatchMachineConfigurationNoContent), nil
|
||||
|
||||
success, ok := result.(*PatchMachineConfigurationNoContent)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*PatchMachineConfigurationDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
@ -310,8 +355,13 @@ func (a *Client) PutGuestBootSource(params *PutGuestBootSourceParams) (*PutGuest
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*PutGuestBootSourceNoContent), nil
|
||||
|
||||
success, ok := result.(*PutGuestBootSourceNoContent)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*PutGuestBootSourceDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
@ -340,8 +390,13 @@ func (a *Client) PutGuestDriveByID(params *PutGuestDriveByIDParams) (*PutGuestDr
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*PutGuestDriveByIDNoContent), nil
|
||||
|
||||
success, ok := result.(*PutGuestDriveByIDNoContent)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*PutGuestDriveByIDDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
@ -370,8 +425,13 @@ func (a *Client) PutGuestNetworkInterfaceByID(params *PutGuestNetworkInterfaceBy
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*PutGuestNetworkInterfaceByIDNoContent), nil
|
||||
|
||||
success, ok := result.(*PutGuestNetworkInterfaceByIDNoContent)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*PutGuestNetworkInterfaceByIDDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
@ -379,7 +439,7 @@ PutGuestVsockByID creates new vsock with ID specified by the id parameter
|
||||
|
||||
If the vsock device with the specified ID already exists, its body will be updated based on the new input. May fail if update is not possible.
|
||||
*/
|
||||
func (a *Client) PutGuestVsockByID(params *PutGuestVsockByIDParams) (*PutGuestVsockByIDCreated, *PutGuestVsockByIDNoContent, error) {
|
||||
func (a *Client) PutGuestVsockByID(params *PutGuestVsockByIDParams) (*PutGuestVsockByIDNoContent, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPutGuestVsockByIDParams()
|
||||
@ -398,16 +458,15 @@ func (a *Client) PutGuestVsockByID(params *PutGuestVsockByIDParams) (*PutGuestVs
|
||||
Client: params.HTTPClient,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
return nil, err
|
||||
}
|
||||
switch value := result.(type) {
|
||||
case *PutGuestVsockByIDCreated:
|
||||
return value, nil, nil
|
||||
case *PutGuestVsockByIDNoContent:
|
||||
return nil, value, nil
|
||||
success, ok := result.(*PutGuestVsockByIDNoContent)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
return nil, nil, nil
|
||||
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*PutGuestVsockByIDDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
@ -434,8 +493,13 @@ func (a *Client) PutLogger(params *PutLoggerParams) (*PutLoggerNoContent, error)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*PutLoggerNoContent), nil
|
||||
|
||||
success, ok := result.(*PutLoggerNoContent)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*PutLoggerDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
@ -464,8 +528,13 @@ func (a *Client) PutMachineConfiguration(params *PutMachineConfigurationParams)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*PutMachineConfigurationNoContent), nil
|
||||
|
||||
success, ok := result.(*PutMachineConfigurationNoContent)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*PutMachineConfigurationDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
|
@ -24,21 +24,18 @@ type PatchGuestDriveByIDReader struct {
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PatchGuestDriveByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
|
||||
case 204:
|
||||
result := NewPatchGuestDriveByIDNoContent()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
||||
case 400:
|
||||
result := NewPatchGuestDriveByIDBadRequest()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
|
||||
default:
|
||||
result := NewPatchGuestDriveByIDDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
@ -89,6 +86,10 @@ func (o *PatchGuestDriveByIDBadRequest) Error() string {
|
||||
return fmt.Sprintf("[PATCH /drives/{drive_id}][%d] patchGuestDriveByIdBadRequest %+v", 400, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PatchGuestDriveByIDBadRequest) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PatchGuestDriveByIDBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
@ -127,6 +128,10 @@ func (o *PatchGuestDriveByIDDefault) Error() string {
|
||||
return fmt.Sprintf("[PATCH /drives/{drive_id}][%d] patchGuestDriveByID default %+v", o._statusCode, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PatchGuestDriveByIDDefault) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PatchGuestDriveByIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
|
@ -24,21 +24,18 @@ type PatchGuestNetworkInterfaceByIDReader struct {
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PatchGuestNetworkInterfaceByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
|
||||
case 204:
|
||||
result := NewPatchGuestNetworkInterfaceByIDNoContent()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
||||
case 400:
|
||||
result := NewPatchGuestNetworkInterfaceByIDBadRequest()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
|
||||
default:
|
||||
result := NewPatchGuestNetworkInterfaceByIDDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
@ -89,6 +86,10 @@ func (o *PatchGuestNetworkInterfaceByIDBadRequest) Error() string {
|
||||
return fmt.Sprintf("[PATCH /network-interfaces/{iface_id}][%d] patchGuestNetworkInterfaceByIdBadRequest %+v", 400, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PatchGuestNetworkInterfaceByIDBadRequest) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PatchGuestNetworkInterfaceByIDBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
@ -127,6 +128,10 @@ func (o *PatchGuestNetworkInterfaceByIDDefault) Error() string {
|
||||
return fmt.Sprintf("[PATCH /network-interfaces/{iface_id}][%d] patchGuestNetworkInterfaceByID default %+v", o._statusCode, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PatchGuestNetworkInterfaceByIDDefault) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PatchGuestNetworkInterfaceByIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
|
@ -24,21 +24,18 @@ type PatchMachineConfigurationReader struct {
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PatchMachineConfigurationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
|
||||
case 204:
|
||||
result := NewPatchMachineConfigurationNoContent()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
||||
case 400:
|
||||
result := NewPatchMachineConfigurationBadRequest()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
|
||||
default:
|
||||
result := NewPatchMachineConfigurationDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
@ -89,6 +86,10 @@ func (o *PatchMachineConfigurationBadRequest) Error() string {
|
||||
return fmt.Sprintf("[PATCH /machine-config][%d] patchMachineConfigurationBadRequest %+v", 400, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PatchMachineConfigurationBadRequest) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PatchMachineConfigurationBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
@ -127,6 +128,10 @@ func (o *PatchMachineConfigurationDefault) Error() string {
|
||||
return fmt.Sprintf("[PATCH /machine-config][%d] patchMachineConfiguration default %+v", o._statusCode, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PatchMachineConfigurationDefault) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PatchMachineConfigurationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
|
@ -24,21 +24,18 @@ type PatchMmdsReader struct {
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PatchMmdsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
|
||||
case 204:
|
||||
result := NewPatchMmdsNoContent()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
||||
case 400:
|
||||
result := NewPatchMmdsBadRequest()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
|
||||
default:
|
||||
result := NewPatchMmdsDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
@ -89,6 +86,10 @@ func (o *PatchMmdsBadRequest) Error() string {
|
||||
return fmt.Sprintf("[PATCH /mmds][%d] patchMmdsBadRequest %+v", 400, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PatchMmdsBadRequest) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PatchMmdsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
@ -127,6 +128,10 @@ func (o *PatchMmdsDefault) Error() string {
|
||||
return fmt.Sprintf("[PATCH /mmds][%d] PatchMmds default %+v", o._statusCode, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PatchMmdsDefault) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PatchMmdsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
|
@ -24,21 +24,18 @@ type PutGuestBootSourceReader struct {
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PutGuestBootSourceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
|
||||
case 204:
|
||||
result := NewPutGuestBootSourceNoContent()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
||||
case 400:
|
||||
result := NewPutGuestBootSourceBadRequest()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
|
||||
default:
|
||||
result := NewPutGuestBootSourceDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
@ -89,6 +86,10 @@ func (o *PutGuestBootSourceBadRequest) Error() string {
|
||||
return fmt.Sprintf("[PUT /boot-source][%d] putGuestBootSourceBadRequest %+v", 400, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutGuestBootSourceBadRequest) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutGuestBootSourceBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
@ -127,6 +128,10 @@ func (o *PutGuestBootSourceDefault) Error() string {
|
||||
return fmt.Sprintf("[PUT /boot-source][%d] putGuestBootSource default %+v", o._statusCode, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutGuestBootSourceDefault) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutGuestBootSourceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
|
@ -24,21 +24,18 @@ type PutGuestDriveByIDReader struct {
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PutGuestDriveByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
|
||||
case 204:
|
||||
result := NewPutGuestDriveByIDNoContent()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
||||
case 400:
|
||||
result := NewPutGuestDriveByIDBadRequest()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
|
||||
default:
|
||||
result := NewPutGuestDriveByIDDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
@ -89,6 +86,10 @@ func (o *PutGuestDriveByIDBadRequest) Error() string {
|
||||
return fmt.Sprintf("[PUT /drives/{drive_id}][%d] putGuestDriveByIdBadRequest %+v", 400, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutGuestDriveByIDBadRequest) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutGuestDriveByIDBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
@ -127,6 +128,10 @@ func (o *PutGuestDriveByIDDefault) Error() string {
|
||||
return fmt.Sprintf("[PUT /drives/{drive_id}][%d] putGuestDriveByID default %+v", o._statusCode, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutGuestDriveByIDDefault) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutGuestDriveByIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
|
@ -24,21 +24,18 @@ type PutGuestNetworkInterfaceByIDReader struct {
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PutGuestNetworkInterfaceByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
|
||||
case 204:
|
||||
result := NewPutGuestNetworkInterfaceByIDNoContent()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
||||
case 400:
|
||||
result := NewPutGuestNetworkInterfaceByIDBadRequest()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
|
||||
default:
|
||||
result := NewPutGuestNetworkInterfaceByIDDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
@ -89,6 +86,10 @@ func (o *PutGuestNetworkInterfaceByIDBadRequest) Error() string {
|
||||
return fmt.Sprintf("[PUT /network-interfaces/{iface_id}][%d] putGuestNetworkInterfaceByIdBadRequest %+v", 400, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutGuestNetworkInterfaceByIDBadRequest) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutGuestNetworkInterfaceByIDBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
@ -127,6 +128,10 @@ func (o *PutGuestNetworkInterfaceByIDDefault) Error() string {
|
||||
return fmt.Sprintf("[PUT /network-interfaces/{iface_id}][%d] putGuestNetworkInterfaceByID default %+v", o._statusCode, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutGuestNetworkInterfaceByIDDefault) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutGuestNetworkInterfaceByIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
|
@ -24,28 +24,18 @@ type PutGuestVsockByIDReader struct {
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PutGuestVsockByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
|
||||
case 201:
|
||||
result := NewPutGuestVsockByIDCreated()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
||||
case 204:
|
||||
result := NewPutGuestVsockByIDNoContent()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
||||
case 400:
|
||||
result := NewPutGuestVsockByIDBadRequest()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
|
||||
default:
|
||||
result := NewPutGuestVsockByIDDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
@ -58,27 +48,6 @@ func (o *PutGuestVsockByIDReader) ReadResponse(response runtime.ClientResponse,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutGuestVsockByIDCreated creates a PutGuestVsockByIDCreated with default headers values
|
||||
func NewPutGuestVsockByIDCreated() *PutGuestVsockByIDCreated {
|
||||
return &PutGuestVsockByIDCreated{}
|
||||
}
|
||||
|
||||
/*PutGuestVsockByIDCreated handles this case with default header values.
|
||||
|
||||
Vsock created
|
||||
*/
|
||||
type PutGuestVsockByIDCreated struct {
|
||||
}
|
||||
|
||||
func (o *PutGuestVsockByIDCreated) Error() string {
|
||||
return fmt.Sprintf("[PUT /vsocks/{id}][%d] putGuestVsockByIdCreated ", 201)
|
||||
}
|
||||
|
||||
func (o *PutGuestVsockByIDCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutGuestVsockByIDNoContent creates a PutGuestVsockByIDNoContent with default headers values
|
||||
func NewPutGuestVsockByIDNoContent() *PutGuestVsockByIDNoContent {
|
||||
return &PutGuestVsockByIDNoContent{}
|
||||
@ -86,7 +55,7 @@ func NewPutGuestVsockByIDNoContent() *PutGuestVsockByIDNoContent {
|
||||
|
||||
/*PutGuestVsockByIDNoContent handles this case with default header values.
|
||||
|
||||
Vsock updated
|
||||
Vsock created/updated
|
||||
*/
|
||||
type PutGuestVsockByIDNoContent struct {
|
||||
}
|
||||
@ -117,6 +86,10 @@ func (o *PutGuestVsockByIDBadRequest) Error() string {
|
||||
return fmt.Sprintf("[PUT /vsocks/{id}][%d] putGuestVsockByIdBadRequest %+v", 400, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutGuestVsockByIDBadRequest) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutGuestVsockByIDBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
@ -155,6 +128,10 @@ func (o *PutGuestVsockByIDDefault) Error() string {
|
||||
return fmt.Sprintf("[PUT /vsocks/{id}][%d] putGuestVsockByID default %+v", o._statusCode, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutGuestVsockByIDDefault) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutGuestVsockByIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
|
@ -24,21 +24,18 @@ type PutLoggerReader struct {
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PutLoggerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
|
||||
case 204:
|
||||
result := NewPutLoggerNoContent()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
||||
case 400:
|
||||
result := NewPutLoggerBadRequest()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
|
||||
default:
|
||||
result := NewPutLoggerDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
@ -89,6 +86,10 @@ func (o *PutLoggerBadRequest) Error() string {
|
||||
return fmt.Sprintf("[PUT /logger][%d] putLoggerBadRequest %+v", 400, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutLoggerBadRequest) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutLoggerBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
@ -127,6 +128,10 @@ func (o *PutLoggerDefault) Error() string {
|
||||
return fmt.Sprintf("[PUT /logger][%d] putLogger default %+v", o._statusCode, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutLoggerDefault) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutLoggerDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
|
@ -24,21 +24,18 @@ type PutMachineConfigurationReader struct {
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PutMachineConfigurationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
|
||||
case 204:
|
||||
result := NewPutMachineConfigurationNoContent()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
||||
case 400:
|
||||
result := NewPutMachineConfigurationBadRequest()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
|
||||
default:
|
||||
result := NewPutMachineConfigurationDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
@ -89,6 +86,10 @@ func (o *PutMachineConfigurationBadRequest) Error() string {
|
||||
return fmt.Sprintf("[PUT /machine-config][%d] putMachineConfigurationBadRequest %+v", 400, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutMachineConfigurationBadRequest) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutMachineConfigurationBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
@ -127,6 +128,10 @@ func (o *PutMachineConfigurationDefault) Error() string {
|
||||
return fmt.Sprintf("[PUT /machine-config][%d] putMachineConfiguration default %+v", o._statusCode, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutMachineConfigurationDefault) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutMachineConfigurationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
|
@ -24,21 +24,18 @@ type PutMmdsReader struct {
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PutMmdsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
|
||||
case 204:
|
||||
result := NewPutMmdsNoContent()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
||||
case 400:
|
||||
result := NewPutMmdsBadRequest()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
|
||||
default:
|
||||
result := NewPutMmdsDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
@ -89,6 +86,10 @@ func (o *PutMmdsBadRequest) Error() string {
|
||||
return fmt.Sprintf("[PUT /mmds][%d] putMmdsBadRequest %+v", 400, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutMmdsBadRequest) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutMmdsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
@ -127,6 +128,10 @@ func (o *PutMmdsDefault) Error() string {
|
||||
return fmt.Sprintf("[PUT /mmds][%d] PutMmds default %+v", o._statusCode, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutMmdsDefault) GetPayload() *models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutMmdsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.Error)
|
||||
|
@ -5,7 +5,6 @@ info:
|
||||
The API is accessible through HTTP calls on specific URLs
|
||||
carrying JSON modeled data.
|
||||
The transport medium is a Unix Domain Socket.
|
||||
This API has definitions for experimental features like vsock.
|
||||
version: 0.17.0
|
||||
termsOfService: ""
|
||||
contact:
|
||||
@ -374,10 +373,8 @@ paths:
|
||||
schema:
|
||||
$ref: "#/definitions/Vsock"
|
||||
responses:
|
||||
201:
|
||||
description: Vsock created
|
||||
204:
|
||||
description: Vsock updated
|
||||
description: Vsock created/updated
|
||||
400:
|
||||
description: Vsock cannot be created due to bad input
|
||||
schema:
|
||||
@ -649,13 +646,27 @@ definitions:
|
||||
|
||||
Vsock:
|
||||
type: object
|
||||
description:
|
||||
Defines a vsock device, backed by a set of Unix Domain Sockets, on the host side.
|
||||
For host-initiated connections, Firecracker will be listening on the Unix socket
|
||||
identified by the path `uds_path`. Firecracker will create this socket, bind and
|
||||
listen on it. Host-initiated connections will be performed by connection to this
|
||||
socket and issuing a connection forwarding request to the desired guest-side vsock
|
||||
port (i.e. `CONNECT 52\n`, to connect to port 52).
|
||||
For guest-initiated connections, Firecracker will expect host software to be
|
||||
bound and listening on Unix sockets at `uds_path_<PORT>`.
|
||||
E.g. "/path/to/host_vsock.sock_52" for port number 52.
|
||||
required:
|
||||
- id
|
||||
- vsock_id
|
||||
- guest_cid
|
||||
- uds_path
|
||||
properties:
|
||||
id:
|
||||
vsock_id:
|
||||
type: string
|
||||
guest_cid:
|
||||
type: integer
|
||||
minimum: 3
|
||||
description: Guest Vsock CID
|
||||
uds_path:
|
||||
type: string
|
||||
description: Path to UNIX domain socket, used to proxy vsock connections.
|
||||
|
Loading…
Reference in New Issue
Block a user