From 7f186ed3b6bdbb210bdf92f32ad2a3a91e0dc497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gonz=C3=A1lez?= Date: Fri, 29 Mar 2019 12:18:46 +0100 Subject: [PATCH 1/2] F #3151 Add clone parameter to template instantiate function --- src/oca/go/src/goca/template.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/oca/go/src/goca/template.go b/src/oca/go/src/goca/template.go index b5402a3d3fb..6e584c34965 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 From eb2ca85789a0ae3ae9482e15fba8fe3ca832fc4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gonz=C3=A1lez?= Date: Fri, 29 Mar 2019 12:42:09 +0100 Subject: [PATCH 2/2] F #3151 update test. --- src/oca/go/src/goca/template_test.go | 2 +- src/oca/go/src/goca/vm_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/oca/go/src/goca/template_test.go b/src/oca/go/src/goca/template_test.go index 8aae4ea0414..f4e187fab2d 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 fa43809d924..1fa0878077b 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 }