本文整理汇总了Golang中github.com/cloudfoundry/bosh-init/stemcell.CloudStemcell.Version方法的典型用法代码示例。如果您正苦于以下问题:Golang CloudStemcell.Version方法的具体用法?Golang CloudStemcell.Version怎么用?Golang CloudStemcell.Version使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudfoundry/bosh-init/stemcell.CloudStemcell
的用法示例。
在下文中一共展示了CloudStemcell.Version方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: rootDesc
//.........这里部分代码省略.........
fakeStemcellExtractor = fakebistemcell.NewFakeExtractor()
mockStemcellManager = mock_stemcell.NewMockManager(mockCtrl)
fakeStemcellManagerFactory = fakebistemcell.NewFakeManagerFactory()
fakeReleaseSetParser = fakebirelsetmanifest.NewFakeParser()
fakeInstallationParser = fakebiinstallmanifest.NewFakeParser()
fakeDeploymentParser = fakebideplmanifest.NewFakeParser()
mockLegacyDeploymentStateMigrator = mock_config.NewMockLegacyDeploymentStateMigrator(mockCtrl)
configUUIDGenerator = &fakeuuid.FakeGenerator{}
configUUIDGenerator.GeneratedUUID = directorID
setupDeploymentStateService = biconfig.NewFileSystemDeploymentStateService(fakeFs, configUUIDGenerator, logger, biconfig.DeploymentStatePath(deploymentManifestPath))
fakeDeploymentValidator = fakebideplval.NewFakeValidator()
fakeStage = fakebiui.NewFakeStage()
sha1Calculator = crypto.NewSha1Calculator(fakeFs)
fakeUUIDGenerator = &fakeuuid.FakeGenerator{}
var err error
manifestSHA1, err = sha1Calculator.Calculate(deploymentManifestPath)
Expect(err).ToNot(HaveOccurred())
cpiReleaseTarballPath = "/release/tarball/path"
stemcellTarballPath = "/stemcell/tarball/path"
extractedStemcell = bistemcell.NewExtractedStemcell(
bistemcell.Manifest{
ImagePath: "/stemcell/image/path",
Name: "fake-stemcell-name",
Version: "fake-stemcell-version",
SHA1: "fake-stemcell-sha1",
CloudProperties: biproperty.Map{},
OS: "ubuntu-trusty",
},
"fake-extracted-path",
fakeFs,
)
// create input files
fakeFs.WriteFileString(cpiReleaseTarballPath, "")
fakeFs.WriteFileString(stemcellTarballPath, "")
// deployment exists
fakeFs.WriteFileString(deploymentManifestPath, "")
// deployment is valid
fakeDeploymentValidator.SetValidateBehavior([]fakebideplval.ValidateOutput{
{Err: nil},
})
fakeDeploymentValidator.SetValidateReleaseJobsBehavior([]fakebideplval.ValidateReleaseJobsOutput{
{Err: nil},
})
// stemcell exists
fakeFs.WriteFile(stemcellTarballPath, []byte{})
releaseSetManifest = birelsetmanifest.Manifest{
Releases: []birelmanifest.ReleaseRef{
{
Name: "fake-cpi-release-name",
URL: "file://" + cpiReleaseTarballPath,
},