equal
deleted
inserted
replaced
48 import pkg.version |
48 import pkg.version |
49 |
49 |
50 from pkg.client.imageplan import EXECUTED_OK |
50 from pkg.client.imageplan import EXECUTED_OK |
51 from pkg.client import global_settings |
51 from pkg.client import global_settings |
52 |
52 |
53 CURRENT_API_VERSION = 25 |
53 CURRENT_API_VERSION = 26 |
54 CURRENT_P5I_VERSION = 1 |
54 CURRENT_P5I_VERSION = 1 |
55 |
55 |
56 logger = global_settings.logger |
56 logger = global_settings.logger |
57 |
57 |
58 class ImageInterface(object): |
58 class ImageInterface(object): |
93 callbacks. cancel_state_callable is a function which the client |
93 callbacks. cancel_state_callable is a function which the client |
94 wishes to have called each time whether the operation can be |
94 wishes to have called each time whether the operation can be |
95 canceled changes. It can raise VersionException and |
95 canceled changes. It can raise VersionException and |
96 ImageNotFoundException.""" |
96 ImageNotFoundException.""" |
97 |
97 |
98 compatible_versions = set([CURRENT_API_VERSION]) |
98 compatible_versions = set([25, CURRENT_API_VERSION]) |
99 |
99 |
100 if version_id not in compatible_versions: |
100 if version_id not in compatible_versions: |
101 raise api_errors.VersionException(CURRENT_API_VERSION, |
101 raise api_errors.VersionException(CURRENT_API_VERSION, |
102 version_id) |
102 version_id) |
103 |
103 |
184 # |
184 # |
185 # Verify validity of certificates before possibly |
185 # Verify validity of certificates before possibly |
186 # attempting network operations. |
186 # attempting network operations. |
187 # |
187 # |
188 self.__cert_verify() |
188 self.__cert_verify() |
189 |
189 self.__img.refresh_publishers(immediate=True, |
190 try: |
190 progtrack=self.__progresstracker) |
191 self.__img.refresh_publishers( |
|
192 progtrack=self.__progresstracker) |
|
193 except KeyboardInterrupt: |
|
194 raise |
|
195 except api_errors.InvalidDepotResponseException: |
|
196 raise |
|
197 except: |
|
198 # Since this is not a refresh |
|
199 # that was explicitly requested, |
|
200 # it doesn't matter if it fails. |
|
201 pass |
|
202 |
191 |
203 def __plan_common_start(self, operation): |
192 def __plan_common_start(self, operation): |
204 """Start planning an operation. Aquire locks and log |
193 """Start planning an operation. Aquire locks and log |
205 the start of the operation.""" |
194 the start of the operation.""" |
206 |
195 |