1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

F #3151 Add clone parameter to template instantiate function

This commit is contained in:
Christian González 2019-04-01 09:41:17 +02:00 committed by Ruben S. Montero
parent 49998530c6
commit 17a30188fb
3 changed files with 4 additions and 4 deletions

View File

@ -198,8 +198,8 @@ func (template *Template) Delete() error {
}
// Instantiate will instantiate the template
func (template *Template) Instantiate(name string, pending bool, extra string) (uint, error) {
response, err := client.Call("one.template.instantiate", template.ID, name, pending, extra)
func (template *Template) Instantiate(name string, pending bool, extra string, clone bool) (uint, error) {
response, err := client.Call("one.template.instantiate", template.ID, name, pending, extra, clone)
if err != nil {
return 0, err

View File

@ -100,7 +100,7 @@ func TestTemplateInstantiate(t *testing.T) {
template := NewTemplate(id)
// Instantiate(name string, pending bool, extra string) (uint, error)
vmid, err := template.Instantiate("", false, "")
vmid, err := template.Instantiate("", false, "", false)
if err != nil {
t.Error(err)
}

View File

@ -61,7 +61,7 @@ func (s *VMSuite) SetUpSuite(c *C) {
func (s *VMSuite) SetUpTest(c *C) {
template := NewTemplate(s.templateID)
vmID, err := template.Instantiate("", true, "")
vmID, err := template.Instantiate("", true, "", false)
c.Assert(err, IsNil)
s.vmID = vmID
}