...

Source file src/github.com/chaos-mesh/chaos-mesh/api/v1alpha1/physical_machine_types.go

Documentation: github.com/chaos-mesh/chaos-mesh/api/v1alpha1

     1  // Copyright 2021 Chaos Mesh Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  // http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  //
    15  
    16  package v1alpha1
    17  
    18  import (
    19  	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    20  )
    21  
    22  // +kubebuilder:object:root=true
    23  // +chaos-mesh:base
    24  
    25  // PhysicalMachine is the Schema for the physical machine API
    26  type PhysicalMachine struct {
    27  	metav1.TypeMeta   `json:",inline"`
    28  	metav1.ObjectMeta `json:"metadata,omitempty"`
    29  
    30  	// Spec defines the behavior of a physical machine
    31  	Spec PhysicalMachineSpec `json:"spec"`
    32  }
    33  
    34  // PhysicalMachineSpec defines the desired state of PhysicalMachine
    35  type PhysicalMachineSpec struct {
    36  
    37  	// Address represents the address of the physical machine
    38  	Address string `json:"address"`
    39  }
    40  
    41  // +kubebuilder:object:root=true
    42  
    43  // PhysicalMachineList contains a list of PhysicalMachine
    44  type PhysicalMachineList struct {
    45  	metav1.TypeMeta `json:",inline"`
    46  	metav1.ListMeta `json:"metadata,omitempty"`
    47  	Items           []PhysicalMachine `json:"items"`
    48  }
    49