Skip to content

Commit

Permalink
Merge pull request #9958 from AlonaKaplan/removeHotplugVmiApi
Browse files Browse the repository at this point in the history
Remove hotplug VMI API
  • Loading branch information
kubevirt-bot committed Jun 22, 2023
2 parents 8f9050e + b88c64d commit f73d6ce
Show file tree
Hide file tree
Showing 16 changed files with 149 additions and 831 deletions.
204 changes: 0 additions & 204 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -11241,57 +11241,6 @@
}
}
},
"/apis/subresources.kubevirt.io/v1/namespaces/{namespace:[a-z0-9][a-z0-9\\-]*}/virtualmachineinstances/{name:[a-z0-9][a-z0-9\\-]*}/addinterface": {
"put": {
"description": "Add a network interface to a running Virtual Machine Instance",
"operationId": "v1vmi-addinterface",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.AddInterfaceOptions"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized"
}
}
},
"parameters": [
{
"uniqueItems": true,
"type": "string",
"description": "Name of the resource",
"name": "name",
"in": "path",
"required": true
},
{
"uniqueItems": true,
"type": "string",
"description": "Object name and auth scope, such as for teams and projects",
"name": "namespace",
"in": "path",
"required": true
}
]
},
"/apis/subresources.kubevirt.io/v1/namespaces/{namespace:[a-z0-9][a-z0-9\\-]*}/virtualmachineinstances/{name:[a-z0-9][a-z0-9\\-]*}/addvolume": {
"put": {
"description": "Add a volume and disk to a running Virtual Machine Instance",
Expand Down Expand Up @@ -11626,57 +11575,6 @@
}
]
},
"/apis/subresources.kubevirt.io/v1/namespaces/{namespace:[a-z0-9][a-z0-9\\-]*}/virtualmachineinstances/{name:[a-z0-9][a-z0-9\\-]*}/removeinterface": {
"put": {
"description": "Remove a network interface from a running Virtual Machine Instance",
"operationId": "v1vmi-removeinterface",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.RemoveInterfaceOptions"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized"
}
}
},
"parameters": [
{
"uniqueItems": true,
"type": "string",
"description": "Name of the resource",
"name": "name",
"in": "path",
"required": true
},
{
"uniqueItems": true,
"type": "string",
"description": "Object name and auth scope, such as for teams and projects",
"name": "namespace",
"in": "path",
"required": true
}
]
},
"/apis/subresources.kubevirt.io/v1/namespaces/{namespace:[a-z0-9][a-z0-9\\-]*}/virtualmachineinstances/{name:[a-z0-9][a-z0-9\\-]*}/removevolume": {
"put": {
"description": "Removes a volume and disk from a running Virtual Machine Instance",
Expand Down Expand Up @@ -12849,57 +12747,6 @@
}
}
},
"/apis/subresources.kubevirt.io/v1alpha3/namespaces/{namespace:[a-z0-9][a-z0-9\\-]*}/virtualmachineinstances/{name:[a-z0-9][a-z0-9\\-]*}/addinterface": {
"put": {
"description": "Add a network interface to a running Virtual Machine Instance",
"operationId": "v1alpha3vmi-addinterface",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.AddInterfaceOptions"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized"
}
}
},
"parameters": [
{
"uniqueItems": true,
"type": "string",
"description": "Name of the resource",
"name": "name",
"in": "path",
"required": true
},
{
"uniqueItems": true,
"type": "string",
"description": "Object name and auth scope, such as for teams and projects",
"name": "namespace",
"in": "path",
"required": true
}
]
},
"/apis/subresources.kubevirt.io/v1alpha3/namespaces/{namespace:[a-z0-9][a-z0-9\\-]*}/virtualmachineinstances/{name:[a-z0-9][a-z0-9\\-]*}/addvolume": {
"put": {
"description": "Add a volume and disk to a running Virtual Machine Instance",
Expand Down Expand Up @@ -13234,57 +13081,6 @@
}
]
},
"/apis/subresources.kubevirt.io/v1alpha3/namespaces/{namespace:[a-z0-9][a-z0-9\\-]*}/virtualmachineinstances/{name:[a-z0-9][a-z0-9\\-]*}/removeinterface": {
"put": {
"description": "Remove a network interface from a running Virtual Machine Instance",
"operationId": "v1alpha3vmi-removeinterface",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.RemoveInterfaceOptions"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized"
}
}
},
"parameters": [
{
"uniqueItems": true,
"type": "string",
"description": "Name of the resource",
"name": "name",
"in": "path",
"required": true
},
{
"uniqueItems": true,
"type": "string",
"description": "Object name and auth scope, such as for teams and projects",
"name": "namespace",
"in": "path",
"required": true
}
]
},
"/apis/subresources.kubevirt.io/v1alpha3/namespaces/{namespace:[a-z0-9][a-z0-9\\-]*}/virtualmachineinstances/{name:[a-z0-9][a-z0-9\\-]*}/removevolume": {
"put": {
"description": "Removes a volume and disk from a running Virtual Machine Instance",
Expand Down
4 changes: 0 additions & 4 deletions manifests/generated/operator-csv.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,6 @@ spec:
- virtualmachineinstances/freeze
- virtualmachineinstances/unfreeze
- virtualmachineinstances/softreboot
- virtualmachineinstances/addinterface
- virtualmachineinstances/removeinterface
verbs:
- update
- apiGroups:
Expand Down Expand Up @@ -898,7 +896,6 @@ spec:
- virtualmachineinstances/freeze
- virtualmachineinstances/unfreeze
- virtualmachineinstances/softreboot
- virtualmachineinstances/addinterface
verbs:
- update
- apiGroups:
Expand Down Expand Up @@ -1044,7 +1041,6 @@ spec:
- virtualmachineinstances/freeze
- virtualmachineinstances/unfreeze
- virtualmachineinstances/softreboot
- virtualmachineinstances/addinterface
verbs:
- update
- apiGroups:
Expand Down
4 changes: 0 additions & 4 deletions manifests/generated/rbac-operator.authorization.k8s.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,6 @@ rules:
- virtualmachineinstances/freeze
- virtualmachineinstances/unfreeze
- virtualmachineinstances/softreboot
- virtualmachineinstances/addinterface
- virtualmachineinstances/removeinterface
verbs:
- update
- apiGroups:
Expand Down Expand Up @@ -826,7 +824,6 @@ rules:
- virtualmachineinstances/freeze
- virtualmachineinstances/unfreeze
- virtualmachineinstances/softreboot
- virtualmachineinstances/addinterface
verbs:
- update
- apiGroups:
Expand Down Expand Up @@ -972,7 +969,6 @@ rules:
- virtualmachineinstances/freeze
- virtualmachineinstances/unfreeze
- virtualmachineinstances/softreboot
- virtualmachineinstances/addinterface
verbs:
- update
- apiGroups:
Expand Down
26 changes: 0 additions & 26 deletions pkg/virt-api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,24 +504,6 @@ func (app *virtAPIApp) composeSubresources() {
Returns(http.StatusOK, "OK", "").
Returns(http.StatusInternalServerError, httpStatusInternalServerError, ""))

subws.Route(subws.PUT(definitions.NamespacedResourcePath(subresourcesvmiGVR)+definitions.SubResourcePath("addinterface")).
To(subresourceApp.VMIAddInterfaceRequestHandler).
Reads(v1.AddInterfaceOptions{}).
Param(definitions.NamespaceParam(subws)).Param(definitions.NameParam(subws)).
Operation(version.Version+"vmi-addinterface").
Doc("Add a network interface to a running Virtual Machine Instance").
Returns(http.StatusOK, "OK", "").
Returns(http.StatusBadRequest, httpStatusBadRequestMessage, ""))

subws.Route(subws.PUT(definitions.NamespacedResourcePath(subresourcesvmiGVR)+definitions.SubResourcePath("removeinterface")).
To(subresourceApp.VMIRemoveInterfaceRequestHandler).
Reads(v1.RemoveInterfaceOptions{}).
Param(definitions.NamespaceParam(subws)).Param(definitions.NameParam(subws)).
Operation(version.Version+"vmi-removeinterface").
Doc("Remove a network interface from a running Virtual Machine Instance").
Returns(http.StatusOK, "OK", "").
Returns(http.StatusBadRequest, httpStatusBadRequestMessage, ""))

subws.Route(subws.PUT(definitions.NamespacedResourcePath(subresourcesvmGVR)+definitions.SubResourcePath("addinterface")).
To(subresourceApp.VMAddInterfaceRequestHandler).
Reads(v1.AddInterfaceOptions{}).
Expand Down Expand Up @@ -638,14 +620,6 @@ func (app *virtAPIApp) composeSubresources() {
Name: "virtualmachineinstances/removevolume",
Namespaced: true,
},
{
Name: "virtualmachineinstances/addinterface",
Namespaced: true,
},
{
Name: "virtualmachineinstances/removeinterface",
Namespaced: true,
},
}

response.WriteAsJson(list)
Expand Down
1 change: 0 additions & 1 deletion pkg/virt-api/rest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ go_library(
"//pkg/controller:go_default_library",
"//pkg/instancetype:go_default_library",
"//pkg/monitoring/api:go_default_library",
"//pkg/network/vmispec:go_default_library",
"//pkg/storage/types:go_default_library",
"//pkg/util:go_default_library",
"//pkg/util/status:go_default_library",
Expand Down

0 comments on commit f73d6ce

Please sign in to comment.