Exemplo n.º 1
0
    def __call__(self, req):
        user_obj = self.get_user_obj(req)
        log_request(req, user_obj)

        input = LaunchConfigurationInput()
        input.set_from_dict(req.params)
        lc = LaunchConfigurationType('LaunchConfiguration')
        lc.set_from_intype(input, make_arn(input.LaunchConfigurationName, self.xamznRequestId, 'launchConfigurationName'))

        self._system.create_launch_config(user_obj, lc)

        res = self.get_response()
        doc = self.get_default_response_body_dom(doc_name="CreateLaunchConfigurationResponse")
        res.unicode_body = doc.documentElement.toprettyxml()
        log_reply(doc, user_obj)
        return res
Exemplo n.º 2
0
    def __call__(self, req):

        user_obj = self.get_user_obj(req)
        log_request(req, user_obj)

        input = CreateAutoScalingGroupInput()
        input.set_from_dict(req.params)

        arn = make_arn(input.AutoScalingGroupName, self.xamznRequestId, 'autoScalingGroupName')
        asg = AutoScalingGroupType('AutoScalingGroup')
        asg.set_from_intype(input, arn)

        self._system.create_autoscale_group(user_obj, asg)

        res = self.get_response()
        doc = self.get_default_response_body_dom(doc_name="CreateAutoScalingGroupResponse")
        res.unicode_body = doc.documentElement.toprettyxml()
        log_reply(doc, user_obj)
        return res
Exemplo n.º 3
0
    def __call__(self, req):
        user_obj = self.get_user_obj(req)
        log_request(req, user_obj)

        input = LaunchConfigurationInput()
        input.set_from_dict(req.params)
        lc = LaunchConfigurationType('LaunchConfiguration')
        lc.set_from_intype(
            input,
            make_arn(input.LaunchConfigurationName, self.xamznRequestId,
                     'launchConfigurationName'))

        self._system.create_launch_config(user_obj, lc)

        res = self.get_response()
        doc = self.get_default_response_body_dom(
            doc_name="CreateLaunchConfigurationResponse")
        res.unicode_body = doc.documentElement.toprettyxml()
        log_reply(doc, user_obj)
        return res
Exemplo n.º 4
0
    def __call__(self, req):

        user_obj = self.get_user_obj(req)
        log_request(req, user_obj)

        input = CreateAutoScalingGroupInput()
        input.set_from_dict(req.params)

        arn = make_arn(input.AutoScalingGroupName, self.xamznRequestId,
                       'autoScalingGroupName')
        asg = AutoScalingGroupType('AutoScalingGroup')
        asg.set_from_intype(input, arn)

        self._system.create_autoscale_group(user_obj, asg)

        res = self.get_response()
        doc = self.get_default_response_body_dom(
            doc_name="CreateAutoScalingGroupResponse")
        res.unicode_body = doc.documentElement.toprettyxml()
        log_reply(doc, user_obj)
        return res