Skip to content

Commit

Permalink
Merge pull request #13 from onmetal/volume_resource_rename
Browse files Browse the repository at this point in the history
Renamed disk and disk attachment resource to volume
  • Loading branch information
afritzler authored May 11, 2021
2 parents fca0b7b + c41bdda commit e29f8ae
Show file tree
Hide file tree
Showing 23 changed files with 340 additions and 226 deletions.
4 changes: 2 additions & 2 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ resources:
controller: true
domain: onmetal.de
group: storage
kind: Disk
kind: Volume
path: github.com/onmetal/apis/storage/v1alpha1
version: v1alpha1
- api:
Expand All @@ -20,7 +20,7 @@ resources:
controller: true
domain: onmetal.de
group: storage
kind: DiskAttachment
kind: VolumeAttachment
path: github.com/onmetal/apis/storage/v1alpha1
version: v1alpha1
- api:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,42 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// DiskSpec defines the desired state of Disk
type DiskSpec struct {
// VolumeSpec defines the desired state of Volume
type VolumeSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Foo is an example field of Disk. Edit disk_types.go to remove/update
// Foo is an example field of Volume. Edit volume_types.go to remove/update
Foo string `json:"foo,omitempty"`
}

// DiskStatus defines the observed state of Disk
type DiskStatus struct {
// VolumeStatus defines the observed state of Volume
type VolumeStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

// Disk is the Schema for the disks API
type Disk struct {
// Volume is the Schema for the volumes API
type Volume struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec DiskSpec `json:"spec,omitempty"`
Status DiskStatus `json:"status,omitempty"`
Spec VolumeSpec `json:"spec,omitempty"`
Status VolumeStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// DiskList contains a list of Disk
type DiskList struct {
// VolumeList contains a list of Volume
type VolumeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Disk `json:"items"`
Items []Volume `json:"items"`
}

func init() {
SchemeBuilder.Register(&Disk{}, &DiskList{})
SchemeBuilder.Register(&Volume{}, &VolumeList{})
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,42 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// DiskAttachmentSpec defines the desired state of DiskAttachment
type DiskAttachmentSpec struct {
// VolumeAttachmentSpec defines the desired state of VolumeAttachment
type VolumeAttachmentSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Foo is an example field of DiskAttachment. Edit diskattachment_types.go to remove/update
// Foo is an example field of VolumeAttachment. Edit volumeattachment_types.go to remove/update
Foo string `json:"foo,omitempty"`
}

// DiskAttachmentStatus defines the observed state of DiskAttachment
type DiskAttachmentStatus struct {
// VolumeAttachmentStatus defines the observed state of VolumeAttachment
type VolumeAttachmentStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

// DiskAttachment is the Schema for the diskattachments API
type DiskAttachment struct {
// VolumeAttachment is the Schema for the volumeattachments API
type VolumeAttachment struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec DiskAttachmentSpec `json:"spec,omitempty"`
Status DiskAttachmentStatus `json:"status,omitempty"`
Spec VolumeAttachmentSpec `json:"spec,omitempty"`
Status VolumeAttachmentStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// DiskAttachmentList contains a list of DiskAttachment
type DiskAttachmentList struct {
// VolumeAttachmentList contains a list of VolumeAttachment
type VolumeAttachmentList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []DiskAttachment `json:"items"`
Items []VolumeAttachment `json:"items"`
}

func init() {
SchemeBuilder.Register(&DiskAttachment{}, &DiskAttachmentList{})
SchemeBuilder.Register(&VolumeAttachment{}, &VolumeAttachmentList{})
}
Loading

0 comments on commit e29f8ae

Please sign in to comment.