예제 #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)