コード例 #1
0
ファイル: virtual_app.go プロジェクト: MerlinDMC/machine
func (p VirtualApp) PowerOffVApp_Task(ctx context.Context, force bool) error {
	req := types.PowerOffVApp_Task{
		This:  p.Reference(),
		Force: force,
	}

	_, err := methods.PowerOffVApp_Task(ctx, p.c, &req)
	return err
}
コード例 #2
0
ファイル: virtual_app.go プロジェクト: CodeJuan/kubernetes
func (p VirtualApp) PowerOffVApp_Task(ctx context.Context, force bool) (*Task, error) {
	req := types.PowerOffVApp_Task{
		This:  p.Reference(),
		Force: force,
	}

	res, err := methods.PowerOffVApp_Task(ctx, p.c, &req)
	if err != nil {
		return nil, err
	}

	return NewTask(p.c, res.Returnval), nil

}