aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/logdata/client1.log66
-rw-r--r--tests/logdata/server.log82
-rwxr-xr-xtests/test_partitioner.py10
3 files changed, 86 insertions, 72 deletions
diff --git a/tests/logdata/client1.log b/tests/logdata/client1.log
index c589f6d..f7544df 100644
--- a/tests/logdata/client1.log
+++ b/tests/logdata/client1.log
@@ -1,33 +1,33 @@
-12/15/2016 04:19:39 PM Domino Client Starting...
-12/15/2016 04:19:39 PM 1 Sending Registration
-12/15/2016 04:19:39 PM Registration Response: Response Code: 1
-12/15/2016 04:19:39 PM CLI Service is starting
-12/15/2016 04:19:39 PM RPC service for CLI is starting...
-12/15/2016 04:19:41 PM Received CLI ['heartbeat']
-12/15/2016 04:19:41 PM 12345678123456781234567812345678 Sending heartbeat
-12/15/2016 04:19:41 PM heart beat received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 2
-12/15/2016 04:19:42 PM Received CLI ['subscribe', '-t', 'hot', '-l', 'tosca.policies.Placement:properties:region:nova-1']
-12/15/2016 04:19:42 PM subscribing labels ['tosca.policies.Placement:properties:region:nova-1'] and templates ['hot']
-12/15/2016 04:19:42 PM Subscribe Response is received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 3
-12/15/2016 04:19:43 PM Received CLI ['subscribe', '-t', 'dummy1,dummy2', '--top', 'OVERWRITE']
-12/15/2016 04:19:43 PM subscribing labels [] and templates ['dummy1', 'dummy2']
-12/15/2016 04:19:43 PM Subscribe Response is received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 4
-12/15/2016 04:19:44 PM Received CLI ['subscribe', '-t', 'dummy1,dummy2', '--top', 'DELETE']
-12/15/2016 04:19:44 PM subscribing labels [] and templates ['dummy1', 'dummy2']
-12/15/2016 04:19:44 PM Subscribe Response is received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 5
-12/15/2016 04:19:45 PM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-2']
-12/15/2016 04:19:45 PM subscribing labels ['tosca.policies.Placement:properties:region:nova-2'] and templates []
-12/15/2016 04:19:45 PM Subscribe Response is received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 6
-12/15/2016 04:19:46 PM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-3', '--lop', 'OVERWRITE']
-12/15/2016 04:19:46 PM subscribing labels ['tosca.policies.Placement:properties:region:nova-3'] and templates []
-12/15/2016 04:19:46 PM Subscribe Response is received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 7
-12/15/2016 04:19:47 PM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-3', '--lop', 'DELETE']
-12/15/2016 04:19:47 PM subscribing labels ['tosca.policies.Placement:properties:region:nova-3'] and templates []
-12/15/2016 04:19:47 PM Subscribe Response is received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 8
-12/15/2016 04:19:48 PM Received CLI ['publish', '-t', './tosca-templates/tosca_helloworld_nfv.yaml']
-12/15/2016 04:19:48 PM Publishing the template file: ./tosca-templates/tosca_helloworld_nfv.yaml
-12/15/2016 04:19:48 PM Publish Response is received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 9 Status: 2
-12/15/2016 04:19:49 PM Received CLI ['subscribe', '-l', 'tosca.policies.Placement.Geolocation:properties:region:us-west-1']
-12/15/2016 04:19:49 PM subscribing labels ['tosca.policies.Placement.Geolocation:properties:region:us-west-1'] and templates []
-12/15/2016 04:19:49 PM Subscribe Response is received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 10
-12/15/2016 04:19:50 PM 12345678123456781234567812345678 Received Template File
+02/06/2017 06:36:52 AM Domino Client Starting...
+02/06/2017 06:36:52 AM 1 Sending Registration
+02/06/2017 06:36:52 AM Registration Response: Response Code: 1
+02/06/2017 06:36:52 AM CLI Service is starting
+02/06/2017 06:36:52 AM RPC service for CLI is starting...
+02/06/2017 06:36:54 AM Received CLI ['heartbeat']
+02/06/2017 06:36:54 AM 12345678123456781234567812345678 Sending heartbeat
+02/06/2017 06:36:54 AM heart beat received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 2
+02/06/2017 06:36:55 AM Received CLI ['subscribe', '-t', 'hot', '-l', 'tosca.policies.Placement:properties:region:nova-1']
+02/06/2017 06:36:55 AM subscribing labels ['tosca.policies.Placement:properties:region:nova-1'] and templates ['hot']
+02/06/2017 06:36:55 AM Subscribe Response is received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 3
+02/06/2017 06:36:56 AM Received CLI ['subscribe', '-t', 'dummy1,dummy2', '--top', 'OVERWRITE']
+02/06/2017 06:36:56 AM subscribing labels [] and templates ['dummy1', 'dummy2']
+02/06/2017 06:36:56 AM Subscribe Response is received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 4
+02/06/2017 06:36:57 AM Received CLI ['subscribe', '-t', 'dummy1,dummy2', '--top', 'DELETE']
+02/06/2017 06:36:57 AM subscribing labels [] and templates ['dummy1', 'dummy2']
+02/06/2017 06:36:57 AM Subscribe Response is received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 5
+02/06/2017 06:36:58 AM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-2']
+02/06/2017 06:36:58 AM subscribing labels ['tosca.policies.Placement:properties:region:nova-2'] and templates []
+02/06/2017 06:36:58 AM Subscribe Response is received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 6
+02/06/2017 06:36:59 AM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-3', '--lop', 'OVERWRITE']
+02/06/2017 06:36:59 AM subscribing labels ['tosca.policies.Placement:properties:region:nova-3'] and templates []
+02/06/2017 06:36:59 AM Subscribe Response is received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 7
+02/06/2017 06:37:01 AM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-3', '--lop', 'DELETE']
+02/06/2017 06:37:01 AM subscribing labels ['tosca.policies.Placement:properties:region:nova-3'] and templates []
+02/06/2017 06:37:01 AM Subscribe Response is received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 8
+02/06/2017 06:37:02 AM Received CLI ['publish', '-t', './tosca-templates/tosca_helloworld_nfv.yaml']
+02/06/2017 06:37:02 AM Publishing the template file: ./tosca-templates/tosca_helloworld_nfv.yaml
+02/06/2017 06:37:02 AM Publish Response is received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 9 Status: 2
+02/06/2017 06:37:03 AM Received CLI ['subscribe', '-l', 'tosca.policies.Placement.Geolocation:properties:region:us-west-1']
+02/06/2017 06:37:03 AM subscribing labels ['tosca.policies.Placement.Geolocation:properties:region:us-west-1'] and templates []
+02/06/2017 06:37:03 AM Subscribe Response is received from: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ,sequence number: 10
+02/06/2017 06:37:04 AM 12345678123456781234567812345678 Received Template File
diff --git a/tests/logdata/server.log b/tests/logdata/server.log
index bdd4c20..c017d54 100644
--- a/tests/logdata/server.log
+++ b/tests/logdata/server.log
@@ -1,37 +1,45 @@
-12/15/2016 04:19:38 PM Domino Server Starting...
-12/15/2016 04:19:39 PM Registration Request received for UUID 12345678123456781234567812345678 from IP: 192.168.253.148 port: 9091
-12/15/2016 04:19:40 PM Registration Request received for UUID 12345678123456781234567812345678 from IP: 192.168.253.148 port: 9092
-12/15/2016 04:19:41 PM heartbeat received from 12345678123456781234567812345678
-12/15/2016 04:19:42 PM Subscribe Request received from 12345678123456781234567812345678
-12/15/2016 04:19:42 PM APPENDING Labels...
-12/15/2016 04:19:42 PM Supported Template: set(['hot']) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
-12/15/2016 04:19:43 PM Subscribe Request received from 12345678123456781234567812345678
-12/15/2016 04:19:43 PM APPENDING Labels...
-12/15/2016 04:19:43 PM Supported Template: set(['dummy2', 'dummy1']) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
-12/15/2016 04:19:44 PM Subscribe Request received from 12345678123456781234567812345678
-12/15/2016 04:19:44 PM APPENDING Labels...
-12/15/2016 04:19:44 PM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
-12/15/2016 04:19:45 PM Subscribe Request received from 12345678123456781234567812345678
-12/15/2016 04:19:45 PM APPENDING Labels...
-12/15/2016 04:19:45 PM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-2', 'tosca.policies.Placement:properties:region:nova-1'])
-12/15/2016 04:19:46 PM Subscribe Request received from 12345678123456781234567812345678
-12/15/2016 04:19:46 PM OVERWRITING Labels...
-12/15/2016 04:19:46 PM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-3'])
-12/15/2016 04:19:47 PM Subscribe Request received from 12345678123456781234567812345678
-12/15/2016 04:19:47 PM DELETING Labels...
-12/15/2016 04:19:47 PM Supported Template: set([]) Supported Labels: set([])
-12/15/2016 04:19:48 PM Publish Request received from 12345678123456781234567812345678
-12/15/2016 04:19:48 PM Node Labels: {'VNF2': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF3': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF1': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1'])}
-12/15/2016 04:19:48 PM Site Maps: {'VNF2': set([]), 'VNF3': set([]), 'VNF1': set([])}
-12/15/2016 04:19:48 PM Selected Sites: {'VNF2': [], 'VNF3': [], 'VNF1': []}
-12/15/2016 04:19:48 PM Per domain file paths: {}
-12/15/2016 04:19:49 PM Subscribe Request received from 12345678123456781234567812345678
-12/15/2016 04:19:49 PM APPENDING Labels...
-12/15/2016 04:19:49 PM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1'])
-12/15/2016 04:19:50 PM Publish Request received from 8339120b7e2e4e87a0164c806bea4e06
-12/15/2016 04:19:50 PM ERRNO 17; ./toscafiles/ exists. Creating: ./toscafiles/template1.yaml
-12/15/2016 04:19:50 PM Node Labels: {'VNF2': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF3': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF1': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1'])}
-12/15/2016 04:19:50 PM Site Maps: {'VNF2': set([]), 'VNF3': set([]), 'VNF1': set(['12345678123456781234567812345678'])}
-12/15/2016 04:19:50 PM Selected Sites: {'VNF2': [], 'VNF3': [], 'VNF1': '12345678123456781234567812345678'}
-12/15/2016 04:19:50 PM Per domain file paths: {'12345678123456781234567812345678': './toscafiles/template_part12345678123456781234567812345678.yaml'}
-12/15/2016 04:19:50 PM Push Response received from 12345678123456781234567812345678
+02/06/2017 06:36:52 AM Domino Server Starting...
+02/06/2017 06:36:52 AM Registration Request received for UUID 12345678123456781234567812345678 from IP: 172.16.42.2 port: 9091
+02/06/2017 06:36:53 AM Registration Request received for UUID 12345678123456781234567812345678 from IP: 172.16.42.2 port: 9092
+02/06/2017 06:36:54 AM heartbeat received from 12345678123456781234567812345678
+02/06/2017 06:36:55 AM Subscribe Request received from 12345678123456781234567812345678
+02/06/2017 06:36:55 AM APPENDING Labels...
+02/06/2017 06:36:55 AM Supported Template: set(['hot']) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
+02/06/2017 06:36:56 AM Subscribe Request received from 12345678123456781234567812345678
+02/06/2017 06:36:56 AM APPENDING Labels...
+02/06/2017 06:36:56 AM Supported Template: set(['dummy2', 'dummy1']) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
+02/06/2017 06:36:57 AM Subscribe Request received from 12345678123456781234567812345678
+02/06/2017 06:36:57 AM APPENDING Labels...
+02/06/2017 06:36:57 AM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
+02/06/2017 06:36:58 AM Subscribe Request received from 12345678123456781234567812345678
+02/06/2017 06:36:58 AM APPENDING Labels...
+02/06/2017 06:36:58 AM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-2', 'tosca.policies.Placement:properties:region:nova-1'])
+02/06/2017 06:36:59 AM Subscribe Request received from 12345678123456781234567812345678
+02/06/2017 06:36:59 AM OVERWRITING Labels...
+02/06/2017 06:36:59 AM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-3'])
+02/06/2017 06:37:01 AM Subscribe Request received from 12345678123456781234567812345678
+02/06/2017 06:37:01 AM DELETING Labels...
+02/06/2017 06:37:01 AM Supported Template: set([]) Supported Labels: set([])
+02/06/2017 06:37:02 AM Publish Request received from 12345678123456781234567812345678
+02/06/2017 06:37:02 AM Node Labels: {'VNF2': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF3': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF1': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1'])}
+02/06/2017 06:37:02 AM Site Maps: {'VNF2': set([]), 'VNF3': set([]), 'VNF1': set([])}
+02/06/2017 06:37:02 AM Selected Sites: {'VNF2': [], 'VNF3': [], 'VNF1': []}
+02/06/2017 06:37:02 AM Per domain file paths: {}
+02/06/2017 06:37:02 AM Per domain topologies: {}
+02/06/2017 06:37:02 AM Boundary VLs: {}
+02/06/2017 06:37:02 AM VL sites: {}
+02/06/2017 06:37:02 AM Subscribers: [] for TUID: 5105955fa64f44db96b5e3ac57d224e6
+02/06/2017 06:37:03 AM Subscribe Request received from 12345678123456781234567812345678
+02/06/2017 06:37:03 AM APPENDING Labels...
+02/06/2017 06:37:03 AM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1'])
+02/06/2017 06:37:04 AM Publish Request received from 3b49733eca51447c8e4bd6028f6f45b6
+02/06/2017 06:37:04 AM ERRNO 17; ./toscafiles/ exists. Creating: ./toscafiles/template1.yaml
+02/06/2017 06:37:04 AM Node Labels: {'VNF2': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF3': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF1': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1'])}
+02/06/2017 06:37:04 AM Site Maps: {'VNF2': set([]), 'VNF3': set([]), 'VNF1': set(['12345678123456781234567812345678'])}
+02/06/2017 06:37:04 AM Selected Sites: {'VNF2': [], 'VNF3': [], 'VNF1': '12345678123456781234567812345678'}
+02/06/2017 06:37:04 AM Per domain file paths: {'12345678123456781234567812345678': './toscafiles/template_part12345678123456781234567812345678.yaml'}
+02/06/2017 06:37:04 AM Per domain topologies: {'12345678123456781234567812345678': {'policy_types': {'tosca.policies.Placement.Geolocation': {'description': 'Geolocation policy', 'derived_from': 'tosca.policies.Placement'}}, 'tosca_definitions_version': 'tosca_simple_profile_for_nfv_1_0_0', 'description': 'Template for deploying a single server with predefined properties.', 'topology_template': {'node_templates': {'VNF1': {'type': 'tosca.nodes.nfv.VNF', 'properties': {'version': 1.0, 'vendor': 'acmetelco', 'id': 'vnf1'}}}, 'policies': [{'rule1': {'type': 'tosca.policies.Placement.Geolocation', 'targets': ['VNF1'], 'properties': {'region': ['us-west-1']}}}]}, 'metadata': {'template_name': 'TOSCA NFV Sample Template'}}}
+02/06/2017 06:37:04 AM Boundary VLs: {}
+02/06/2017 06:37:04 AM VL sites: {}
+02/06/2017 06:37:04 AM Push Response received from 12345678123456781234567812345678
+02/06/2017 06:37:04 AM Subscribers: ['12345678123456781234567812345678'] for TUID: c520de762fb44803b99170e34c3dc21a
diff --git a/tests/test_partitioner.py b/tests/test_partitioner.py
index 75ec817..5634c01 100755
--- a/tests/test_partitioner.py
+++ b/tests/test_partitioner.py
@@ -41,11 +41,17 @@ def main(argv):
node_site = label.select_site( site_map )
print node_site
- file_paths = partitioner.partition_tosca("./tests/tmp/tosca",node_site,tpl)
+ tpl_site = {}
+ file_paths = partitioner.partition_tosca("./tests/tmp/tosca",node_site,tpl,tpl_site)
print file_paths
+
+ boundary_VLs, VL_sites = partitioner.return_boundarylinks(tpl_site)
+ print boundary_VLs
+ print VL_sites
+
except:
print('Unexpected error: %s', sys.exc_info()[0])
-
+ raise
if __name__ == "__main__":
main(sys.argv[1:])