本文整理匯總了Golang中github.com/juju/juju/state.Model類的典型用法代碼示例。如果您正苦於以下問題:Golang Model類的具體用法?Golang Model怎麽用?Golang Model使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Model類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: assertDestroyModelAdvancesLife
func (s *MigrationImportSuite) assertDestroyModelAdvancesLife(c *gc.C, m *state.Model, life state.Life) {
err := m.Destroy()
c.Assert(err, jc.ErrorIsNil)
err = m.Refresh()
c.Assert(err, jc.ErrorIsNil)
c.Assert(m.Life(), gc.Equals, life)
}
示例2: checkModelMatches
func (s *modelManagerSuite) checkModelMatches(c *gc.C, env params.Model, expected *state.Model) {
c.Check(env.Name, gc.Equals, expected.Name())
c.Check(env.UUID, gc.Equals, expected.UUID())
c.Check(env.OwnerTag, gc.Equals, expected.Owner().String())
}
示例3: checkEnvironmentMatches
func (s *controllerSuite) checkEnvironmentMatches(c *gc.C, env params.Model, expected *state.Model) {
c.Check(env.Name, gc.Equals, expected.Name())
c.Check(env.UUID, gc.Equals, expected.UUID())
c.Check(env.OwnerTag, gc.Equals, expected.Owner().String())
}
示例4: checkSameModel
func (s *ModelUserSuite) checkSameModel(c *gc.C, env1, env2 *state.Model) {
c.Check(env1.Name(), gc.Equals, env2.Name())
c.Check(env1.UUID(), gc.Equals, env2.UUID())
}
示例5: envVersionUpdate
// Base implementation of envVersionUpdater
func envVersionUpdate(env *state.Model, ver version.Number) error {
return env.UpdateLatestToolsVersion(ver)
}