The cinder.volume.drivers.huawei.rest_client
Module¶
-
class
RestClient
(configuration)¶ Bases:
object
Common class for Huawei OceanStor 18000 storage system.
-
activate_deactivate_qos
(qos_id, enablestatus)¶ Activate or deactivate QoS.
enablestatus: true (activate) enbalestatus: false (deactivate)
-
activate_snapshot
(snapshot_id)¶
-
add_fc_port_to_host
(host_id, wwn)¶ Add a FC port to the host.
-
add_host_into_hostgroup
(host_id)¶ Associate host to hostgroup.
If hostgroup doesn’t exist, create one.
-
add_host_with_check
(host_name, host_name_before_hash)¶
-
add_lun_to_cache
(lun_id, cache_id)¶
-
add_lun_to_partition
(lun_id, partition_id)¶
-
add_lun_to_qos
(qos_id, lun_id, lun_list)¶ Add lun to QoS.
-
associate_lun_to_lungroup
(lungroup_id, lun_id)¶ Associate lun to lungroup.
-
call
(*args, **kwargs)¶ Send requests to server.
If fail, try another RestURL.
-
change_lun_priority
(lun_id)¶ Change lun priority to high.
-
change_lun_smarttier
(lunid, smarttier_policy)¶ Change lun smarttier policy.
-
check_fc_initiators_exist_in_host
(host_id)¶
-
check_lun_exist
(lun_id)¶
-
check_snapshot_exist
(snapshot_id)¶
-
create_hostgroup_with_check
(hostgroup_name)¶ Check if host exists on the array, or create it.
-
create_lun_migration
(src_id, dst_id, speed=2)¶
-
create_luncopy
(luncopyname, srclunid, tgtlunid)¶ Create a luncopy.
-
create_qos_policy
(qos, lun_id)¶
-
create_snapshot
(snapshot)¶
-
create_volume
(lun_param)¶
-
delete_hostgoup_mapping_view
(view_id, hostgroup_id)¶ Remove hostgroup associate from the mapping view.
-
delete_hostgroup
(hostgroup_id)¶
-
delete_lun
(lun_id)¶
-
delete_lun_migration
(src_id, dst_id)¶
-
delete_luncopy
(luncopy_id)¶ Delete a LUNcopy.
-
delete_lungroup
(lungroup_id)¶
-
delete_lungroup_mapping_view
(view_id, lungroup_id)¶ Remove lungroup associate from the mapping view.
-
delete_mapping_view
(view_id)¶ Remove mapping view from the storage.
-
delete_portgroup_mapping_view
(view_id, portgroup_id)¶ Remove portgroup associate from the mapping view.
-
delete_qos_policy
(qos_id)¶ Delete a QoS policy.
-
delete_snapshot
(snapshotid)¶
-
do_call
(url=None, data=None, method=None, calltimeout=52)¶ Send requests to 18000 server.
Send HTTPS call, get response in JSON. Convert response into Python Object and return it.
-
do_mapping
(lun_id, hostgroup_id, host_id, tgtportgroup_id=None)¶ Add hostgroup and lungroup to mapping view.
-
ensure_fc_initiator_added
(initiator_name, host_id)¶
-
ensure_initiator_added
(xml_file_path, initiator_name, host_id)¶
-
extend_volume
(lun_id, new_volume_size)¶
-
find_all_pools
()¶
-
find_array_version
()¶
-
find_available_qos
(qos)¶ “Find available QoS on the array.
-
find_chap_info
(iscsi_conf, initiator_name)¶ Find CHAP info from xml.
-
find_host
(host_name)¶ Get the given host ID.
-
find_host_lun_id
(host_id, lun_id)¶
-
find_hostgroup
(groupname)¶ Get the given hostgroup id.
-
find_lungroup_from_map
(view_id)¶ Get lungroup from the given map
-
find_mapping_view
(name)¶ Find mapping view.
-
find_pool_info
(pool_name=None, result=None)¶
-
find_tgt_port_group
(tgt_port_group)¶ Find target portgroup id by target port group name.
-
get_cache_id_by_name
(name)¶
-
get_cache_info_by_id
(cacheid)¶
-
get_fc_ports_from_contr
(contr)¶
-
get_fc_ports_on_array
()¶
-
get_fc_target_wwpns
(wwn)¶
-
get_host_fc_initiators
(host_id)¶
-
get_host_iscsi_initiators
(host_id)¶
-
get_host_online_fc_initiators
(host_id)¶
-
get_init_targ_map
(wwns)¶
-
get_iscsi_params
(xml_file_path, connector)¶ Get target iSCSI params, including iqn, IP.
-
get_lun_info
(lun_id)¶
-
get_lun_list_in_qos
(qos_id)¶ Get the lun list in QoS.
-
get_lun_migration_task
()¶
-
get_luncopy_info
(luncopy_id)¶ Get LUNcopy information.
-
get_lungroupids_by_lunid
(lun_id)¶ Get lungroup ids by lun id.
-
get_lunid
(volume, volume_name)¶
-
get_lunnum_from_lungroup
(lungroup_id)¶ Check if there are still other luns associated to the lungroup.
-
get_online_free_wwns
()¶ Get online free WWNs.
If no new ports connected, return an empty list.
-
get_partition_id_by_name
(name)¶
-
get_partition_info_by_id
(partition_id)¶
-
get_qos
()¶
-
get_qos_info
(qos_id)¶ Get QoS information.
-
get_qosid_by_lunid
(lun_id)¶ Get QoS id by lun id.
-
get_snapshotid_by_name
(name)¶
-
get_volume_by_name
(name)¶
-
hostgroup_associated
(view_id, hostgroup_id)¶
-
init_http_head
()¶
-
is_fc_initiator_associated_to_host
(ininame)¶ Check whether the initiator is associated to the host.
-
is_initiator_associated_to_host
(ininame)¶ Check whether the initiator is associated to the host.
-
is_portgroup_associated_to_view
(view_id, portgroup_id)¶ Check whether the port group is associated to the mapping view.
-
login
()¶ Login 18000 array.
-
lungroup_associated
(view_id, lungroup_id)¶
-
remove_chap
(initiator_name)¶ Remove CHAP when terminate connection.
-
remove_fc_from_host
(initiator)¶
-
remove_host
(host_id)¶
-
remove_host_from_hostgroup
(hostgroup_id, host_id)¶
-
remove_iscsi_from_host
(initiator)¶
-
remove_lun_from_cache
(lun_id, cache_id)¶
-
remove_lun_from_lungroup
(lungroup_id, lun_id)¶ Remove lun from lungroup.
-
remove_lun_from_partition
(lun_id, partition_id)¶
-
remove_lun_from_qos
(lun_id, lun_list, qos_id)¶ Remove lun from QoS.
-
rename_lun
(lun_id, new_name)¶
-
start_luncopy
(luncopy_id)¶ Start a LUNcopy.
-
stop_snapshot
(snapshot_id)¶
-
update_volume_stats
()¶
-