Пример #1
0
def _find_backup(cs, backup):
    """Get a backup by ID."""
    return utils.find_resource(cs.backups, backup)
Пример #2
0
def _find_vsm_type(cs, vtype):
    """Get a vsm type by name or ID."""
    return utils.find_resource(cs.vsm_types, vtype)
Пример #3
0
def _find_vsm_snapshot(cs, snapshot):
    """Get a vsm snapshot by ID."""
    return utils.find_resource(cs.vsm_snapshots, snapshot)
Пример #4
0
 def test_find_by_str_displayname(self):
     output = utils.find_resource(self.manager, 'entity_three')
     self.assertEqual(output, self.manager.get('4242'))
Пример #5
0
def _find_vsm(cs, vsm):
    """Get a vsm by ID."""
    return utils.find_resource(cs.vsms, vsm)
Пример #6
0
 def test_find_by_uuid(self):
     output = utils.find_resource(self.manager, UUID)
     self.assertEqual(output, self.manager.get(UUID))
Пример #7
0
 def test_find_by_str_name(self):
     output = utils.find_resource(self.manager, 'entity_one')
     self.assertEqual(output, self.manager.get('1234'))
Пример #8
0
def _find_backup(cs, backup):
    """Get a backup by ID."""
    return utils.find_resource(cs.backups, backup)
Пример #9
0
 def test_find_by_integer_id(self):
     output = utils.find_resource(self.manager, 1234)
     self.assertEqual(output, self.manager.get('1234'))
Пример #10
0
def _find_vsm(cs, vsm):
    """Get a vsm by ID."""
    return utils.find_resource(cs.vsms, vsm)
Пример #11
0
def _find_vsm_snapshot(cs, snapshot):
    """Get a vsm snapshot by ID."""
    return utils.find_resource(cs.vsm_snapshots, snapshot)
Пример #12
0
def _find_vsm_type(cs, vtype):
    """Get a vsm type by name or ID."""
    return utils.find_resource(cs.vsm_types, vtype)
Пример #13
0
 def test_find_by_str_displayname(self):
     output = utils.find_resource(self.manager, 'entity_three')
     self.assertEqual(output, self.manager.get('4242'))
Пример #14
0
 def test_find_by_str_name(self):
     output = utils.find_resource(self.manager, 'entity_one')
     self.assertEqual(output, self.manager.get('1234'))
Пример #15
0
 def test_find_by_uuid(self):
     output = utils.find_resource(self.manager, UUID)
     self.assertEqual(output, self.manager.get(UUID))
Пример #16
0
 def test_find_by_integer_id(self):
     output = utils.find_resource(self.manager, 1234)
     self.assertEqual(output, self.manager.get('1234'))