本文整理汇总了Golang中github.com/juju/juju/state/cloudimagemetadata.MetadataAttributes.Source方法的典型用法代码示例。如果您正苦于以下问题:Golang MetadataAttributes.Source方法的具体用法?Golang MetadataAttributes.Source怎么用?Golang MetadataAttributes.Source使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/juju/juju/state/cloudimagemetadata.MetadataAttributes
的用法示例。
在下文中一共展示了MetadataAttributes.Source方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: TestSaveSameMetadataSameImageDiffSourceConcurrently
func (s *cloudImageMetadataSuite) TestSaveSameMetadataSameImageDiffSourceConcurrently(c *gc.C) {
attrs := cloudimagemetadata.MetadataAttributes{
Stream: "stream",
Series: "series",
Arch: "arch",
Source: cloudimagemetadata.Public,
}
metadata0 := cloudimagemetadata.Metadata{attrs, "0"}
attrs.Source = cloudimagemetadata.Custom
metadata1 := cloudimagemetadata.Metadata{attrs, "0"}
s.assertConcurrentSave(c,
metadata0,
metadata1,
metadata0,
metadata1,
)
}
示例2: TestSaveSameMetadataSameImageDiffSourceConcurrently
func (s *cloudImageMetadataSuite) TestSaveSameMetadataSameImageDiffSourceConcurrently(c *gc.C) {
attrs := cloudimagemetadata.MetadataAttributes{
Stream: "stream",
Version: "14.04",
Series: "trusty",
Arch: "arch",
Source: "public",
}
metadata0 := cloudimagemetadata.Metadata{attrs, 0, "0"}
attrs.Source = "custom"
metadata1 := cloudimagemetadata.Metadata{attrs, 0, "0"}
s.assertConcurrentSave(c,
metadata0,
metadata1,
metadata0,
metadata1,
)
}