Howto Setup OpenStack python-keystoneclient Development Environment
import os
import sys
this_dir = os.path.dirname(os.path.realpath(__file__))
prev_dir = os.path.dirname(this_dir)
print prev_dir
###Required to import keystoneclient
sys.path.append(prev_dir)
###test keystoneclient import
import keystoneclient
from keystoneclient.v3 import client
keystone = client.Client(token="tokentoken", endpoint="http://192.168.56.101:35357/v3")
#print "====",keystone.users.list()
#print keystone.projects.list()
import os
import sys
this_dir = os.path.dirname(os.path.realpath(__file__))
prev_dir = os.path.dirname(this_dir)
print prev_dir
###Required to import keystoneclient
sys.path.append(prev_dir)
###test keystoneclient import
import keystoneclient
from keystoneclient.v3 import client
keystone = client.Client(token="tokentoken", endpoint="http://192.168.56.101:35357/v3")
#print "====",keystone.users.list()
#print keystone.projects.list()
No comments:
Post a Comment