'Check if a datastore is entering maintenance or in maintenance.
:param summary: Summary information about the datastore
:return: True if the datastore is entering maintenance or in
maintenance'

def _in_maintenance(self, summary):

    if hasattr(summary, 'maintenanceMode'):
        return (summary.maintenanceMode in ['enteringMaintenance', 'inMaintenance'])
    return False
