aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/patches/0005-maas-module-Obtain-fabric-ID-from-CIDR.patch
blob: 4a81786b28ee3cef0ff9863235bd9b20cceadd08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
##############################################################################
# Copyright (c) 2018 Mirantis Inc., Enea AB and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---
build:
  # Common pkgs required for all builds, no matter the type, arch etc.
  common:
    - python-pip
deploy:
  # Common pkgs required for all deploys, no matter the type, arch etc.
  common:
    - bridge-utils
    - cloud-guest-utils
    - cpu-checker
    - curl
    - docker-compose
    - e2fsprogs
    - git
    - kpartx
    - libglib2.0-bin
    - libvirt-bin
    - make
    - mkisofs
    - qemu-kvm
    - rsync
    - uuid-runtime
    - virtinst
    # python is indirectly required for PDF parsing
    - python
    - python-ipaddress
    - python-jinja2
    - python-yaml
    - python-jsonschema
  # Optional, arch-specific requirements, matched by key name = $(uname -m)
  aarch64:
    # AArch64 VMs use AAVMF (guest UEFI)
    - ipxe-qemu
    - qemu-efi
n class="gi">+ subnets = json.loads(self._maas.get(u'api/2.0/subnets/').read()) + for subnet in subnets: + if subnet['cidr'] == cidr: + return subnet['vlan']['fabric'] + return '' + def _process_iprange(self, subnet_id): ipranges = json.loads(self._maas.get(u'api/2.0/ipranges/').read()) LOG.warn('all %s ipranges %s', subnet_id, ipranges)