cloudmesh / cloudmesh-cloud

Multicloud Cloudmesh Plugins for cloudmesh cmd5 CMD
https://cloudmesh.github.io/cloudmesh-manual
Apache License 2.0
2 stars 27 forks source link

should provider.info(...) return None if name does not exist or through exception #254

Open laszewsk opened 4 years ago

laszewsk commented 4 years ago

see elif cloud == 'oracle': # also aws in openstack we seem to return None try: provider.info(name=name) except Exception:

if there is an exception that means the group has been

            # deleted
            pass
laszewsk commented 4 years ago

see def test_provider_vm_terminate(self): in test08...

we should just call info and get the status ...

maybe its time to implement a cm status with a class in the abstractions ...

nirandaperera commented 4 years ago

Well, this exception catch happens in the vm deletion test. So, after deleting the vm, we are verifying if the vm is still available. Why I did exception catch in Azure was, azure sdk throws an exception when the requested vm is not in azure. And once the vm is deleted, this verification is sufficient AFAIU.

But I agree. We can simply catch the exception in the Provider.info method.