-
Notifications
You must be signed in to change notification settings - Fork 23
/
NaServer.patch
43 lines (40 loc) · 1.12 KB
/
NaServer.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
--- lib/puppet/util/network_device/netapp/NaServer.rb.orig 2013-07-22 08:49:06.878678638 +0000
+++ lib/puppet/util/network_device/netapp/NaServer.rb 2013-07-22 08:49:13.902571339 +0000
@@ -18,7 +18,7 @@
include REXML
require 'stringio'
include StreamListener
-require 'NaElement'
+require File.dirname(__FILE__) + "/NaElement"
# Class for managing Network Appliance(r) Storage System
@@ -425,18 +425,24 @@
#
def invoke(api, *args)
- num_parms = args.length
+ num_parms = args.length
if ((num_parms & 1) != 0)
return self.fail_response(13001, "in Zapi::invoke, invalid number of parameters")
- end
+ end
xi = NaElement.new(api)
i = 0
while(i < num_parms)
- key = args[i]
- i = i + 1
- value = args[i]
- i = i + 1
- xi.child_add(NaElement.new(key, value))
+ key = args[i]
+ i = i + 1
+ value = args[i]
+ i = i + 1
+ if value.class == NaElement
+ x = NaElement.new(key)
+ x.child_add(value)
+ xi.child_add(x)
+ else
+ xi.child_add(NaElement.new(key, value))
+ end
end
return invoke_elem(xi)
end