def re_materialize_owners():
     for device in DeviceDomain.get({'@type': 'Computer'}):
         materialize_owners([device['_id']])
     print('Owners re-materialized in devices.')
Example #2
0
def re_materialize_owners(_, event: dict):
    """Deleting an Allocate / deallocate requires """
    if event.get('@type') in ('devices:Allocate', 'devices:Deallocate'):
        from ereuse_devicehub.resources.event.device.allocate.allocate import materialize_owners
        materialize_owners(event['devices'])
Example #3
0
 def re_materialize_owners():
     for device in DeviceDomain.get({'@type': 'Computer'}):
         materialize_owners([device['_id']])
     print('Owners re-materialized in devices.')
Example #4
0
def re_materialize_owners(_, event: dict):
    """Deleting an Allocate / deallocate requires """
    if event.get('@type') in ('devices:Allocate', 'devices:Deallocate'):
        from ereuse_devicehub.resources.event.device.allocate.allocate import materialize_owners
        materialize_owners(event['devices'])