Example #1
0
 def _insert_resource(self, collection: discovery.Resource,
                      body: Dict[str, Any]) -> 'GcpResource':
     logger.info('Creating compute resource:\n%s',
                 self.resource_pretty_format(body))
     resp = self._execute(collection.insert(project=self.project,
                                            body=body))
     return self.GcpResource(body['name'], resp['targetLink'])
Example #2
0
 def _insert_resource(self, collection: discovery.Resource,
                      body: Dict[str, Any]) -> GcpResource:
     logger.debug("Creating %s", body)
     resp = self._execute(collection.insert(project=self.project, body=body))
     return self.GcpResource(body['name'], resp['targetLink'])