Add gitignore
This commit is contained in:
parent
62b8e6f276
commit
afaa447860
15
.gitignore
vendored
Normal file
15
.gitignore
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/build/
|
||||
|
||||
bin
|
||||
.coverage
|
||||
.testrepository
|
||||
.tox
|
||||
tags
|
||||
*.sw[nop]
|
||||
*.pyc
|
||||
.unit-state.db
|
||||
trusty/
|
||||
xenial/
|
||||
.stestr
|
||||
__pycache__
|
||||
func-results.json
|
21
config.yaml
21
config.yaml
@ -1,21 +0,0 @@
|
||||
options:
|
||||
openstack-origin:
|
||||
default: distro
|
||||
type: string
|
||||
description: |
|
||||
Repository from which to install. May be one of the following:
|
||||
distro (default), ppa:somecustom/ppa, a deb url sources entry,
|
||||
or a supported Ubuntu Cloud Archive e.g.
|
||||
.
|
||||
cloud:<series>-<openstack-release>
|
||||
cloud:<series>-<openstack-release>/updates
|
||||
cloud:<series>-<openstack-release>/staging
|
||||
cloud:<series>-<openstack-release>/proposed
|
||||
.
|
||||
See https://wiki.ubuntu.com/OpenStack/CloudArchive for info on which
|
||||
cloud archives are available and supported.
|
||||
region:
|
||||
default: RegionOne
|
||||
type: string
|
||||
description: |
|
||||
Name of the OpenStack region.
|
@ -1,7 +0,0 @@
|
||||
includes:
|
||||
- 'layer:openstack'
|
||||
- 'interface:neutron-plugin-api-subordinate'
|
||||
- 'interface:keystone-credentials'
|
||||
options:
|
||||
basic:
|
||||
use_venv: False
|
@ -1,36 +0,0 @@
|
||||
from charmhelpers.core.hookenv import (
|
||||
config,
|
||||
log
|
||||
)
|
||||
import charms_openstack.charm as charm
|
||||
|
||||
IRONIC_AGENT_CONF = "/etc/neutron/plugins/ml2/ironic_neutron_agent.ini"
|
||||
|
||||
|
||||
def request_endpoint_information(keystone):
|
||||
charm = NeutronIronicAgentCharm.singleton
|
||||
keystone.request_credentials(
|
||||
charm.name, region=charm.region)
|
||||
|
||||
|
||||
class NeutronIronicAgentCharm(charm.OpenStackCharm):
|
||||
abstract_class = False
|
||||
|
||||
release = 'train'
|
||||
name = 'ironic'
|
||||
group = 'neutron'
|
||||
|
||||
python_version = 3
|
||||
packages = ['ironic-neutron-agent', 'python3-ironic-neutron-agent']
|
||||
default_service = 'ironic-neutron-agent'
|
||||
services = [default_service,]
|
||||
|
||||
restart_map = {
|
||||
IRONIC_AGENT_CONF: [default_service, ],
|
||||
}
|
||||
|
||||
release_pkg = version_package = 'neutron-common'
|
||||
|
||||
def install(self):
|
||||
self.configure_source()
|
||||
super().install()
|
@ -1,22 +0,0 @@
|
||||
name: neutron-api-plugin-ironic
|
||||
summary: Ironic bare metal ML2 plugin support for Neutron-API
|
||||
maintainer: Gabriel-Adrian Samfira <gsamfira@cloudbasesolutions.com>
|
||||
description: |
|
||||
Ironic baremetal mechanism driver and ironic neutron agent support
|
||||
tags:
|
||||
- misc
|
||||
- networking
|
||||
subordinate: true
|
||||
series:
|
||||
- bionic
|
||||
- focal
|
||||
provides:
|
||||
neutron-plugin-api-subordinate:
|
||||
interface: neutron-plugin-api-subordinate
|
||||
scope: container
|
||||
requires:
|
||||
container:
|
||||
interface: juju-info
|
||||
scope: container
|
||||
identity-credentials:
|
||||
interface: keystone-credentials
|
@ -1,68 +0,0 @@
|
||||
import charms.reactive as reactive
|
||||
import charm.openstack.neutron_ironic as ironic
|
||||
|
||||
import json
|
||||
|
||||
from charmhelpers.core.hookenv import (
|
||||
config,
|
||||
log,
|
||||
)
|
||||
|
||||
from charms_openstack.charm import (
|
||||
provide_charm_instance,
|
||||
use_defaults,
|
||||
optional_interfaces,
|
||||
)
|
||||
|
||||
|
||||
use_defaults(
|
||||
'charm.default-select-release',
|
||||
'update-status',
|
||||
)
|
||||
|
||||
@reactive.when('identity-credentials.available')
|
||||
def render_stuff(*args):
|
||||
with provide_charm_instance() as ironic_charm:
|
||||
ironic_charm.render_with_interfaces(
|
||||
optional_interfaces(args))
|
||||
ironic_charm.assess_status()
|
||||
reactive.set_state('config.complete')
|
||||
|
||||
|
||||
@reactive.when('identity-credentials.connected')
|
||||
def setup_endpoint(keystone):
|
||||
with provide_charm_instance() as charm_class:
|
||||
ironic.request_endpoint_information(keystone)
|
||||
charm_class.assess_status()
|
||||
|
||||
|
||||
@reactive.when_not('ironic-agent-package.installed')
|
||||
@reactive.when('neutron-plugin-api-subordinate.available')
|
||||
def install():
|
||||
with provide_charm_instance() as charm_class:
|
||||
charm_class.install()
|
||||
reactive.set_state('ironic-agent-package.installed')
|
||||
|
||||
|
||||
@reactive.when_any('neutron-plugin-api-subordinate.connected')
|
||||
def configure_principle():
|
||||
try:
|
||||
api_principle = reactive.endpoint_from_flag(
|
||||
'neutron-plugin-api-subordinate.connected')
|
||||
|
||||
mech_drivers = []
|
||||
existing_mech_drivers = api_principle.neutron_config_data.get(
|
||||
'mechanism_drivers', None)
|
||||
if existing_mech_drivers:
|
||||
mech_drivers.extend(existing_mech_drivers.split(','))
|
||||
|
||||
mech_drivers.append("baremetal")
|
||||
mechanism_drivers = ','.join(mech_drivers)
|
||||
except AttributeError:
|
||||
log("The principle charm isn't ready yet. "
|
||||
"Postponing its configuration...")
|
||||
return
|
||||
|
||||
api_principle.configure_plugin(
|
||||
neutron_plugin='ironic',
|
||||
mechanism_drivers=mechanism_drivers)
|
@ -1,34 +0,0 @@
|
||||
{% if identity_credentials.auth_host -%}
|
||||
{% if identity_credentials.api_version and identity_credentials.api_version == "3" -%}
|
||||
{% set auth_ver = "v3" -%}
|
||||
{% else -%}
|
||||
{% set auth_ver = "v2.0" -%}
|
||||
{% endif -%}
|
||||
|
||||
[ironic]
|
||||
region_name = {{ options.region }}
|
||||
auth_version = {{auth_ver}}
|
||||
auth_uri = {{ identity_credentials.auth_protocol }}://{{ identity_credentials.auth_host }}:{{ identity_credentials.credentials_port }}/{{auth_ver}}
|
||||
auth_url = {{ identity_credentials.auth_protocol }}://{{ identity_credentials.auth_host }}:{{ identity_credentials.credentials_port }}
|
||||
auth_type = password
|
||||
|
||||
{% if identity_credentials.credentials_project_domain_name -%}
|
||||
project_domain_name = {{ identity_credentials.credentials_project_domain_name }}
|
||||
user_domain_name = {{ identity_credentials.credentials_user_domain_name }}
|
||||
{% else %}
|
||||
project_domain_name = default
|
||||
user_domain_name = default
|
||||
{% endif -%}
|
||||
|
||||
username = {{ identity_credentials.credentials_username }}
|
||||
password = {{ identity_credentials.credentials_password }}
|
||||
project_name = {{identity_credentials.credentials_project}}
|
||||
|
||||
admin_user = {{ identity_credentials.credentials_username }}
|
||||
admin_password = {{ identity_credentials.credentials_password }}
|
||||
admin_tenant_name = {{identity_credentials.credentials_project}}
|
||||
|
||||
{% if identity_credentials.signing_dir -%}
|
||||
signing_dir = {{ identity_credentials.signing_dir }}
|
||||
{% endif -%}
|
||||
{% endif -%}
|
Loading…
x
Reference in New Issue
Block a user