瀏覽代碼

Add links argument to service

Ben Firshman 12 年之前
父節點
當前提交
973760a501
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      plum/service.py

+ 2 - 1
plum/service.py

@@ -2,7 +2,7 @@ import re
 
 
 
 
 class Service(object):
 class Service(object):
-    def __init__(self, name, client=None, image=None, command=None):
+    def __init__(self, name, client=None, image=None, command=None, links=None):
         if not re.match('^[a-zA-Z0-9_]+$', name):
         if not re.match('^[a-zA-Z0-9_]+$', name):
             raise ValueError('Invalid name: %s' % name)
             raise ValueError('Invalid name: %s' % name)
 
 
@@ -10,6 +10,7 @@ class Service(object):
         self.client = client
         self.client = client
         self.image = image
         self.image = image
         self.command = command
         self.command = command
+        self.links = links or []
 
 
     @property
     @property
     def containers(self):
     def containers(self):