<commit_before>import base64
import json
import mimetools
import os
import re
from urllib2 import Request, HTTPError, URLError, urlopen
from zipfile import ZipFile


def print_banner(message):
    print ("**************************************************")
    print (message)
    print ("**************************************************")


# TODO do we really want to rely only on basic auth for admin access to external Apigee?
def get_basic_auth(username, password):
    up = '%s:%s' % (username, password)
    return "Basic %s" % base64.b64encode(up).decode()


def create_kvm(secretKey, reg, lambdaARN, host, org, env, username, password):
    print_banner("Creating the KVM for Common-Jazz API Proxy .......")
    payload = {
        "encrypted": "true",
        "entry": [
            {
                "name": "accessKey",
                "value": secretKey
            },
            {
                "name": "reg",
                "value": reg
            },
            {
                "name": "lambdaARN",<commit_msg>Updated accesskey and secretkey cred store in kvm (#477)<commit_after>import base64
import json
import mimetools
import os
import re
from urllib2 import Request, HTTPError, URLError, urlopen
from zipfile import ZipFile


def print_banner(message):
    print ("**************************************************")
    print (message)
    print ("**************************************************")


# TODO do we really want to rely only on basic auth for admin access to external Apigee?
def get_basic_auth(username, password):
    up = '%s:%s' % (username, password)
    return "Basic %s" % base64.b64encode(up).decode()


def create_kvm(secretKey, reg, lambdaARN, host, org, env, username, password):
    print_banner("Creating the KVM for Common-Jazz API Proxy .......")
    payload = {
        "encrypted": "true",
        "entry": [
            {
                "name": "accessKey",
                "value": reg
            },
            {
                "name": "secretKey",
                "value": secretKey
            },
            {
                "name": "reg",
                "value": reg
            },
            {
                "name": "lambdaARN",
{'fraction_non_alphanumeric': 0.19683257918552036, 'fraction_numerical': 0.007692307692307693, 'mean_word_length': 2.304932735426009, 'pattern_counts': {'":': 16, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1462655', 'n_tokens_mistral': 628, 'n_tokens_neox': 585, 'n_words': 181}