Ejemplo n.º 1
0
def _find_share_snapshot(cs, snapshot):
    """Get a snapshot by ID."""
    return utils.find_resource(cs.share_snapshots, snapshot)
Ejemplo n.º 2
0
def _find_share_snapshot(cs, snapshot):
    """Get a snapshot by ID."""
    return utils.find_resource(cs.share_snapshots, snapshot)
Ejemplo n.º 3
0
def _find_share(cs, share):
    """Get a share by ID."""
    return utils.find_resource(cs.shares, share)
Ejemplo n.º 4
0
 def test_find_by_str_displayname(self):
     output = utils.find_resource(self.manager, 'entity_three')
     self.assertEqual(output, self.manager.get('4242'))
Ejemplo n.º 5
0
def _find_share(cs, share):
    """Get a share by ID."""
    return utils.find_resource(cs.shares, share)
Ejemplo n.º 6
0
 def test_find_by_str_name(self):
     output = utils.find_resource(self.manager, 'entity_one')
     self.assertEqual(output, self.manager.get('1234'))
Ejemplo n.º 7
0
 def test_find_by_uuid(self):
     output = utils.find_resource(self.manager, UUID)
     self.assertEqual(output, self.manager.get(UUID))
Ejemplo n.º 8
0
 def test_find_by_integer_id(self):
     output = utils.find_resource(self.manager, 1234)
     self.assertEqual(output, self.manager.get('1234'))
Ejemplo n.º 9
0
def _find_share_network(cs, share_network):
    "Get a share network by ID or name."
    return utils.find_resource(cs.share_networks, share_network)
Ejemplo n.º 10
0
def _find_volume_type(cs, vtype):
    """Get a volume type by name or ID."""
    return utils.find_resource(cs.volume_types, vtype)