summaryrefslogtreecommitdiffstats
path: root/environments/tls-everywhere-endpoints-dns.yaml
blob: 00ca547ea12fbe017ec868d6d2585ff63e113715 (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Use this environment when deploying an overcloud where all the endpoints are
# DNS names and there's TLS in all endpoint types.
parameter_defaults:
  EndpointMap:
    AodhAdmin: {protocol: 'https', port: '8042', host: 'CLOUDNAME'}
    AodhInternal: {protocol: 'https', port: '8042', host: 'CLOUDNAME'}
    AodhPublic: {protocol: 'https', port: '13042', host: 'CLOUDNAME'}
    BarbicanAdmin: {protocol: 'https', port: '9311', host: 'CLOUDNAME'}
    BarbicanInternal: {protocol: 'https', port: '9311', host: 'CLOUDNAME'}
    BarbicanPublic: {protocol: 'https', port: '13311', host: 'CLOUDNAME'}
    CeilometerAdmin: {protocol: 'https', port: '8777', host: 'CLOUDNAME'}
    CeilometerInternal: {protocol: 'https', port: '8777', host: 'CLOUDNAME'}
    CeilometerPublic: {protocol: 'https', port: '13777', host: 'CLOUDNAME'}
    CephRgwAdmin: {protocol: 'https', port: '8080', host: 'CLOUDNAME'}
    CephRgwInternal: {protocol: 'https', port: '8080', host: 'CLOUDNAME'}
    CephRgwPublic: {protocol: 'https', port: '13808', host: 'CLOUDNAME'}
    CinderAdmin: {protocol: 'https', port: '8776', host: 'CLOUDNAME'}
    CinderInternal: {protocol: 'https', port: '8776', host: 'CLOUDNAME'}
    CinderPublic: {protocol: 'https', port: '13776', host: 'CLOUDNAME'}
    ContrailAnalyticsApiAdmin: {protocol: 'http', port: '8081', host: 'IP_ADDRESS'}
    ContrailAnalyticsApiInternal: {protocol: 'http', port: '8081', host: 'IP_ADDRESS'}
    ContrailAnalyticsApiPublic: {protocol: 'http', port: '8081', host: 'IP_ADDRESS'}
    ContrailAnalyticsCollectorHttpAdmin: {protocol: 'http', port: '8089',
      host: 'IP_ADDRESS'}
    ContrailAnalyticsCollectorHttpInternal: {protocol: 'http', port: '8089',
      host: 'IP_ADDRESS'}
    ContrailAnalyticsCollectorHttpPublic: {protocol: 'http', port: '8089',
      host: 'IP_ADDRESS'}
    ContrailAnalyticsCollectorSandeshAdmin: {protocol: 'http', port: '8086',
      host: 'IP_ADDRESS'}
    ContrailAnalyticsCollectorSandeshInternal: {protocol: 'http', port: '8086',
      host: 'IP_ADDRESS'}
    ContrailAnalyticsCollectorSandeshPublic: {protocol: 'http', port: '8086',
      host: 'IP_ADDRESS'}
    ContrailAnalyticsHttpAdmin: {protocol: 'http', port: '8090', host: 'IP_ADDRESS'}
    ContrailAnalyticsHttpInternal: {protocol: 'http', port: '8090', host: 'IP_ADDRESS'}
    ContrailAnalyticsHttpPublic: {protocol: 'http', port: '8090', host: 'IP_ADDRESS'}
    ContrailAnalyticsRedisAdmin: {protocol: 'http', port: '6379', host: 'IP_ADDRESS'}
    ContrailAnalyticsRedisInternal: {protocol: 'http', port: '6379', host: 'IP_ADDRESS'}
    ContrailAnalyticsRedisPublic: {protocol: 'http', port: '6379', host: 'IP_ADDRESS'}
    ContrailConfigAdmin: {protocol: 'http', port: '8082', host: 'IP_ADDRESS'}
    ContrailConfigInternal: {protocol: 'http', port: '8082', host: 'IP_ADDRESS'}
    ContrailConfigPublic: {protocol: 'http', port: '8082', host: 'IP_ADDRESS'}
    ContrailDiscoveryAdmin: {protocol: 'http', port: '5998', host: 'IP_ADDRESS'}
    ContrailDiscoveryInternal: {protocol: 'http', port: '5998', host: 'IP_ADDRESS'}
    ContrailDiscoveryPublic: {protocol: 'http', port: '5998', host: 'IP_ADDRESS'}
    ContrailWebuiHttpAdmin: {protocol: 'http', port: '8080', host: 'IP_ADDRESS'}
    ContrailWebuiHttpInternal: {protocol: 'http', port: '8080', host: 'IP_ADDRESS'}
    ContrailWebuiHttpPublic: {protocol: 'http', port: '8080', host: 'IP_ADDRESS'}
    ContrailWebuiHttpsAdmin: {protocol: 'http', port: '8143', host: 'IP_ADDRESS'}
    ContrailWebuiHttpsInternal: {protocol: 'http', port: '8143', host: 'IP_ADDRESS'}
    ContrailWebuiHttpsPublic: {protocol: 'http', port: '8143', host: 'IP_ADDRESS'}
    Ec2ApiAdmin: {protocol: 'https', port: '8788', host: 'CLOUDNAME'}
    Ec2ApiInternal: {protocol: 'https', port: '8788', host: 'CLOUDNAME'}
    Ec2ApiPublic: {protocol: 'https', port: '13788', host: 'CLOUDNAME'}
    GlanceAdmin: {protocol: 'https', port: '9292', host: 'CLOUDNAME'}
    GlanceInternal: {protocol: 'https', port: '9292', host: 'CLOUDNAME'}
    GlancePublic: {protocol: 'https', port: '13292', host: 'CLOUDNAME'}
    GnocchiAdmin: {protocol: 'https', port: '8041', host: 'CLOUDNAME'}
    GnocchiInternal: {protocol: 'https', port: '8041', host: 'CLOUDNAME'}
    GnocchiPublic: {protocol: 'https', port: '13041', host: 'CLOUDNAME'}
    HeatAdmin: {protocol: 'https', port: '8004', host: 'CLOUDNAME'}
    HeatInternal: {protocol: 'https', port: '8004', host: 'CLOUDNAME'}
    HeatPublic: {protocol: 'https', port: '13004', host: 'CLOUDNAME'}
    HeatCfnAdmin: {protocol: 'https', port: '8000', host: 'CLOUDNAME'}
    HeatCfnInternal: {protocol: 'https', port: '8000', host: 'CLOUDNAME'}
    HeatCfnPublic: {protocol: 'https', port: '13005', host: 'CLOUDNAME'}
    HorizonPublic: {protocol: 'https', port: '443', host: 'CLOUDNAME'}
    IronicAdmin: {protocol: 'https', port: '6385', host: 'CLOUDNAME'}
    IronicInternal: {protocol: 'https', port: '6385', host: 'CLOUDNAME'}
    IronicPublic: {protocol: 'https', port: '13385', host: 'CLOUDNAME'}
    KeystoneAdmin: {protocol: 'https', port: '35357', host: 'CLOUDNAME'}
    KeystoneInternal: {protocol: 'https', port: '5000', host: 'CLOUDNAME'}
    KeystonePublic: {protocol: 'https', port: '13000', host: 'CLOUDNAME'}
    ManilaAdmin: {protocol: 'https', port: '8786', host: 'CLOUDNAME'}
    ManilaInternal: {protocol: 'https', port: '8786', host: 'CLOUDNAME'}
    ManilaPublic: {protocol: 'https', port: '13786', host: 'CLOUDNAME'}
    MistralAdmin: {protocol: 'https', port: '8989', host: 'CLOUDNAME'}
    MistralInternal: {protocol: 'https', port: '8989', host: 'CLOUDNAME'}
    MistralPublic: {protocol: 'https', port: '13989', host: 'CLOUDNAME'}
    MysqlInternal: {protocol: 'mysql+pymysql', port: '3306', host: 'CLOUDNAME'}
    NeutronAdmin: {protocol: 'https', port: '9696', host: 'CLOUDNAME'}
    NeutronInternal: {protocol: 'https', port: '9696', host: 'CLOUDNAME'}
    NeutronPublic: {protocol: 'https', port: '13696', host: 'CLOUDNAME'}
    NovaAdmin: {protocol: 'https', port: '8774', host: 'CLOUDNAME'}
    NovaInternal: {protocol: 'https', port: '8774', host: 'CLOUDNAME'}
    NovaPublic: {protocol: 'https', port: '13774', host: 'CLOUDNAME'}
    NovaPlacementAdmin: {protocol: 'https', port: '8778', host: 'CLOUDNAME'}
    NovaPlacementInternal: {protocol: 'https', port: '8778', host: 'CLOUDNAME'}
    NovaPlacementPublic: {protocol: 'https', port: '13778', host: 'CLOUDNAME'}
    NovaVNCProxyAdmin: {protocol: 'https', port: '6080', host: 'CLOUDNAME'}
    NovaVNCProxyInternal: {protocol: 'https', port: '6080', host: 'CLOUDNAME'}
    NovaVNCProxyPublic: {protocol: 'https', port: '13080', host: 'CLOUDNAME'}
    OctaviaAdmin: {protocol: 'https', port: '9876', host: 'IP_ADDRESS'}
    OctaviaInternal: {protocol: 'https', port: '9876', host: 'IP_ADDRESS'}
    OctaviaPublic: {protocol: 'https', port: '13876', host: 'CLOUDNAME'}
    PankoAdmin: {protocol: 'https', port: '8779', host: 'CLOUDNAME'}
    PankoInternal: {protocol: 'https', port: '8779', host: 'CLOUDNAME'}
    PankoPublic: {protocol: 'https', port: '13779', host: 'CLOUDNAME'}
    SaharaAdmin: {protocol: 'https', port: '8386', host: 'CLOUDNAME'}
    SaharaInternal: {protocol: 'https', port: '8386', host: 'CLOUDNAME'}
    SaharaPublic: {protocol: 'https', port: '13386', host: 'CLOUDNAME'}
    SwiftAdmin: {protocol: 'https', port: '8080', host: 'CLOUDNAME'}
    SwiftInternal: {protocol: 'https', port: '8080', host: 'CLOUDNAME'}
    SwiftPublic: {protocol: 'https', port: '13808', host: 'CLOUDNAME'}
    ZaqarAdmin: {protocol: 'https', port: '8888', host: 'CLOUDNAME'}
    ZaqarInternal: {protocol: 'https', port: '8888', host: 'CLOUDNAME'}
    ZaqarPublic: {protocol: 'https', port: '13888', host: 'CLOUDNAME'}
    ZaqarWebSocketAdmin: {protocol: 'wss', port: '9000', host: 'CLOUDNAME'}
    ZaqarWebSocketInternal: {protocol: 'wss', port: '9000', host: 'CLOUDNAME'}
    ZaqarWebSocketPublic: {protocol: 'wss', port: '9000', host: 'CLOUDNAME'}
.VNFD_0) self.assertIsNone(udp_replay_approx_vnf._vnf_process) @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") @mock.patch(SSH_HELPER) def test_collect_kpi(self, ssh, *args): mock_ssh(ssh) vnfd = self.VNFD_0 result = "stats\r\r\n\r\nUDP_Replay stats:\r\n--------------\r\n" \ "Port\t\tRx Packet\t\tTx Packet\t\tRx Pkt Drop\t\tTx Pkt Drop \r\n"\ "0\t\t7374156\t\t7374136\t\t\t0\t\t\t0\r\n" \ "1\t\t7374316\t\t7374315\t\t\t0\t\t\t0\r\n\r\nReplay>\r\r\nReplay>" udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, vnfd) udp_replay_approx_vnf.q_in = mock.MagicMock() udp_replay_approx_vnf.q_out = mock.MagicMock() udp_replay_approx_vnf.q_out.qsize = mock.Mock(return_value=0) udp_replay_approx_vnf.all_ports = ["xe0", "xe1"] udp_replay_approx_vnf.get_stats = mock.Mock(return_value=result) result = {'collect_stats': {}, 'packets_dropped': 0, 'packets_fwd': 14748451, 'packets_in': 14748472} self.assertEqual(result, udp_replay_approx_vnf.collect_kpi()) @mock.patch(SSH_HELPER) def test_get_stats(self, ssh, *args): mock_ssh(ssh) udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, self.VNFD_0) udp_replay_approx_vnf.q_in = mock.MagicMock() udp_replay_approx_vnf.q_out = mock.MagicMock() udp_replay_approx_vnf.q_out.qsize = mock.Mock(return_value=0) mock_result = \ "CG-NAPT(.*\n)*Received 100, Missed 0, Dropped 0,Translated 100,ingress" udp_replay_approx_vnf.vnf_execute = mock.Mock(return_value=mock_result) self.assertEqual(mock_result, udp_replay_approx_vnf.get_stats()) def _get_file_abspath(self, filename): curr_path = os.path.dirname(os.path.abspath(__file__)) file_path = os.path.join(curr_path, filename) return file_path @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Context") @mock.patch(SSH_HELPER) def test__build_config(self, ssh, mock_context, *args): mock_ssh(ssh) udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, self.VNFD_0) udp_replay_approx_vnf.queue_wrapper = mock.MagicMock() udp_replay_approx_vnf.nfvi_context = mock_context udp_replay_approx_vnf.nfvi_context.attrs = {'nfvi_type': 'baremetal'} udp_replay_approx_vnf.setup_helper.bound_pci = [] udp_replay_approx_vnf.ssh_helper.provision_tool = mock.MagicMock(return_value="tool_path") udp_replay_approx_vnf.scenario_helper = ScenarioHelper(name='vnf__1') udp_replay_approx_vnf.scenario_helper.scenario_cfg = self.SCENARIO_CFG cmd_line = udp_replay_approx_vnf._build_config() expected = \ "sudo tool_path --log-level=5 -c 0x7 -n 4 -w -- -p 0x3 --config='(0,0,1),(1,0,2)'" self.assertEqual(cmd_line, expected) @mock.patch('yardstick.network_services.vnf_generic.vnf.udp_replay.open') @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Context") @mock.patch(SSH_HELPER) def test__build_pipeline_kwargs(self, ssh, mock_context, *args): mock_ssh(ssh) udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, self.VNFD_0) udp_replay_approx_vnf.nfvi_context = mock_context udp_replay_approx_vnf.nfvi_context.attrs = {'nfvi_type': 'baremetal'} udp_replay_approx_vnf.setup_helper.bound_pci = ['0000:00:0.1', '0000:00:0.3'] udp_replay_approx_vnf.all_ports = ["xe0", "xe1"] udp_replay_approx_vnf.ssh_helper.provision_tool = mock.MagicMock(return_value="tool_path") udp_replay_approx_vnf.scenario_helper = ScenarioHelper(name='vnf__1') udp_replay_approx_vnf.scenario_helper.scenario_cfg = self.SCENARIO_CFG udp_replay_approx_vnf._build_pipeline_kwargs() self.assertEqual(udp_replay_approx_vnf.pipeline_kwargs, { 'config': '(0,0,1),(1,0,2)', 'cpu_mask_hex': '0x7', 'hw_csum': '', 'port_mask_hex': '0x3', 'tool_path': 'tool_path', 'whitelist': '0000:00:0.1 -w 0000:00:0.3' }) @mock.patch(SSH_HELPER) def test_run_udp_replay(self, ssh, *args): mock_ssh(ssh) udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, self.VNFD_0) udp_replay_approx_vnf._build_config = mock.MagicMock() udp_replay_approx_vnf.queue_wrapper = mock.MagicMock() udp_replay_approx_vnf.scenario_helper = mock.MagicMock() udp_replay_approx_vnf._run() udp_replay_approx_vnf.ssh_helper.run.assert_called_once() @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Context") @mock.patch(SSH_HELPER) def test_instantiate(self, ssh, *args): mock_ssh(ssh) udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, self.VNFD_0) udp_replay_approx_vnf.q_out.put("Replay>") udp_replay_approx_vnf.WAIT_TIME = 0 udp_replay_approx_vnf.setup_helper.setup_vnf_environment = mock.Mock() udp_replay_approx_vnf.deploy_helper = mock.MagicMock() udp_replay_approx_vnf.deploy_vnfs = mock.MagicMock() self.assertIsNone(udp_replay_approx_vnf.instantiate(self.SCENARIO_CFG, self.CONTEXT_CFG)) udp_replay_approx_vnf._vnf_process.is_alive = mock.Mock(return_value=1) udp_replay_approx_vnf._vnf_process.exitcode = 0 self.assertEqual(udp_replay_approx_vnf.wait_for_instantiate(), 0) @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Context") @mock.patch('yardstick.ssh.SSH') @mock.patch(SSH_HELPER) def test_instantiate_panic(self, *args): udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, self.VNFD_0) udp_replay_approx_vnf.WAIT_TIME = 0 udp_replay_approx_vnf.q_out.put("some text PANIC some text") udp_replay_approx_vnf.setup_helper.setup_vnf_environment = mock.Mock() udp_replay_approx_vnf.deploy_helper = mock.MagicMock() self.assertIsNone(udp_replay_approx_vnf.instantiate(self.SCENARIO_CFG, self.CONTEXT_CFG)) with self.assertRaises(RuntimeError): udp_replay_approx_vnf.wait_for_instantiate()