-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jack Yu <jack.yu@suse.com> Co-authored-by: Gaurav Mehta <gaurav.mehta@suse.com>
- Loading branch information
1 parent
0bf39cf
commit 0145a9f
Showing
90 changed files
with
33,479 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
//go:generate go run pkg/codegen/cleanup/main.go | ||
//go:generate go run pkg/codegen/main.go | ||
//go:generate go run ./pkg/codegen crds ./charts/templates/crds.yaml | ||
//go:generate go run pkg/util/gousb/codegen/main.go -template pkg/util/gousb/codegen/load_data.go.tpl -o pkg/util/gousb/usbid/load_data.go | ||
|
||
package main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package v1beta1 | ||
|
||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
|
||
// +genclient | ||
// +genclient:nonNamespaced | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
// +kubebuilder:object:root=true | ||
|
||
type USBDevice struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Status USBDeviceStatus `json:"status,omitempty"` | ||
} | ||
|
||
type USBDeviceStatus struct { | ||
VendorID string `json:"vendorID"` | ||
ProductID string `json:"productID"` | ||
NodeName string `json:"nodeName"` | ||
ResourceName string `json:"resourceName"` | ||
DevicePath string `json:"devicePath"` | ||
Description string `json:"description"` | ||
PCIAddress string `json:"pciAddress"` | ||
Enabled bool `json:"enabled"` | ||
} |
25 changes: 25 additions & 0 deletions
25
pkg/apis/devices.harvesterhci.io/v1beta1/usb_device_claim.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package v1beta1 | ||
|
||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
|
||
// +genclient | ||
// +genclient:nonNamespaced | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
// +kubebuilder:object:root=true | ||
|
||
type USBDeviceClaim struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Status USBDeviceClaimStatus `json:"status,omitempty"` | ||
} | ||
|
||
type USBDeviceClaimStatus struct { | ||
NodeName string `json:"nodeName"` | ||
PCIAddress string `json:"pciAddress"` | ||
UserName string `json:"userName"` | ||
} | ||
|
||
const ( | ||
USBDevicePCIAddress = "usb-device-pci-address" | ||
) |
Oops, something went wrong.