def get_heat_client(session=None): try: if not session: session = login_lib.load_dumped_session() heat = heat_client.Client('1', session=session) return heat except Exception as e: utils.log_err(e)
def get_neutron_client(session=None): if not session: session = login_lib.load_dumped_session() neutron = neutron_client.Client(session=session) return neutron
def get_image_client(session=None): if not session: session = login_lib.load_dumped_session() img = image_client('2', session=session) return img
def get_cinder_client(session=None): if not session: session = login_lib.load_dumped_session() storage = cinder_client.Client(2, session=session) return storage
def get_nova_client(session=None): if not session: session = login_lib.load_dumped_session() compute = nova_client.Client(2, session=session) return compute