I found the solution but still do not know the reason of this problem.
solution is call config.load_config before init SDKAPI, like this:
from zvmsdk import config
config.load_config()
from zvmsdk import api
sdkapi = api.SDKAPI()
sdkapi.volume_attach(connection_info)
by doing this, the problem will not happen again.
I think this problem will disappear after I add REST API for volume.
Because load_config is called in wsgi now.
I found the solution but still do not know the reason of this problem.
solution is call config.load_config before init SDKAPI, like this:
from zvmsdk import config load_config( ) volume_ attach( connection_ info)
config.
from zvmsdk import api
sdkapi = api.SDKAPI()
sdkapi.
by doing this, the problem will not happen again.
I think this problem will disappear after I add REST API for volume.
Because load_config is called in wsgi now.