aboutsummaryrefslogtreecommitdiffstats
path: root/network/ports/internal_api.yaml
blob: f84e8f71209093707e3459b63f2b4011206b5af3 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
heat_template_version: 2015-04-30

description: >
  Creates a port on the internal_api network.

parameters:
  InternalApiNetName:
    description: Name of the internal API neutron network
    default: internal_api
    type: string
  PortName:
    description: Name of the port
    default: ''
    type: string
  ControlPlaneIP: # Here for compatibility with noop.yaml
    description: IP address on the control plane
    default: ''
    type: string
  FixedIPs:
    description: >
        Control the IP allocation for the VIP port. E.g.
        [{'ip_address':'1.2.3.4'}]
    default: []
    type: json
  IPPool: # Here for compatibility with from_pool.yaml
    default: {}
    type: json
  NodeIndex: # Here for compatibility with from_pool.yaml
    default: 0
    type: number

resources:

  InternalApiPort:
    type: OS::Neutron::Port
    properties:
      network: {get_param: InternalApiNetName}
      name: {get_param: PortName}
      fixed_ips: {get_param: FixedIPs}
      replacement_policy: AUTO

outputs:
  ip_address:
    description: internal API network IP
    value: {get_attr: [InternalApiPort, fixed_ips, 0, ip_address]}
  ip_subnet:
    # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?)
    description: IP/Subnet CIDR for the internal API network IP
    value:
          list_join:
            - ''
            - - {get_attr: [InternalApiPort, fixed_ips, 0, ip_address]}
              - '/'
              - {get_attr: [InternalApiPort, subnets, 0, cidr, -2]}
              - {get_attr: [InternalApiPort, subnets, 0, cidr, -1]}
class="p">, .active_low = 1, }, { .name = "qca:red:wlan-2g", .gpio = AP136_GPIO_LED_WLAN_2G, .active_low = 1, }, { .name = "qca:red:usb", .gpio = AP136_GPIO_LED_USB, .active_low = 1, } }; static struct gpio_keys_button ap136_gpio_keys[] __initdata = { { .desc = "WPS button", .type = EV_KEY, .code = KEY_WPS_BUTTON, .debounce_interval = AP136_KEYS_DEBOUNCE_INTERVAL, .gpio = AP136_GPIO_BTN_WPS, .active_low = 1, }, { .desc = "RFKILL button", .type = EV_KEY, .code = KEY_RFKILL, .debounce_interval = AP136_KEYS_DEBOUNCE_INTERVAL, .gpio = AP136_GPIO_BTN_RFKILL, .active_low = 1, }, }; static struct spi_board_info ap136_spi_info[] = { { .bus_num = 0, .chip_select = 0, .max_speed_hz = 25000000, .modalias = "mx25l6405d", } }; static struct ath79_spi_platform_data ap136_spi_data = { .bus_num = 0, .num_chipselect = 1, }; #ifdef CONFIG_PCI static struct ath9k_platform_data ap136_ath9k_data; static int ap136_pci_plat_dev_init(struct pci_dev *dev) { if (dev->bus->number == 1 && (PCI_SLOT(dev->devfn)) == 0) dev->dev.platform_data = &ap136_ath9k_data; return 0; } static void __init ap136_pci_init(u8 *eeprom) { memcpy(ap136_ath9k_data.eeprom_data, eeprom, sizeof(ap136_ath9k_data.eeprom_data)); ath79_pci_set_plat_dev_init(ap136_pci_plat_dev_init); ath79_register_pci(); } #else static inline void ap136_pci_init(u8 *eeprom) {} #endif /* CONFIG_PCI */ static void __init ap136_setup(void) { u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); ath79_register_leds_gpio(-1, ARRAY_SIZE(ap136_leds_gpio), ap136_leds_gpio); ath79_register_gpio_keys_polled(-1, AP136_KEYS_POLL_INTERVAL, ARRAY_SIZE(ap136_gpio_keys), ap136_gpio_keys); ath79_register_spi(&ap136_spi_data, ap136_spi_info, ARRAY_SIZE(ap136_spi_info)); ath79_register_usb(); ath79_register_wmac(art + AP136_WMAC_CALDATA_OFFSET); ap136_pci_init(art + AP136_PCIE_CALDATA_OFFSET); } MIPS_MACHINE(ATH79_MACH_AP136_010, "AP136-010", "Atheros AP136-010 reference board", ap136_setup);