blob: d5f1fcb77296e9406a98d1c716cbf9dabe18495b [file] [log] [blame]
Chetan Gaonkerc1a4c8a2017-04-13 00:24:44 +00001#
2# Copyright 2016-present Ciena Corporation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16import unittest
17import os,sys
18import keystoneclient.v2_0.client as ksclient
19import keystoneclient.apiclient.exceptions
20import neutronclient.v2_0.client as nclient
21import neutronclient.common.exceptions
22from novaclient import client as nova_client
23from neutronclient.v2_0 import client as neutron_client
24import neutronclient.v2_0.client as neutronclient
25from nose.tools import assert_equal
26from CordTestUtils import get_mac, log_test
27from OnosCtrl import OnosCtrl
28from OnosFlowCtrl import OnosFlowCtrl
29from credentials import *
30from OnboardingServiceUtils import OnboardingServiceUtils
31from SSHTestAgent import SSHTestAgent
32import requests
33import time
34import json
35
36class onboarding_exchange():
37
38 @classmethod
39 def setUpClass(cls):
40 OnboardingServiceUtils.setUp()
41
42 @classmethod
43 def tearDownClass(cls):
44 OnboardingServiceUtils.tearDown()
45
46 def cliEnter(self, controller = None):
47 retries = 0
48 while retries < 30:
49 self.cli = OnosCliDriver(controller = controller, connect = True)
50 if self.cli.handle:
51 break
52 else:
53 retries += 1
54 time.sleep(2)
55
56 def cliExit(self):
57 self.cli.disconnect()
58
59 def onos_shutdown(self, controller = None):
60 status = True
61 self.cliEnter(controller = controller)
62 try:
63 self.cli.shutdown(timeout = 10)
64 except:
65 log.info('Graceful shutdown of ONOS failed for controller: %s' %controller)
66 status = False
67
68 self.cliExit()
69 return status
70
71 def test_exampleservice_health(self):
72 """
73 Algo:
74 1. Login to compute node VM
75 2. Get all exampleservice
76 3. Ping to all exampleservice
77 4. Verifying Ping success
78 """
79 status = OnboardingServiceUtils.health_check()
80 assert_equal(status, True)
81
82 def test_exampleservice_onboarding(self):
83 pass
84
85 def test_exampleservice_connectivity(self):
86 pass
87
88 def test_exampleservice_for_apache_service(self):
89 pass
90
91 def test_exampleservice_using__curl(self):
92 pass