Ubuntu Pastebin

Paste from jwitko at Tue, 22 Nov 2016 23:02:22 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
   def allocate_machine(self, params=None):
        u"""Allocate an available machine for deployment.

        http://maas.ubuntu.com/docs2.0/api.html#machine

        :param params:Constraints parameters can be used to
        allocate a machine that possesses certain characteristics.
        All the constraints are optional and when multiple
        constraints are provided, they are combined using 'AND' semantics.
        """
        url = u'machines/'
        if params is None:
            params = dict()
        params[u'op'] = u'allocate'
        res = self.post(url, params)
        return self.error_checking(res)
Download as text