ソースを参照

Work around N/A as a potential vCPU value on AWS VMType

Enis Afgan 7 年 前
コミット
e68d30fc1c
1 ファイル変更4 行追加1 行削除
  1. 4 1
      cloudbridge/cloud/providers/aws/resources.py

+ 4 - 1
cloudbridge/cloud/providers/aws/resources.py

@@ -183,7 +183,10 @@ class AWSVMType(BaseVMType):
 
     @property
     def vcpus(self):
-        return self._inst_dict.get('vCPU')
+        vcpus = self._inst_dict.get('vCPU')
+        if vcpus == 'N/A':
+            return None
+        return vcpus
 
     @property
     def ram(self):