Class: IControl::Management::Partition
- Inherits:
-
Base
- Object
- Base
- IControl::Management::Partition
- Defined in:
- lib/icontrol/management/partition.rb,
lib/icontrol/management.rb,
lib/icontrol/base/icontrol_overlay/management/partition.rb
Overview
The Partition interface enables you to manage AuthZ Administrative Partitions, as well as relationship between users, roles, and their associated partitions.
Defined Under Namespace
Classes: AuthZPartition, AuthZPartitionSequence
Class Method Summary collapse
Instance Method Summary collapse
-
#active_partition ⇒ String
Gets the active partition for the current user.
-
#create_partition ⇒ Object
Creates this AuthZ partition.
- #delete ⇒ Object
-
#delete_all_partitions ⇒ Object
Deletes all AuthZ partition, except for the "Common“ partition.
-
#delete_partition(opts) ⇒ Object
Deletes this AuthZ partition.
-
#partition_list ⇒ AuthZPartition
Gets a list of all AuthZ partition.
-
#set_active_partition(opts) ⇒ Object
Sets the active partition for the current user.
-
#version ⇒ String
Gets the version information for this interface.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class IControl::Base
Class Method Details
.find(partition_name) ⇒ Object
3 4 5 6 |
# File 'lib/icontrol/base/icontrol_overlay/management/partition.rb', line 3 def self.find(partition_name) partition = [*get_partition_list].flatten.select { |i| i.partition_name == partition_name }.first return self.new(:partition_name => partition.partition_name, :description => partition.description) if partition end |
.get_list ⇒ Object
17 18 19 |
# File 'lib/icontrol/base/icontrol_overlay/management/partition.rb', line 17 def self.get_list get_partition_list end |
.set_active_partition(options) ⇒ Object
12 13 14 15 |
# File 'lib/icontrol/base/icontrol_overlay/management/partition.rb', line 12 def self.set_active_partition() [:raw_call] = true return method_missing(:set_active_partition,) end |
Instance Method Details
#active_partition ⇒ String
Gets the active partition for the current user. The active partition is the administrative partition where all configuration will take place until a new active partition is selected. Each user can only be in one active partition at any given time. By default, if not explicitly set, the active partition for a user will be "Common“.
57 58 59 |
# File 'lib/icontrol/management/partition.rb', line 57 def active_partition super end |
#create_partition ⇒ Object
Creates this AuthZ partition.
16 17 18 |
# File 'lib/icontrol/management/partition.rb', line 16 def create_partition super end |
#delete ⇒ Object
8 9 10 |
# File 'lib/icontrol/base/icontrol_overlay/management/partition.rb', line 8 def delete return self.class.delete_partition(:partition_names => partition_name) end |
#delete_all_partitions ⇒ Object
Deletes all AuthZ partition, except for the "Common“ partition.
26 27 28 |
# File 'lib/icontrol/management/partition.rb', line 26 def delete_all_partitions super end |
#delete_partition(opts) ⇒ Object
Deletes this AuthZ partition. It’s recommended that if a partition to be deleted is also the current active partition, the user should change the active partition to something else first (using set_active_partition). Otherwise, in the event that the partition to be deleted is the current active partition, iControl will automatically default the new active partition to the "Common“ partition.
42 43 44 45 |
# File 'lib/icontrol/management/partition.rb', line 42 def delete_partition(opts) opts = check_params(opts,[:partition_names]) super(opts) end |
#partition_list ⇒ AuthZPartition
Gets a list of all AuthZ partition.
68 69 70 |
# File 'lib/icontrol/management/partition.rb', line 68 def partition_list super end |
#set_active_partition(opts) ⇒ Object
Sets the active partition for the current user. The active partition is the administrative partition where all configuration will take place until a new active partition is selected. Each user can only be in one active partition at any given time. By default, if not explicitly set, the active partition for a user will be "Common“.
91 92 93 94 |
# File 'lib/icontrol/management/partition.rb', line 91 def set_active_partition(opts) opts = check_params(opts,[:active_partition]) super(opts) end |
#version ⇒ String
Gets the version information for this interface.
76 77 78 |
# File 'lib/icontrol/management/partition.rb', line 76 def version super end |