Class: Plus4uCodebase::Territory
- Inherits:
-
Object
- Object
- Plus4uCodebase::Territory
- Defined in:
- lib/plus4u_codebase/territory.rb
Class Method Summary collapse
-
.get_hub_list(uu_uri) ⇒ Hash
Get hubs for territory.
-
.get_limits(uu_uri) ⇒ Hash
Get limits for territory.
-
.set_limits(uu_uri, limits) ⇒ void
Sets limits for territory.
Instance Method Summary collapse
-
#get_hub_list(uu_uri) ⇒ Array
Get hubs for territory.
-
#get_limits(uu_uri) ⇒ Hash
Get limits for territory.
-
#initialize(session, options = nil) ⇒ Territory
constructor
Creates a new instance of
Territory
. -
#set_limits(uu_uri, limits) ⇒ void
Sets limits for territory.
Constructor Details
#initialize(session, options = nil) ⇒ Territory
Creates a new instance of Territory
.
12 13 14 |
# File 'lib/plus4u_codebase/territory.rb', line 12 def initialize(session, = nil) @cmd = UU::OS::CMD::CommandClient.new("plus4u-codebase", session, ) end |
Class Method Details
.get_hub_list(uu_uri) ⇒ Hash
Get hubs for territory.
:repository_limit [String] - Maximum repository limit per one hub. :hub_limit [String] - Maximum hub limit in territory. :max_size_limit [String] - Maximum repository size in KB for territory.
115 116 117 118 |
# File 'lib/plus4u_codebase/territory.rb', line 115 def self.get_hub_list(uu_uri) session = UU::OS::Security::Session.current_session self.new(session).get_hub_list(uu_uri) end |
.get_limits(uu_uri) ⇒ Hash
Get limits for territory.
:repository_limit [String] - Maximum repository limit per one hub. :hub_limit [String] - Maximum hub limit in territory. :max_size_limit [String] - Maximum repository size in KB for territory.
80 81 82 83 |
# File 'lib/plus4u_codebase/territory.rb', line 80 def self.get_limits(uu_uri) session = UU::OS::Security::Session.current_session self.new(session).get_limits(uu_uri) end |
.set_limits(uu_uri, limits) ⇒ void
This method returns an undefined value.
Sets limits for territory. You must set greater limits than actual value.
96 97 98 99 |
# File 'lib/plus4u_codebase/territory.rb', line 96 def self.set_limits(uu_uri, limits) session = UU::OS::Security::Session.current_session self.new(session).set_limits(uu_uri, limits) end |
Instance Method Details
#get_hub_list(uu_uri) ⇒ Array
Get hubs for territory.
44 45 46 47 |
# File 'lib/plus4u_codebase/territory.rb', line 44 def get_hub_list(uu_uri) hubs = @cmd.invoke('Territory/getHubList', uu_uri) return hubs.map(&:to_snake_keys) end |
#get_limits(uu_uri) ⇒ Hash
Get limits for territory.
:repository_limit [String] - Maximum repository limit per one hub. :hub_limit [String] - Maximum hub limit in territory. :max_size_limit [String] - Maximum repository size in KB for territory.
31 32 33 34 |
# File 'lib/plus4u_codebase/territory.rb', line 31 def get_limits(uu_uri) limits = @cmd.invoke('Territory/getLimits', uu_uri) return limits.to_snake_keys end |
#set_limits(uu_uri, limits) ⇒ void
This method returns an undefined value.
Sets limits for territory. You must set greater limits than actual value.
61 62 63 64 |
# File 'lib/plus4u_codebase/territory.rb', line 61 def set_limits(uu_uri, limits) limits = limits.to_lower_camel_keys return @cmd.invoke('Territory/setLimits', uu_uri, parameters: {limits: limits}) end |