Revert move to explicit dependencies

The change to explicit dependencies lost the dependencies
that were previously found by reflection.
This commit is contained in:
John Gardiner Myers 2020-07-20 22:10:46 -07:00
parent e7414f76d4
commit eb94877ee9
4 changed files with 0 additions and 24 deletions

View File

@ -74,16 +74,11 @@ type LaunchConfiguration struct {
var _ fi.Task = &LaunchConfiguration{}
var _ fi.CompareWithID = &LaunchConfiguration{}
var _ fi.HasDependencies = &LaunchConfiguration{}
func (l *LaunchConfiguration) CompareWithID() *string {
return l.ID
}
func (l *LaunchConfiguration) GetDependencies(tasks map[string]fi.Task) []fi.Task {
return l.UserData.GetDependencies(tasks)
}
func (l *LaunchConfiguration) Find(c *fi.Context) (*LaunchConfiguration, error) {
if l.ScalingGroup == nil || l.ScalingGroup.ScalingGroupId == nil {
klog.V(4).Infof("ScalingGroup / ScalingGroupId not found for %s, skipping Find", fi.StringValue(l.Name))

View File

@ -94,17 +94,12 @@ type LaunchConfiguration struct {
}
var _ fi.CompareWithID = &LaunchConfiguration{}
var _ fi.HasDependencies = &LaunchConfiguration{}
var _ fi.ProducesDeletions = &LaunchConfiguration{}
func (e *LaunchConfiguration) CompareWithID() *string {
return e.ID
}
func (l *LaunchConfiguration) GetDependencies(tasks map[string]fi.Task) []fi.Task {
return l.UserData.GetDependencies(tasks)
}
// findLaunchConfigurations returns matching LaunchConfigurations, sorted by CreatedTime (ascending)
func (e *LaunchConfiguration) findLaunchConfigurations(c *fi.Context) ([]*autoscaling.LaunchConfiguration, error) {
cloud := c.Cloud.(awsup.AWSCloud)

View File

@ -47,16 +47,11 @@ type Droplet struct {
var _ fi.Task = &Droplet{}
var _ fi.CompareWithID = &Droplet{}
var _ fi.HasDependencies = &Droplet{}
func (d *Droplet) CompareWithID() *string {
return d.Name
}
func (l *Droplet) GetDependencies(tasks map[string]fi.Task) []fi.Task {
return l.UserData.GetDependencies(tasks)
}
func (d *Droplet) Find(c *fi.Context) (*Droplet, error) {
cloud := c.Cloud.(*digitalocean.Cloud)

View File

@ -70,20 +70,11 @@ type InstanceTemplate struct {
var _ fi.Task = &InstanceTemplate{}
var _ fi.CompareWithID = &InstanceTemplate{}
var _ fi.HasDependencies = &InstanceTemplate{}
func (e *InstanceTemplate) CompareWithID() *string {
return e.ID
}
func (l *InstanceTemplate) GetDependencies(tasks map[string]fi.Task) []fi.Task {
var deps []fi.Task
for _, resource := range l.Metadata {
deps = append(deps, resource.GetDependencies(tasks)...)
}
return deps
}
func (e *InstanceTemplate) Find(c *fi.Context) (*InstanceTemplate, error) {
cloud := c.Cloud.(gce.GCECloud)