github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/upgrades/steps_21.go (about)

     1  // Copyright 2016 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package upgrades
     5  
     6  // stateStepsFor21 returns upgrade steps for Juju 2.1 that manipulate state directly.
     7  func stateStepsFor21() []Step {
     8  	return []Step{
     9  		&upgradeStep{
    10  			description: "add attempt to migration docs",
    11  			targets:     []Target{DatabaseMaster},
    12  			run: func(context Context) error {
    13  				return context.State().AddMigrationAttempt()
    14  			},
    15  		},
    16  		&upgradeStep{
    17  			description: "add sequences to track used local charm revisions",
    18  			targets:     []Target{DatabaseMaster},
    19  			run: func(context Context) error {
    20  				return context.State().AddLocalCharmSequences()
    21  			},
    22  		},
    23  		&upgradeStep{
    24  			description: "update lxd cloud/credentials",
    25  			targets:     []Target{DatabaseMaster},
    26  			run: func(context Context) error {
    27  				return updateLXDCloudCredentials(context.State())
    28  			},
    29  		},
    30  	}
    31  }