Clean up straggling autogenerated code

This commit is contained in:
John Gardiner Myers 2021-06-02 20:59:24 -07:00
parent 921dbbab50
commit 1b1b18f5ab
20 changed files with 40 additions and 289 deletions

View File

@ -37,7 +37,7 @@ import (
// NetworkLoadBalancer manages an NLB. We find the existing NLB using the Name tag.
var _ DNSTarget = &NetworkLoadBalancer{}
//go:generate fitask -type=NetworkLoadBalancer
// +kops:fitask
type NetworkLoadBalancer struct {
// We use the Name tag to find the existing NLB, because we are (more or less) unrestricted when
// it comes to tag values, but the LoadBalancerName is length limited

View File

@ -1,3 +1,5 @@
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
@ -14,37 +16,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by ""fitask" -type=NetworkLoadBalancer"; DO NOT EDIT
// Code generated by fitask. DO NOT EDIT.
package awstasks
import (
"encoding/json"
"k8s.io/kops/upup/pkg/fi"
)
// NetworkLoadBalancer
// JSON marshaling boilerplate
type realNetworkLoadBalancer NetworkLoadBalancer
// UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
func (o *NetworkLoadBalancer) UnmarshalJSON(data []byte) error {
var jsonName string
if err := json.Unmarshal(data, &jsonName); err == nil {
o.Name = &jsonName
return nil
}
var r realNetworkLoadBalancer
if err := json.Unmarshal(data, &r); err != nil {
return err
}
*o = NetworkLoadBalancer(r)
return nil
}
var _ fi.HasLifecycle = &NetworkLoadBalancer{}
// GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle
@ -64,11 +45,6 @@ func (o *NetworkLoadBalancer) GetName() *string {
return o.Name
}
// SetName sets the Name of the object, implementing fi.SetName
func (o *NetworkLoadBalancer) SetName(name string) {
o.Name = &name
}
// String is the stringer function for the task, producing readable output using fi.TaskAsString
func (o *NetworkLoadBalancer) String() string {
return fi.TaskAsString(o)

View File

@ -26,9 +26,8 @@ import (
"k8s.io/kops/upup/pkg/fi/cloudup/azure"
)
//go:generate fitask -type=Disk
// Disk is an Azure Managed Disk.
// +kops:fitask
type Disk struct {
Name *string
Lifecycle *fi.Lifecycle

View File

@ -1,3 +1,5 @@
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
@ -14,37 +16,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by ""fitask" -type=Disk"; DO NOT EDIT
// Code generated by fitask. DO NOT EDIT.
package azuretasks
import (
"encoding/json"
"k8s.io/kops/upup/pkg/fi"
)
// Disk
// JSON marshaling boilerplate
type realDisk Disk
// UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
func (o *Disk) UnmarshalJSON(data []byte) error {
var jsonName string
if err := json.Unmarshal(data, &jsonName); err == nil {
o.Name = &jsonName
return nil
}
var r realDisk
if err := json.Unmarshal(data, &r); err != nil {
return err
}
*o = Disk(r)
return nil
}
var _ fi.HasLifecycle = &Disk{}
// GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle
@ -64,11 +45,6 @@ func (o *Disk) GetName() *string {
return o.Name
}
// SetName sets the Name of the object, implementing fi.SetName
func (o *Disk) SetName(name string) {
o.Name = &name
}
// String is the stringer function for the task, producing readable output using fi.TaskAsString
func (o *Disk) String() string {
return fi.TaskAsString(o)

View File

@ -27,9 +27,8 @@ import (
"k8s.io/kops/upup/pkg/fi/cloudup/azure"
)
//go:generate fitask -type=LoadBalancer
// LoadBalancer is an Azure Cloud LoadBalancer
// +kops:fitask
type LoadBalancer struct {
Name *string
Lifecycle *fi.Lifecycle

View File

@ -1,3 +1,5 @@
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
@ -14,37 +16,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by ""fitask" -type=LoadBalancer"; DO NOT EDIT
// Code generated by fitask. DO NOT EDIT.
package azuretasks
import (
"encoding/json"
"k8s.io/kops/upup/pkg/fi"
)
// LoadBalancer
// JSON marshaling boilerplate
type realLoadBalancer LoadBalancer
// UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
func (o *LoadBalancer) UnmarshalJSON(data []byte) error {
var jsonName string
if err := json.Unmarshal(data, &jsonName); err == nil {
o.Name = &jsonName
return nil
}
var r realLoadBalancer
if err := json.Unmarshal(data, &r); err != nil {
return err
}
*o = LoadBalancer(r)
return nil
}
var _ fi.HasLifecycle = &LoadBalancer{}
// GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle
@ -64,11 +45,6 @@ func (o *LoadBalancer) GetName() *string {
return o.Name
}
// SetName sets the Name of the object, implementing fi.SetName
func (o *LoadBalancer) SetName(name string) {
o.Name = &name
}
// String is the stringer function for the task, producing readable output using fi.TaskAsString
func (o *LoadBalancer) String() string {
return fi.TaskAsString(o)

View File

@ -26,9 +26,8 @@ import (
"k8s.io/kops/upup/pkg/fi/cloudup/azure"
)
//go:generate fitask -type=PublicIPAddress
// PublicIPAddress is an Azure Cloud Public IP Address
// +kops:fitask
type PublicIPAddress struct {
Name *string
Lifecycle *fi.Lifecycle

View File

@ -1,3 +1,5 @@
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
@ -14,37 +16,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by ""fitask" -type=PublicIPAddress"; DO NOT EDIT
// Code generated by fitask. DO NOT EDIT.
package azuretasks
import (
"encoding/json"
"k8s.io/kops/upup/pkg/fi"
)
// PublicIPAddress
// JSON marshaling boilerplate
type realPublicIPAddress PublicIPAddress
// UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
func (o *PublicIPAddress) UnmarshalJSON(data []byte) error {
var jsonName string
if err := json.Unmarshal(data, &jsonName); err == nil {
o.Name = &jsonName
return nil
}
var r realPublicIPAddress
if err := json.Unmarshal(data, &r); err != nil {
return err
}
*o = PublicIPAddress(r)
return nil
}
var _ fi.HasLifecycle = &PublicIPAddress{}
// GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle
@ -64,11 +45,6 @@ func (o *PublicIPAddress) GetName() *string {
return o.Name
}
// SetName sets the Name of the object, implementing fi.SetName
func (o *PublicIPAddress) SetName(name string) {
o.Name = &name
}
// String is the stringer function for the task, producing readable output using fi.TaskAsString
func (o *PublicIPAddress) String() string {
return fi.TaskAsString(o)

View File

@ -26,9 +26,8 @@ import (
"k8s.io/kops/upup/pkg/fi/cloudup/azure"
)
//go:generate fitask -type=ResourceGroup
// ResourceGroup is an Azure resource group.
// +kops:fitask
type ResourceGroup struct {
Name *string
Lifecycle *fi.Lifecycle

View File

@ -1,3 +1,5 @@
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
@ -14,37 +16,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by ""fitask" -type=ResourceGroup"; DO NOT EDIT
// Code generated by fitask. DO NOT EDIT.
package azuretasks
import (
"encoding/json"
"k8s.io/kops/upup/pkg/fi"
)
// ResourceGroup
// JSON marshaling boilerplate
type realResourceGroup ResourceGroup
// UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
func (o *ResourceGroup) UnmarshalJSON(data []byte) error {
var jsonName string
if err := json.Unmarshal(data, &jsonName); err == nil {
o.Name = &jsonName
return nil
}
var r realResourceGroup
if err := json.Unmarshal(data, &r); err != nil {
return err
}
*o = ResourceGroup(r)
return nil
}
var _ fi.HasLifecycle = &ResourceGroup{}
// GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle
@ -64,11 +45,6 @@ func (o *ResourceGroup) GetName() *string {
return o.Name
}
// SetName sets the Name of the object, implementing fi.SetName
func (o *ResourceGroup) SetName(name string) {
o.Name = &name
}
// String is the stringer function for the task, producing readable output using fi.TaskAsString
func (o *ResourceGroup) String() string {
return fi.TaskAsString(o)

View File

@ -35,9 +35,8 @@ import (
"github.com/google/uuid"
)
//go:generate fitask -type=RoleAssignment
// RoleAssignment is an Azure Role Assignment.
// +kops:fitask
type RoleAssignment struct {
// Name is the name of the RoleAssignment task. This is
// different from a name of Role Assignment, which is GUID.

View File

@ -1,3 +1,5 @@
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
@ -14,37 +16,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by ""fitask" -type=RoleAssignment"; DO NOT EDIT
// Code generated by fitask. DO NOT EDIT.
package azuretasks
import (
"encoding/json"
"k8s.io/kops/upup/pkg/fi"
)
// RoleAssignment
// JSON marshaling boilerplate
type realRoleAssignment RoleAssignment
// UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
func (o *RoleAssignment) UnmarshalJSON(data []byte) error {
var jsonName string
if err := json.Unmarshal(data, &jsonName); err == nil {
o.Name = &jsonName
return nil
}
var r realRoleAssignment
if err := json.Unmarshal(data, &r); err != nil {
return err
}
*o = RoleAssignment(r)
return nil
}
var _ fi.HasLifecycle = &RoleAssignment{}
// GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle
@ -64,11 +45,6 @@ func (o *RoleAssignment) GetName() *string {
return o.Name
}
// SetName sets the Name of the object, implementing fi.SetName
func (o *RoleAssignment) SetName(name string) {
o.Name = &name
}
// String is the stringer function for the task, producing readable output using fi.TaskAsString
func (o *RoleAssignment) String() string {
return fi.TaskAsString(o)

View File

@ -26,9 +26,8 @@ import (
"k8s.io/kops/upup/pkg/fi/cloudup/azure"
)
//go:generate fitask -type=RouteTable
// RouteTable is an Azure Route Table.
// +kops:fitask
type RouteTable struct {
Name *string
Lifecycle *fi.Lifecycle

View File

@ -1,3 +1,5 @@
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
@ -14,37 +16,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by ""fitask" -type=RouteTable"; DO NOT EDIT
// Code generated by fitask. DO NOT EDIT.
package azuretasks
import (
"encoding/json"
"k8s.io/kops/upup/pkg/fi"
)
// RouteTable
// JSON marshaling boilerplate
type realRouteTable RouteTable
// UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
func (o *RouteTable) UnmarshalJSON(data []byte) error {
var jsonName string
if err := json.Unmarshal(data, &jsonName); err == nil {
o.Name = &jsonName
return nil
}
var r realRouteTable
if err := json.Unmarshal(data, &r); err != nil {
return err
}
*o = RouteTable(r)
return nil
}
var _ fi.HasLifecycle = &RouteTable{}
// GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle
@ -64,11 +45,6 @@ func (o *RouteTable) GetName() *string {
return o.Name
}
// SetName sets the Name of the object, implementing fi.SetName
func (o *RouteTable) SetName(name string) {
o.Name = &name
}
// String is the stringer function for the task, producing readable output using fi.TaskAsString
func (o *RouteTable) String() string {
return fi.TaskAsString(o)

View File

@ -25,9 +25,8 @@ import (
"k8s.io/kops/upup/pkg/fi/cloudup/azure"
)
//go:generate fitask -type=Subnet
// Subnet is an Azure subnet.
// +kops:fitask
type Subnet struct {
Name *string
Lifecycle *fi.Lifecycle

View File

@ -1,3 +1,5 @@
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
@ -14,37 +16,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by ""fitask" -type=Subnet"; DO NOT EDIT
// Code generated by fitask. DO NOT EDIT.
package azuretasks
import (
"encoding/json"
"k8s.io/kops/upup/pkg/fi"
)
// Subnet
// JSON marshaling boilerplate
type realSubnet Subnet
// UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
func (o *Subnet) UnmarshalJSON(data []byte) error {
var jsonName string
if err := json.Unmarshal(data, &jsonName); err == nil {
o.Name = &jsonName
return nil
}
var r realSubnet
if err := json.Unmarshal(data, &r); err != nil {
return err
}
*o = Subnet(r)
return nil
}
var _ fi.HasLifecycle = &Subnet{}
// GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle
@ -64,11 +45,6 @@ func (o *Subnet) GetName() *string {
return o.Name
}
// SetName sets the Name of the object, implementing fi.SetName
func (o *Subnet) SetName(name string) {
o.Name = &name
}
// String is the stringer function for the task, producing readable output using fi.TaskAsString
func (o *Subnet) String() string {
return fi.TaskAsString(o)

View File

@ -27,9 +27,8 @@ import (
"k8s.io/kops/upup/pkg/fi/cloudup/azure"
)
//go:generate fitask -type=VirtualNetwork
// VirtualNetwork is an Azure Virtual Network.
// +kops:fitask
type VirtualNetwork struct {
Name *string
Lifecycle *fi.Lifecycle

View File

@ -1,3 +1,5 @@
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
@ -14,37 +16,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by ""fitask" -type=VirtualNetwork"; DO NOT EDIT
// Code generated by fitask. DO NOT EDIT.
package azuretasks
import (
"encoding/json"
"k8s.io/kops/upup/pkg/fi"
)
// VirtualNetwork
// JSON marshaling boilerplate
type realVirtualNetwork VirtualNetwork
// UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
func (o *VirtualNetwork) UnmarshalJSON(data []byte) error {
var jsonName string
if err := json.Unmarshal(data, &jsonName); err == nil {
o.Name = &jsonName
return nil
}
var r realVirtualNetwork
if err := json.Unmarshal(data, &r); err != nil {
return err
}
*o = VirtualNetwork(r)
return nil
}
var _ fi.HasLifecycle = &VirtualNetwork{}
// GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle
@ -64,11 +45,6 @@ func (o *VirtualNetwork) GetName() *string {
return o.Name
}
// SetName sets the Name of the object, implementing fi.SetName
func (o *VirtualNetwork) SetName(name string) {
o.Name = &name
}
// String is the stringer function for the task, producing readable output using fi.TaskAsString
func (o *VirtualNetwork) String() string {
return fi.TaskAsString(o)

View File

@ -89,9 +89,8 @@ func parseLoadBalancerID(lb string) (*loadBalancerID, error) {
}, nil
}
//go:generate fitask -type=VMScaleSet
// VMScaleSet is an Azure VM Scale Set.
// +kops:fitask
type VMScaleSet struct {
Name *string
Lifecycle *fi.Lifecycle

View File

@ -1,3 +1,5 @@
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
@ -14,37 +16,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by ""fitask" -type=VMScaleSet"; DO NOT EDIT
// Code generated by fitask. DO NOT EDIT.
package azuretasks
import (
"encoding/json"
"k8s.io/kops/upup/pkg/fi"
)
// VMScaleSet
// JSON marshaling boilerplate
type realVMScaleSet VMScaleSet
// UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
func (o *VMScaleSet) UnmarshalJSON(data []byte) error {
var jsonName string
if err := json.Unmarshal(data, &jsonName); err == nil {
o.Name = &jsonName
return nil
}
var r realVMScaleSet
if err := json.Unmarshal(data, &r); err != nil {
return err
}
*o = VMScaleSet(r)
return nil
}
var _ fi.HasLifecycle = &VMScaleSet{}
// GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle
@ -64,11 +45,6 @@ func (o *VMScaleSet) GetName() *string {
return o.Name
}
// SetName sets the Name of the object, implementing fi.SetName
func (o *VMScaleSet) SetName(name string) {
o.Name = &name
}
// String is the stringer function for the task, producing readable output using fi.TaskAsString
func (o *VMScaleSet) String() string {
return fi.TaskAsString(o)