Пример #1
0
 def re_materialize_owners():
     for device in DeviceDomain.get({'@type': 'Computer'}):
         materialize_owners([device['_id']])
     print('Owners re-materialized in devices.')
Пример #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'])
Пример #3
0
 def re_materialize_owners():
     for device in DeviceDomain.get({'@type': 'Computer'}):
         materialize_owners([device['_id']])
     print('Owners re-materialized in devices.')
Пример #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'])