Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 88317
Collapse All | Expand All

(-)installer/src/GLIClientController.py (-10 / +31 lines)
Lines 246-265 Link Here
246
			else:
246
			else:
247
				self._logger.log("SSH Started.")
247
				self._logger.log("SSH Started.")
248
248
249
	def load_client_configuration(self, uri, allowInteractive=True):
250
		configuration=None
249
251
252
		if uri == None:
253
			raise GLIException("ClientConfigurationError", 'fatal', 'load_client_configuration', 'No URI specified for client_configuration')
254
				
255
		success = GLIUtility.get_uri(uri,'/tmp/client_configuration.xml')
256
		if success:
257
			configuration = GLIClientConfiguration.ClientConfiguration()
258
			configuration.parse('/tmp/client_configuration.xml')
259
		else:
260
			raise GLIException("ClientConfigurationError", 'fatal', 'load_client_configuration', 'Could not download/copy the install profile from: ' + uri)
250
261
251
	def load_install_profile(self):
262
		if allowInteractive == False:
263
			configuration.set_interactive( None, False, None )
264
265
		self.set_configuration( configuration )
266
		self._logger.log( "Configuration successfully loaded from " + uri )
267
268
	def load_install_profile(self, uri=None):
252
		install_profile=None
269
		install_profile=None
253
		if self._install_profile == None:
270
271
		if uri == None:
254
			if self._configuration != None:
272
			if self._configuration != None:
255
				success = GLIUtility.get_uri(self._configuration.get_profile_uri(),'/tmp/install_profile.xml')
273
				uri = self._configuration.get_profile_uri()
256
				if success:
274
			else:
257
					self._logger.log("Profile downloaded succesfully, loading it now.")
275
				raise GLIException("InstallProfileError", 'fatal', 'load_install_profile', 'No URI specified for install profile')
258
					self.output("Profile downloaded... loading it now...")
276
				
259
					install_profile = GLIInstallProfile.InstallProfile()
277
		success = GLIUtility.get_uri(uri,'/tmp/install_profile.xml')
260
					install_profile.parse('/tmp/install_profile.xml')
278
		if success:
261
				else:
279
			self._logger.log("Profile downloaded succesfully, loading it now.")
262
					raise GLIException("InstallProfileError", 'fatal', 'get_install_profile', 'Could not download/copy the install profile from: ' + self._configuration.get_profile_uri())
280
			install_profile = GLIInstallProfile.InstallProfile()
281
			install_profile.parse('/tmp/install_profile.xml')
282
		else:
283
			raise GLIException("InstallProfileError", 'fatal', 'load_install_profile', 'Could not download/copy the install profile from: ' + uri)
263
284
264
		self._install_profile = install_profile
285
		self._install_profile = install_profile
265
286

Return to bug 88317