예제 #1
0
def test_meid_credentials_v1_legacy_md5():
    input = "dynatrace-aws-logs-Lambda-1K7HG2Q2LIQKUus-east-1_000047316593"

    id = me_id._legacy_entity_id_md5(input)
    meid = me_id.meid_md5("AWS_LAMBDA_FUNCTION", input)
    meid_from_format = me_id.meid_md5(
        "AWS_LAMBDA_FUNCTION",
        format_required("{}{}_{}", [
            "dynatrace-aws-logs-Lambda-1K7HG2Q2LIQKU", "us-east-1",
            "000047316593"
        ]))

    assert id == -3464187019831048966
    assert meid == "AWS_LAMBDA_FUNCTION-CFECBC426F7384FA"
    assert meid == meid_from_format
 def _func_dt_meid_ec2_instance(self, instanceId):
     return me_id.meid_md5("EC2_INSTANCE",
                           format_required("{}", [instanceId]))
 def _func_dt_meid_s3_bucket_v1(self, name):
     return me_id.meid_md5("S3BUCKET", format_required("{}", [name]))
 def _func_dt_meid_ebs_volume(self, volumeId):
     return me_id.meid_md5("EBS_VOLUME", format_required("{}", [volumeId]))
 def _func_dt_meid_dynamo_db_v1(self, tableName, region):
     return me_id.meid_md5("DYNAMO_DB_TABLE",
                           format_required("{}{}", [tableName, region]))
 def _func_dt_meid_rds_v1(self, instanceId, region):
     return me_id.meid_md5("RELATIONAL_DATABASE_SERVICE",
                           format_required("{}{}", [instanceId, region]))
 def _func_dt_meid_auto_scaling_group_v1(self, arn):
     return me_id.meid_md5("AUTO_SCALING_GROUP",
                           format_required("{}", [arn]))
 def _func_dt_meid_nlb_v1(self, arn):
     return me_id.meid_md5("AWS_NETWORK_LOAD_BALANCER",
                           format_required("{}", [arn]))
 def _func_dt_meid_alb_v1(self, arn):
     return me_id.meid_md5("AWS_APPLICATION_LOAD_BALANCER",
                           format_required("{}", [arn]))
 def _func_dt_meid_elb_v1(self, dnsName):
     return me_id.meid_md5("ELASTIC_LOAD_BALANCER",
                           format_required("{}", [dnsName]))
 def _func_dt_meid_lambda_function(self, functionName, region, accountId):
     return me_id.meid_md5(
         "AWS_LAMBDA_FUNCTION",
         format_required("{}{}_{}", [functionName, region, accountId]))