def create_python_app_env(public_ip, app_name): """ Returns the environment variables the python application server uses. Args: public_ip: The public IP of the load balancer app_name: The name of the application to be run Returns: A dictionary containing the environment variables """ env_vars = {} env_vars['MY_IP_ADDRESS'] = public_ip env_vars['APPNAME'] = app_name env_vars['GOMAXPROCS'] = appscale_info.get_num_cpus() env_vars['APPSCALE_HOME'] = APPSCALE_HOME env_vars['PYTHON_LIB'] = "{0}/AppServer/".format(APPSCALE_HOME) return env_vars
def create_python_app_env(public_ip, app_name): """ Returns the environment variables the python application server uses. Args: public_ip: The public IP of the load balancer app_name: The name of the application to be run Returns: A dictionary containing the environment variables """ env_vars = {} env_vars['MY_IP_ADDRESS'] = public_ip env_vars['APPNAME'] = app_name env_vars['GOMAXPROCS'] = appscale_info.get_num_cpus() env_vars['APPSCALE_HOME'] = constants.APPSCALE_HOME env_vars['PYTHON_LIB'] = "{0}/AppServer/".format(constants.APPSCALE_HOME) return env_vars
def test_get_num_cpus(self): self.assertNotEqual(0, appscale_info.get_num_cpus())