def test_find_by_str_displayname(self): output = utils.find_resource(self.manager, 'entity_three') self.assertEqual(output, self.manager.get('4242'))
def test_find_by_uuid(self): output = utils.find_resource(self.manager, UUID) self.assertEqual(output, self.manager.get(UUID))
def test_find_by_str_name(self): output = utils.find_resource(self.manager, 'entity_one') self.assertEqual(output, self.manager.get('1234'))
def _find_backup(cs, backup): """Get a backup by ID.""" return utils.find_resource(cs.backups, backup)
def test_find_by_integer_id(self): output = utils.find_resource(self.manager, 1234) self.assertEqual(output, self.manager.get('1234'))
def _find_monitor(cs, monitor): """Get a monitor by ID.""" return utils.find_resource(cs.monitors, monitor)
def _find_monitor_snapshot(cs, snapshot): """Get a monitor snapshot by ID.""" return utils.find_resource(cs.monitor_snapshots, snapshot)
def _find_monitor_type(cs, vtype): """Get a monitor type by name or ID.""" return utils.find_resource(cs.monitor_types, vtype)