def __init__(self, **kwargs):
self.generic_credentials = {
'key': os.getenv('VULTR_API_KEY', '')
}
for host in [request.host, os.getenv('APP_NAME', '') + '.nanoapp.io']:
try:
ip = socket.gethostbyname(host) or None
except socket.gaierror:
ip = None
if ip:
break
self.auth_instructions += (' (If you need to be more specific about '
'the access controls, you can use %s/32, but keep in mind that '
'this address may change at any point in the future, and you will '
'need to update your Vultr account accordingly to continue '
'deploying.)') % (ip) if ip else ''
# Internal overrides for provider retrieval
评论列表
文章目录