def Deploy(self): """Deploys the new app version but does not make it default. All the files returned by Begin() must have been uploaded with UploadFile() before Deploy() can be called. Returns: An appinfo.AppInfoSummary if one was returned from the Deploy, None otherwise. Raises: Error: Some required files were not uploaded. """ assert self.in_transaction, 'Begin() must be called before Deploy().' if self.files: raise Error('Not all required files have been uploaded.') log.debug('Starting deployment.') result = self.logging_context.Send('/api/appversion/deploy') self.deployed = True if result: return yaml_object.BuildSingleObject(appinfo.AppInfoSummary, result) else: return None
def ParseIndexDefinitions(document, open_fn=None): """Parse an individual index definitions document from string or stream. Args: document: Yaml document as a string or file-like stream. open_fn: Function for opening files. Unused. Raises: EmptyConfigurationFile when the configuration file is empty. MultipleConfigurationFile when the configuration file contains more than one document. Returns: Single parsed yaml file if one is defined, else None. """ try: return yaml_object.BuildSingleObject(IndexDefinitions, document) except yaml_errors.EmptyConfigurationFile: return None