Browse Source

Small update to the getting started guide

Enis Afgan 10 năm trước cách đây
mục cha
commit
6a68635a11
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      docs/getting_started.rst

+ 3 - 1
docs/getting_started.rst

@@ -93,7 +93,9 @@ get a base Ubuntu image ``ami-d85e75b0`` and launch an instance.
 .. code-block:: python
 
     img = provider.compute.images.get(image_id)
-    inst_type = provider.compute.instance_types.find(name='m1.small')[0]
+    inst_type = sorted([t for t in provider.compute.instance_types.list()
+                        if t.vcpus >= 2 and t.ram >= 4],
+                       key=lambda x: x.vcpus*x.ram)[0]
     inst = provider.compute.instances.create(
         name='CloudBridge-intro', image=img, instance_type=inst_type,
         key_pair=kp, security_groups=[sg])