Ver código fonte

Apply suggestions from code review

Co-authored-by: Nuwan Goonasekera <2070605+nuwang@users.noreply.github.com>
Alexandru Mahmoud 5 anos atrás
pai
commit
e1a15c80b2

+ 1 - 2
cloudbridge/providers/aws/resources.py

@@ -206,8 +206,7 @@ class AWSVMType(BaseVMType):
         ram = self._inst_dict.get('MemoryInfo')
         if ram:
             mib = ram.get('SizeInMiB', 0)
-            if mib:
-                return mib / 1024
+            return mib / 1024
         return 0
 
     @property

+ 1 - 1
cloudbridge/providers/aws/services.py

@@ -858,7 +858,7 @@ class AWSVMTypeService(BaseVMTypeService):
             LocationType='availability-zone',
             Filters=[{'Name': 'location',
                       'Values': [self.provider.zone_name]}],
-            **trim_empty_params({'MaxRestuls': limit, 'NextToken': marker}))
+            **trim_empty_params({'MaxResults': limit, 'NextToken': marker}))
         next_token = vmt_list_resp.get("NextToken")
         vmt_list_names = [x.get("InstanceType")
                           for x in vmt_list_resp.get('InstanceTypeOfferings')]