示例#1
0
def _find_share_snapshot(cs, snapshot):
    """Get a snapshot by ID."""
    return utils.find_resource(cs.share_snapshots, snapshot)
示例#2
0
def _find_share_snapshot(cs, snapshot):
    """Get a snapshot by ID."""
    return utils.find_resource(cs.share_snapshots, snapshot)
示例#3
0
def _find_share(cs, share):
    """Get a share by ID."""
    return utils.find_resource(cs.shares, share)
示例#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_share(cs, share):
    """Get a share by ID."""
    return utils.find_resource(cs.shares, share)
示例#6
0
 def test_find_by_str_name(self):
     output = utils.find_resource(self.manager, 'entity_one')
     self.assertEqual(output, self.manager.get('1234'))
示例#7
0
 def test_find_by_uuid(self):
     output = utils.find_resource(self.manager, UUID)
     self.assertEqual(output, self.manager.get(UUID))
示例#8
0
 def test_find_by_integer_id(self):
     output = utils.find_resource(self.manager, 1234)
     self.assertEqual(output, self.manager.get('1234'))
示例#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)
示例#10
0
def _find_volume_type(cs, vtype):
    """Get a volume type by name or ID."""
    return utils.find_resource(cs.volume_types, vtype)