コード例 #1
0
ファイル: validate_edp.py プロジェクト: edx/tubular
def validate_cli(ami_id, environment, deployment, play):
    """
    Method to validate that an AMI was built for a particular EDP.
    """
    ami_id = ami_id.strip()
    try:
        edp_matched = validate_edp(ami_id, environment, deployment, play)
    except Exception as err:  # pylint: disable=broad-except
        traceback.print_exc()
        click.secho("Error validating AMI: {0}.\nMessage: {1}".format(ami_id, err.message), fg="red")
        sys.exit(1)

    sys.exit(0 if edp_matched else 1)
コード例 #2
0
def validate_cli(ami_id, environment, deployment, play):
    """
    Method to validate that an AMI was built for a particular EDP.
    """
    ami_id = ami_id.strip()
    try:
        edp_matched = validate_edp(ami_id, environment, deployment, play)
    except Exception as err:  # pylint: disable=broad-except
        traceback.print_exc()
        click.secho("Error validating AMI: {0}.\nMessage: {1}".format(
            ami_id, err),
                    fg='red')
        sys.exit(1)

    sys.exit(0 if edp_matched else 1)
コード例 #3
0
ファイル: test_ec2.py プロジェクト: eol-uchile/tubular
 def test_ami_edp_validate_ami_id(self, expected_ret, edp):
     fake_ami_id = self._make_fake_ami()
     self.assertEqual(ec2.validate_edp(fake_ami_id, *edp), expected_ret)
コード例 #4
0
ファイル: test_ec2.py プロジェクト: edx/tubular
 def test_ami_edp_validate_ami_id(self, expected_ret, edp):
     fake_ami_id = self._make_fake_ami()
     self.assertEqual(ec2.validate_edp(fake_ami_id, *edp), expected_ret)