Skip to content

Commit

Permalink
added provider node
Browse files Browse the repository at this point in the history
  • Loading branch information
henderiw committed Nov 8, 2024
1 parent 83308e6 commit 0b73714
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 1 deletion.
31 changes: 31 additions & 0 deletions apis/id/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ type PartitionNodeID struct {
Node string `json:"node" yaml:"node" protobuf:"bytes,3,opt,name=node"`
}

type PartitionProviderNodeID struct {
// Partition defines the partition this resource belongs to
Partition string `json:"partition" yaml:"partition" protobuf:"bytes,1,opt,name=partition"`
// SiteID define the siteid of the node
SiteID `json:",inline" yaml:",inline" protobuf:"bytes,2,opt,name=siteID"`
// Node defines the name of the node
Node string `json:"node" yaml:"node" protobuf:"bytes,3,opt,name=node"`
// Provider defines the provider implementing this resource.
Provider string `json:"provider" yaml:"provider" protobuf:"bytes,4,opt,name=provider"`
// PlatformType define the type of platform implementing the nodespec
PlatformType string `json:"platformType" yaml:"platformType" protobuf:"bytes,5,opt,name=platformType"`
}

type PartitionPortID struct {
PartitionNodeID `json:",inline" yaml:",inline" protobuf:"bytes,1,opt,name=nodeID"`
// ModuleBay defines the moduleBay reference id
Expand All @@ -48,6 +61,8 @@ type PartitionPortID struct {
Port int `json:"port" yaml:"port" protobuf:"bytes,4,opt,name=port"`
}



type PartitionAdaptorID struct {
PartitionPortID `json:",inline" yaml:",inline" protobuf:"bytes,1,opt,name=nodeID"`
// Adaptor defines the name of the adaptor
Expand Down Expand Up @@ -87,6 +102,22 @@ type PartitionEndpointID struct {
Name *string `json:"name,omitempty" yaml:"name,omitempty" protobuf:"bytes,8,opt,name=name"`
}

type PartitionProviderEndpointID struct {
PartitionProviderNodeID `json:",inline" yaml:",inline" protobuf:"bytes,2,opt,name=nodeID"`
// ModuleBay defines the moduleBay reference id
ModuleBay *int `json:"moduleBay,omitempty" yaml:"moduleBay,omitempty" protobuf:"bytes,3,opt,name=moduleBay"`
// Module defines the module reference id
Module *int `json:"module,omitempty" yaml:"module,omitempty" protobuf:"bytes,4,opt,name=module"`
// Port defines the id of the port
Port int `json:"port" yaml:"port" protobuf:"bytes,5,opt,name=port"`
// Adaptor defines the name of the adaptor
Adaptor *string `json:"adaptor,omitempty" yaml:"adaptor,omitempty" protobuf:"bytes,6,opt,name=adaptor"`
// Endpoint defines the name of the endpoint
Endpoint int `json:"endpoint" yaml:"endpoint" protobuf:"bytes,7,opt,name=endpoint"`
// Name is used to refer to internal names of the node
Name *string `json:"name,omitempty" yaml:"name,omitempty" protobuf:"bytes,8,opt,name=name"`
}

type ClusterID struct {
SiteID `json:",inline" yaml:",inline" protobuf:"bytes,1,opt,name=siteID"`
// Cluster defines the name of the cluster
Expand Down
54 changes: 54 additions & 0 deletions apis/id/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion apis/infra/v1alpha1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0b73714

Please sign in to comment.