Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multivlan ipfix #768

Open
wants to merge 3 commits into
base: plugin_v2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion hpedockerplugin/hpe/hpe_3par_iscsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,25 @@ def initialize_iscsi_ports(self, common):
# when found, add the valid iSCSI ip, ip port, iqn and nsp
# to the iSCSI IP dictionary
iscsi_ports = common.get_active_iscsi_target_ports()
LOG.info('iscsi_ports received from client are %s ' % iscsi_ports)

for port in iscsi_ports:
ip = port['IPAddr']
if ip in temp_iscsi_ip:
len_iSCSIVlans = len(port['iSCSIVlans'])
if len_iSCSIVlans > 0:
iSCSIVlans = port['iSCSIVlans']
tmpip = []
for val in iSCSIVlans:
tmpip.append(val['IPAddr'])
LOG.info('single port more ips, ips are : %s ' % tmpip)
for ipaddr in tmpip:
if ipaddr in temp_iscsi_ip:
ipPort = temp_iscsi_ip[ipaddr]['ip_port']
self.iscsi_ips[ipaddr] = {'ip_port': ipPort,
'nsp': port['nsp'],
'iqn': port['iSCSIName']}
del temp_iscsi_ip[ipaddr]
elif ip in temp_iscsi_ip:
ip_port = temp_iscsi_ip[ip]['ip_port']
self.iscsi_ips[ip] = {'ip_port': ip_port,
'nsp': port['nsp'],
Expand Down Expand Up @@ -246,6 +261,16 @@ def initialize_connection(self, volume, connector, is_snap):
lun_id = None
for port in ready_ports:
iscsi_ip = port['IPAddr']
len_iSCSIVlans = len(port['iSCSIVlans'])
tmpip = []
if len_iSCSIVlans > 0:
iSCSIVlans = port['iSCSIVlans']
for val in iSCSIVlans:
tmpip.append(val['IPAddr'])
if len(tmpip) > 0:
for targ_ip in tmpip:
if targ_ip in target_portal_ips:
iscsi_ip = targ_ip
if iscsi_ip in target_portal_ips:
vlun = None
# check for an already existing VLUN matching the
Expand Down