~ubuntu-branches/ubuntu/raring/python-novaclient/raring

« back to all changes in this revision

Viewing changes to tests/v1_1/test_shell.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-09-27 08:59:05 UTC
  • mfrom: (1.1.25)
  • Revision ID: package-import@ubuntu.com-20120927085905-oosk1yjuf83uifpd
Tags: 1:2.9.0-0ubuntu1
New upstream release. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
                'imageRef': '1',
83
83
                'min_count': 1,
84
84
                'max_count': 1,
 
85
                'networks': [],
85
86
                }},
86
87
        )
87
88
 
97
98
                'metadata': {'foo': 'bar=pants', 'spam': 'eggs'},
98
99
                'min_count': 1,
99
100
                'max_count': 1,
 
101
                'networks': [],
100
102
            }},
101
103
        )
102
104
 
111
113
                    'imageRef': '1',
112
114
                    'min_count': 1,
113
115
                    'max_count': 1,
 
116
                    'networks': [],
114
117
                },
115
118
                'os:scheduler_hints': {'a': 'b=c'},
116
119
            },
152
155
                'imageRef': '1',
153
156
                'min_count': 1,
154
157
                'max_count': 1,
 
158
                'networks': [],
155
159
                'personality': [
156
160
                   {'path': '/tmp/bar', 'contents': expected_file_data},
157
161
                   {'path': '/tmp/foo', 'contents': expected_file_data},
167
171
 
168
172
    def test_flavor_list(self):
169
173
        self.run_command('flavor-list')
 
174
        self.assert_called('GET', '/flavors/2/os-extra_specs')
170
175
        self.assert_called_anytime('GET', '/flavors/detail')
171
176
 
172
177
    def test_flavor_show(self):
173
178
        self.run_command('flavor-show 1')
174
 
        self.assert_called('GET', '/flavors/1')
 
179
        self.assert_called_anytime('GET', '/flavors/1')
175
180
 
176
181
    def test_image_show(self):
177
182
        self.run_command('image-show 1')
374
379
        self.run_command("flavor-create flavorcreate "
375
380
                         "1234 512 10 1 --swap 1024 --ephemeral 10 "
376
381
                         "--is-public true")
377
 
 
378
 
        body = {
379
 
            "flavor": {
380
 
                "name": "flavorcreate",
381
 
                "ram": 512,
382
 
                "vcpus": 1,
383
 
                "disk": 10,
384
 
                "OS-FLV-EXT-DATA:ephemeral": 10,
385
 
                "id": 1234,
386
 
                "swap": 1024,
387
 
                "rxtx_factor": 1,
388
 
                "os-flavor-access:is_public": True,
389
 
            }
390
 
        }
391
 
 
392
 
        self.assert_called('POST', '/flavors', body, pos=-2)
393
 
        self.assert_called('GET', '/flavors/1')
 
382
        self.assert_called('POST', '/flavors', pos=-3)
 
383
        self.assert_called('GET', '/flavors/1', pos=-2)
 
384
        self.assert_called('GET', '/flavors/1/os-extra_specs', pos=-1)
394
385
 
395
386
    def test_aggregate_list(self):
396
387
        self.run_command('aggregate-list')
534
525
    def test_quota_class_update(self):
535
526
        self.run_command('quota-class-update test --instances=5')
536
527
        self.assert_called('PUT', '/os-quota-class-sets/test')
 
528
 
 
529
    def test_network_list(self):
 
530
        self.run_command('network-list')
 
531
        self.assert_called('GET', '/os-networks')
 
532
 
 
533
    def test_network_show(self):
 
534
        self.run_command('network-show 1')
 
535
        self.assert_called('GET', '/os-networks/1')