abiquo-etk 0.4.19 → 0.4.20

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.19
1
+ 0.4.20
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{abiquo-etk}
8
- s.version = "0.4.19"
8
+ s.version = "0.4.20"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Sergio Rubio"]
@@ -75,6 +75,33 @@ if ARGV[0] == 'set'
75
75
  config_set_node(f, 'hypervisors/xenserver/abiquoRepository', val, true)
76
76
  end
77
77
  end
78
+
79
+ def set_ontap_server_ip(val)
80
+ f = ABIQUO_BASE_DIR + '/ontap/tomcat/webapps/ROOT/WEB-INF/classes/config.xml'
81
+ if File.exist? f
82
+ config_set_node(f, 'filer/host', val, true)
83
+ else
84
+ $stderr.puts "NetApp Ontap Connector not installed. Ignoring the order."
85
+ end
86
+ end
87
+
88
+ def set_ontap_user(val)
89
+ f = ABIQUO_BASE_DIR + '/ontap/tomcat/webapps/ROOT/WEB-INF/classes/config.xml'
90
+ if File.exist? f
91
+ config_set_node(f, 'filer/user', val, true)
92
+ else
93
+ $stderr.puts "NetApp Ontap Connector not installed. Ignoring the order."
94
+ end
95
+ end
96
+
97
+ def set_ontap_password(val)
98
+ f = ABIQUO_BASE_DIR + '/ontap/tomcat/webapps/ROOT/WEB-INF/classes/config.xml'
99
+ if File.exist? f
100
+ config_set_node(f, 'filer/password', val, true)
101
+ else
102
+ $stderr.puts "NetApp Ontap Connector not installed. Ignoring the order."
103
+ end
104
+ end
78
105
 
79
106
  $command_mappings = {
80
107
  'event-sink-url' => ['server', 'eventSinkAddress'],
@@ -89,7 +116,10 @@ if ARGV[0] == 'set'
89
116
  'storagelink-password' => ['virtualfactory', 'storagelink/password'],
90
117
  'database-host' => Proc.new { |val| set_database_host(val) },
91
118
  'database-user' => Proc.new { |val| set_database_user(val) },
92
- 'database-password' => Proc.new { |val| set_database_password(val) }
119
+ 'database-password' => Proc.new { |val| set_database_password(val) },
120
+ 'ontap-user' => Proc.new { |val| set_ontap_user(val) },
121
+ 'ontap-password' => Proc.new { |val| set_ontap_password(val) },
122
+ 'ontap-server-ip' => Proc.new { |val| set_ontap_server_ip(val) }
93
123
  }
94
124
 
95
125
  def mapping_exist?(key)
@@ -101,7 +131,11 @@ if ARGV[0] == 'set'
101
131
  end
102
132
 
103
133
  def help
134
+ puts "\nSet Abiquo Platform properties\n\n"
104
135
  puts "Available subcommands:"
136
+ $command_mappings.keys.sort.each do |cmd,proc|
137
+ puts " #{cmd}"
138
+ end
105
139
  end
106
140
 
107
141
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abiquo-etk
3
3
  version: !ruby/object:Gem::Version
4
- hash: 41
4
+ hash: 39
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 19
10
- version: 0.4.19
9
+ - 20
10
+ version: 0.4.20
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergio Rubio