本文整理汇总了Golang中github.com/juju/juju/apiserver/params.Entities.Entities方法的典型用法代码示例。如果您正苦于以下问题:Golang Entities.Entities方法的具体用法?Golang Entities.Entities怎么用?Golang Entities.Entities使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/juju/juju/apiserver/params.Entities
的用法示例。
在下文中一共展示了Entities.Entities方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: ids2args
func ids2args(ids []string) params.Entities {
var args params.Entities
for _, id := range ids {
tag := names.NewPayloadTag(id).String()
args.Entities = append(args.Entities, params.Entity{
Tag: tag,
})
}
return args
}
示例2: RetryProvisioning
// RetryProvisioning updates the provisioning status of a machine allowing the
// provisioner to retry.
func (c *Client) RetryProvisioning(machines ...names.MachineTag) ([]params.ErrorResult, error) {
p := params.Entities{}
p.Entities = make([]params.Entity, len(machines))
for i, machine := range machines {
p.Entities[i] = params.Entity{Tag: machine.String()}
}
var results params.ErrorResults
err := c.facade.FacadeCall("RetryProvisioning", p, &results)
return results.Results, err
}
示例3: addFakeEntities
func addFakeEntities(actual params.Entities) params.Entities {
for _, entity := range commonFakeEntities {
actual.Entities = append(actual.Entities, entity)
}
return actual
}