Example #1
0
 def test_find_by_str_displayname(self):
     output = utils.find_resource(self.manager, 'entity_three')
     self.assertEqual(output, self.manager.get('4242'))
Example #2
0
 def test_find_by_uuid(self):
     output = utils.find_resource(self.manager, UUID)
     self.assertEqual(output, self.manager.get(UUID))
Example #3
0
 def test_find_by_str_name(self):
     output = utils.find_resource(self.manager, 'entity_one')
     self.assertEqual(output, self.manager.get('1234'))
Example #4
0
def _find_backup(cs, backup):
    """Get a backup by ID."""
    return utils.find_resource(cs.backups, backup)
Example #5
0
 def test_find_by_integer_id(self):
     output = utils.find_resource(self.manager, 1234)
     self.assertEqual(output, self.manager.get('1234'))
Example #6
0
def _find_monitor(cs, monitor):
    """Get a monitor by ID."""
    return utils.find_resource(cs.monitors, monitor)
Example #7
0
def _find_monitor_snapshot(cs, snapshot):
    """Get a monitor snapshot by ID."""
    return utils.find_resource(cs.monitor_snapshots, snapshot)
Example #8
0
def _find_backup(cs, backup):
    """Get a backup by ID."""
    return utils.find_resource(cs.backups, backup)
Example #9
0
def _find_monitor_type(cs, vtype):
    """Get a monitor type by name or ID."""
    return utils.find_resource(cs.monitor_types, vtype)
Example #10
0
def _find_monitor_type(cs, vtype):
    """Get a monitor type by name or ID."""
    return utils.find_resource(cs.monitor_types, vtype)
Example #11
0
def _find_monitor_snapshot(cs, snapshot):
    """Get a monitor snapshot by ID."""
    return utils.find_resource(cs.monitor_snapshots, snapshot)
Example #12
0
def _find_monitor(cs, monitor):
    """Get a monitor by ID."""
    return utils.find_resource(cs.monitors, monitor)
Example #13
0
 def test_find_by_str_displayname(self):
     output = utils.find_resource(self.manager, 'entity_three')
     self.assertEqual(output, self.manager.get('4242'))
Example #14
0
 def test_find_by_str_name(self):
     output = utils.find_resource(self.manager, 'entity_one')
     self.assertEqual(output, self.manager.get('1234'))
Example #15
0
 def test_find_by_uuid(self):
     output = utils.find_resource(self.manager, UUID)
     self.assertEqual(output, self.manager.get(UUID))
Example #16
0
 def test_find_by_integer_id(self):
     output = utils.find_resource(self.manager, 1234)
     self.assertEqual(output, self.manager.get('1234'))