Skip to content

Instantly share code, notes, and snippets.

@j-griffith
Created November 20, 2017 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j-griffith/fe0cbe90d7fd8c067d0568b8e9313d57 to your computer and use it in GitHub Desktop.
Save j-griffith/fe0cbe90d7fd8c067d0568b8e9313d57 to your computer and use it in GitHub Desktop.
attach responses
##################################################
# Cinder V3.27 attach API response
##################################################
# attachment_create (returns a dict)
{
'status': 'reserved',
'detached_at': '',
'connection_info': {},
'attached_at': '',
'attach_mode': None,
'instance': '5cc249db-583c-45f6-9385-ff4229d5143b',
'volume_id': 'aacf9944-285b-4a4d-9c5d-6e8b5029700b',
'id': 'b44dbee6-7a0d-4e70-a406-99c4b9bea674'
}
# attachment_update (returns an attachment object)
{
'status': 'reserved',
'detached_at': '',
'connection_info':
{'access_mode': 'rw',
'attachment_id': '15e9549b-7f4b-4e08-8835-cd6ee451eba7',
'target_discovered': False,
'encrypted': False,
'driver_volume_type': 'iscsi',
'qos_specs': None,
'target_iqn': 'iqn.2010-10.org.openstack:volume-aacf9944-285b-4a4d-9c5d-6e8b5029700b',
'target_portal': '192.168.33.29:3260',
'volume_id': 'aacf9944-285b-4a4d-9c5d-6e8b5029700b',
'target_lun': 0,
'auth_password': 'nM5ZjD8u4dyF6yRJ',
'auth_username': '3NMRxM5Y2Fojsp5U6G5s',
'auth_method': 'CHAP'
},
'attached_at': '',
'attach_mode': None,
'instance': '5cc249db-583c-45f6-9385-ff4229d5143b',
'volume_id': 'aacf9944-285b-4a4d-9c5d-6e8b5029700b',
'id': '15e9549b-7f4b-4e08-8835-cd6ee451eba7'
}
##################################################
# Cinder V2/3.0 initialize_connection response
##################################################
# initialize_connection (connection_info):
{
'driver_volume_type': 'iscsi',
'connector':
{
'platform': 'x86_64',
'host': 'os-1',
'do_local_attach': False,
'ip': '192.168.33.29',
'os_type': 'linux2',
'multipath': False,
'initiator': 'iqn.1993-08.org.debian:01:aa17a9463a46'
},
'data':
{
'access_mode': 'rw',
'target_discovered': False,
'encrypted': False,
'qos_specs': None,
'target_iqn': 'iqn.2010-10.org.openstack:volume-2dee7e77-f230-4878-abc1-e0e875c48dba',
'target_portal': '192.168.33.29:3260',
'volume_id': '2dee7e77-f230-4878-abc1-e0e875c48dba',
'target_lun': 0,
'auth_password': 'bT6FRdeiQ9CYH6b6',
'auth_username': 'RdP7NV5kooYYApCLP9h4',
'auth_method': 'CHAP'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment