sigs.k8s.io/cluster-api-provider-azure@v1.17.0/azure/services/disks/spec.go (about)

     1  /*
     2  Copyright 2021 The Kubernetes Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package disks
    18  
    19  import "context"
    20  
    21  // DiskSpec defines the specification for a disk.
    22  type DiskSpec struct {
    23  	Name          string
    24  	ResourceGroup string
    25  }
    26  
    27  // ResourceName returns the name of the disk.
    28  func (s *DiskSpec) ResourceName() string {
    29  	return s.Name
    30  }
    31  
    32  // ResourceGroupName returns the name of the resource group.
    33  func (s *DiskSpec) ResourceGroupName() string {
    34  	return s.ResourceGroup
    35  }
    36  
    37  // OwnerResourceName is a no-op for disks.
    38  func (s *DiskSpec) OwnerResourceName() string {
    39  	return ""
    40  }
    41  
    42  // Parameters is a no-op for disks.
    43  func (s *DiskSpec) Parameters(ctx context.Context, existing interface{}) (params interface{}, err error) {
    44  	return nil, nil
    45  }