def vcd(account):
    myCredAccount = CredAccountVCloudDirector()
    # doing field verification
    if not "hostname" in account:
        printer.out("hostname in vcd account not found", printer.ERROR)
        return
    if not "username" in account:
        printer.out("username in vcd account not found", printer.ERROR)
        return
    if not "password" in account:
        printer.out("password in vcd account not found", printer.ERROR)
        return
    if not "name" in account:
        printer.out("name in vcd account not found", printer.ERROR)
        return

    if "proxyHostname" in account:
        myCredAccount.proxyHost = account["proxyHostname"]
    if "proxyPort" in account:
        myCredAccount.proxyPort = account["proxyPort"]
    if "port" in account:
        port = int(account["port"])
    else:
        port = 443

    myCredAccount.name = account["name"]
    myCredAccount.login = account["username"]
    myCredAccount.password = account["password"]
    myCredAccount.hostname = account["hostname"]
    myCredAccount.port = port

    return myCredAccount
dataset/ETHPy150Open usharesoft/hammr/src/hammr/utils/account_utils.py/vcd/original