import logging

from cliff.command import Command

import jujuxaas.client

def get_jxaas_client(command):
  tenant = 'abcdef'
  username = '123'
  password= '123'

  client = jujuxaas.client.Client(url="http://127.0.0.1:8080/xaas", tenant=tenant, username=username, password=password)
  return client

import logging
import os

from cliff.command import Command

import jujuxaas.client

def get_jxaas_client(command):
  tenant = 'abcdef'
  username = '123'
  password= '123'

  url = os.getenv('JXAAS_URL', "http://127.0.0.1:8080/xaas")
  client = jujuxaas.client.Client(url=url, tenant=tenant, username=username, password=password)
  return client

Allow JXAAS_URL to be configured as an env var
Allow JXAAS_URL to be configured as an env var

  import logging
+ import os
  
  from cliff.command import Command
  
  import jujuxaas.client
  
  def get_jxaas_client(command):
    tenant = 'abcdef'
    username = '123'
    password= '123'
  
+   url = os.getenv('JXAAS_URL', "http://127.0.0.1:8080/xaas")
-   client = jujuxaas.client.Client(url="http://127.0.0.1:8080/xaas", tenant=tenant, username=username, password=password)
+   client = jujuxaas.client.Client(url=url, tenant=tenant, username=username, password=password)
    return client
  
Allow JXAAS_URL to be configured as an env var
## Code Before:
import logging

from cliff.command import Command

import jujuxaas.client

def get_jxaas_client(command):
  tenant = 'abcdef'
  username = '123'
  password= '123'

  client = jujuxaas.client.Client(url="http://127.0.0.1:8080/xaas", tenant=tenant, username=username, password=password)
  return client

## Instruction:
Allow JXAAS_URL to be configured as an env var
## Code After:
import logging
import os

from cliff.command import Command

import jujuxaas.client

def get_jxaas_client(command):
  tenant = 'abcdef'
  username = '123'
  password= '123'

  url = os.getenv('JXAAS_URL', "http://127.0.0.1:8080/xaas")
  client = jujuxaas.client.Client(url=url, tenant=tenant, username=username, password=password)
  return client
