+class CopyManifest:
+ """ Utility class to hold manifest information."""
+ def __init__(self, project, log):
+ self.tasklet_info = project.tasklet.tasklet_info
+ self.manifest = self.tasklet_info.get_pb_manifest()
+ self.use_ssl = self.manifest.bootstrap_phase.rwsecurity.use_ssl
+ self.ssl_cert, self.ssl_key = None, None
+ if self.use_ssl:
+ self.ssl_cert = self.manifest.bootstrap_phase.rwsecurity.cert
+ self.ssl_key = self.manifest.bootstrap_phase.rwsecurity.key
+ self.onboarder = None
+ self.log = log
+
+ def ssl_manifest(self):
+ return (self.use_ssl, self.ssl_cert, self.ssl_key)
+
+ def get_onboarder(self, host="127.0.0.1", port="8008"):
+ if not self.onboarder:
+ self.onboarder = onboard.DescriptorOnboarder(self.log,
+ host, port, *self.ssl_manifest())
+ return self.onboarder
+
+