~ubuntu-branches/ubuntu/trusty/python-cinderclient/trusty

« back to all changes in this revision

Viewing changes to cinderclient/tests/v1/fakes.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2014-03-06 15:15:14 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20140306151514-ihbixyaopbhaqdju
Tags: 1:1.0.8-0ubuntu1
* New upstream release.
* debian/patches/fix-search-opts.patch: Dropped no longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        "bootable": "false",
36
36
        "availability_zone": "cinder",
37
37
        "created_at": "2012-08-27T00:00:00.000000",
38
 
        "display_description": None,
39
 
        "display_name": None,
40
38
        "id": '00000000-0000-0000-0000-000000000000',
41
39
        "metadata": {},
42
40
        "size": 1,
260
258
    def get_snapshots_1234(self, **kw):
261
259
        return (200, {}, {'snapshot': _stub_snapshot(id='1234')})
262
260
 
 
261
    def get_snapshots_5678(self, **kw):
 
262
        return (200, {}, {'snapshot': _stub_snapshot(id='5678')})
 
263
 
263
264
    def put_snapshots_1234(self, **kw):
264
265
        snapshot = _stub_snapshot(id='1234')
265
266
        snapshot.update(kw['body']['snapshot'])
278
279
            raise AssertionError("Unexpected action: %s" % action)
279
280
        return (resp, {}, _body)
280
281
 
 
282
    def post_snapshots_5678_action(self, body, **kw):
 
283
        return self.post_snapshots_1234_action(body, **kw)
 
284
 
 
285
    def delete_snapshots_1234(self, **kw):
 
286
        return (202, {}, {})
 
287
 
281
288
    #
282
289
    # Volumes
283
290
    #
351
358
            raise AssertionError("Unexpected action: %s" % action)
352
359
        return (resp, {}, _body)
353
360
 
 
361
    def post_volumes_5678_action(self, body, **kw):
 
362
        return self.post_volumes_1234_action(body, **kw)
 
363
 
354
364
    def post_volumes(self, **kw):
355
365
        return (202, {}, {'volume': {}})
356
366
 
468
478
    def put_types_1_encryption_1(self, body, **kw):
469
479
        return (200, {}, {})
470
480
 
 
481
    def delete_types_1_encryption_provider(self, **kw):
 
482
        return (202, {}, None)
 
483
 
471
484
    #
472
485
    # Set/Unset metadata
473
486
    #
689
702
 
690
703
    def put_os_services_enable(self, body, **kw):
691
704
        return (200, {}, {'host': body['host'], 'binary': body['binary'],
 
705
                'status': 'enabled'})
 
706
 
 
707
    def put_os_services_disable(self, body, **kw):
 
708
        return (200, {}, {'host': body['host'], 'binary': body['binary'],
692
709
                'status': 'disabled'})
693
710
 
694
 
    def put_os_services_disable(self, body, **kw):
695
 
        return (200, {}, {'host': body['host'], 'binary': body['binary'],
696
 
                'status': 'enabled'})
697
 
 
698
711
    def get_os_availability_zone(self, **kw):
699
712
        return (200, {}, {
700
713
            "availabilityZoneInfo": [