Revision 78548bed

b/snf-common/synnefo/util/rapi.py
1659 1659

  
1660 1660
  def CreateNetwork(self, network_name, network, gateway=None, network6=None,
1661 1661
                    gateway6=None, mac_prefix=None, network_type="private",
1662
                    reserved_ips=None, dry_run=False):
1662
                    reserved_ips=None, tags=None, dry_run=False):
1663 1663
    """Creates a new network.
1664 1664

  
1665 1665
    @type name: str
......
1674 1674
    query = []
1675 1675
    _AppendDryRunIf(query, dry_run)
1676 1676

  
1677
    if reserved_ips:
1678
        reserved_ips = reserved_ips.split(',')
1679

  
1680
    if tags:
1681
        tags = tags.split(',')
1682

  
1677 1683
    body = {
1678 1684
      "network_name": network_name,
1679 1685
      "gateway": gateway,
......
1682 1688
      "network6": network6,
1683 1689
      "mac_prefix": mac_prefix,
1684 1690
      "network_type": network_type,
1685
      "reserved_ips": reserved_ips
1691
      "reserved_ips": reserved_ips,
1692
      "tags": tags
1686 1693
      }
1687 1694

  
1688 1695
    return self._SendRequest(HTTP_POST, "/%s/networks" % GANETI_RAPI_VERSION,

Also available in: Unified diff