Ubuntu Pastebin

Paste from gz at Wed, 25 Feb 2015 12:08:10 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
    def _unit(self, d):
        svc_units = self.data.setdefault("services", {}).setdefault(
            d['Service'], {}).setdefault('units', {})
        d.pop("Service")
        d.pop("Series")
        d.pop("CharmURL")
        name = d.pop('Name')
        ports = d.pop('Ports')
        tports = d.setdefault('Ports', [])
        for p in ports:
            tports.append("%s/%s" % (p['Number'], p['Protocol']))
        svc_units[name] = self._translate(d)
Download as text