// NewGravityResourcesPhase returns executor that creates Gravity resources
NewGravityResourcesPhase returns executor that creates Gravity resources
// NewGravityResourcesPhase returns executor that creates Gravity resources
func NewGravityResourcesPhase(p fsm.ExecutorParams, operator ops.Operator, factory resources.Resources) (*gravityExecutor, error) {
	if p.Phase.Data == nil || p.Phase.Data.Install == nil {
		return nil, trace.BadParameter("phase data is mandatory")
	}
	logger := &fsm.Logger{
		FieldLogger: logrus.WithFields(logrus.Fields{
			constants.FieldPhase: p.Phase.ID,
		}),
		Key:      opKey(p.Plan),
		Operator: operator,
		Server:   p.Phase.Data.Server,
	}
	return &gravityExecutor{
		FieldLogger: logger,
		progress:    p.Progress,
		factory:     factory,
		operator:    operator,
		resources:   p.Phase.Data.Install.GravityResources,
	}, nil
}
func NewGravityResourcesPhase ( p fsm . ExecutorParams , operator ops . Operator , factory resources . Resources ) ( * gravityExecutor , error ) { if p . Phase . Data == nil || p . Phase . Data . Install == nil { return nil , trace . BadParameter ( " " ) } logger := & fsm . Logger { FieldLogger : logrus . WithFields ( logrus . Fields { constants . FieldPhase : p . Phase . ID , } ) , Key : opKey ( p . Plan ) , Operator : operator , Server : p . Phase . Data . Server , } return & gravityExecutor { FieldLogger : logger , progress : p . Progress , factory : factory , operator : operator , resources : p . Phase . Data . Install . GravityResources , } , nil }
NewGravityResourcesPhase returns executor that creates Gravity resources
NewGravityResourcesPhase returns executor that creates Gravity resources