267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
|
# File 'lib/puppet/util/hpe3par_api.rb', line 267
def modify_qos_rules(target_name, target_type = QoStargetTypeConstants::VVSET, priority = nil,
bwMinGoalKB = nil, bwMaxLimitKB = nil, ioMinGoal= nil, ioMaxLimit = nil,
bwMinGoalOP = nil, bwMaxLimitOP = nil, ioMinGoalOP = nil, ioMaxLimitOP = nil,
latencyGoal = nil, defaultLatency = nil, enable = nil, latencyGoaluSecs = nil, debug = false)
cl = Hpe3parSdk::Client.new(@rest_url, debug: debug)
qos_rules = {
:bwMinGoalKB => bwMinGoalKB,
:bwMaxLimitKB => bwMaxLimitKB,
:ioMinGoal => ioMinGoal,
:ioMaxLimit => ioMaxLimit,
:latencyGoal => latencyGoal,
:defaultLatency => defaultLatency,
:enable => enable,
:latencyGoaluSecs => latencyGoaluSecs
}
unless priority.nil?
qos_rules[:priority] = Hpe3parSdk::QoSpriorityEnumeration.const_get(priority)
end
unless bwMinGoalOP.nil?
qos_rules[:bwMinGoalOP] = Hpe3parSdk::QosZeroNoneOperation.const_get(bwMinGoalOP)
end
unless bwMaxLimitOP.nil?
qos_rules[:bwMaxLimitOP] = Hpe3parSdk::QosZeroNoneOperation.const_get(bwMaxLimitOP)
end
unless ioMinGoalOP.nil?
qos_rules[:ioMinGoalOP] = Hpe3parSdk::QosZeroNoneOperation.const_get(ioMinGoalOP)
end
unless ioMaxLimitOP.nil?
qos_rules[:ioMaxLimitOP] = Hpe3parSdk::QosZeroNoneOperation.const_get(ioMaxLimitOP)
end
begin
cl.login(@url.user, @url.password)
cl.modify_qos_rules(target_name, qos_rules, Hpe3parSdk::QoStargetTypeConstants.const_get(target_type))
ensure
cl.logout
end
end
|