pyfos_brocade_security
- PyFOS module to provide REST support forsystem security.¶
The pyfos_brocade_security
module provides REST support for system security.
-
class
pyfos_brocade_security.
auth_spec
(dictvalues={})¶ - This class configures the authentication mode and displays
- the authentication mode configuration.
Important Class Members:
Attribute Name Description Frequently Used Methods authentication-mode The authentication mode for RADIUS, TACACS+, and LDAP. set_authentication_mode()
peek_authentication_mode()
activate-no-log-out A change in the authentication mechanism. set_activate_no_log_out()
peek_activate_no_log_out()
primary-auth-log-messages The log messages for authentication failure. set_primary_auth_log_messages()
peek_primary_auth_log_messages()
Object Methods
-
static
get
(session, name=None)¶ - Returns a
auth_spec
object with authentication - configuration attributes.
Each object can be printed using
pyfos_util.response_print()
and individual attributes can be accessed through peek methods.Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: The auth_spec
object or dictionary in case of error.- Returns a
-
patch
(session)¶ Replaces an existing configuration authentication mode. The required fields are set within the object using the attribute’s set method. This method is used to modify the existing authentication mode configuration.
Example Usage of the Method to Configure the Response radiuslocal:
# initialize the switch object server_info = pyfos_brocade_security.auth_spec() # set the mode of authentication server_info.set_authentication_mode("radiuslocal") # execute HTTP patch command to apply the object to the # switch connected through session server_info.patch(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
Attribute Methods
-
set_authentication_mode
(mode)¶ Sets the authentication mode in the object.
Parameters: mode – The authentication mode to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_authentication_mode
()¶ Reads the authentication mode from the object.
Return type: A dictionary in case of error or a success response.
-
set_activate_no_log_out
(bool)¶ Sets the authentication mechanism to enable or disable in the object.
Parameters: bool – The authentication mechanism to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_activate_no_log_out
()¶ Reads the authentication mechanism from the object.
Return type: A dictionary in case of error or a success response.
-
set_primary_auth_log_messages
(bool)¶ Enables or disables log messages in the object.
Parameters: bool – The log message enabled or disabled within the object. Return type: A dictionary in case of error or a success response.
-
peek_primary_auth_log_messages
()¶ Reads the log message status from the object.
Return type: A dictionary in case of error or a success response.
-
class
pyfos_brocade_security.
ipfilter_policy
(dictvalues={})¶ - This class provides the ipfilter policy information and also can
- configure the ipfilter policies.
Important Class Members:
Attribute Name Description Frequently Used Methods name The policy name. set_name()
peek_name()
ip-version - The policy IP version
- (IPv4/IPv6).
set_ip_version()
peek_ip_version()
is-policy-active Indicates the status of the policy (Active/Defined). peek_is_policy_active()
is-default-policy Indicates the default or user defined policy. peek_is_default_policy()
action The IPfilter action (commit, save, activate, and clone). set_action()
clone-destination-policy-name The destination policy name when using the clone action. set_clone_destination_policy_name()
peek_clone_destination_policy_name()
Object Methods
-
static
get
(session)¶ - Returns a
ipfilter_policy
object with the IPfilter - policy attributes.
Each object can be printed using
pyfos_util.response_print()
and individual attributes are accessed through peek methods.Example Usage of the Method to Get IP Filter Policies:
# initialize the switch object ipfilter_obj=pyfos_brocade_security.ipfilter_policy.get(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: The ipfilter_policy
object if a name is given or a list of objects if there are more than one. A dictionary in case of error.- Returns a
-
post
(session)¶ Creates an IP filter policy entry. The required fields are set within the object using attribute’s set method. This method is used to create a new IP filter policy configuration.
Example Usage of the Method to Configure a New IP filter Policy:
# initialize the switch object ipfilter_obj = pyfos_brocade_security.ipfilter_policy() # set the policy name ipfilter_obj.set_name("mypolicy") # set the ip version ipfilter_obj.set_ip_version("IPv4") # execute HTTP post command to apply the object to the # switch connected through session ipfilter_obj.post(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
patch
(session)¶ The required fields are set within the object using attribute’s set method. This method is used to perform actions such as commit, save, activate the policy, and clone.
Example Usage of the Method to Clone an IP Filter Policy:
# initialize the switch object ipfilter_info = pyfos_brocade_security.ipfilter_policy() # set the action to perform ipfilter_info.set_action("clone") # set the source policy name ipfilter_info.set_name("default_ipv4") # set the destination policy name ipfilter_info.set_clone_destination_policy_name("myclone") # execute HTTP patch command to apply the object to the # switch connected through session ipfilter_info.patch(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
delete
(session)¶ Deletes an IP filter policy. The required fields are set within the object using attribute’s set method. This method is used to delete an IP filter policy configuration.
Example Usage of the Method to Delete an IP Filter Policy configuration:
# initialize the switch object ipfilter_obj = pyfos_brocade_security.ipfilter_policy() # set the policy name to delete ipfilter_obj.set_name("mypolicy") # execute HTTP delete command to apply the object to the # switch connected through session ipfilter_obj.delete(session)
Attribute Methods
-
set_name
(name)¶ Sets policy name in the object.
Parameters: name – The policy name to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_name
()¶ Reads the IP filter policy name from the object.
Return type: A dictionary in case of error or a success response.
-
set_ip_version
(version)¶ Sets the policy IP version in the object.
Parameters: version – The policy IP version (IPv4/IPv6) to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_ip_version
()¶ Reads the policy IP version from the object.
Return type: A dictionary in case of error or a success response.
-
peek_is_policy_active
()¶ Reads the status of the policy from the object.
Return type: A dictionary in case of error or a success response.
-
peek_is_default_policy
()¶ Reads whether it is a default or user-defined policy from the object.
Return type: A dictionary in case of error or a success response.
-
set_action
(ops)¶ Sets the action to perform in the object.
Parameters: ops – The IP filter action to be set within the object supported operations: clone, save, activate and commit-and-activate. Return type: A dictionary in case of error or a success response.
-
set_clone_destination_policy_name
("myclone")¶ Sets the destination policy name for the clone action in the object.
Return type: A dictionary in case of error or a success response.
-
peek_clone_destination_policy_name
()¶ Reads the destination policy name from the object.
Return type: A dictionary in case of error or a success response.
-
class
pyfos_brocade_security.
ipfilter_rule
(dictvalues={})¶ - This class provides the IP filter rule information and also can configure
- an IP filter rule.
Important Class Members:
Attribute Name Description Frequently Used Methods policy-name The policy name. set_policy_name()
peek_policy_name()
index The rule number. set_index()
peek_index()
source-ip The source IP address. set_source_ip()
peek_source_ip()
destination-start-port The destination start port. set_destination_start_port()
peek_destination_start_port()
destination-end-port The destination end port. set_destination_end_port()
peek_destination_end_port()
protocol The protocol type. set_protocol()
peek_protocol()
permission The permission (permitor deny). set_permission()
peek_permission()
traffic-type The traffic type (INPUT or FORWARD). set_traffic_type()
peek_traffic_type()
destination-ip The destination IP address. set_destination_ip()
peek_destination_ip()
Object Methods
-
static
get
(session, name=None)¶ - Returns a
ipfilter_rule
object filled with IP filter - rule attributes.
Each object can be printed using
pyfos_util.response_print()
and individual attributes can be accessed through peek methods.Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A ipfilter_rule
object or a dictionary in case of error.- Returns a
-
post
(session)¶ Creates an IP filter rule entry. The required fields are set within the object using attribute’s set method. This method is used to create a new IP filter rule.
Example Usage of the Method to Configure a New IP Filter Rule:
# initialize the switch object ipfilter_obj = pyfos_brocade_security.ipfilter_rule() # set the policy name ipfilter_obj.set_policy_name("mypolicy") # set the ip version ipfilter_obj.set_index(1) ipfilter_obj.set_source_ip(<IP_ADDRESS>) ipfilter_obj.set_destination_start_port(23) ipfilter_obj.set_protocol(tcp) ipfilter_obj.set_permission("permit") # execute HTTP post command to apply the object to the # switch connected through session ipfilter_obj.post(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
delete
(session)¶ Deletes an IP filter rule. The required fields are set within the object using attribute’s set method. This method is used to delete an IP filter rule configuration.
Example Usage of the Method to Delete an IP Filter Rule configuration:
# initialize the switch object ipfilter_obj = pyfos_brocade_security.ipfilter_rule() # set the policy name to delete ipfilter_obj.set_policy_name("mypolicy") ipfilter_obj.set_index(1) # execute HTTP delete command to apply the object to the # switch connected through session ipfilter_obj.delete(session)
Attribute Methods
-
set_policy_name
(name)¶ Sets the policy name in the object.
Parameters: name – The policy name to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_policy_name
()¶ Reads the IP filter policy from the object.
Return type: A dictionary in case of error or a success response.
-
set_index
(index)¶ Sets the rule number in the object.
Parameters: index – The rule number to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_index
()¶ Reads the rule number from the object.
Return type: A dictionary in case of error or a success response.
-
set_source_ip
(ip)¶ Sets the source IP address in the object.
Parameters: ip – The source IP address to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_source_ip
()¶ Reads the source IP address from the object.
Return type: A dictionary in case of error or a success response.
-
set_destination_start_port
(port)¶ Sets the destination start port in the object.
Parameters: port – The destination start port to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_destination_start_port
()¶ Reads the destination start port from the object.
Return type: A dictionary in case of error or a success response.
-
set_destination_end_port
(port)¶ Sets the destination end port in the object.
Parameters: port – The destination end port to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_destination_end_port
()¶ Reads the destination end port from the object.
Return type: A dictionary in case of error or a success response.
-
set_protocol
(type)¶ Sets the protocol type in the object.
Parameters: type – The protocol type to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_protocol
()¶ Reads the protocol type from the object.
Return type: A dictionary in case of error or a success response.
-
set_permission
(type)¶ Sets the permission type in the object.
Parameters: type – The permission type to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_permission
()¶ Reads the permission type from the object.
Return type: A dictionary in case of error or a success response.
-
set_traffic_type
(type)¶ Sets the traffic type in the object.
Parameters: type – The traffic type to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_traffic_type
()¶ Reads the traffic type from the object.
Return type: A dictionary in case of error or a success response.
-
set_destination_ip
(ip)¶ Sets the destination IP address in the object.
Parameters: ip – The destination IP address to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_destination_ip
()¶ Reads the destination IP address from the object.
Return type: A dictionary in case of error or a success response.
-
class
pyfos_brocade_security.
ldap_role_map
(dictvalues={})¶ Class of LDAP Role mapping configuration.
Important Class Members:
Attribute Name Description Frequently Used Methods ldap-role The LDAP role to be mapped to a switch role. set_ldap_role()
peek_ldap_role()
switch-role The switch role to which the LDAP role is mapped. set_switch_role()
peek_switch_role()
home-virtual-fabric The home VF ID. set_home_virtual_fabric()
peek_home_virtual_fabric()
chassis-access-role The chassis-level role. set_chassis_access_role()
peek_chassis_access_role()
Object Methods
-
get
(session)¶ Returns a :class`ldap_role_map` object with values for all the attributes. The object can be printed using
pyfos_utils.response_print()
.Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or an ldap_role_map
object.
-
post
(session)¶ Creates an entry. The required fields are set within the object using attribute’s set method. This command is used to create an ldap_map_role.
Example Usage of the Method to Create a New Configuration:
ldap_cfg_obj = pyfos_ldapcfg.ldap_role_map() ldap_cfg_obj.set_ldap_role("ldapRole") ldap_cfg_obj.set_switch_role("switchRole") ldap_cfg_obj.post(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
patch
()¶ Modifies an LDAP configuration such as vf-list, vf-role-list, and so on. The required fields are set within the object using the attribute’s set method.
Example Usage of the Method to Modify an Existing LDAP Role Configuration:
ldap_cfg_obj = pyfos_ldapcfg.ldap_role_map() ldap_cfg_obj.set_ldap_role("ldapRole") ldap_cfg_obj.set_chassis_access_role("admin") ldap_cfg_obj.set_home_virtual_fabric(128) ldap_cfg_obj.patch(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
delete
()¶ Deletes an LDAP role mapping. The required fields are set within the object using attribute’s set method. This command is used to delete an LDAP role mapping.
Example Usage of the Method to Delete an Existing LDAP Role Map:
ldap_cfg_obj = pyfos_ldapcfg.ldap_role_map() ldap_cfg_obj.set_ldap_role("ldapRole") ldap_cfg_obj.delete(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
Attribute Methods
-
set_ldap_role
(role)¶ Sets the LDAP role in the object
param role: The LDAP role to be mapped to a switch role. rtype: A dictionary in case of error or a success response.
-
peek_ldap_role
()¶ Reads the LDAP role from the object.
Return type: None or ldap_role.
-
set_switch_role
(role)¶ - Sets the switch role in the object.
Parameters: role – The switch role to which the LDAP role is mapped. Return type: A dictionary in case of error or a success response.
-
peek_switch_role
()¶ Reads the switch role from the object.
Return type: None or switch_role.
-
set_home_virtual_fabric
(fcid)¶ - Sets the home virtual fabric in the object.
Parameters: fcid – The default virtual fabric switch context. Return type: A dictionary in case of error or a success response.
-
peek_home_virtual_fabric
()¶ Reads the home virtual fabric from the object.
Return type: None or home_virtual_fabric.
-
set_chassis_access_role
(role)¶ - Sets the chassis access role in the object.
Parameters: role – The chassis level role. Return type: A dictionary in case of error or a success response.
-
peek_chassis_access_role
()¶ Reads the chassis access role from the object.
Return type: None or chassis_access_role.
-
-
class
pyfos_brocade_security.
ldap_server
(dictvalues={})¶ - This class is used to add, change, read, and delete AAA
- LDAP server configuration.
Important Class Members:
Attribute Name Description Frequently Used Methods server The LDAP server IP/FQDN. set_server()
peek_server()
port The LDAP server port. set_port()
peek_port()
timeout The LDAP server response timeout. set_timeout()
peek_timeout()
domain The LDAP server domain name. set_domain()
peek_domain()
position The LDAP server position. set_position()
peek_position()
Object Methods
-
static
get
(session, name=None)¶ - Returns a
ldap_server
object with LDAP Server - attributes.
Each object can be printed using
pyfos_util.response_print()
and individual attributes can be accessed through peek methods.Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: The ldap_server
object, if a name is provided, or a list of objects if there is more than one. A dictionary in case of error.- Returns a
-
post
(session)¶ Creates an LDAP server entry. The required fields are set within the object using the attribute’s set method. This method is used to create a new LDAP server configuration for AAA authentication to the switch.
Example Usage of the Method to Configure a New AAA LDAP Server:
# initialize the switch object ldap_obj = pyfos_brocade_security.ldap_server() # set the server FQDN/ip ldap_obj.set_server("<IP_ADDRESS>") # execute HTTP post command to apply the object to the # switch connected through session ldap_obj.post(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
patch
(session)¶ Edits an existing configuration. The required fields are set within the object using the attribute’s set method. This method is used to modify the existing LDAP server configuration.
Example Usage of the Method to Configure the Response Timeout:
# initialize the switch object ldap_info = pyfos_brocade_security.ldap_server() # set the server FQDN/ip ldap_info.set_server(name) # set the response timeout 10 ldap_info.set_timeout(10) # execute HTTP patch command to apply the object to the # switch connected through session ldap_info.patch(session)
Below is an Example of Combining Object Initialization and Attribute Sets:
# set the payload ldap_info = pyfos_brocade_security.ldap_server( {"server" : <IP_ADDRESS>, "timeout" : 10}) result = ldap_info.patch(session) pyfos_util.response_print(result)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
delete
(session)¶ Deletes an LDAP server entry. The required fields are set within the object using the attribute’s set method. This method is used to delete an LDAP server configuration.
Example Usage of the Method to Delete an LDAP Configuration:
# initialize the switch object ldap_obj = pyfos_brocade_security.ldap_server() # set the server FQDN/ip ldap_obj.set_server("<IP_ADDRESS>") # execute HTTP delete command to apply the object to the # switch connected through session ldap_obj.delete(session)
Attribute Methods
-
set_server
(name)¶ Sets the LDAP name in the object.
Parameters: name – The LDAP FQDN/IP to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_server
()¶ Reads the LDAP server from the object.
Return type: A dictionary in case of error or a success response.
-
set_port
(number)¶ Sets the LDAP server port number in the object.
Parameters: number – The LDAP server port number to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_port
()¶ Reads the LDAP server port number from the object.
Return type: A dictionary in case of error or a success response.
-
set_timeout
(value)¶ Sets the LDAP server response timeout value in the object.
Parameters: value – The LDAP server timeout value to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_timeout
()¶ Reads the LDAP server timeout from the object.
Return type: A dictionary in case of error or a success response.
-
set_domain
(domain)¶ Sets the LDAP server domain name in the object.
Parameters: domain – The LDAP server domain name to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_domain
()¶ Reads the LDAP server domain name from the object.
Return type: A dictionary in case of error or a success response.
-
set_position
(pos)¶ Sets the LDAP server position in the object.
Parameters: pos – The LDAP server position to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_position
()¶ Reads the LDAP server position from the object.
Return type: A dictionary in case of error or a success response.
-
class
pyfos_brocade_security.
password
(dictvalues={})¶ This class provides methods to change password.
Important Class Members:
Attribute Name Description Frequently Used Methods - user-name | The name of the user to change password.
set_user_name()
peek_user_name()
- old-password | The current password.
set_old_password()
peek_old_password()
- new-password | The new password.
set_new_password()
peek_new_password()
Object Methods
-
patch
()¶ Replaces entry members. The fields are set within the object using attribute’s set method. This command is used to change a user password.
Example Usage of the Method to Change a Password:
passwd_obj = pyfos_brocade_security.password() passwd_obj.change_password(username) passwd_obj.patch(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
Attribute Methods
-
change_password
(username, old_password, new_password)¶ Changes the password for the specified user.
Parameters: username – Changes the password. Return type: A dictionary in case of error or a success response.
-
class
pyfos_brocade_security.
password_cfg
(dictvalues={})¶ - Class of password configuration.
- Important Class Members:
Attribute Name Description Frequently Used Methods minimum-length The minimum length of the password. set_minimum_length()
peek_minimum_length()
character-set The minimum criteria on the character set. set_character_set()
peek_character_set()
user-name-allowed Enable or disable username is allowed in the password. set_user_name_allowed()
peek_user_name_allowed()
minimum-lower-case-character The minimum number of lowercase alphabetic characters. set_minimum_lower_case_character()
peek_minimum_lower_case_character()
minimum-upper-case-character The minimum number of uppercase alphabetic characters. set_minimum_upper_case_character()
peek_minimum_upper_case_character()
minimum-numeric-character The minimum number of digits. set_minimum_numeric_character()
peek_minimum_numeric_character()
minimum-special-character The minimum number of punctuation characters. set_minimum_special_character()
peek_minimum_special_character()
past-password-history The number of past password values that are disallowed. set_past_password_history()
peek_past_password_history()
minimum-password-age The minimum number of days before which a password cannot be modified. set_minimum_password_age()
peek_minimum_password_age()
maximum-password-age The maximum number of days after which the password should be modified. set_maximum_password_age()
peek_maximum_password_age()
warn-on-expire The number of days prior to password expiration when the user should be warned. set_warn_on_expire()
peek_warn_on_expire()
lock-out-threshold The number of time user can give the incorrect password. set_lock_out_threshold()
peek_lock_out_threshold()
lock-out-duration The lockout duration in minutes. set_lock_out_duration()
peek_lock_out_duration()
admin-lock-out-enabled Enables or disables admin lockout. set_admin_lock_out_enabled()
peek_admin_lock_out_enabled()
repeat-character-limit The length of the character sequences. set_repeat_character_limit()
peek_repeat_character_limit()
sequence-character-limit The length of sequential character sequences. set_sequence_character_limit()
peek_sequence_character_limit()
password-config-changed Indicates whether it is the account default configuration. peek_password_config_changed()
reverse-user-name-allowed Allows or disallows the reverse username in the password. set_reverse_user_name_allowed()
peek_reverse_user_name_allowed()
hash-type The hash type. set_hash_type()
peek_hash_type()
manual-hash-enabled Enables or disables manual hash. set_manual_hash_enabled()
peek_manual_hash_enabled()
enforce-expire Expires the password for the user. set_enforce_expire()
peek_enforce_expire()
minimum-difference The number of character differences expected between the old and new password. set_minimum_difference()
peek_minimum_difference()
password-action The password configuration action. set_password_action()
- Object Methods
-
get
(session)¶ Returns a :class`password_cfg` object with values for all the attributes. The object can be printed using
pyfos_utils.response_print()
.Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a password_cfg
object.
-
patch
()¶ Modifies the password configuration. The required fields are set within the object using attribute’s set method.
Example Usage of the Method to Modify the Global Password Configuration:
password_obj = pyfos_password_cfg.password_cfg() password_obj.set_password_action("global-config") password_obj.set_minimum_length(10) password_obj.set_user_name_allowed(0) password_obj.patch(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
delete
(session)¶ Deletes a user-defined password configuration. The fields are set within the object using attribute’s set method. This command is used to delete a password configuration.
Example Usage of the Method to Delete a Password Configuration:
password_obj = pyfos_password_cfg.password_cfg() password_obj.set_password_action("delete-all") password_obj.delete(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
Attribute Methods
-
set_minimum_length
(length)¶ - Sets the minimum length of the password in the object.
Parameters: length – The minimum length of the password. Return type: A dictionary in case of error or a success response.
-
peek_minimum_length
()¶ Reads the minimum length of the password from the object.
Return type: A dictionary in case of error or a success response.
-
set_character_set
(criteria)¶ - Sets the minimum criteria for the password of the object.
Parameters: criteria – The minimum criteria on the password. Return type: A dictionary in case of error or a success response.
-
peek_minimum_length
() Reads the minimum criteria from the object.
Return type: A dictionary in case of error or a success response.
-
set_user_name_allowed
(bool)¶ - Sets whether enabling or disabling the username is allowed on the object.
Parameters: bool – Whether enabling or disabling the username is allowed. Return type: A dictionary in case of error or a success response.
-
peek_user_name_allowed
()¶ Reads whether the username is allowed in password from the object.
Return type: A dictionary in case of error or a success response.
-
set_minimum_lower_case_character
(number)¶ - Sets the minimum lowercase characters to the object.
Parameters: number – The minimum number of lowercase characters. Return type: A dictionary in case of error or a success response.
-
peek_minimum_lower_case_character
()¶ Reads the minimum number of lowercase characters from the object.
Return type: A dictionary in case of error or a success response.
-
set_minimum_upper_case_character
(number)¶ - Sets minimum uppercase character to the object
Parameters: number – minimum number of uppercase character Return type: A dictionary in case of error or a success response.
-
peek_minimum_upper_case_character
()¶ Reads minimum number of uppercase character from the object.
Return type: A dictionary in case of error or a success response.
-
set_minimum_numeric_character
(number)¶ - Sets the minimum digits to the object.
Parameters: number – The minimum number of digits. Return type: A dictionary in case of error or a success response.
-
peek_minimum_numeric_character
()¶ Reads the minimum number of digits from the object.
Return type: A dictionary in case of error or a success response.
-
set_minimum_special_character
(number)¶ - Sets the minimum punctuation characters to the object.
Parameters: number – The minimum number of punctuation characters. Return type: A dictionary in case of error or a success response.
-
peek_minimum_special_character
()¶ Reads the minimum number of punctuation characters from the object.
Return type: A dictionary in case of error or a success response.
-
set_past_password_history
(number)¶ - Sets the number of past passwords disallowed to the object.
Parameters: number – The number of past passwords disallowed. Return type: A dictionary in case of error or a success response.
-
peek_past_password_history
()¶ Reads the number of past passwords disallowed from the object.
Return type: A dictionary in case of error or a success response.
-
set_minimum_password_age
(number)¶ - Sets the minimum number of days that must elapse before a password can be changed.
Parameters: number – The minimum number of days that must elapse before a password can be changed. Return type: A dictionary in case of error or a success response.
-
peek_minimum_password_age
()¶ Reads the minimum number of days that must elapse before a password can be changed.
Return type: A dictionary in case of error or a success response.
-
set_maximum_password_age
(number)¶ - Sets the maximum number of days that can elapse before a password can be changed.
Parameters: number – The maximum number of days that can elapse before a password can be changed. Return type: A dictionary in case of error or a success response.
-
peek_maximum_password_age
()¶ Reads the maximum number of days that can elapse before a password can be changed.
Return type: A dictionary in case of error or a success response.
-
set_warn_on_expire
(number)¶ - Sets the number of days prior to password expiration to the object.
Parameters: number – The number of days prior to password expiration. Return type: A dictionary in case of error or a success response.
-
peek_warn_on_expire
()¶ Reads the number of days prior to password expiration from the object.
Return type: A dictionary in case of error or a success response.
-
set_lock_out_threshold
(times)¶ - Sets the number of times a user can specify an incorrect password to the object.
Parameters: times – The number of times a user can specify an incorrect password. Return type: A dictionary in case of error or a success response.
-
peek_lock_out_threshold
()¶ Reads the number of times a user can specify an incorrect password from the object.
Return type: A dictionary in case of error or a success response.
-
set_lock_out_duration
(times)¶ - Sets the time, in minutes, after which a previously locked account automatically unlocks to the object.
Parameters: times – The time, in minutes, after which a previously locked account automatically unlocks. Return type: A dictionary in case of error or a success response.
-
peek_lock_out_duration
()¶ Reads time, in minutes, after which a previously locked account automatically unlocks from the object.
Return type: A dictionary in case of error or a success response.
-
set_admin_lock_out_enabled
(bool)¶ - Enables or disables admin lockout to the object.
Parameters: bool – Enable or disable admin lockout. Return type: A dictionary in case of error or a success response.
-
peek_admin_lock_out_enabled
()¶ Reads the admin lockout status from the object.
Return type: A dictionary in case of error or a success response.
-
set_repeat_character_limit
(length)¶ - Sets the length of repeated character sequences to the object.
Parameters: length – The length of repeated character sequences. Return type: A dictionary in case of error or a success response.
-
peek_repeat_character_limit
(length)¶ Reads the length of repeated character sequences from the object.
Return type: A dictionary in case of error or a success response.
-
set_sequence_character_limit
(length)¶ - Sets the length of sequential character sequences to the object.
Parameters: length – The length of sequential character sequences. Return type: A dictionary in case of error or a success response.
-
peek_sequence_character_limit
()¶ Reads the length of sequential character sequences from the object.
Return type: A dictionary in case of error or a success response.
-
peek_password_config_changed
()¶ Reads the status of the user-defined configuration or the default configuration from the object.
Return type: A dictionary in case of error or a success response.
-
set_reverse_user_name_allowed
(bool)¶ - Enables or disables use of reverse username in the password to the object.
Parameters: bool – Enables or disables use of reverse username. Return type: A dictionary in case of error or a success response.
-
peek_reverse_user_name_allowed
()¶ Reads the status of reverse username allowed from the object.
Return type: A dictionary in case of error or a success response.
-
set_hash_type
(hash)¶ - Sets the hash type to the object.
Parameters: hash – The hash type for the password. Return type: A dictionary in case of error or a success response.
-
peek_hash_type
()¶ Reads the hash type from the object.
Return type: A dictionary in case of error or a success response.
-
set_manual_hash_enabled
(bool)¶ - Enables or disables manual hash to the object.
Parameters: bool – Enables or disables manual hash type change. Return type: A dictionary in case of error or a success response.
-
peek_manual_hash_enabled
()¶ Reads the status of the manual hash type change from the object.
Return type: A dictionary in case of error or a success response.
-
set_enforce_expire
(bool)¶ - Enables or disables password expiration for the user to the object.
Parameters: bool – Enables or disables password expiration. Return type: A dictionary in case of error or a success response.
-
peek_enforce_expire
()¶ Reads the status of password expiration for the user from the object.
Return type: A dictionary in case of error or a success response.
-
set_password_action
(ops)¶ - Sets the password action to be performed to the object.
Parameters: ops – The password action to be performed. Return type: A dictionary in case of error or a success response.
-
set_minimum_difference
(value)¶ - Sets the minimum difference expected between the old and new password.
Parameters: value – The minimum difference between old and new passwords. Return type: A dictionary in case of error or a success response.
-
peek_minimum_difference
()¶ Reads the value of the minimum difference between old and new passwords from the object.
Return type: A dictionary in case of error or a success response.
-
class
pyfos_brocade_security.
radius_server
(dictvalues={})¶ - This class is used to add, change, read, and delete an AAA
- RADIUS server configuration.
Important Class Members:
Attribute Name Description Frequently Used Methods server The RADIUS server IP/FQDN. set_server()
peek_server()
port The RADIUS server port. set_port()
peek_port()
secret The secret between the switch and the server. set_secret()
peek_secret()
timeout The RADIUS server response timeout. set_timeout()
peek_timeout()
authentication The authentication protocol. set_authentication()
peek_authentication()
encryption-type The encryption type. set_encryption_type()
peek_encryption_type()
position The RADIUS server position. set_position()
peek_position()
Object Methods
-
static
get
(session, name=None)¶ - Returnss a
radius_server
object with the RADIUS server - attributes.
Each object can be printed using
pyfos_util.response_print()
and individual attributes can be accessed through peek methods.Parameters: session – The session handler returned by the pyfos_auth.login()
.Return type: The radius_server
object, if a name is provided, or a list of objects if there is more than one. A dictionary in case of error.- Returnss a
-
post
(session)¶ Creates a RADIUS server entry. The required fields are set within the object using the attribute’s set method. This method is used to create a new RADIUS server configuration for AAA authentication to a switch.
Example Usage of the Method to Configure a New AAA RADIUS Server:
# initialize the switch object radius_obj = pyfos_brocade_security.radius_server() # set the server FQDN/ip radius_obj.set_server("<IP_ADDRESS>") # execute HTTP post command to apply the object to the # switch connected through session radius_obj.post(session)
Parameters: session – The session handler returned by the pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
patch
(session)¶ Edits an existing configuration. The required fields are set within the object using the attribute’s set method. This method is used to modify the existing RADIUS server configuration.
Example Usage of the Method to Configure Response Timeout:
# initialize the switch object radius_info = pyfos_brocade_security.radius_server() # set the server FQDN/ip radius_info.set_server(name) # set the response timeout 10 radius_info.set_timeout(10) # execute HTTP patch command to apply the object to the # switch connected through session radius_info.patch(session)
Below is an Example of Combining Object Initialization and Attribute Sets:
# set the payload radius_info = pyfos_brocade_security.radius_server( {"server" : <IP_ADDRESS>, "timeout" : 10}) result = radius_info.patch(session) pyfos_util.response_print(result)
Parameters: session – The session handler returned by the pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
delete
(session)¶ Deletes a RADIUS server entry. The required fields are set within the object using attribute’s set method. This method is used to delete a RADIUS server configuration.
Example Usage of the Method to Delete a RADIUS Configuration:
# initialize the switch object radius_obj = pyfos_brocade_security.radius_server() # set the server FQDN/ip radius_obj.set_server("<IP_ADDRESS>") # execute HTTP delete command to apply the object to the # switch connected through session radius_obj.delete(session)
Attribute Methods
-
set_server
(name)¶ Sets the RADIUS server name in the object.
Parameters: name – The RADIUS server FQDN/IP to be set within the object Return type: A dictionary in case of error or a success response.
-
peek_server
()¶ Reads the RADIUS server from the object.
Return type: A dictionary in case of error or a success response.
-
set_port
(number)¶ Sets the RADIUS server port number in the object.
Parameters: number – The RADIUS server port number to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_port
()¶ Reads the RADIUS server port number from the object.
Return type: A dictionary in case of error or a success response.
-
set_secret
(secret)¶ Sets the RADIUS server secret in the object.
Parameters: secret – The RADIUS server secret to be set within the object Return type: A dictionary in case of error or a success response.
-
peek_secret
()¶ Reads the RADIUS server secret from the object.
Return type: A dictionary in case of error or a success response.
-
set_timeout
(value)¶ Sets the RADIUS server response timeout value in the object.
Parameters: value – The RADIUS server timeout value to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_timeout
()¶ Reads the RADIUS server timeout from the object.
Return type: A dictionary in case of error or a success response.
-
set_authentication
(protocol)¶ Sets the RADIUS server authentication protocol type in the object.
Parameters: protocol – The RADIUS server authentication protocol type to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_authentication
()¶ Reads the RADIUS server authentication protocol type from the object.
Return type: A dictionary in case of error or a success response.
-
set_encryption_type
(encrypt)¶ Sets the RADIUS server encryption type in the object.
Parameters: encrypt – The RADIUS server encryption type to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_encryption_type
()¶ Reads the RADIUS server encryption type from the object.
Return type: A dictionary in case of error or a success response.
-
set_position
(pos)¶ Sets the RADIUS server position in the object.
Parameters: pos – The RADIUS server position to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_position
()¶ Reads the RADIUS server position from the object.
Return type: A dictionary in case of error or a success response.
-
class
pyfos_brocade_security.
sec_crypto_cfg
(dictvalues={})¶ Class to display active cryptographic configurations.
Important Class Members:
Attribute Name Description Frequently Used Methods ssh-cipher The SSH cipher configuration. peek_ssh_cipher()
ssh-kex The SSH kex configuration. peek_ssh_kex()
ssh-mac The SSH mac configuration. peek_ssh_mac()
https-cipher The HTTPS cipher configuration. peek_https_cipher()
radius-cipher The RADIUS cipher configuration. peek_radius_cipher()
ldap-cipher The LDAP cipher configuration. peek_ldap_cipher()
syslog-cipher The Syslog cipher configuration. peek_syslog_cipher()
https-tls-protocol The TLS Protocol version for HTTPS. peek_ttps_tls_protocol()
radius-tls-protocol The TLS protocol version for RADIUS. peek_radius_tls_protocol()
ldap-tls-protocol The TLS protocol version for for LDAP. peek_ldap_tls_protocol()
syslog-tls-protocol The TLS protocol version for SYSLOG. peek_syslog_tls_protocol()
x509v3-validation-mode The X509 validation mode selection. peek_x509v3_validation_mode()
Object Methods
-
static
get
()¶ - Returns a
sec_crypto_cfg
object filled with cryptographic - attributes.
Each object can be printed using
pyfos_util.response_print()
and individual attributes accessed through peek methods.Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A sec_crypto_cfg
object or a dictionary in case of error.- Returns a
Attribute Methods
-
peek_ssh_cipher
()¶ Reads the SSH cipher algorithm from the object.
Return type: A dictionary in case of error or a success response.
-
peek_ssh_kex
()¶ Reads the SSH kex algorithm from the object.
Return type: A dictionary in case of error or a success response.
-
peek_ssh_mac
()¶ Reads the SSH MAC algorithm from the object.
Return type: A dictionary in case of error or a success response.
-
peek_https_cipher
()¶ Reads the https cipher algorithm from the object.
Return type: A dictionary in case of error or a success response.
-
peek_radius_cipher
()¶ Reads the RADIUS cipher algorithm from the object.
Return type: A dictionary in case of error or a success response.
-
peek_ldap_cipher
()¶ Reads the LDAP cipher algorithm from the object.
Return type: A dictionary in case of error or a success response.
-
peek_syslog_cipher
()¶ Reads the syslog cipher algorithm from the object.
Return type: A dictionary in case of error or a success response.
-
peek_https_tls_protocol
()¶ Reads the TLS protocol version for https from the object.
Return type: A dictionary in case of error or a success response.
-
peek_radius_tls_protocol
()¶ Reads the TLS protocol version for RADIUS from the object.
Return type: A dictionary in case of error or a success response.
-
peek_ldap_tls_protocol
()¶ Reads the TLS protocol version for LDAP from the object.
Return type: A dictionary in case of error or a success response.
-
peek_syslog_tls_protocol
()¶ Reads the TLS protocol version for syslog from the object.
Return type: A dictionary in case of error or a success response.
-
peek_x509v3_validation_mode
()¶ Reads the X509 validation mode selection from the object.
Return type: A dictionary in case of error or a success response.
-
static
-
class
pyfos_brocade_security.
sec_crypto_cfg_template
(dictvalues={})¶ Class for cryptographic template display.
Important Class Members:
Attribute Name Description Frequently Used Methods name The template name. peek_name()
template The template content. peek_template()
Object Methods
-
static
get
(session, name=None)¶ -
Returns a :class:`sec_crypto_cfg_template` object filled with
-
template contents.
Each object can be printed using
pyfos_util.response_print()
.Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A sec_crypto_cfg_template
object if name is given or list of objects if name is None. A dictionary in case of error.
-
static
-
class
pyfos_brocade_security.
sec_crypto_cfg_template_action
(dictvalues={})¶ - This class provides the cryptographic template configurations and
- operations.
Important Class Members:
Attribute Name Description Frequently Used Methods template-name The template name. set_template_name()
action Sets the crypto action. set_action()
remote-user-name Sets the remote user login name. set_remote_user_name()
remote-host-ip Sets the remote host IP address. set_remote_host_ip()
remote-user-password Sets the remote user password. set_remote_user_password()
remote-directory The remote directory file path. set_remote_directory()
file-transfer-protocol-type Sets the file transfer protocol type. set_file_transfer_protocol_type()
Object Methods
-
patch
(session)¶ The required fields are set within the object using attribute’s set method. This method is used to set the import or export cryptographic template, which is configured in the host machine, verify and apply template.
Example Usage of the Method to Apply Cipher Configuration:
# initialize the switch object crypto_info = pyfos_brocade_security.sec_crypto_cfg_template() # set the action to perform crypto_info.set_action("apply") # set the template name crypto_info.set_template_name("default_generic") # execute HTTP patch command to apply the object to the # switch connected through session crypto_info.patch(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
delete
(session)¶ Deletes a user-defined template. The required fields are set within the object using attribute’s set method. This command is used to delete a user-defined template.
Example Usage of the Method to Delete a User-defined Template:
# initialize the switch object crypto_obj = pyfos_brocade_security.sec_crypto_cfg_template() # set the template name crypto_obj.set_template_name(“mytemplate”) crypto_obj.delete(session)Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
Attribute Methods
-
set_template_name
(name)¶ Sets the template name in the object.
Parameters: name – The default template name to be set within the object. Return type: A dictionary in case of error or a success response.
-
set_action
(ops)¶ Sets the seccryptographic action in the object.
Parameters: ops – The seccryptographic action to be set within the object. Return type: A dictionary in case of error or a success response.
-
set_remote_user_name
(loginname)¶ Sets the remote user login name in the object.
Parameters: loginname – The remote user login name name to be set within the object. Return type: A dictionary in case of error or a success response.
-
set_remote_host_ip
(ip)¶ Sets the remote user IP address in the object.
Parameters: ip – The remote user IP address to be set within the object. Return type: A dictionary in case of error or a success response.
-
set_remote_user_password
(passwd)¶ Sets the remote user password in the object.
Parameters: passwd – The remote user password to be set within the object. Return type: A dictionary in case of error or a success response.
-
set_remote_directory
(template_file)¶ Sets the template file path in the object.
Parameters: template_file – The template file path to be set within the object. Return type: A dictionary in case of error or a success response.
-
set_file_transfer_protocol_type
(protocol)¶ Sets the file transfer protocol in the object.
Parameters: protocol – The file transfer protocol to be set within the object. Return type: A dictionary in case of error or a success response.
-
class
pyfos_brocade_security.
security_certificate
(dictvalues={})¶ This class provides options to display and configure certificates.
Important Class Members:
Attribute Name Description Frequently Used Methods certificate-entity The certificate entity (CSR, switch, or CA certificate. set_certificate_entity()
peek_certificate_entity()
certificate-type The certificate types (commoncert, https, radius, ldap, or syslog). peek_certificate_type()
set_certificate_type()
certificate The certificate. peek_certificate()
certificate-hexdump The certificate in hex format. peek_certificate_hexdump()
Object Methods
-
get
(session)¶ Returns a
seccertmgmt_show
object or a list of objects filled with the certificate attributes. If certificate entity and certificate type is specified, a certificate matching the name of the certificate entity and type is returned or an empty object is returned if no match is found.Each object can be printed using
pyfos_util.response_print()
. and individual attributes accessed through peek methods.Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A seccertmgmt
object to get a object or a list of objects if there are more than one.
Attribute Methods
-
set_certificate_entity
(cert)¶ Sets the certificate entity in the object.
Parameters: cert – The certificate entity to be set within the object. Return type: None or a dictionary of error information.
-
peek_certificate_entity
()¶ Reads the certificate entity in the object.
Return type: The certificate entity.
-
set_certificate_type
(cert)¶ Sets the certificate type in the object.
Parameters: type (cert) – The certificate type to be set within the object. Return type: None or a dictionary of error information.
-
peek_certificate_type
()¶ Reads the certificate type in the object.
Return type: The certificate type.
-
peek_certificate
()¶ Gets the certificate in the object.
Return type: None or a certificate.
-
peek_certificate_hexdump
()¶ Gets the certificate in hex format in the object.
Return type: None or the certificate in hex format.
-
-
class
pyfos_brocade_security.
security_certificate_action
(dictvalues={})¶ This class provides options to display and configure certificates.
Important Class Members:
Attribute Name Description Frequently Used Methods certificate-entity The certificate entity (CSR, switch, or CA certificate. set_certificate_entity()
certificate-type The certificate types (commoncert, https, radius, ldap, or syslog). set_certificate_type()
certificate-name The certificate name. set_certificate_name()
operation The operation. set_operation()
protocol The protocol used for import or export. set_protocol()
remote-host-ip The remote host IP address for import or export. set_remote_host_ip()
remote-directory The directory in remote host. set_remote_dir()
remote-user-name The username for the remote host. set_remote_user_name()
remote-user-password The password for the remote host. set_remote_user_password()
Object Methods
-
set
(session)¶ Returns a
security_certificate_action
object or a list of objects filled with the certificate attributes. If a certificate entity and certificate type is specified, a certificate matching the name of the certificate entity and type is returned or an empty object is returned if no match is found.Each object can be printed using
pyfos_util.response_print()
and individual attributes accessed through peek methods.Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A seccertmgmt
object to get a object or a list of objects if there are more than one.
-
patch
(session)¶ Imports or exports the certificate or CSR to and from a remote server. This method imports or exports a specified certifiate to or from a switch. This certificate overwrites any existing certificate already present in the switch. Also, this method is used to send a signing request (CSR) from the switch to a remote server.
Below is an example using individual sets:
# initialize the System Security object seccertmgmt = pyfos_brocade_security.security_certificate_action(); # export a CSR to remote server seccertmgmt.import("csr","commoncert","<IP_ADDRESS>","ca","root") seccertmgmt.export("cert","commoncert","<IP_ADDRESS>","ca","root") # execute HTTP patch method to apply the object to the # switch connected through session seccertmgmt.patch(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
delete
(session)¶ Deletes a certificate. This method is used to remove or clear the specified certificate.
Example Usage of the Method to Delete a Certificate:
# initialize the System Security object seccertmgmt = pyfos_brocade_security.seccertmgmt(); # delete a certificate seccertmgmt.delete("cert", "https") result = seccertmgmt.delete(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
Attribute Methods
-
set_certificate_entity
(cert)¶ Sets the certificate entity in the object.
Parameters: cert – The certificate entity to be set within the object. Return type: None or a dictionary of error information.
-
peek_certificate_entity
()¶ Reads the certificate entity in the object.
Return type: The certificate entity.
-
set_certificate_type
(cert)¶ Sets the certificate type in the object.
Parameters: type (cert) – the certificate type to be set within the object. Return type: None or a dictionary of error information.
-
peek_certificate_type
()¶ Reads the certificate type in the object.
Return type: The certificate type.
-
peek_certificate_name
()¶ Gets the certificate name in the object.
Return type: None or the certificate name.
-
set_certificate_name
(cert_name)¶ Sets the certificate name type in the object.
Parameters: cert_name – the certificate name Return type: None or a dictionary of error information.
-
peek_operation
()¶ Gets the certificate operation in the object.
Return type: None or the certificate operation.
-
set_operation
()¶ Sets the certificate operation in the object.
Return type: None or the certificate operation.
-
set_remote_host_ip
(ip)¶ Sets the remote host ip address object
Parameters: ip – The IP address of the remote host. Return type: A dictionary in case of error or a success response.
-
set_remote_dir
(location)¶ Sets a remote directory path in the object.
Parameters: location – The directory path in remote host. Return type: A dictionary in case of error or a success response.
-
set_remote_user_name
(username)¶ Sets the remote host’s username in the object.
Parameters: name (user) – The username for authenticating the remote host. Return type: A dictionary in case of error or a success response.
-
set_remote_user_password
(password)¶ - Sets the remote host’s user password in the object.
Parameters: password – The password for remote host. Return type: A dictionary in case of error or a success response.
-
-
class
pyfos_brocade_security.
security_certificate_generate
(dictvalues={})¶ This class provides options to display and configure certificates.
Important Class Members:
Attribute Name Description Frequently Used Methods certificate-entity The certificate entity (CSR, switch, or CA certificate. set_certificate_entity()
certificate-type The certificate types (commoncert, https, radius, ldap, or syslog). set_certificate_type()
algorithm-type The algorithm type (rsa, dsa, or ecdsa). set_algorithm_type()
key-size The size of the key. set_key_size()
hash-type The hash type. set_hash_type()
years The certificate validity. peek_years()
set_years()
country-name The country name. Only needed to generate a CSR. set_country_name()
peek_country_name()
state-name The state name. Only needed to generate a CSR. set_state_name()
peek_state_name()
locality-name The locality name. Only needed to generate a CSR. set_locality_name()
peek_locality_name()
organization-name The organization name. Only needed to generate a CSR. set_organization_name()
peek_organization_name()
unit-name The unit name. Only needed to generate a CSR. set_unit_name()
peek_unit_name()
domain-name The domain name. Only needed to generate a CSR. set_domain_name()
peek_domain_name()
-
get
(session)¶ Returns a
security_certificate_generate
object or a list of objects filled with the certificate attributes. If a certificate entity and certificate type is specified, a certificate matching the name of the certificate entity and type is returned or an empty object is returned if no match is found.Each object can be printed using
pyfos_util.response_print()
and individual attributes accessed through peek methods.Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A seccertmgmt
object to get a object or a list of objects if there are more than one.
-
post
(session)¶ Generates a certificate. This method is used to create a specified certificate.
Example Usage of the Method to Create a New Certificate:
# initialize the System Security object seccertmgmt = pyfos_brocade_security.security_certificate_generate(); # Generate a https certificate security_certificate_generate.generate("cert", "https") result = security_certificate_generate.post(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
Attribute Methods
-
set_certificate_entity
(cert)¶ Sets the certificate entity in the object.
Parameters: cert – The certificate entity to be set within the object. Return type: None or a dictionary of error information.
-
peek_certificate_entity
()¶ Reads the certificate entity in the object.
Return type: certificate entity
-
set_certificate_type
(cert)¶ Sets the certificate type in the object.
Parameters: type (cert) – The certificate type to be set within the object. Return type: None or a dictionary of error information.
-
peek_certificate_type
()¶ Reads the certificate type in the object.
Return type: certificate type
-
set_algorithm_type
(algo)¶ Sets the algorithm type in the object.
Parameters: algo – The algorithm type to be set within the object. Return type: None or a dictionary of error information.
-
peek_algorithm_type
()¶ Reads the algorithm type in the object.
Return type: algorithm type
-
set_key_size
(size)¶ Sets the size of the key in the object.
Parameters: size – The size of the key. Return type: None or a dictionary of error information.
-
peek_key_size
()¶ Gets the size of the key in the object.
Return type: None or the key size.
-
set_hash_type
(hash_type)¶ Sets the hash type in the object.
Parameters: hash_type – The hash type. Return type: None or a dictionary of error information.
-
peek_hash_type
()¶ Gets the hash type in the object.
Return type: None or a hash type.
-
peek_years
()¶ Gets the years in the object.
Return type: None or the years.
-
set_years
(years)¶ Sets the years in the object.
Parameters: years – The years. Return type: None or a dictionary of error information.
-
peek_certificate
()¶ Gets the certificate in the object.
Return type: None or a certificate.
-
peek_country_name
()¶ Gets the country name in the object.
Return type: None or the country name.
-
set_country_name
(country_name)¶ Sets the country name in the object.
Parameters: country_name – The country name. Return type: None or a dictionary of error information.
-
peek_state_name
()¶ Gets the state name in the object.
Return type: None or the state name.
-
set_state_name
(state_name)¶ Sets the state name in the object.
Parameters: state_name – The state name. Return type: None or a dictionary of error information.
-
peek_locality_name
()¶ Gets the locality name in the object.
Return type: None or the locality name.
-
set_locality_name
(locality_name)¶ Sets the locality name in the object.
Parameters: locality_name – The locality name. Return type: None or a dictionary of error information.
-
peek_organization_name
()¶ Gets the organization name in the object.
Return type: None or the organization name.
-
set_organization_name
(organization_name)¶ Sets the organization name in the object.
Parameters: organization_name – The organization name. Return type: None or a dictionary of error information.
-
peek_unit_name
()¶ Gets the unit name in the object.
Return type: None or the unit name.
-
set_unit_name
(unit_name)¶ Sets the unit name in the object.
Parameters: unit_name – The unit name. Return type: None or a dictionary of error information.
-
peek_domain_name
()¶ Gets the domain name in the object.
Return type: None or the domain name.
-
set_domain_name
(domain_name)¶ Sets the domain name in the object.
Parameters: domain_name – The domain name. Return type: None or a dictionary of error information.
-
-
class
pyfos_brocade_security.
sshutil
(dictvalues={})¶ This class provides methods to manage and configure public and private key pairs in a switch.
Important Class Members:
Attribute Name Description Frequently Used Methods allow-user-name The username. set_allow_user_name()
peek_allow_user_name()
rekey-interval The rekey interval duration. set_rekey_interval()
peek_rekey_interval()
Object Methods
-
get
()¶ Returns a
sshutil
object with values for all the attributes. The object can be printed usingpyfos_utils.response_print()
.Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a sshutil
object.
-
patch
()¶ Replaces entry members. The fields are set within the object using attribute’s set method. This command is used to import public key from remote host to switch or export public key from switch to a remote host.
Example Usage of the Method to Export a Public Key:
sshutil_obj = pyfos_brocade_security.sshutil() sshutil_obj.export_public_key("<IP_ADDRESS>", "/root/ca", "root", "pray4green") sshutil_obj.patch(session)
Example Usage of the Method to Import a Public Key:
sshutil_obj = pyfos_brocade_security.sshutil() sshutil_obj.import_export_key("test","<IP_ADDRESS>", "/root/ca", "key.pub","root", "pray4green") sshutil_obj.patch(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
Attribute Methods
-
set_allow_user_name
("user")¶ Sets the username in the object.
Parameters: pgid – Allows the username. Return type: A dictionary in case of error or a success response.
-
peek_allow_user_name
()¶ Reads whether the username is allowed in the object.
Return type: None or the PGID.
-
set_rekey_interval
(int)¶ - Sets the rekey interval duration in the object.
Parameters: interval – The rekey interval duration. Return type: A dictionary in case of error or a success response.
-
peek_rekey_interval
()¶ Reads the rekey interval duration in the object.
Return type: None or the multiple fabric name monitoring mode status.
-
-
class
pyfos_brocade_security.
sshutil_key
(dictvalues={})¶ This class provides methods/options to manage and configure public and private key pairs in a switch.
Important Class Members:
Attribute Name Description Frequently Used Methods key-type The key type. set_key_type()
peek_key_type()
passphrase The passphrase for the key. set_passphrase()
peek_passphrase()
algorithm-type The algorithm type. set_algorithm_type()
peek_algorithm_type()
size The size. peek_size()
fingerprint The fingerprint. peek_fingerprint()
Object Methods
-
get
()¶ Returns a
sshutilkey
object with values for all the attributes. The object can be printed usingpyfos_utils.response_print()
.Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a sshutil
object.
-
post
()¶ Creates an entry or adds members. The fields are set within the object using attribute’s set method. This method is used to create a host key or public and private key pair.
Example Usage of the Method to Create a New Host Key:
sshutil_obj = pyfos_brocade_security.sshutilkey() sshutil_obj.generate_public_key("rsa", "fibranne") sshutil_obj.generate_host_key("rsa") sshutil_obj.post(session)
The example above generates a public/private key pair and host key with and RSA algorithm.
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
delete
()¶ Deletes an entry or entry members. The fields are set within the object using attribute’s set method. This command is used to delete public key(s), private key, delknownhost(s), or hostkey.
Example Usage of the Method to Delete a Public Key:
sshutil_obj = pyfos_brocade_security.sshutilkey() sshutil_obj.delete_public_keys("user") sshutil_obj.delete_host_keys("user") sshutil_obj.delete(session)
Example Usage of the Method to Delete a Private Key:
sshutil_obj = pyfos_brocade_security.sshutilkey() sshutil_obj.delete_private_key("user") sshutil_obj.delete(session)
Example Usage of the Method to Delete a Host Key:
sshutil_obj = pyfos_brocade_security.sshutilkey() sshutil_obj.delete_host_key("rsa") sshutil_obj.delete(session)
Example Usage of the Method to Delete a Known Host:
Attribute Methods
-
set_key_type
("type")¶ Sets the key type in the object.
Parameters: pgid – The key type (public-private-key or host-key). Return type: A dictionary in case of error or a success response.
-
peek_key_type
()¶ Reads the key type from the object.
Return type: None or the PGID.
-
set_passphrase
(password)¶ - Sets the passphrase for key generation in the object.
Parameters: password – The password for key generation. Return type: A dictionary in case of error or a success response.
-
set_algorithm_type
(type)¶ - Sets the algorithm type in the object.
Parameters: type (algorithm) – The algorithm type (rsa, dsa, or ecdsa). Return type: A dictionary in case of error or a success response.
-
peek_size
()¶ Reads the size in the object.
Return type: None or the multiple fabric name monitoring mode status.
-
peek_fingerprint
()¶ - Reads the fingerprint in the object
Parameters: operation – The fingerprint. Return type: A dictionary in case of error or a success response.
-
-
class
pyfos_brocade_security.
sshutil_public_key
(dictvalues={})¶ This class provides methods to manage and configure public and private key pairs in a switch.
Important Class Members:
Attribute Name Description Frequently Used Methods user-name The username. set_user_name()
peek_user_name()
public-key The public key. set_public_key()
peek_public_key()
Object Methods
-
get
()¶ Returns a
sshutil_public_key
object with values for all the attributes. The object can be printed usingpyfos_utils.response_print()
.Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a sshutil
object.
-
delete
()¶ Deletes an entry or entry members. The fields are set within the object using attribute’s set method. This command is used to delete public key(s), a private key, delknownhost(s) or a host key.
Example Usage of the Method to Delete a Public Key:
sshutil_obj = pyfos_brocade_security.sshutil_public_key() sshutil_obj.delete_public_keys("user") sshutil_obj.delete(session)
Attribute Methods
-
set_user_name
("user")¶ Sets the username in the object.
Parameters: pgid – The username. Return type: A dictionary in case of error or a success response.
-
peek_user_name
()¶ Reads the username in the object.
Return type: None or the PGID.
-
peek_public_key
()¶ Reads the public key in the object.
Parameters: name – The public key. Return type: A dictionary in case of error or a success response.
-
-
class
pyfos_brocade_security.
sshutil_public_key_action
(dictvalues={})¶ This class provides methods to manage and configure public and private key pairs in a switch.
Important Class Members:
Attribute Name Description Frequently Used Methods user-name The username. set_user_name()
public-key-name The public key name. set_public_key_name()
remote-host-ip The username for the remote host. set_remote_host_ip()
remote-directory The directory in remote host. set_remote_dir()
remote-user-name The username for the host. set_remote_user_name()
remote-user-password The remote user’s password. set_remote_user_password()
algorithm-type The algorithm type. set_algorithm_type()
action The sshutil operations. set_action()
Object Methods
-
patch
()¶ Replaces entry members. The fields are set within the object using attribute’s set method. This command is used to import public key from remote host to switch, export public key from switch to a remote host.
Example Usage of the Method to Export a Public Key:
sshutil_obj = pyfos_brocade_security.sshutil() sshutil_obj.export_public_key("<IP_ADDRESS>", "/root/ca", "root", "pray4green") sshutil_obj.patch(session)
Example Usage of the Method to Import a Public Key:
sshutil_obj = pyfos_brocade_security.sshutil() sshutil_obj.import_export_key("test","<IP_ADDRESS>","/root/ca", "key.pub","root","pray4green") sshutil_obj.patch(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
Attribute Methods
-
set_user_name
("user")¶ Sets the username in the object.
Parameters: pgid – The username. Return type: A dictionary in case of error or a success response.
-
peek_user_name
()¶ Reads the username in the object.
Return type: None or the PGID.
-
set_public_key_name
(name)¶ Sets the public key name in the object.
Parameters: name – The name of the public key. Return type: A dictionary in case of error or a success response.
-
set_remote_host_ip
(ip)¶ Sets the remote host IP address in the object.
Parameters: ip – The IP address of the remote host. Return type: A dictionary in case of error or a success response.
-
set_remote_dir
(location)¶ Sets a remote directory path in the object.
Parameters: location – The directory path in remote host. Return type: A dictionary in case of error or a success response.
-
set_remote_user_name
(username)¶ Sets the remote host’s username in the object.
Parameters: name (user) – The username for authenticating the remote host. Return type: A dictionary in case of error or a success response.
-
set_remote_user_password
(password)¶ - Sets the remote host’s user password in the object.
Parameters: password – The password for the remote host. Return type: A dictionary in case of error or a success response.
-
set_algorithm_type
(type)¶ - Sets the algorithm type in the object.
Parameters: type (algorithm) – The algorithm type. Return type: A dictionary in case of error or a success response.
-
set_action
(type)¶ - Sets an action in the object.
Parameters: operation – action Return type: A dictionary in case of error or a success response.
-
-
class
pyfos_brocade_security.
tacacs_server
(dictvalues={})¶ - This class is used to add, change, read, and delete an AAA
- TACACS+ server configuration.
Important Class Members:
Attribute Name Description Frequently Used Methods server The TACACS+ server IP/FQDN. set_server()
peek_server()
port The TACACS+ server port. set_port()
peek_port()
secret The secret between the switch and the server. set_secret()
peek_secret()
timeout The TACACS+ server response timeout. set_timeout()
peek_timeout()
authentication The authentication protocol. set_authentication()
peek_authentication()
encryption-type The encryption type. set_encryption_type()
peek_encryption_type()
position The TACACS+ server position. set_position()
peek_position()
Object Methods
-
static
get
(session, name=None)¶ Returns a
tacacs_server
object with TACACS+ Server attributes.Each object can be printed using
pyfos_util.response_print()
and individual attributes can be accessed through peek methods.Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: The tacacs_server
object, if name is provided, or a list of objects if there is more than one. A dictionary in case of error.
-
post
(session)¶ Creates a TACACS+ server entry. The required fields are set within the object using the attribute’s set method. This method is used to create a new TACACS+ server configuration for AAA authentication to the switch.
Example Usage of the Method to Configure a New AAA TACACS+ Server:
# initialize the switch object tacacs_obj = pyfos_brocade_security.tacacs_server() # set the server FQDN/ip tacacs_obj.set_server("<IP_ADDRESS>") # execute HTTP post command to apply the object to the # switch connected through session tacacs_obj.post(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
patch
(session)¶ Edits an existing configuration. The required fields are set within the object using the attribute’s set method. This method is used to modify an existing TACACS+ server configuration.
Example Usage of the Method to Configure a Response Timeout:
# initialize the switch object tacacs_info = pyfos_brocade_security.tacacs_server() # set the server FQDN/ip tacacs_info.set_server(name) # set the response timeout 10 tacacs_info.set_timeout(10) # execute HTTP patch command to apply the object to the # switch connected through session tacacs_info.patch(session)
Below is an Example of Combining Object Initialization and Attribute Sets:
# set the payload tacacs_info = pyfos_brocade_security.tacacs_server( {"server" : <IP_ADDRESS>, "timeout" : 10}) result = tacacs_info.patch(session) pyfos_util.response_print(result)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
delete
(session)¶ Deletes a TACACS+ server entry. The required fields are set within the object using the attribute’s set method. This method is used to delete a TACACS+ server configuration.
Example Usage of the Method to Delete an TACACS+ Configuration:
# initialize the switch object tacacs_obj = pyfos_brocade_security.tacacs_server() # set the server FQDN/ip tacacs_obj.set_server("<IP_ADDRESS>") # execute HTTP delete command to apply the object to the # switch connected through session tacacs_obj.delete(session)
Attribute Methods
-
set_server
(name)¶ Sets the TACACS+ name in the object.
Parameters: name – The TACACS+ FQDN/IP to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_server
()¶ Reads the TACACS+ server from the object.
Return type: A dictionary in case of error or a success response.
-
set_port
(number)¶ Sets The TACACS+ server port number in the object.
Parameters: number – The TACACS+ server port number to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_port
()¶ Reads the TACACS+ server port number from the object.
Return type: A dictionary in case of error or a success response.
-
set_secret
(secret)¶ Sets the TACACS+ server secret in the object.
Parameters: secret – The TACACS+ server secret to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_secret
()¶ Reads the TACACS+ server secret from the object.
Return type: A dictionary in case of error or a success response.
-
set_timeout
(value)¶ Sets the TACACS+ server response timeout value in the object.
Parameters: value – The TACACS+ server timeout value to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_timeout
()¶ Reads the TACACS+ server timeout from the object.
Return type: A dictionary in case of error or a success response.
-
set_authentication
(protocol)¶ Sets the TACACS+ server authentication protocol type in the object.
Parameters: protocol – The TACACS+ server authentication protocol type to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_authentication
()¶ Reads the TACACS+ server authentication protocol type from the object.
Return type: A dictionary in case of error or a success response.
-
set_encryption_type
(encrypt)¶ Sets the TACACS+ server encryption type in the object.
Parameters: encrypt – The TACACS+ server encryption type to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_encryption_type
()¶ Reads the TACACS+ server encryption type from the object.
Return type: A dictionary in case of error or a success response.
-
set_position
(pos)¶ Sets the TACACS+ server position in the object.
Parameters: pos – The TACACS+ server position to be set within the object. Return type: A dictionary in case of error or a success response.
-
peek_position
()¶ Reads the TACACS+ server position from the object.
Return type: A dictionary in case of error or a success response.
-
class
pyfos_brocade_security.
user_config
(dictvalues={})¶ - Class of user configuration.
- Important Class Members:
Attribute Name Description Frequently Used Methods name The name of the user account. set_name()
peek_name()
password The user account password. set_password()
role The user’s role name. set_role()
peek_role()
account-description The account description. set_account_description()
peek_account_description()
account-enabled Indicates the user’s account status. set_account_enabled()
peek_account_enabled()
password-change-enforced - Enables or disables enforcing
- password change during login.
set_password_change_enforced()
peek_password_change_enforced()
account-locked Unlocks the user account if already locked. set_account_locked()
peek_account_locked()
access-start-time The access start time for the account. set_access_start_time()
peek_access_start_time()
access-end-time The access end time for the account. set_access_end_time()
peek_access_end_time()
home-virtual-fabric The home Virtual Fabric for the account/ set_home_virtual_fabric()
peek_home_virtual_fabric()
chassis-access-role The chassis access role name. set_chassis_access_role()
peek_chassis_access_role()
- virtual-fabric-role-id-list/
- role-id
The Virtual Fabric role name list. set_virtual_fabric_role_id_list_role_id()
peek_virtual_fabric_role_id_list_role_id()
Attribute Methods
-
static
get
(session, name=None)¶ - Returns a
user_config
object filled with user config - attributes.
Each object can be printed using
pyfos_util.response_print()
and individual attributes can be accessed through peek methods.Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A user_config
object if the name is given or list of objects if there is more than one. A dictionary in case of error.- Returns a
-
post
(session)¶ Creates a user account. The fields are set within the object using attribute’s set method. This method is used to create a new user account configuration.
Example Usage of the Method to Configure a New User Account:
# initialize the user config object user_obj = pyfos_brocade_security.user_config() user_obj.set_name("myuser") user_obj.set_role("admin") user_obj.set_password("bXlsaWZlMTk4OSM="); user_obj.set_account_description("new user") # execute HTTP post command to apply the object to the # switch connected through session user_obj.post(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
patch
(session)¶ Replaces an existing configuration. The fields are set within the object using attribute’s set method. This method is used to modifying the existing user account configuration.
Example Usage of the Method to Configure the Response Timeout:
# initialize the user config object user_info = pyfos_brocade_security.user_config() user_info.set_name("myuser") user_info.set_account_enabled(1) user_info.set_password_change_enforced(0) # execute HTTP patch command to apply the object to the # switch connected through session user_info.patch(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
delete
(session)¶ Deletes a user account. The fields are set within the object using attribute’s set method. This method is used to delete a user account configuration.
Example Usage of the Method to Delete a User Account:
# initialize the user config object user_obj = pyfos_brocade_security.user_config() user_obj.set_name("myuser") # execute HTTP delete command to apply the object to the # switch connected through session user_obj.delete(session)
Attribute Methods
-
set_name
(name)¶ Sets the user account name in the object.
param name: The user account name to be set within the object. rtype: A dictionary in case of error or a success response.
-
peek_name
()¶ Reads the user account name from the object.
Return type: A dictionary in case of error or a success response.
-
set_password
(pass)¶ Sets the user account password in the object.
param pass: The user account password to be set within the object. rtype: A dictionary in case of error or a success response.
-
set_role
(role)¶ Sets the user role in the object.
param role: The user role to be set within the object. rtype: A dictionary in case of error or a success response.
-
peek_role
()¶ Reads the user role from the object.
Return type: A dictionary in case of error or a success response.
-
set_account_description
(message)¶ Sets the user account description in the object.
param message: The user account description to be set within the object. rtype: A dictionary in case of error or a success response.
-
peek_account_description
()¶ Reads the user account description from the object.
Return type: A dictionary in case of error or a success response.
-
set_account_enabled
(bool)¶ Enables or disables user account in the object.
param bool: Enables or disables the user account. rtype: A dictionary in case of error or a success response.
-
peek_account_enabled
()¶ Reads the status of user account from the object.
Return type: A dictionary in case of error or a success response.
-
set_password_change_enforced
(bool)¶ Enables or disables password change during login in the object.
param bool: Enables or disables password change durning login. rtype: A dictionary in case of error or a success response.
-
peek_password_change_enforced
()¶ Reads status password change during login from the object.
Return type: A dictionary in case of error or a success response.
-
set_account_locked
(bool)¶ Unlocks the user account if already locked in the object.
param bool: Unlocks the user account. rtype: A dictionary in case of error or a success response.
-
peek_account_locked
()¶ Reads the locked or unlocked status of user accountfrom the object.
Return type: A dictionary in case of error or a success response.
-
set_access_start_time
(time)¶ Sets the user access start time in the object.
param time: The user access start time. rtype: A dictionary in case of error or a success response.
-
peek_access_start_time
()¶ Reads the user access start time from the object.
Return type: A dictionary in case of error or a success response.
-
set_access_end_time
(time)¶ Sets the user access end time in the object.
param time: The user access end time. rtype: A dictionary in case of error or a success response.
-
peek_access_end_time
()¶ Reads the user access end time from the object.
Return type: A dictionary in case of error or a success response.
-
set_home_virtual_fabric
(fid)¶ Sets the user account home FID in the object
param fid: The user account home FID. rtype: A dictionary in case of error or a success response.
-
peek_home_virtual_fabric
()¶ Reads the user account home FID from the object.
Return type: A dictionary in case of error or a success response.
-
set_chassis_access_role
(role)¶ Sets the chassis access role in the object.
param role: The chassis access role. rtype: A dictionary in case of error or a success response.
-
peek_chassis_access_role
()¶ Reads the chassis access role from the object.
Return type: A dictionary in case of error or a success response.
-
set_virtual_fabric_role_id_list_role_id
(roles)¶ Sets the virtual fabric roles in the object.
param roles: The virtual fabric role and ID. rtype: A dictionary in case of error or a success response.
-
peek_virtual_fabric_role_id_list_role_id
()¶ Reads the virtual fabric role and ID from the object.
Return type: A dictionary in case of error or a success response.
-
class
pyfos_brocade_security.
user_specific_password_cfg
(dictvalues={})¶ - Class of user specific password configuration
- Important Class Members:
Attribute Name Description Frequently Used Methods user-name The username. set_user_name()
peek_user_name()
minimum-password-age The minimum number of days that must elapse before a password can be changed. set_minimum_password_age()
peek_minimum_password_age()
maximum-password-age The maximum number of days that can elapse before a password can be changed. set_maximum_password_age()
peek_maximum_password_age()
warn-on-expire The number of days prior to password expiration that a that a warning about password expiration displays. set_warn_on_expire()
peek_warn_on_expire()
enforce-expire Enables or disables password expiration for user. set_enforce_expire()
peek_enforce_expire()
hash-type The hash type. set_hash_type()
peek_hash_type()
- Object Methods
-
get
(session)¶ Returns a :class`user_specific_password_cfg` object with values for all the attributes. The object can be printed using
pyfos_utils.response_print()
.Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a user_specific_password_cfg
object.
-
post
(session)¶ Creates a password configuration for a specific user. The fields are set within the object using attribute’s set method. This command is used to create a password configuration for a specific user.
Example Usage of the Method to Create a New Configuration:
password_obj = pyfos_password_cfg.password_cfg() password_obj.set_user_name("mytestuser") password_obj.set_minimum_password_age(10) password_obj.set_maximum_password_age(20) password_obj.set_warn_on_expire(5) password_obj.post(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
patch
()¶ Modifies a user’s specific password configuration. The fields are set within the object using attribute’s set method.
Example Usage of the Method to Modify a User’s Password Configuration:
password_obj = pyfos_password_cfg.password_cfg() password_obj.set_minimum_length(10) password_obj.set_maximum_length(20) password_obj.patch(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
delete
(session)¶ Deletes a user-defined password configuration. The fields are set within the object using attribute’s set method. This command is used to delete a user-defined password configuration.
Example Usage of the Method to Delete a User-defined Password Configuration:
password_obj = pyfos_password_cfg.password_cfg() password_obj.set_user_name("mytestuser") password_obj.delete(session)
Parameters: session – The session handler returned by pyfos_auth.login()
.Return type: A dictionary in case of error or a success response.
-
Attribute Methods
-
set_user_name
(name)¶ Sets the username in the object.
param name: The username for the password configuration. rtype: A dictionary in case of error or a success response.
-
peek_user_name
()¶ Reads the username from the object.
Return type: A dictionary in case of error or a success response.
-
set_minimum_password_age
(number)¶ - Sets the minimum number of days that must elapse before a password can be changed.
Parameters: number – The minimum number of days that must elapse before a password can be changed. Return type: A dictionary in case of error or a success response.
-
peek_minimum_password_age
()¶ Reads the minimum number of days that must elapse before a password can be changed from the object.
Return type: A dictionary in case of error or a success response.
-
set_maximum_password_age
(number)¶ - Sets the maximum number of days that can elapse before a password can be changed.
Parameters: number – The maximum number of days before password expiration. Return type: A dictionary in case of error or a success response.
-
peek_maximum_password_age
()¶ Reads the maximum number of days before password expiration from the object.
Return type: A dictionary in case of error or a success response.
-
set_warn_on_expire
(number)¶ - Sets the number of days prior to password expiration to the object.
Parameters: number – number of days Return type: A dictionary in case of error or a success response.
-
peek_warn_on_expire
()¶ Reads the number of days prior to password expiration that a warning about password expiration displays from the object.
Return type: A dictionary in case of error or a success response.
-
set_hash_type
(hash)¶ - Sets the hash type to the object.
Parameters: hash – The hash type for the password. Return type: A dictionary in case of error or a success response.
-
peek_hash_type
()¶ Reads the hash type from the object.
Return type: A dictionary in case of error or a success response.
-
set_enforce_expire
(bool)¶ - Enables or disables password expiration for the user to the object.
Parameters: bool – Enables or disables password expiration. Return type: A dictionary in case of error or a success response.
-
peek_enforce_expire
()¶ Reads the status of the password expiration for the user from the object.
Return type: A dictionary in case of error or a success response.
See also
Module pyfos_auth


Quiet Reliable and Compact Fuel Cell Based APU (QRCFC-APU)
EPA Contract Number: EPD06019Title: Quiet Reliable and Compact Fuel Cell Based APU (QRCFC-APU)
Investigators: Namazian, Mehdi
Small Business: Altex Technologies Corporation
EPA Contact: Manager, SBIR Program
Phase: I
Project Period: March 1, 2006 through August 31, 2006
Project Amount: $69,981
RFA: Small Business Innovation Research (SBIR) - Phase I (2006) RFA Text | Recipients Lists
Research Category: Air Quality and Air Toxics , Particulate Matter , SBIR - Air Pollution , Small Business Innovation Research (SBIR)
Description:
There are more than 480,000 trucks on U.S. roads, and each vehicle produces up to 20 tons CO2, 420 lbs of CO, and 250 lbs of nitrous oxides per year while idling to produce auxiliary power needed for the driver’s comfort. The overall goal of this project is a Quiet Reliable and Compact Fuel Cell Base Auxiliary Power Unit (QRCFC-APU) to reduce significantly idling emissions. QRCFC overcomes the challenges with the diesel fuel reforming and the current fuel cell systems limitations to reliably convert diesel fuel to power on board the truck and replace idling. Under Phase I, QRCFC will be designed and its critical components and processes tested to provide the foundation for Phase II, in which the system will be fabricated and demonstrated. If QRCFC-APU penetrates just 20 percent of the truck APU market, it will result in the reduction of more than 12,000 tons on NOx; 20,160 tons of CO; and 1.5 million tons of CO2 emissions each year.
Idling trucks result in substantial fuel and maintenance cost for the truck owner and driver. Current diesel engine-based APU generators are too noisy and inefficient and lack the longevity and reliability needed for extended operation. When QRCFC-APU is available, the cost savings achieved by replacing truck idling with QRCFC-APUs, along with its quietness and high efficiency, will drive the commercialization of the system. This economic driver and other system attributes will allow QRCFC-APU to capture a substantial portion of the potential $2 billion market for truck APUs.


Back
----------------------------------------------------------------------------------------------------------------------
D-I-D-P-L
Versions
About
EMERGENCY CRASH!
Credits
Close NewType
THIS WEBSITE IS UNDERGOING HEAVY DEVELOPMENT.


| Class | Description |
|---|---|
| Base64 |
A very fast and memory efficient class to encode and decode to and from BASE64 in full accordance
with RFC 2045.
On Windows XP sp1 with 1.4.2_04 and later ;), this encoder and decoder is about 10 times faster on small arrays (10 - 1000 bytes) and 2-3 times as fast on larger arrays (10000 - 1000000 bytes) compared to sun.misc.Encoder()/Decoder() .On byte arrays the encoder is about 20% faster than Jakarta Commons Base64 Codec for encode and about 50% faster for decoding large arrays. |
| EmailUtils | |
| TextUtils |
Copyright © 2012 SubEthaSMTP. All Rights Reserved. Build version: 3.1.7


17
1 Yahweh said, "It is as though a list of the sins committed by the people of Judah is engraved with an iron chisel, or engraved using the fine point of a very hard stone,
on the altars where they worship idols, and it is as though this list is engraved on their inner beings!
2 Even their children fondly remember when they went to the altars for their gods, and to the poles that represent the goddess Asherah at which their parents worshiped,
shrines that are underneath all the big trees
and on all the high hills.
3 Their children remember these places on the hills. So I will allow your enemies to capture the mountain where you worship and the area around it,
and all your wealth and your treasures.
I will tell your enemies to take you to a land that you do not know about,
and you will become their slaves.

5 This is also what Yahweh says:
"Those who trust in human beings to help them are cursed,
those who rely on their own strength
and turn away from me with their inner beings.
6 They are like dry bushes in the desert,
they are people who will not experience any good things.
Those people will live in the barren desert
in a salty area, where no one can safely abide.
7 But Yahweh is pleased with those who trust in him,
and who confidently expect him to take care of them.
8 Those people are like fruit trees that have been planted along a riverbank,
trees that have roots that go down into the wet ground beside the water.
They are trees whose leaves remain green when it becomes hot,
trees that continue to bear fruit when there are many months in which there is no rain.
9 Human minds are extremely corrupt,
and we cannot change that.
It is also completely impossible for anyone to understand that.
10 But I, Yahweh, search what is in everyone's inner being,
and I examine what they are thinking.
I will give all people reward or punishment,
what they deserve for what they have done."
11 I know some people who become rich by doing things that are unjust.
They are like birds that hatch eggs that they did not lay.
So, when those people have lived only half of the years that they expect to live, they will disappear.

If you rescue me, I will truly be safe, because you are the only one whom I praise.
15 People often ridicule me and say,
"You tell us messages that you say came from Yahweh,
but why have the things that you predicted not happened?
16 Yahweh, you appointed me to take care of your people like a shepherd takes care of his sheep; I have not abandoned that work,
and you know that I have not previously wanted this time of disaster to come to people who ridicule me.

Cause them to be terrified!
Do to them many things that will completely destroy them!
19 This is what Yahweh said to me: "Go to the city gates in Jerusalem. First go to the gate where the kings of Judah go in and out of the city, and then go to each of the other gates.
20 Say to the people at each gate, 'You kings of Judah and everyone else who is living in Jerusalem and all you other people of Judah who enter these gates, listen to this message from Yahweh!
21 He says, "Listen to this warning carefully if you want to live! Stop doing work on Sabbath days! Stop carrying loads through these gates on those days!
22 Do not carry loads out of your houses or do any other work on Sabbath days! Instead, cause Sabbath days to be holy. I commanded your ancestors to do that,
23 but they did not listen to me or obey me. When I did things to correct them, they stubbornly refused to pay attention to what I said or to accept it.
24 But I say that if you obey me, and if you do not carry loads through these gates on Sabbath days or do any other work on Sabbath days, and if you dedicate the Sabbath days to me,
25 kings of Judah and their officials will continue to go in and out of these gates. There will always be someone who is a descendant of King David ruling here in Jerusalem. Kings and their officials will go in and out of these gates, riding in chariots and on horses, and there will be people living in this city forever.
26 And people will come to Jerusalem bringing offerings to be completely burned on the altar and other offerings. They will bring to the temple grain offerings and incense and offerings to thank me. People will bring these offerings from the towns in Judah and the villages near Jerusalem and from the land where the tribe of Benjamin lives and from the western foothills and from the southern Judean wilderness.
27 But if you do not pay attention to what I say, and if you refuse to dedicate the Sabbath days to me, and if you continue to carry loads through these gates into the city on Sabbath days, I will burn these gates completely. The fire will spread to the palaces, and no one will be able to put out that fire." ' "