summaryrefslogtreecommitdiffstats
path: root/deploy/scenario/ha_heat_ceilometer_scenario_0.0.3.yaml
blob: 8ab5f9277ddabcd2c1e02ba8b22d4956743dd51e (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
##############################################################################
# Copyright (c) 2015 Ericsson AB and others.
# jonas.bjurel@ericsson.com
# 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
##############################################################################

############################################################################### # Description:
# This .yaml configuration file defines the configuration of the fuel
# deployment and is passed as an argument to deploy.sh
# eg. deploy.sh -c https://artifact.opnfv.org/fuel/config
# This will make build.sh fetch this configuration file and configure the
# deployment accordingly.
# After the deployment, a copy of this file gets uploaded to fuel:
# /root/deploy-config.yaml, as well as the sha-1 sum of this file:
# /root/deploy-config.sha1
##############################################################################

##############################################################################
# deployment configuration meta-data
deployment-scenario-metadata:
   title: OpenStack-only, HA deployment
   version: 0.0.3
   created: Jan 26 2016
   comment: Rebased to Fuel8

##############################################################################
# Stack extentions are opnfv added value features in form of a fuel-plugin
# plug-ins listed below will be enabled and configured according to the
# <module-config-base-uri>/<module-config-name>_<module-config-version>.yaml
# It does so by copying the config file to the local plugin config directory
stack-extensions:

##############################################################################
# By editing the override-config sections below, you can override arbitrary
# configuration name-space settings
dea-override-config:
  nodes:
  - id: 1
    interfaces: interfaces_1
    role: controller
    transformations: transformations_1
  - id: 2
    interfaces: interfaces_1
    role: mongo, controller
    transformations: transformations_1
  - id: 3
    interfaces: interfaces_1
    role: ceph-osd,controller
    transformations: transformations_1
  - id: 4
    interfaces: interfaces_1
    role: ceph-osd,compute
    transformations: transformations_1
  - id: 5
    interfaces: interfaces_1
    role: ceph-osd,compute
    transformations: transformations_1

dha-override-config:
  nodes:
  - id: 1
    libvirtName: controller1
    libvirtTemplate: templates/virtual_environment/vms/controller.xml
  - id: 2
    libvirtName: controller2
    libvirtTemplate: templates/virtual_environment/vms/controller.xml
  - id: 3
    libvirtName: controller3
    libvirtTemplate: templates/virtual_environment/vms/controller.xml
  - id: 4
    libvirtName: compute1
    libvirtTemplate: templates/virtual_environment/vms/compute.xml
  - id: 5
    libvirtName: compute2
    libvirtTemplate: templates/virtual_environment/vms/compute.xml
  - id: 6
    libvirtName: fuel-master
    libvirtTemplate: templates/virtual_environment/vms/fuel.xml
    isFuel: yes
    username: root
    password: r00tme


##############################################################################
# The verification pipeline may populate the section below with arbitrary
# testing information, which post deploy can be retreived from the fuel master:
# /root/deploy-config.yaml
test:
span>rx; }; static inline struct altera_spi *altera_spi_to_hw(struct spi_device *sdev) { return spi_master_get_devdata(sdev->master); } static void altera_spi_chipsel(struct spi_device *spi, int value) { struct altera_spi *hw = altera_spi_to_hw(spi); if (spi->mode & SPI_CS_HIGH) { switch (value) { case BITBANG_CS_INACTIVE: writel(1 << spi->chip_select, hw->base + ALTERA_SPI_SLAVE_SEL); hw->imr |= ALTERA_SPI_CONTROL_SSO_MSK; writel(hw->imr, hw->base + ALTERA_SPI_CONTROL); break; case BITBANG_CS_ACTIVE: hw->imr &= ~ALTERA_SPI_CONTROL_SSO_MSK; writel(hw->imr, hw->base + ALTERA_SPI_CONTROL); writel(0, hw->base + ALTERA_SPI_SLAVE_SEL); break; } } else { switch (value) { case BITBANG_CS_INACTIVE: hw->imr &= ~ALTERA_SPI_CONTROL_SSO_MSK; writel(hw->imr, hw->base + ALTERA_SPI_CONTROL); break; case BITBANG_CS_ACTIVE: writel(1 << spi->chip_select, hw->base + ALTERA_SPI_SLAVE_SEL); hw->imr |= ALTERA_SPI_CONTROL_SSO_MSK; writel(hw->imr, hw->base + ALTERA_SPI_CONTROL); break; } } } static inline unsigned int hw_txbyte(struct altera_spi *hw, int count) { if (hw->tx) { switch (hw->bytes_per_word) { case 1: return hw->tx[count]; case 2: return (hw->tx[count * 2] | (hw->tx[count * 2 + 1] << 8)); } } return 0; } static int altera_spi_txrx(struct spi_device *spi, struct spi_transfer *t) { struct altera_spi *hw = altera_spi_to_hw(spi); hw->tx = t->tx_buf; hw->rx = t->rx_buf; hw->count = 0; hw->bytes_per_word = DIV_ROUND_UP(t->bits_per_word, 8); hw->len = t->len / hw->bytes_per_word; if (hw->irq >= 0) { /* enable receive interrupt */ hw->imr |= ALTERA_SPI_CONTROL_IRRDY_MSK; writel(hw->imr, hw->base + ALTERA_SPI_CONTROL); /* send the first byte */ writel(hw_txbyte(hw, 0), hw->base + ALTERA_SPI_TXDATA); wait_for_completion(&hw->done); /* disable receive interrupt */ hw->imr &= ~ALTERA_SPI_CONTROL_IRRDY_MSK; writel(hw->imr, hw->base + ALTERA_SPI_CONTROL); } else { while (hw->count < hw->len) { unsigned int rxd; writel(hw_txbyte(hw, hw->count), hw->base + ALTERA_SPI_TXDATA); while (!(readl(hw->base + ALTERA_SPI_STATUS) & ALTERA_SPI_STATUS_RRDY_MSK)) cpu_relax(); rxd = readl(hw->base + ALTERA_SPI_RXDATA); if (hw->rx) { switch (hw->bytes_per_word) { case 1: hw->rx[hw->count] = rxd; break; case 2: hw->rx[hw->count * 2] = rxd; hw->rx[hw->count * 2 + 1] = rxd >> 8; break; } } hw->count++; } } return hw->count * hw->bytes_per_word; } static irqreturn_t altera_spi_irq(int irq, void *dev) { struct altera_spi *hw = dev; unsigned int rxd; rxd = readl(hw->base + ALTERA_SPI_RXDATA); if (hw->rx) { switch (hw->bytes_per_word) { case 1: hw->rx[hw->count] = rxd; break; case 2: hw->rx[hw->count * 2] = rxd; hw->rx[hw->count * 2 + 1] = rxd >> 8; break; } } hw->count++; if (hw->count < hw->len) writel(hw_txbyte(hw, hw->count), hw->base + ALTERA_SPI_TXDATA); else complete(&hw->done); return IRQ_HANDLED; } static int altera_spi_probe(struct platform_device *pdev) { struct altera_spi *hw; struct spi_master *master; struct resource *res; int err = -ENODEV; master = spi_alloc_master(&pdev->dev, sizeof(struct altera_spi)); if (!master) return err; /* setup the master state. */ master->bus_num = pdev->id; master->num_chipselect = 16; master->mode_bits = SPI_CS_HIGH; master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 16); master->dev.of_node = pdev->dev.of_node; hw = spi_master_get_devdata(master); platform_set_drvdata(pdev, hw); /* setup the state for the bitbang driver */ hw->bitbang.master = master; hw->bitbang.chipselect = altera_spi_chipsel; hw->bitbang.txrx_bufs = altera_spi_txrx; /* find and map our resources */ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); hw->base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(hw->base)) { err = PTR_ERR(hw->base); goto exit; } /* program defaults into the registers */ hw->imr = 0; /* disable spi interrupts */ writel(hw->imr, hw->base + ALTERA_SPI_CONTROL); writel(0, hw->base + ALTERA_SPI_STATUS); /* clear status reg */ if (readl(hw->base + ALTERA_SPI_STATUS) & ALTERA_SPI_STATUS_RRDY_MSK) readl(hw->base + ALTERA_SPI_RXDATA); /* flush rxdata */ /* irq is optional */ hw->irq = platform_get_irq(pdev, 0); if (hw->irq >= 0) { init_completion(&hw->done); err = devm_request_irq(&pdev->dev, hw->irq, altera_spi_irq, 0, pdev->name, hw); if (err) goto exit; } /* register our spi controller */ err = spi_bitbang_start(&hw->bitbang); if (err) goto exit; dev_info(&pdev->dev, "base %p, irq %d\n", hw->base, hw->irq); return 0; exit: spi_master_put(master); return err; } static int altera_spi_remove(struct platform_device *dev) { struct altera_spi *hw = platform_get_drvdata(dev); struct spi_master *master = hw->bitbang.master; spi_bitbang_stop(&hw->bitbang); spi_master_put(master); return 0; } #ifdef CONFIG_OF static const struct of_device_id altera_spi_match[] = { { .compatible = "ALTR,spi-1.0", }, { .compatible = "altr,spi-1.0", }, {}, }; MODULE_DEVICE_TABLE(of, altera_spi_match); #endif /* CONFIG_OF */ static struct platform_driver altera_spi_driver = { .probe = altera_spi_probe, .remove = altera_spi_remove, .driver = { .name = DRV_NAME, .pm = NULL, .of_match_table = of_match_ptr(altera_spi_match), }, }; module_platform_driver(altera_spi_driver); MODULE_DESCRIPTION("Altera SPI driver"); MODULE_AUTHOR("Thomas Chou <thomas@wytron.com.tw>"); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:" DRV_NAME);