ZBLOG

@option("name", desc="Required. Access path name.") @option("p_name", desc="Required. Pool name.") # @option("pid", desc="Required. Pool id.") @option("type", desc

The function create_access_path creates a new access path in the system. It takes in various options as arguments such as the name of the access path, pool name, type of access path, description, initiator group name, volume name list, portal group name list, volume rw permissions, CHAP username and password for target.

Firstly, it calls the get_pid_by_pool_name function to retrieve the pool id by pool name. Then, it retrieves the initiator group id by initiator group name through the get_igid_by_name function and volume id list by volume name list through get_vid_list_by_vllist function. Similarly, it retrieves portal group id list by portal group name list using the get_pgid_list_by_pglist function.

It sets various options for the access path such as pid, igid, vid_list, pgid_list, ap_type, and rw_state, based on the retrieved information and passed arguments. It then creates an instance of accessPath class and calls its create method passing the options as an argument to create a new access path in the system.

Finally, it prints the result returned by the create method using the print_res function.

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:https://golang.0voice.com/?id=123

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

在线咨询: 点击这里给我发消息

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?