From 17a30188fbb022fd28aa8db995a844895361b698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gonz=C3=A1lez?= Date: Mon, 1 Apr 2019 09:41:17 +0200 Subject: [PATCH] F #3151 Add clone parameter to template instantiate function --- src/oca/go/src/goca/template.go | 4 ++-- src/oca/go/src/goca/template_test.go | 2 +- src/oca/go/src/goca/vm_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/oca/go/src/goca/template.go b/src/oca/go/src/goca/template.go index b5402a3d3f..6e584c3496 100644 --- a/src/oca/go/src/goca/template.go +++ b/src/oca/go/src/goca/template.go @@ -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 diff --git a/src/oca/go/src/goca/template_test.go b/src/oca/go/src/goca/template_test.go index 8aae4ea041..f4e187fab2 100644 --- a/src/oca/go/src/goca/template_test.go +++ b/src/oca/go/src/goca/template_test.go @@ -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) } diff --git a/src/oca/go/src/goca/vm_test.go b/src/oca/go/src/goca/vm_test.go index fa43809d92..1fa0878077 100644 --- a/src/oca/go/src/goca/vm_test.go +++ b/src/oca/go/src/goca/vm_test.go @@ -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 }