Skip to content

Commit

Permalink
api: Update generated API
Browse files Browse the repository at this point in the history
Fixes comment in generated HTTP error code constants

upstream PR:
go-swagger/go-swagger#953

Signed-off-by: Thomas Graf <thomas@cilium.io>
  • Loading branch information
tgraf committed Mar 7, 2017
1 parent cf88b7b commit af5d8e1
Show file tree
Hide file tree
Showing 27 changed files with 80 additions and 78 deletions.
2 changes: 1 addition & 1 deletion api/v1/server/restapi/daemon/get_config_responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cilium/cilium/api/v1/models"
)

// HTTP code for type GetConfigOK
// GetConfigOKCode is the HTTP code returned for type GetConfigOK
const GetConfigOKCode int = 200

/*GetConfigOK Success
Expand Down
2 changes: 1 addition & 1 deletion api/v1/server/restapi/daemon/get_healthz_responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cilium/cilium/api/v1/models"
)

// HTTP code for type GetHealthzOK
// GetHealthzOKCode is the HTTP code returned for type GetHealthzOK
const GetHealthzOKCode int = 200

/*GetHealthzOK Success
Expand Down
6 changes: 3 additions & 3 deletions api/v1/server/restapi/daemon/patch_config_responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cilium/cilium/api/v1/models"
)

// HTTP code for type PatchConfigOK
// PatchConfigOKCode is the HTTP code returned for type PatchConfigOK
const PatchConfigOKCode int = 200

/*PatchConfigOK Success
Expand All @@ -32,7 +32,7 @@ func (o *PatchConfigOK) WriteResponse(rw http.ResponseWriter, producer runtime.P
rw.WriteHeader(200)
}

// HTTP code for type PatchConfigBadRequest
// PatchConfigBadRequestCode is the HTTP code returned for type PatchConfigBadRequest
const PatchConfigBadRequestCode int = 400

/*PatchConfigBadRequest Bad configuration parameters
Expand Down Expand Up @@ -74,7 +74,7 @@ func (o *PatchConfigBadRequest) WriteResponse(rw http.ResponseWriter, producer r

}

// HTTP code for type PatchConfigFailure
// PatchConfigFailureCode is the HTTP code returned for type PatchConfigFailure
const PatchConfigFailureCode int = 500

/*PatchConfigFailure Recompilation failed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cilium/cilium/api/v1/models"
)

// HTTP code for type DeleteEndpointIDOK
// DeleteEndpointIDOKCode is the HTTP code returned for type DeleteEndpointIDOK
const DeleteEndpointIDOKCode int = 200

/*DeleteEndpointIDOK Success
Expand All @@ -32,7 +32,7 @@ func (o *DeleteEndpointIDOK) WriteResponse(rw http.ResponseWriter, producer runt
rw.WriteHeader(200)
}

// HTTP code for type DeleteEndpointIDErrors
// DeleteEndpointIDErrorsCode is the HTTP code returned for type DeleteEndpointIDErrors
const DeleteEndpointIDErrorsCode int = 206

/*DeleteEndpointIDErrors Deleted with a number of errors encountered
Expand Down Expand Up @@ -74,7 +74,7 @@ func (o *DeleteEndpointIDErrors) WriteResponse(rw http.ResponseWriter, producer

}

// HTTP code for type DeleteEndpointIDInvalid
// DeleteEndpointIDInvalidCode is the HTTP code returned for type DeleteEndpointIDInvalid
const DeleteEndpointIDInvalidCode int = 400

/*DeleteEndpointIDInvalid Invalid endpoint ID format for specified type. Details in error
Expand Down Expand Up @@ -118,7 +118,7 @@ func (o *DeleteEndpointIDInvalid) WriteResponse(rw http.ResponseWriter, producer

}

// HTTP code for type DeleteEndpointIDNotFound
// DeleteEndpointIDNotFoundCode is the HTTP code returned for type DeleteEndpointIDNotFound
const DeleteEndpointIDNotFoundCode int = 404

/*DeleteEndpointIDNotFound Endpoint not found
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cilium/cilium/api/v1/models"
)

// HTTP code for type GetEndpointIDConfigOK
// GetEndpointIDConfigOKCode is the HTTP code returned for type GetEndpointIDConfigOK
const GetEndpointIDConfigOKCode int = 200

/*GetEndpointIDConfigOK Success
Expand Down Expand Up @@ -54,7 +54,7 @@ func (o *GetEndpointIDConfigOK) WriteResponse(rw http.ResponseWriter, producer r
}
}

// HTTP code for type GetEndpointIDConfigNotFound
// GetEndpointIDConfigNotFoundCode is the HTTP code returned for type GetEndpointIDConfigNotFound
const GetEndpointIDConfigNotFoundCode int = 404

/*GetEndpointIDConfigNotFound Endpoint not found
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cilium/cilium/api/v1/models"
)

// HTTP code for type GetEndpointIDLabelsOK
// GetEndpointIDLabelsOKCode is the HTTP code returned for type GetEndpointIDLabelsOK
const GetEndpointIDLabelsOKCode int = 200

/*GetEndpointIDLabelsOK Success
Expand Down Expand Up @@ -54,7 +54,7 @@ func (o *GetEndpointIDLabelsOK) WriteResponse(rw http.ResponseWriter, producer r
}
}

// HTTP code for type GetEndpointIDLabelsNotFound
// GetEndpointIDLabelsNotFoundCode is the HTTP code returned for type GetEndpointIDLabelsNotFound
const GetEndpointIDLabelsNotFoundCode int = 404

/*GetEndpointIDLabelsNotFound Endpoint not found
Expand Down
6 changes: 3 additions & 3 deletions api/v1/server/restapi/endpoint/get_endpoint_id_responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cilium/cilium/api/v1/models"
)

// HTTP code for type GetEndpointIDOK
// GetEndpointIDOKCode is the HTTP code returned for type GetEndpointIDOK
const GetEndpointIDOKCode int = 200

/*GetEndpointIDOK Success
Expand Down Expand Up @@ -54,7 +54,7 @@ func (o *GetEndpointIDOK) WriteResponse(rw http.ResponseWriter, producer runtime
}
}

// HTTP code for type GetEndpointIDInvalid
// GetEndpointIDInvalidCode is the HTTP code returned for type GetEndpointIDInvalid
const GetEndpointIDInvalidCode int = 400

/*GetEndpointIDInvalid Invalid endpoint ID format for specified type
Expand Down Expand Up @@ -96,7 +96,7 @@ func (o *GetEndpointIDInvalid) WriteResponse(rw http.ResponseWriter, producer ru

}

// HTTP code for type GetEndpointIDNotFound
// GetEndpointIDNotFoundCode is the HTTP code returned for type GetEndpointIDNotFound
const GetEndpointIDNotFoundCode int = 404

/*GetEndpointIDNotFound Endpoint not found
Expand Down
2 changes: 1 addition & 1 deletion api/v1/server/restapi/endpoint/get_endpoint_responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cilium/cilium/api/v1/models"
)

// HTTP code for type GetEndpointOK
// GetEndpointOKCode is the HTTP code returned for type GetEndpointOK
const GetEndpointOKCode int = 200

/*GetEndpointOK Success
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cilium/cilium/api/v1/models"
)

// HTTP code for type PatchEndpointIDConfigOK
// PatchEndpointIDConfigOKCode is the HTTP code returned for type PatchEndpointIDConfigOK
const PatchEndpointIDConfigOKCode int = 200

/*PatchEndpointIDConfigOK Success
Expand All @@ -32,7 +32,7 @@ func (o *PatchEndpointIDConfigOK) WriteResponse(rw http.ResponseWriter, producer
rw.WriteHeader(200)
}

// HTTP code for type PatchEndpointIDConfigInvalid
// PatchEndpointIDConfigInvalidCode is the HTTP code returned for type PatchEndpointIDConfigInvalid
const PatchEndpointIDConfigInvalidCode int = 400

/*PatchEndpointIDConfigInvalid Invalid configuration request
Expand All @@ -53,7 +53,7 @@ func (o *PatchEndpointIDConfigInvalid) WriteResponse(rw http.ResponseWriter, pro
rw.WriteHeader(400)
}

// HTTP code for type PatchEndpointIDConfigNotFound
// PatchEndpointIDConfigNotFoundCode is the HTTP code returned for type PatchEndpointIDConfigNotFound
const PatchEndpointIDConfigNotFoundCode int = 404

/*PatchEndpointIDConfigNotFound Endpoint not found
Expand All @@ -74,7 +74,7 @@ func (o *PatchEndpointIDConfigNotFound) WriteResponse(rw http.ResponseWriter, pr
rw.WriteHeader(404)
}

// HTTP code for type PatchEndpointIDConfigFailed
// PatchEndpointIDConfigFailedCode is the HTTP code returned for type PatchEndpointIDConfigFailed
const PatchEndpointIDConfigFailedCode int = 500

/*PatchEndpointIDConfigFailed Update failed. Details in message.
Expand Down
8 changes: 4 additions & 4 deletions api/v1/server/restapi/endpoint/patch_endpoint_id_responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cilium/cilium/api/v1/models"
)

// HTTP code for type PatchEndpointIDOK
// PatchEndpointIDOKCode is the HTTP code returned for type PatchEndpointIDOK
const PatchEndpointIDOKCode int = 200

/*PatchEndpointIDOK Success
Expand All @@ -32,7 +32,7 @@ func (o *PatchEndpointIDOK) WriteResponse(rw http.ResponseWriter, producer runti
rw.WriteHeader(200)
}

// HTTP code for type PatchEndpointIDInvalid
// PatchEndpointIDInvalidCode is the HTTP code returned for type PatchEndpointIDInvalid
const PatchEndpointIDInvalidCode int = 400

/*PatchEndpointIDInvalid Invalid modify endpoint request
Expand Down Expand Up @@ -74,7 +74,7 @@ func (o *PatchEndpointIDInvalid) WriteResponse(rw http.ResponseWriter, producer

}

// HTTP code for type PatchEndpointIDNotFound
// PatchEndpointIDNotFoundCode is the HTTP code returned for type PatchEndpointIDNotFound
const PatchEndpointIDNotFoundCode int = 404

/*PatchEndpointIDNotFound Endpoint does not exist
Expand All @@ -95,7 +95,7 @@ func (o *PatchEndpointIDNotFound) WriteResponse(rw http.ResponseWriter, producer
rw.WriteHeader(404)
}

// HTTP code for type PatchEndpointIDFailed
// PatchEndpointIDFailedCode is the HTTP code returned for type PatchEndpointIDFailed
const PatchEndpointIDFailedCode int = 500

/*PatchEndpointIDFailed Endpoint update failed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cilium/cilium/api/v1/models"
)

// HTTP code for type PutEndpointIDLabelsOK
// PutEndpointIDLabelsOKCode is the HTTP code returned for type PutEndpointIDLabelsOK
const PutEndpointIDLabelsOKCode int = 200

/*PutEndpointIDLabelsOK Success
Expand All @@ -32,7 +32,7 @@ func (o *PutEndpointIDLabelsOK) WriteResponse(rw http.ResponseWriter, producer r
rw.WriteHeader(200)
}

// HTTP code for type PutEndpointIDLabelsNotFound
// PutEndpointIDLabelsNotFoundCode is the HTTP code returned for type PutEndpointIDLabelsNotFound
const PutEndpointIDLabelsNotFoundCode int = 404

/*PutEndpointIDLabelsNotFound Endpoint not found
Expand All @@ -53,7 +53,7 @@ func (o *PutEndpointIDLabelsNotFound) WriteResponse(rw http.ResponseWriter, prod
rw.WriteHeader(404)
}

// HTTP code for type PutEndpointIDLabelsLabelNotFound
// PutEndpointIDLabelsLabelNotFoundCode is the HTTP code returned for type PutEndpointIDLabelsLabelNotFound
const PutEndpointIDLabelsLabelNotFoundCode int = 460

/*PutEndpointIDLabelsLabelNotFound Label to be deleted not found
Expand Down Expand Up @@ -95,7 +95,7 @@ func (o *PutEndpointIDLabelsLabelNotFound) WriteResponse(rw http.ResponseWriter,

}

// HTTP code for type PutEndpointIDLabelsUpdateFailed
// PutEndpointIDLabelsUpdateFailedCode is the HTTP code returned for type PutEndpointIDLabelsUpdateFailed
const PutEndpointIDLabelsUpdateFailedCode int = 500

/*PutEndpointIDLabelsUpdateFailed Error while updating labels
Expand Down
8 changes: 4 additions & 4 deletions api/v1/server/restapi/endpoint/put_endpoint_id_responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cilium/cilium/api/v1/models"
)

// HTTP code for type PutEndpointIDCreated
// PutEndpointIDCreatedCode is the HTTP code returned for type PutEndpointIDCreated
const PutEndpointIDCreatedCode int = 201

/*PutEndpointIDCreated Created
Expand All @@ -32,7 +32,7 @@ func (o *PutEndpointIDCreated) WriteResponse(rw http.ResponseWriter, producer ru
rw.WriteHeader(201)
}

// HTTP code for type PutEndpointIDInvalid
// PutEndpointIDInvalidCode is the HTTP code returned for type PutEndpointIDInvalid
const PutEndpointIDInvalidCode int = 400

/*PutEndpointIDInvalid Invalid endpoint in request
Expand Down Expand Up @@ -74,7 +74,7 @@ func (o *PutEndpointIDInvalid) WriteResponse(rw http.ResponseWriter, producer ru

}

// HTTP code for type PutEndpointIDExists
// PutEndpointIDExistsCode is the HTTP code returned for type PutEndpointIDExists
const PutEndpointIDExistsCode int = 409

/*PutEndpointIDExists Endpoint already exists
Expand All @@ -95,7 +95,7 @@ func (o *PutEndpointIDExists) WriteResponse(rw http.ResponseWriter, producer run
rw.WriteHeader(409)
}

// HTTP code for type PutEndpointIDFailed
// PutEndpointIDFailedCode is the HTTP code returned for type PutEndpointIDFailed
const PutEndpointIDFailedCode int = 500

/*PutEndpointIDFailed Endpoint creation failed
Expand Down
10 changes: 5 additions & 5 deletions api/v1/server/restapi/ipam/delete_ip_a_m_ip_responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cilium/cilium/api/v1/models"
)

// HTTP code for type DeleteIPAMIPOK
// DeleteIPAMIPOKCode is the HTTP code returned for type DeleteIPAMIPOK
const DeleteIPAMIPOKCode int = 200

/*DeleteIPAMIPOK Success
Expand All @@ -32,7 +32,7 @@ func (o *DeleteIPAMIPOK) WriteResponse(rw http.ResponseWriter, producer runtime.
rw.WriteHeader(200)
}

// HTTP code for type DeleteIPAMIPInvalid
// DeleteIPAMIPInvalidCode is the HTTP code returned for type DeleteIPAMIPInvalid
const DeleteIPAMIPInvalidCode int = 400

/*DeleteIPAMIPInvalid Invalid IP address
Expand All @@ -53,7 +53,7 @@ func (o *DeleteIPAMIPInvalid) WriteResponse(rw http.ResponseWriter, producer run
rw.WriteHeader(400)
}

// HTTP code for type DeleteIPAMIPNotFound
// DeleteIPAMIPNotFoundCode is the HTTP code returned for type DeleteIPAMIPNotFound
const DeleteIPAMIPNotFoundCode int = 404

/*DeleteIPAMIPNotFound IP address not found
Expand All @@ -74,7 +74,7 @@ func (o *DeleteIPAMIPNotFound) WriteResponse(rw http.ResponseWriter, producer ru
rw.WriteHeader(404)
}

// HTTP code for type DeleteIPAMIPFailure
// DeleteIPAMIPFailureCode is the HTTP code returned for type DeleteIPAMIPFailure
const DeleteIPAMIPFailureCode int = 500

/*DeleteIPAMIPFailure Address release failure
Expand Down Expand Up @@ -116,7 +116,7 @@ func (o *DeleteIPAMIPFailure) WriteResponse(rw http.ResponseWriter, producer run

}

// HTTP code for type DeleteIPAMIPDisabled
// DeleteIPAMIPDisabledCode is the HTTP code returned for type DeleteIPAMIPDisabled
const DeleteIPAMIPDisabledCode int = 501

/*DeleteIPAMIPDisabled Allocation for address family disabled
Expand Down
10 changes: 5 additions & 5 deletions api/v1/server/restapi/ipam/post_ip_a_m_ip_responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cilium/cilium/api/v1/models"
)

// HTTP code for type PostIPAMIPOK
// PostIPAMIPOKCode is the HTTP code returned for type PostIPAMIPOK
const PostIPAMIPOKCode int = 200

/*PostIPAMIPOK Success
Expand All @@ -32,7 +32,7 @@ func (o *PostIPAMIPOK) WriteResponse(rw http.ResponseWriter, producer runtime.Pr
rw.WriteHeader(200)
}

// HTTP code for type PostIPAMIPInvalid
// PostIPAMIPInvalidCode is the HTTP code returned for type PostIPAMIPInvalid
const PostIPAMIPInvalidCode int = 400

/*PostIPAMIPInvalid Invalid IP address
Expand All @@ -53,7 +53,7 @@ func (o *PostIPAMIPInvalid) WriteResponse(rw http.ResponseWriter, producer runti
rw.WriteHeader(400)
}

// HTTP code for type PostIPAMIPExists
// PostIPAMIPExistsCode is the HTTP code returned for type PostIPAMIPExists
const PostIPAMIPExistsCode int = 409

/*PostIPAMIPExists IP already allocated
Expand All @@ -74,7 +74,7 @@ func (o *PostIPAMIPExists) WriteResponse(rw http.ResponseWriter, producer runtim
rw.WriteHeader(409)
}

// HTTP code for type PostIPAMIPFailure
// PostIPAMIPFailureCode is the HTTP code returned for type PostIPAMIPFailure
const PostIPAMIPFailureCode int = 500

/*PostIPAMIPFailure IP allocation failure. Details in message.
Expand Down Expand Up @@ -116,7 +116,7 @@ func (o *PostIPAMIPFailure) WriteResponse(rw http.ResponseWriter, producer runti

}

// HTTP code for type PostIPAMIPDisabled
// PostIPAMIPDisabledCode is the HTTP code returned for type PostIPAMIPDisabled
const PostIPAMIPDisabledCode int = 501

/*PostIPAMIPDisabled Allocation for address family disabled
Expand Down

0 comments on commit af5d8e1

Please sign in to comment.