def _find_backup(cs, backup): """Get a backup by ID.""" return utils.find_resource(cs.backups, backup)
def _find_vsm_type(cs, vtype): """Get a vsm type by name or ID.""" return utils.find_resource(cs.vsm_types, vtype)
def _find_vsm_snapshot(cs, snapshot): """Get a vsm snapshot by ID.""" return utils.find_resource(cs.vsm_snapshots, snapshot)
def test_find_by_str_displayname(self): output = utils.find_resource(self.manager, 'entity_three') self.assertEqual(output, self.manager.get('4242'))
def _find_vsm(cs, vsm): """Get a vsm by ID.""" return utils.find_resource(cs.vsms, vsm)
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 test_find_by_integer_id(self): output = utils.find_resource(self.manager, 1234) self.assertEqual(output, self.manager.get('1234'))