Lines Matching refs:PAYLOAD
40 # Snippet of code that runs on the Moblab and returns the type of a payload
51 """A failure that occurred while staging an update payload."""
55 """A failure that occurred while generating an update payload."""
64 help='Stage a target payload. This can either be a '
65 'path to a local payload file, or take the form '
67 'new payload will get generated from SRC_IMAGE '
72 help='Stage a source payload. This is an optional '
97 """Stages a remote payload on the Moblab's devserver.
101 @param tmp_stage_file: Path to the remote payload file to stage.
103 @return URI to use for downloading the staged payload.
105 @raise PayloadStagingError: If we failed to stage the payload.
123 raise PayloadStagingError('Unable to stage payload on moblab: %s' % e)
128 logging.debug('Payload is staged on Moblab as %s', stage_rel_path)
135 def stage_local_payload(moblab, devserver_port, tmp_stage_dir, payload):
136 """Stages a local payload on the MobLab's devserver.
141 @param payload: Path to the local payload file to stage.
143 @return Tuple consisting a payload download URI and the payload type
146 @raise PayloadStagingError: If we failed to stage the payload.
148 if not os.path.isfile(payload):
149 raise PayloadStagingError('Payload file %s does not exist.' % payload)
151 # Copy the payload file over to the temporary stage directory.
153 moblab.send_file(payload, tmp_stage_file)
155 # Find the payload type.
159 # Stage the copied payload.
166 """Generates and stages a payload from local image(s).
175 @return Tuple consisting a payload download URI and the payload type
178 @raise PayloadGenerationError: If we failed to generate the payload.
179 @raise PayloadStagingError: If we failed to stage the payload.
204 # Generate the payload into a temporary staging directory.
207 '--payload', tmp_stage_file,
219 # Stage the generated payload.
226 """Stages the payload based on a given specification.
231 @param use: String defining the use for the payload, either 'source' or
234 "PAYLOAD:DST_IMAGE[:SRC_IMAGE]" describing how to
235 generate a new payload from a target and (optionally)
236 source image; or path to a local payload file.
238 @return Tuple consisting a payload download URI and the payload type
241 @raise PayloadGenerationError: If we failed to generate the payload.
242 @raise PayloadStagingError: If we failed to stage the payload.
275 logging.info('Source payload was staged')
281 logging.info('Target payload was staged')