On 09/10/18 11:11 +0200, Valentin Vidic wrote:
On Tue, Oct 09, 2018 at 10:55:08AM +0200, Oyvind Albrigtsen wrote:
It seems like the if-line should be updated to check for those 2
libraries (from the imports in the agent).
Yes, that might work too.
Also would it be possible to make the imports in openstack agent
conditional so the metadata works even when the python modules
are not installed?
I've created a PR for the library detection and try/except imports:
https://github.com/ClusterLabs/fence-agents/pull/242
Something like this in aliyun:
try:
from aliyunsdkcore import client
from aliyunsdkecs.request.v20140526.DescribeInstancesRequest import
DescribeInstancesRequest
from aliyunsdkecs.request.v20140526.StartInstanceRequest import
StartInstanceRequest
from aliyunsdkecs.request.v20140526.StopInstanceRequest import
StopInstanceRequest
from aliyunsdkecs.request.v20140526.RebootInstanceRequest import
RebootInstanceRequest
except ImportError:
pass
--
Valentin
_______________________________________________
Developers mailing list
Developers@clusterlabs.org
https://lists.clusterlabs.org/mailman/listinfo/developers
_______________________________________________
Developers mailing list
Developers@clusterlabs.org
https://lists.clusterlabs.org/mailman/listinfo/developers