Example #1
0
 def _create_vs_get():
     """Create vs_get API request."""
     vs_get = NaElement('vserver-get-iter')
     vs_get.add_new_child('max-records', '1')
     query = NaElement('query')
     query.add_node_with_children('vserver-info',
                                  **{'vserver-type': 'node'})
     vs_get.add_child_elem(query)
     desired = NaElement('desired-attributes')
     desired.add_node_with_children(
         'vserver-info', **{'vserver-name': '', 'vserver-type': ''})
     vs_get.add_child_elem(desired)
     return vs_get
Example #2
0
 def _create_vs_get():
     """Create vs_get API request."""
     vs_get = NaElement('vserver-get-iter')
     vs_get.add_new_child('max-records', '1')
     query = NaElement('query')
     query.add_node_with_children('vserver-info',
                                  **{'vserver-type': 'node'})
     vs_get.add_child_elem(query)
     desired = NaElement('desired-attributes')
     desired.add_node_with_children(
         'vserver-info', **{
             'vserver-name': '',
             'vserver-type': ''
         })
     vs_get.add_child_elem(desired)
     return vs_get
Example #3
0
 def _create_ems(netapp_backend, app_version, server_type):
     """Create ems API request."""
     ems_log = NaElement('ems-autosupport-log')
     host = socket.getfqdn() or 'Cinder_node'
     if server_type == "cluster":
         dest = "cluster node"
     else:
         dest = "7 mode controller"
     ems_log.add_new_child('computer-name', host)
     ems_log.add_new_child('event-id', '0')
     ems_log.add_new_child('event-source',
                           'Cinder driver %s' % netapp_backend)
     ems_log.add_new_child('app-version', app_version)
     ems_log.add_new_child('category', 'provisioning')
     ems_log.add_new_child('event-description',
                           'OpenStack Cinder connected to %s' % dest)
     ems_log.add_new_child('log-level', '6')
     ems_log.add_new_child('auto-support', 'false')
     return ems_log
Example #4
0
 def _create_ems(netapp_backend, app_version, server_type):
     """Create ems API request."""
     ems_log = NaElement('ems-autosupport-log')
     host = socket.getfqdn() or 'Cinder_node'
     if server_type == "cluster":
         dest = "cluster node"
     else:
         dest = "7 mode controller"
     ems_log.add_new_child('computer-name', host)
     ems_log.add_new_child('event-id', '0')
     ems_log.add_new_child('event-source',
                           'Cinder driver %s' % netapp_backend)
     ems_log.add_new_child('app-version', app_version)
     ems_log.add_new_child('category', 'provisioning')
     ems_log.add_new_child('event-description',
                           'OpenStack Cinder connected to %s' % dest)
     ems_log.add_new_child('log-level', '6')
     ems_log.add_new_child('auto-support', 'false')
     return ems_log