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:
parent
49998530c6
commit
17a30188fb
@ -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
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user