瀏覽代碼

Small update to the getting started guide

Enis Afgan 10 年之前
父節點
當前提交
6a68635a11
共有 1 個文件被更改,包括 3 次插入1 次删除
  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])