Home | History | Annotate | Download | only in cros

Lines Matching refs:update_url

47 def url_to_version(update_url):
48 """Return the version based on update_url.
50 @param update_url: url to the image to update to.
58 urlparse.urlparse(update_url).path).split('/')[-1].strip()
61 def url_to_image_name(update_url):
62 """Return the image name based on update_url.
68 @param update_url: url to the image to update to.
69 @returns a string representing the image name in the update_url.
72 return '/'.join(urlparse.urlparse(update_url).path.split('/')[-2:])
75 def _get_devserver_build_from_update_url(update_url):
78 @param update_url: The url for update.
81 @return: A tuple of (devserver url, build) or None if the update_url
84 @raises ValueError: If the update_url doesn't match the expected pattern.
91 raise ValueError('Cannot parse update_url, the global config needs '
94 parts = re.search(re_pattern, update_url)
96 raise ValueError('%s is not an update url' % update_url)
100 def list_image_dir_contents(update_url):
101 """Lists the contents of the devserver for a given build/update_url.
103 @param update_url: An update url. Eg: http://devserver:port/update/build.
105 if not update_url:
106 logging.warning('Need update_url to list contents of the devserver.')
108 error_msg = 'Cannot check contents of devserver, update url %s' % update_url
110 devserver_url, build = _get_devserver_build_from_update_url(update_url)
131 def __init__(self, updater_ctrl_bin, update_url, host):
135 @param update_url: The URL we want the update to use.
139 self.update_url = update_url
161 (self.updater_ctrl_bin, self.update_url))
182 list_image_dir_contents(self.update_url)
206 (self.updater_ctrl_bin, self.update_url))
209 list_image_dir_contents(self.update_url)
213 (self.update_url, self.host.hostname, e))
244 def __init__(self, update_url, host=None, local_devserver=False):
245 super(ChromiumOSUpdater, self).__init__(self.UPDATER_BIN, update_url,
249 self.update_version = url_to_version(update_url)
425 update_url.replace('update',
462 auserver_host = urlparse.urlparse(self.update_url)[1]
469 logging.info('Installing from %s to %s', self.update_url,
504 list_image_dir_contents(self.update_url)
582 self.update_url)
656 def __init__(self, update_url, host=None):
659 @param update_url: The URL we want the update to use.
663 '/system/bin/update_engine_client', update_url, host)