Пример #1
0
    def configure(self):
        # This goes before configure because -S's absence causes
        # self.auth.configure to blow up.  With an upload policy that
        # is undesirable.
        self.configure_bundle_upload_auth()

        S3Request.configure(self)

        if not self.args.get("ec2_service"):
            self.args["ec2_service"] = EC2.from_other(
                self.service, url=self.args.get('ec2_url'))
        if not self.args.get("ec2_auth"):
            self.args["ec2_auth"] = QueryHmacV2Auth.from_other(self.auth)

        if self.args.get('url') and not self.args.get('ec2_url'):
            self.log.warn('-U/--url used without --ec2-url; communication '
                          'with different regions may result')
        if self.args.get('ec2_url') and not self.args.get('url'):
            self.log.warn('--ec2-url used without -U/--url; communication '
                          'with different regions may result')

        # Set up access to empyrean in case we need auto cert fetching.
        try:
            self.args['empyrean_service'] = \
                EmpyreanRequest.SERVICE_CLASS.from_other(
                    self.service, url=self.args.get('empyrean_url'))
            self.args['empyrean_auth'] = EmpyreanRequest.AUTH_CLASS.from_other(
                self.auth)
        except:
            self.log.debug('empyrean setup failed; auto cert fetching '
                           'will be unavailable', exc_info=True)

        self.configure_bundle_creds()
        self.configure_bundle_properties()
        self.configure_bundle_output()
Пример #2
0
    def configure(self):
        S3Request.configure(self)
        self.configure_bundle_upload_auth()
        self.configure_bundle_creds()
        self.configure_bundle_output()
        self.configure_bundle_properties()

        if not self.args.get("ec2_service"):
            self.args["ec2_service"] = EC2.from_other(
                self.service, url=self.args.get('ec2_url'))
        if not self.args.get("ec2_auth"):
            self.args["ec2_auth"] = QueryHmacV2Auth.from_other(self.auth)

        if self.args.get("check_cert"):
            if not self.args.get("iam_service"):
                self.args["iam_service"] = IAMRequest.SERVICE_CLASS.from_other(
                    self.service)
            if not self.args.get("iam_auth"):
                self.args["iam_auth"] = IAMRequest.AUTH_CLASS.from_other(
                    self.auth)

        if self.args.get('url') and not self.args.get('ec2_url'):
            self.log.warn('-U/--url used without --ec2-url; communication '
                          'with different regions may result')
        if self.args.get('ec2_url') and not self.args.get('url'):
            self.log.warn('--ec2-url used without -U/--url; communication '
                          'with different regions may result')
Пример #3
0
    def configure(self):
        S3Request.configure(self)
        if not self.args.get('ec2_service'):
            self.args['ec2_service'] = EC2.from_other(
                self.service, url=self.args.get('ec2_url'))

        if not self.args.get('ec2_auth'):
            self.args['ec2_auth'] = QueryHmacV2Auth.from_other(self.auth)
        if not self.args.get('profile'):
            self.args['profile'] = 'default'
Пример #4
0
    def configure(self):
        S3Request.configure(self)
        if not self.args.get('ec2_service'):
            self.args['ec2_service'] = EC2.from_other(
                self.service, url=self.args.get('ec2_url'))

        if not self.args.get('ec2_auth'):
            self.args['ec2_auth'] = QueryHmacV2Auth.from_other(self.auth)
        if not self.args.get('profile'):
            self.args['profile'] = 'default'
Пример #5
0
    def configure(self):
        S3Request.configure(self)
        self.configure_bundle_upload_auth()
        self.configure_bundle_creds()
        self.configure_bundle_output()
        self.configure_bundle_properties()

        if not self.args.get("ec2_service"):
            self.args["ec2_service"] = EC2.from_other(
                self.service, url=self.args.get('ec2_url'))

        if not self.args.get("ec2_auth"):
            self.args["ec2_auth"] = QuerySigV2Auth.from_other(self.auth)
Пример #6
0
    def configure(self):
        S3Request.configure(self)
        self.configure_bundle_upload_auth()
        self.configure_bundle_creds()
        self.configure_bundle_output()
        self.configure_bundle_properties()

        if not self.args.get("ec2_service"):
            self.args["ec2_service"] = EC2.from_other(
                self.service, url=self.args.get('ec2_url'))

        if not self.args.get("ec2_auth"):
            self.args["ec2_auth"] = QuerySigV2Auth.from_other(self.auth)
Пример #7
0
    def configure(self):
        S3Request.configure(self)
        self.configure_bundle_upload_auth()
        self.configure_bundle_creds()
        self.configure_bundle_output()
        self.configure_bundle_properties()

        if not self.args.get("ec2_service"):
            self.args["ec2_service"] = EC2.from_other(
                self.service, url=self.args.get('ec2_url'))
        if not self.args.get("ec2_auth"):
            self.args["ec2_auth"] = QueryHmacV2Auth.from_other(self.auth)

        if self.args.get("check_cert"):
            if not self.args.get("iam_service"):
                self.args["iam_service"] = IAMRequest.SERVICE_CLASS.from_other(
                    self.service)
            if not self.args.get("iam_auth"):
                self.args["iam_auth"] = IAMRequest.AUTH_CLASS.from_other(
                    self.auth)
Пример #8
0
    def configure(self):
        # This goes before configure because -S's absence causes
        # self.auth.configure to blow up.  With an upload policy that
        # is undesirable.
        self.configure_bundle_upload_auth()

        S3Request.configure(self)

        if not self.args.get("ec2_service"):
            self.args["ec2_service"] = EC2.from_other(
                self.service, url=self.args.get('ec2_url'))
        if not self.args.get("ec2_auth"):
            self.args["ec2_auth"] = QueryHmacV2Auth.from_other(self.auth)

        if self.args.get('url') and not self.args.get('ec2_url'):
            self.log.warn('-U/--url used without --ec2-url; communication '
                          'with different regions may result')
        if self.args.get('ec2_url') and not self.args.get('url'):
            self.log.warn('--ec2-url used without -U/--url; communication '
                          'with different regions may result')

        # Set up access to empyrean in case we need auto cert fetching.
        try:
            self.args['empyrean_service'] = \
                EmpyreanRequest.SERVICE_CLASS.from_other(
                    self.service, url=self.args.get('empyrean_url'))
            self.args['empyrean_auth'] = EmpyreanRequest.AUTH_CLASS.from_other(
                self.auth)
        except:
            self.log.debug(
                'empyrean setup failed; auto cert fetching '
                'will be unavailable',
                exc_info=True)

        self.configure_bundle_creds()
        self.configure_bundle_properties()
        self.configure_bundle_output()