aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/scenario/scenario.yaml
blob: 66d32da6845054c7c2be72f98654c4ae971a37be (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
92
93
94
95
##############################################################################
# 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 configuration file defines translation between a short deployment
# scenario name and an actual deployment scenario configuration file
#
# Short deployment scenario names are aligned between installer, test, and
# releng projects according to below pattern.
#   os-[controller]-[feature]-[mode](-[optionalparameter])
#
# Please note that the mechanism to get the details regarding the scenarios
# is different currently which needs to be aligned as well.
##############################################################################

##############################################################################
# Short scenario name convention to be followed:
# os-<controller>-<feature>-<mode>[-<optional-parameter>]
# controler: nosdn|odl|onos|ocl|...
# feaure: nofeature | [vlan]_[kvm]_[ovs]_[vlan]_....
# mode: ha|noha
##############################################################################

os-nosdn-nofeature-ha:
  configfile: ha_heat_ceilometer_scenario.yaml

os-nosdn-nofeature-noha:
  configfile: no-ha_heat_ceilometer_scenario.yaml

os-odl_l3-nofeature-ha:
  configfile: ha_odl-l3_heat_ceilometer_scenario.yaml

os-odl_l3-nofeature-noha:
  configfile: no-ha_odl-l3_heat_ceilometer_scenario.yaml

os-odl_l2-nofeature-ha:
  configfile: ha_odl-l2_heat_ceilometer_scenario.yaml

os-odl_l2-nofeature-noha:
  configfile: no-ha_odl-l2_heat_ceilometer_scenario.yaml

os-onos-nofeature-ha:
  configfile: ha_onos_nofeature_heat_ceilometer_scenario.yaml

os-onos-nofeature-noha:
  configfile: no-ha_onos_nofeature_heat_ceilometer_scenario.yaml

os-onos-sfc-ha:
  configfile: ha_onos_sfc_heat_ceilometer_scenario.yaml 

os-onos-sfc-noha:
  configfile: no-ha_onos_sfc_heat_ceilometer_scenario.yaml

os-nosdn-kvm-ha:
  configfile: ha_nfv-kvm_heat_ceilometer_scenario.yaml

os-nosdn-kvm-noha:
  configfile: no-ha_nfv-kvm_heat_ceilometer_scenario.yaml

os-nosdn-ovs-ha:
  configfile: ha_nfv-ovs_heat_ceilometer_scenario.yaml

os-nosdn-ovs-noha:
  configfile: no-ha_nfv-ovs_heat_ceilometer_scenario.yaml

os-odl_l2-bgpvpn-ha:
  configfile: ha_odl-bgpvpn_scenario.yaml

os-odl_l2-bgpvpn-noha:
  configfile: no-ha_odl-bgpvpn_scenario.yaml

os-odl_l2-sfc-ha:
  configfile: ha_odl-l2_sfc_heat_ceilometer_scenario.yaml

os-odl_l2-sfc-noha:
  configfile: no-ha_odl-l2_sfc_heat_ceilometer_scenario.yaml

os-nosdn-kvm_ovs_dpdk-ha:
  configfile: ha_nfv-kvm_nfv-ovs-dpdk_heat_ceilometer_scenario.yaml

os-nosdn-kvm_ovs_dpdk-noha:
  configfile: no-ha_nfv-kvm_nfv-ovs-dpdk_heat_ceilometer_scenario.yaml

os-nosdn-kvm_ovs_dpdk_bar-ha:
  configfile: ha_nfv-kvm_nfv-ovs-dpdk-bar_heat_ceilometer_scenario.yaml

os-nosdn-kvm_ovs_dpdk_bar-noha:
  configfile: no-ha_nfv-kvm_nfv-ovs-dpdk-bar_heat_ceilometer_scenario.yaml
>']: %s" % (src, dest, e)) return None class ProxyHopClient(paramiko.SSHClient): ''' Connect to a remote server using a proxy hop ''' def __init__(self, *args, **kwargs): self.logger = rl.Logger("ProxyHopClient").getLogger() self.proxy_ssh = None self.proxy_transport = None self.proxy_channel = None self.proxy_ip = None self.proxy_ssh_key = None self.local_ssh_key = os.path.join(os.getcwd(), 'id_rsa') super(ProxyHopClient, self).__init__(*args, **kwargs) def configure_jump_host(self, jh_ip, jh_user, jh_pass, jh_ssh_key='/root/.ssh/id_rsa'): self.proxy_ip = jh_ip self.proxy_ssh_key = jh_ssh_key self.proxy_ssh = paramiko.SSHClient() self.proxy_ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.proxy_ssh.connect(jh_ip, username=jh_user, password=jh_pass) self.proxy_transport = self.proxy_ssh.get_transport() def connect(self, hostname, port=22, username='root', password=None, pkey=None, key_filename=None, timeout=None, allow_agent=True, look_for_keys=True, compress=False, sock=None, gss_auth=False, gss_kex=False, gss_deleg_creds=True, gss_host=None, banner_timeout=None): try: if self.proxy_ssh is None: raise Exception('You must configure the jump ' 'host before calling connect') get_file_res = get_file(self.proxy_ssh, self.proxy_ssh_key, self.local_ssh_key) if get_file_res is None: raise Exception('Could\'t fetch SSH key from jump host') proxy_key = (paramiko.RSAKey .from_private_key_file(self.local_ssh_key)) self.proxy_channel = self.proxy_transport.open_channel( "direct-tcpip", (hostname, 22), (self.proxy_ip, 22)) self.set_missing_host_key_policy(paramiko.AutoAddPolicy()) super(ProxyHopClient, self).connect(hostname, username=username, pkey=proxy_key, sock=self.proxy_channel) os.remove(self.local_ssh_key) except Exception, e: self.logger.error(e)