~ubuntu-branches/ubuntu/raring/cinder/raring-updates

« back to all changes in this revision

Viewing changes to cinder/tests/test_volume_rpcapi.py

Tags: upstream-2013.1~g2
ImportĀ upstreamĀ versionĀ 2013.1~g2

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
 
110
110
    def test_create_volume(self):
111
111
        self._test_volume_api('create_volume',
112
 
                            rpc_method='cast',
113
 
                            volume=self.fake_volume,
114
 
                            host='fake_host1',
115
 
                            snapshot_id='fake_snapshot_id',
116
 
                            image_id='fake_image_id')
 
112
                              rpc_method='cast',
 
113
                              volume=self.fake_volume,
 
114
                              host='fake_host1',
 
115
                              snapshot_id='fake_snapshot_id',
 
116
                              image_id='fake_image_id',
 
117
                              source_volid='fake_src_id',
 
118
                              version='1.1')
117
119
 
118
120
    def test_delete_volume(self):
119
121
        self._test_volume_api('delete_volume',
120
 
                            rpc_method='cast',
121
 
                            volume=self.fake_volume)
 
122
                              rpc_method='cast',
 
123
                              volume=self.fake_volume)
122
124
 
123
125
    def test_create_snapshot(self):
124
126
        self._test_volume_api('create_snapshot',
125
 
                            rpc_method='cast',
126
 
                            volume=self.fake_volume,
127
 
                            snapshot=self.fake_snapshot)
 
127
                              rpc_method='cast',
 
128
                              volume=self.fake_volume,
 
129
                              snapshot=self.fake_snapshot)
128
130
 
129
131
    def test_delete_snapshot(self):
130
132
        self._test_volume_api('delete_snapshot',
131
 
                            rpc_method='cast',
132
 
                            snapshot=self.fake_snapshot,
133
 
                            host='fake_host')
 
133
                              rpc_method='cast',
 
134
                              snapshot=self.fake_snapshot,
 
135
                              host='fake_host')
134
136
 
135
137
    def test_attach_volume(self):
136
138
        self._test_volume_api('attach_volume',
137
 
                            rpc_method='call',
138
 
                            volume=self.fake_volume,
139
 
                            instance_uuid='fake_uuid',
140
 
                            mountpoint='fake_mountpoint')
 
139
                              rpc_method='call',
 
140
                              volume=self.fake_volume,
 
141
                              instance_uuid='fake_uuid',
 
142
                              mountpoint='fake_mountpoint')
141
143
 
142
144
    def test_detach_volume(self):
143
145
        self._test_volume_api('detach_volume',
144
 
                            rpc_method='call',
145
 
                            volume=self.fake_volume)
 
146
                              rpc_method='call',
 
147
                              volume=self.fake_volume)
146
148
 
147
149
    def test_copy_volume_to_image(self):
148
150
        self._test_volume_api('copy_volume_to_image',
149
 
                            rpc_method='cast',
150
 
                            volume=self.fake_volume,
151
 
                            image_id='fake_image_id')
 
151
                              rpc_method='cast',
 
152
                              volume=self.fake_volume,
 
153
                              image_id='fake_image_id')
152
154
 
153
155
    def test_initialize_connection(self):
154
156
        self._test_volume_api('initialize_connection',
155
 
                            rpc_method='call',
156
 
                            volume=self.fake_volume,
157
 
                            connector='fake_connector')
 
157
                              rpc_method='call',
 
158
                              volume=self.fake_volume,
 
159
                              connector='fake_connector')
158
160
 
159
161
    def test_terminate_connection(self):
160
162
        self._test_volume_api('terminate_connection',
161
 
                            rpc_method='call',
162
 
                            volume=self.fake_volume,
163
 
                            connector='fake_connector',
164
 
                            force=False)
 
163
                              rpc_method='call',
 
164
                              volume=self.fake_volume,
 
165
                              connector='fake_connector',
 
166
                              force=False)