The cinder.zonemanager.drivers.brocade.brcd_http_fc_zone_client Module

Brocade south bound connector to communicate with switch using HTTP or HTTPS protocol.

class BrcdHTTPFCZoneClient(ipaddress, username, password, port, vfid, protocol)

Bases: object

add_update_zones_cfgs(cfgs, zones, add_zones_info, active_cfg, cfg_name)

Add or update the zones and cfgs map based on the new zones info.

This method will return the updated zones,cfgs and active_cfg

Parameters:
  • cfgs – Existing cfgs map
  • active_cfg – Existing Active cfg string
  • zones – Existing zones map

:param add_zones_info :Zones map to add :param active_cfg :Existing active cfg :param cfg_name : New cfg name :returns: updated zones, zone configs map, and active_cfg

add_zones(add_zones_info, activate, active_zone_set=None)

Add zone configuration.

This method will add the zone configuration passed by user.

Parameters:
  • add_zones_info

    Zone names mapped to members. zone members are colon separated but case-insensitive { zonename1:[zonememeber1,zonemember2,...],

    zonename2:[zonemember1, zonemember2,...]...}
    e.g: {‘openstack50060b0000c26604201900051ee8e329’:
    [‘50:06:0b:00:00:c2:66:04’, ‘20:19:00:05:1e:e8:e3:29’]

    }R

  • activate – True will activate the zone config.
  • active_zone_set – Active zone set dict retrieved from get_active_zone_set method
Raises:

BrocadeZoningHttpException

authenticate()

Authenticate with the switch.

Returns authentication status with modified authentication header (Base64(username:xxx:random no)).

Returns:Authentication status
Raises:BrocadeZoningHttpException
change_vf_context(vfid, session_data)

Change the VF context in the session.

Parameters:
  • vfid – VFID to which context should be changed.
  • session_data – Session information from the switch
Raises:

BrocadeZoningHttpException

check_change_vf_context()

Check whether VF related configurations is valid and proceed.

cleanup()

Close session.

connect(requestType, requestURL, payload='', header=None)

Connect to the switch using HTTP/HTTPS protocol.

Parameters:
  • requestType – Connection Request method
  • requestURL – Connection URL
  • payload – Data to send with POST request
  • header – Request Headers
Returns:

HTTP response data

Raises:

BrocadeZoningHttpException

create_auth_token()

Create the authentication token.

Creates the authentication token to use in the authentication header return authentication header (Base64(username:password:random no)).

Returns:Authentication Header
Raises:BrocadeZoningHttpException
delete_update_zones_cfgs(cfgs, zones, delete_zones_info, active_cfg)

Add or update the zones and cfgs map based on the new zones info.

Return the updated zones, cfgs and active_cfg after deleting the required items.

Parameters:
  • cfgs – Existing cfgs map
  • active_cfg – Existing Active cfg string
  • zones – Existing zones map

:param delete_zones_info :Zones map to add :param active_cfg :Existing active cfg :returns: updated zones, zone config sets, and active zone config :raises: BrocadeZoningHttpException

delete_zones(delete_zones_info, activate, active_zone_set=None)

Delete zones from fabric.

Deletes zones in the active zone config.

Parameters:
  • zone_names – zoneNames separated by semicolon
  • activate – True/False
  • active_zone_set – the active zone set dict retrieved from get_active_zone_set method
form_zone_string(cfgs, active_cfg, zones, alias, qlps, ifas, activate)

Build the zone string in the required format.

Parameters:
  • cfgs – cfgs map
  • active_cfg – Active cfg string
  • zones – zones map
  • alias – alias map
  • qlps – qlps map
  • ifas – ifas map
  • activate – True will activate config.
Returns:

zonestring in the required format

Raises:

BrocadeZoningHttpException

get_active_zone_set()

Return the active zone configuration.

Return active zoneset from fabric. When none of the configurations are active then it will return empty map.

Returns:Map – active zone set map in the following format
{
‘zones’:
{‘openstack50060b0000c26604201900051ee8e329’:
[‘50060b0000c26604’, ‘201900051ee8e329’]

},

‘active_zone_config’: ‘OpenStack_Cfg’

} :raises: BrocadeZoningHttpException

get_managable_vf_list(session_info)

List of VFIDs that can be managed.

Parameters:session_info – Session information from the switch
Returns:manageable VF list
Raises:BrocadeZoningHttpException
get_nameserver_info()

Get name server data from fabric.

Return the connected node port wwn list(local and remote) for the given switch fabric.

Returns:name server information.
get_nvp_value(data, keyname)

Get the value for the key passed.

Parameters:
  • data – NVP to manipulate
  • keyname – Key name
Returns:

value for the NVP

get_parsed_data(data, delim1, demil2)

Return the sub string between the delimiters.

Parameters:data – String to manipulate

:param delim1 : Delimiter 1 :param delim2 : Delimiter 2 :returns: substring between the delimiters

get_session_info()

Get the session information from the switch

Returns:Connection status information.
get_zone_info()

Parse all the zone information and store it in the dictionary.

is_supported_firmware()

Check firmware version is v6.4 or higher.

This API checks if the firmware version per the plug-in support level. This only checks major and minor version.

Returns:True if firmware is supported else False.
Raises:BrocadeZoningHttpException
is_vf_enabled()

To check whether VF is enabled or not.

Returns:boolean to indicate VF enabled and session information
post_zone_data(data)

Send POST request to the switch with the payload.

Parameters:data – payload to be sent to switch

Previous topic

The cinder.zonemanager.drivers.brocade.brcd_fc_zone_driver Module

Next topic

The cinder.zonemanager.drivers.brocade.fc_zone_constants Module

Project Source

This Page