Skip to content

Instantly share code, notes, and snippets.

@WaltHP
Created May 17, 2016 18:27
Show Gist options
  • Select an option

  • Save WaltHP/b12070b52787e36cba2c362b6c6b908b to your computer and use it in GitHub Desktop.

Select an option

Save WaltHP/b12070b52787e36cba2c362b6c6b908b to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# -*- coding: utf-8 -*-
active = [{
u'failedPathPol': 1,
u'volumeName': u'osv-bAnG.s8FQ7OStMdtxS0Zow',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 2, u'slot': 2, u'cardPort': 1},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': True,
u'type': 4,
u'remoteName': u'iqn.1994-05.com.redhat:5e33ae675',
u'lun': 1,
u'volumeWWN': u'60002AC000000000000070E40000BD6A',
}, {
u'failedPathPol': 1,
u'volumeName': u'osv-bAnG.s8FQ7OStMdtxS0Zow',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 2, u'slot': 2, u'cardPort': 2},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': True,
u'type': 4,
u'remoteName': u'iqn.1994-05.com.redhat:5e33ae675',
u'lun': 1,
u'volumeWWN': u'60002AC000000000000070E40000BD6A',
}, {
u'failedPathPol': 1,
u'volumeName': u'osv-bAnG.s8FQ7OStMdtxS0Zow',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 3, u'slot': 2, u'cardPort': 1},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': True,
u'type': 4,
u'remoteName': u'iqn.1994-05.com.redhat:5e33ae675',
u'lun': 1,
u'volumeWWN': u'60002AC000000000000070E40000BD6A',
}]
inactive = [{
u'failedPathPol': 1,
u'volumeName': u'osv-bAnG.s8FQ7OStMdtxS0Zow',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 2, u'slot': 2, u'cardPort': 1},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': False,
u'type': 4,
u'lun': 1,
u'volumeWWN': u'60002AC000000000000070E40000BD6A',
}, {
u'failedPathPol': 1,
u'volumeName': u'osv-bAnG.s8FQ7OStMdtxS0Zow',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 2, u'slot': 2, u'cardPort': 2},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': False,
u'type': 4,
u'lun': 1,
u'volumeWWN': u'60002AC000000000000070E40000BD6A',
}, {
u'failedPathPol': 1,
u'volumeName': u'osv-bAnG.s8FQ7OStMdtxS0Zow',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 3, u'slot': 2, u'cardPort': 1},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': False,
u'type': 4,
u'lun': 1,
u'volumeWWN': u'60002AC000000000000070E40000BD6A',
}, {
u'failedPathPol': 1,
u'volumeName': u'osv-bAnG.s8FQ7OStMdtxS0Zow',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 3, u'slot': 2, u'cardPort': 2},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': False,
u'type': 4,
u'lun': 1,
u'volumeWWN': u'60002AC000000000000070E40000BD6A',
}]
delete = [{
u'failedPathPol': 1,
u'volumeName': u'osv-bAnG.s8FQ7OStMdtxS0Zow',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 2, u'slot': 2, u'cardPort': 1},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': True,
u'type': 4,
u'remoteName': u'iqn.1994-05.com.redhat:5e33ae675',
u'lun': 1,
u'volumeWWN': u'60002AC000000000000070E40000BD6A',
}, {
u'failedPathPol': 1,
u'volumeName': u'osv-bAnG.s8FQ7OStMdtxS0Zow',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 2, u'slot': 2, u'cardPort': 2},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': True,
u'type': 4,
u'remoteName': u'iqn.1994-05.com.redhat:5e33ae675',
u'lun': 1,
u'volumeWWN': u'60002AC000000000000070E40000BD6A',
}, {
u'failedPathPol': 1,
u'volumeName': u'osv-bAnG.s8FQ7OStMdtxS0Zow',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 3, u'slot': 2, u'cardPort': 1},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': True,
u'type': 4,
u'remoteName': u'iqn.1994-05.com.redhat:5e33ae675',
u'lun': 1,
u'volumeWWN': u'60002AC000000000000070E40000BD6A',
}]
a = {
u'failedPathPol': 1,
u'volumeName': u'osv-bAnG.s8FQ7OStMdtxS0Zow',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 2, u'slot': 2, u'cardPort': 1},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': True,
u'type': 4,
u'remoteName': u'iqn.1994-05.com.redhat:5e33ae675',
u'lun': 1,
u'volumeWWN': u'60002AC000000000000070E40000BD6A',
}
b = {
u'failedPathPol': 1,
u'volumeName': u'osv-bAnG.s8FQ7OStMdtxS0Zow',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 2, u'slot': 2, u'cardPort': 2},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': True,
u'type': 4,
u'remoteName': u'iqn.1994-05.com.redhat:5e33ae675',
u'lun': 1,
u'volumeWWN': u'60002AC000000000000070E40000BD6A',
}
c = {
u'failedPathPol': 1,
u'volumeName': u'osv-bAnG.s8FQ7OStMdtxS0Zow',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 3, u'slot': 2, u'cardPort': 1},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': True,
u'type': 4,
u'remoteName': u'iqn.1994-05.com.redhat:5e33ae675',
u'lun': 1,
u'volumeWWN': u'60002AC000000000000070E40000BD6A',
}
left_over = [
{
u'failedPathPol': 1,
u'volumeName': u'osv-.gfmWPYBQkajyclPqObCeg',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 2, u'slot': 2, u'cardPort': 1},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': True,
u'type': 4,
u'remoteName': u'iqn.1994-05.com.redhat:5e33ae675',
u'lun': 0,
u'volumeWWN': u'60002AC00000000000006FF30000BD6A',
},
{
u'failedPathPol': 1,
u'volumeName': u'osv-.gfmWPYBQkajyclPqObCeg',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 2, u'slot': 2, u'cardPort': 2},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': True,
u'type': 4,
u'remoteName': u'iqn.1994-05.com.redhat:5e33ae675',
u'lun': 0,
u'volumeWWN': u'60002AC00000000000006FF30000BD6A',
},
{
u'failedPathPol': 1,
u'volumeName': u'osv-.gfmWPYBQkajyclPqObCeg',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 3, u'slot': 2, u'cardPort': 1},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': True,
u'type': 4,
u'remoteName': u'iqn.1994-05.com.redhat:5e33ae675',
u'lun': 0,
u'volumeWWN': u'60002AC00000000000006FF30000BD6A',
},
{
u'failedPathPol': 1,
u'volumeName': u'osv-.gfmWPYBQkajyclPqObCeg',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 2, u'slot': 2, u'cardPort': 1},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': False,
u'type': 4,
u'lun': 0,
u'volumeWWN': u'60002AC00000000000006FF30000BD6A',
},
{
u'failedPathPol': 1,
u'volumeName': u'osv-.gfmWPYBQkajyclPqObCeg',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 2, u'slot': 2, u'cardPort': 2},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': False,
u'type': 4,
u'lun': 0,
u'volumeWWN': u'60002AC00000000000006FF30000BD6A',
},
{
u'failedPathPol': 1,
u'volumeName': u'osv-.gfmWPYBQkajyclPqObCeg',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 3, u'slot': 2, u'cardPort': 1},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': False,
u'type': 4,
u'lun': 0,
u'volumeWWN': u'60002AC00000000000006FF30000BD6A',
},
{
u'failedPathPol': 1,
u'volumeName': u'osv-bAnG.s8FQ7OStMdtxS0Zow',
u'hostname': u'dev-os-compute0067',
u'portPos': {u'node': 3, u'slot': 2, u'cardPort': 2},
u'multipathing': 1,
u'failedPathInterval': 0,
u'active': False,
u'type': 4,
u'lun': 1,
u'volumeWWN': u'60002AC000000000000070E40000BD6A',
},
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment