Skip to content

Commit 7c97e2b

Browse files
feat: add usbredir
Signed-off-by: Yaroslav Borbat <[email protected]>
1 parent 281a78d commit 7c97e2b

File tree

15 files changed

+355
-86
lines changed

15 files changed

+355
-86
lines changed

api/client/kubeclient/async.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,7 @@ func asyncSubresourceHelper(
127127
case err = <-errChan:
128128
return nil, err
129129
case ws := <-aws.Connection:
130-
return &wsStreamer{
131-
conn: ws,
132-
done: done,
133-
}, nil
130+
return newWebsocketStreamer(ws, done), nil
134131
}
135132
}
136133

api/client/kubeclient/streamer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func (c *wsConn) SetDeadline(t time.Time) error {
7575
return c.Conn.SetReadDeadline(t)
7676
}
7777

78-
func NewWebsocketStreamer(conn *websocket.Conn, done chan struct{}) *wsStreamer {
78+
func newWebsocketStreamer(conn *websocket.Conn, done chan struct{}) *wsStreamer {
7979
return &wsStreamer{
8080
conn: conn,
8181
done: done,

api/subresources/v1alpha2/register.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
5959
&VirtualMachineFreeze{},
6060
&VirtualMachineUnfreeze{},
6161
&VirtualMachineCancelEvacuation{},
62-
&VirtualMAchineUSBRedir{},
62+
&VirtualMachineUSBRedir{},
6363
)
6464
return nil
6565
}

api/subresources/v1alpha2/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,6 @@ type VirtualMachineCancelEvacuation struct {
9898
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
9999
// +k8s:conversion-gen:explicit-from=net/url.Values
100100

101-
type VirtualMAchineUSBRedir struct {
101+
type VirtualMachineUSBRedir struct {
102102
metav1.TypeMeta `json:",inline"`
103103
}

api/subresources/v1alpha2/zz_generated.conversion.go

Lines changed: 44 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/subresources/v1alpha2/zz_generated.deepcopy.go

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

images/qemu/werf.inc.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ altLibraries:
108108
- libnfs-devel
109109
- libblkio-devel libpmem-devel
110110
- libdaxctl-devel
111-
- libcacard-devel libusbredir-devel libepoxy-devel libgbm-devel
111+
- libcacard-devel libusbredir-devel libusbredir libepoxy-devel libgbm-devel
112112
- libvitastor-devel libiscsi-devel glusterfs-coreutils
113113
- libglusterfs11-api-devel
114114
- libvdeplug-devel
@@ -325,6 +325,7 @@ shell:
325325
--enable-selinux \
326326
--enable-slirp \
327327
--enable-snappy \
328+
--enable-spice \
328329
--enable-spice-protocol \
329330
--enable-system \
330331
--enable-tcg \

images/virt-launcher/werf.inc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ shell:
284284
LIBS+=" /usr/lib64/libtpms* /usr/lib64/libjson* /usr/lib64/libfuse*"
285285
LIBS+=" /usr/lib64/libxml2.s* /usr/lib64/libgcc_s* /usr/lib64/libaudit*"
286286
LIBS+=" /usr/lib64/libisoburn.s* /usr/lib64/libacl.s*"
287+
LIBS+=" /usr/lib64/libusbredir*"
287288
288289
echo "Relocate additional libs for files in /VBINS"
289290
./relocate_binaries.sh -i "$FILES" -o /VBINS

images/virtualization-artifact/pkg/apiserver/api/generated/openapi/zz_generated.openapi.go

Lines changed: 27 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,3 +650,7 @@ func (b *KVVM) SetMetadata(metadata metav1.ObjectMeta) {
650650
func (b *KVVM) SetUpdateVolumesStrategy(strategy *virtv1.UpdateVolumesStrategy) {
651651
b.Resource.Spec.UpdateVolumesStrategy = strategy
652652
}
653+
654+
func (b *KVVM) SetClientPassthroughDevices() {
655+
b.Resource.Spec.Template.Spec.Domain.Devices.ClientPassthrough = &virtv1.ClientPassthroughDevices{}
656+
}

0 commit comments

Comments
 (0)