From 34178dd4bccfb571f9cf70bf7a382a20ad7bb274 Mon Sep 17 00:00:00 2001 From: "renan.lopes" Date: Tue, 23 May 2023 17:13:01 -0300 Subject: [PATCH 1/4] networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_post.py --- fast_start_test.sh | 300 +++++++++--------- networkapi/api_neighbor/models.py | 2 +- .../neighbor_v4/sanity/sync/test_post.py | 40 +-- .../neighbor_v6/sanity/sync/test_post.py | 40 +-- 4 files changed, 191 insertions(+), 191 deletions(-) diff --git a/fast_start_test.sh b/fast_start_test.sh index e29151f8c..34e19cffb 100755 --- a/fast_start_test.sh +++ b/fast_start_test.sh @@ -17,157 +17,157 @@ echo "Found SDN controller at $REMOTE_CTRL_IP" echo "Starting tests.." -echo "=============== Tests for VLAN =================" -python manage.py test networkapi/api_vlan.tests.sanity.sync.test_vlan_delete.py -python manage.py test networkapi/api_vlan.tests.sanity.sync.test_vlan_get.py -python manage.py test networkapi/api_vlan.tests.sanity.sync.test_vlan_post.py -python manage.py test networkapi/api_vlan.tests.sanity.sync.test_vlan_put.py -python manage.py test networkapi/api_vlan.tests.unit.async.test_delete.py -python manage.py test networkapi/api_vlan.tests.unit.async.test_post.py -python manage.py test networkapi/api_vlan.tests.unit.async.test_put.py - -echo "=============== Tests for IPV4 =================" -python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_delete.py -python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_get.py -python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_post.py -python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_put.py -python manage.py test networkapi/api_ip.tests.unit.ipv4.async.test_delete.py -python manage.py test networkapi/api_ip.tests.unit.ipv4.async.test_post.py -python manage.py test networkapi/api_ip.tests.unit.ipv4.async.test_put.py -python manage.py test networkapi/api_ip.v4.tests.sanity.ipv4.sync.test_delete.py -python manage.py test networkapi/api_ip.v4.tests.sanity.ipv4.sync.test_get.py -python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_post.py -python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_put.py - -echo "" -echo "=============== Tests for IPV6 =================" -python manage.py test networkapi/api_ip.tests.sanity.ipv6.sync.test_delete.py -python manage.py test networkapi/api_ip.tests.sanity.ipv6.sync.test_get.py -python manage.py test networkapi/api_ip.tests.sanity.ipv6.sync.test_post.py -python manage.py test networkapi/api_ip.tests.sanity.ipv6.sync.test_put.py -python manage.py test networkapi/api_ip.tests.unit.ipv6.async.test_delete.py -python manage.py test networkapi/api_ip.tests.unit.ipv6.async.test_post.py -python manage.py test networkapi/api_ip.tests.unit.ipv6.async.test_put.py -python manage.py test networkapi/api_ip.v4.tests.sanity.ipv6.sync.test_delete.py -python manage.py test networkapi/api_ip.v4.tests.sanity.ipv6.sync.test_get.py -python manage.py test networkapi/api_ip.v4.tests.sanity.ipv6.sync.test_post.py -python manage.py test networkapi/api_ip.v4.tests.sanity.ipv6.sync.test_put.py - -echo "" -echo "=============== Tests for Environment =================" -python manage.py test networkapi/api_environment.tests.sanity.test_cidr_delete.py -python manage.py test networkapi/api_environment.tests.sanity.test_cidr_get.py -python manage.py test networkapi/api_environment.tests.sanity.test_cidr_post.py -python manage.py test networkapi/api_environment.tests.sanity.test_cidr_put.py -python manage.py test networkapi/api_environment.tests.sanity.test_environment_delete.py -python manage.py test networkapi/api_environment.tests.sanity.test_environment_get.py -python manage.py test networkapi/api_environment.tests.sanity.test_environment_post.py -python manage.py test networkapi/api_environment.tests.sanity.test_environment_put.py -python manage.py test networkapi/api_environment.tests.test_acl_flows.py - -echo "" -echo "=============== Tests for Environment VIP =================" -python manage.py test networkapi/api_environment_vip.tests.sanity.test_environment_vip_delete.py -python manage.py test networkapi/api_environment_vip.tests.sanity.test_environment_vip_get.py -python manage.py test networkapi/api_environment_vip.tests.sanity.test_environment_vip_post.py -python manage.py test networkapi/api_environment_vip.tests.sanity.test_environment_vip_put.py - -echo "" -echo "=============== Tests for Plugins =================" -python manage.py test networkapi/plugins.SDN.ODL.tests.test_acl_flow_builder.py -python manage.py test networkapi/plugins.SDN.ODL.tests.test_cookie_handler.py -# python manage.py test networkapi/plugins.SDN.ODL.tests.test_generic_odl_plugin.py -python manage.py test networkapi/plugins.SDN.ODL.tests.test_odl_acl.py -python manage.py test networkapi/plugins.SDN.ODL.tests.test_odl_authentication.py -python manage.py test networkapi/plugins.SDN.ODL.tests.test_send_flows_with_tcp_flags.py -python manage.py test networkapi/plugins.SDN.ODL.tests.test_tcp_control_bits.py - -echo "" -echo "=============== Tests for Network v4 =================" -python manage.py test networkapi/api_network.tests.test_create_network.py -python manage.py test networkapi/api_network.tests.test_facade.py -python manage.py test networkapi/api_network.tests.v3.unit.networkipv4.async.test_delete.py -python manage.py test networkapi/api_network.tests.v3.unit.networkipv4.async.test_post.py -python manage.py test networkapi/api_network.tests.v3.unit.networkipv4.async.test_put.py -python manage.py test networkapi/api_network.tests.v3.sanity.allocate.test_network_v4.py -python manage.py test networkapi/api_network.tests.v3.sanity.networkipv4.sync.test_delete.py -python manage.py test networkapi/api_network.tests.v3.sanity.networkipv4.sync.test_get.py -python manage.py test networkapi/api_network.tests.v3.sanity.networkipv4.sync.test_post.py -python manage.py test networkapi/api_network.tests.v3.sanity.networkipv4.sync.test_put.py - -echo "" -echo "=============== Tests for Network v6 =================" -python manage.py test networkapi/api_network.tests.v3.unit.networkipv6.async.test_delete.py -python manage.py test networkapi/api_network.tests.v3.unit.networkipv6.async.test_post.py -python manage.py test networkapi/api_network.tests.v3.unit.networkipv6.async.test_put.py -python manage.py test networkapi/api_network.tests.v3.sanity.allocate.test_network_v4.py -python manage.py test networkapi/api_network.tests.v3.sanity.networkipv6.sync.test_delete.py -python manage.py test networkapi/api_network.tests.v3.sanity.networkipv6.sync.test_get.py -python manage.py test networkapi/api_network.tests.v3.sanity.networkipv6.sync.test_post.py -python manage.py test networkapi/api_network.tests.v3.sanity.networkipv6.sync.test_put.py - -echo "" -echo "=============== Tests for ASN =================" -python manage.py test networkapi/api_asn.v4.tests.sanity.sync.test_as_delete.py -python manage.py test networkapi/api_asn.v4.tests.sanity.sync.test_as_get.py -python manage.py test networkapi/api_asn.v4.tests.sanity.sync.test_as_post.py -python manage.py test networkapi/api_asn.v4.tests.sanity.sync.test_as_put.py - -echo "" -echo "=============== Tests for Interface =================" -python manage.py test networkapi/api_interface.tests.sanity.interface.test_interface_delete.py -python manage.py test networkapi/api_interface.tests.sanity.interface.test_interface_get.py -python manage.py test networkapi/api_interface.tests.sanity.interface.test_interface_post.py -python manage.py test networkapi/api_interface.tests.sanity.interface.teste_interface_put.py -python manage.py test networkapi/api_interface.tests.sanity.interface_environments.teste_delete.py -python manage.py test networkapi/api_interface.tests.sanity.interface_environments.teste_post.py - -echo "" -echo "=============== Tests for List Configuration BGP =================" -python manage.py test networkapi/api_list_config_bgp.v4.tests.sanity.sync.test_delete.py -python manage.py test networkapi/api_list_config_bgp.v4.tests.sanity.sync.test_get.py -python manage.py test networkapi/api_list_config_bgp.v4.tests.sanity.sync.test_post.py -python manage.py test networkapi/api_list_config_bgp.v4.tests.sanity.sync.test_put.py - -echo "" -echo "=============== Tests for Rack =================" -python manage.py test networkapi/api_rack.tests.datacenter.test_datacenter.py -python manage.py test networkapi/api_rack.tests.fabric.test_fabric.py -python manage.py test networkapi/api_rack.tests.rack.test_rack.py - -echo "" -echo "=============== Tests for Pool =================" -python manage.py test networkapi/api_pools.tests.functional.v1.test_facade.py -python manage.py test networkapi/api_pools.tests.functional.v1.test_save_pool.py -python manage.py test networkapi/api_pools.tests.sanity.test_pool_deploy_mock_delete.py -python manage.py test networkapi/api_pools.tests.sanity.test_pool_deploy_mock_post.py -python manage.py test networkapi/api_pools.tests.sanity.test_pool_deploy_mock_put.py -python manage.py test networkapi/api_pools.tests.sanity.test_pool_get.py -python manage.py test networkapi/api_pools.tests.sanity.test_pool_get_deploy_mock.py -python manage.py test networkapi/api_pools.tests.sanity.test_pool_post_spec.py -python manage.py test networkapi/api_pools.tests.sanity.test_pool_put_spec.py -python manage.py test networkapi/api_pools.tests.unit.test_pool_deploy_mock_plugin.py -python manage.py test networkapi/api_pools.tests.unit.async.test_delete.py -python manage.py test networkapi/api_pools.tests.unit.async.test_post.py -python manage.py test networkapi/api_pools.tests.unit.async.test_put.py - -echo "" -echo "=============== Tests for VIP Requests =================" -python manage.py test networkapi/api_vip_request.tests.sanity.sync.test_delete.py -python manage.py test networkapi/api_vip_request.tests.sanity.sync.test_get.py -python manage.py test networkapi/api_vip_request.tests.sanity.sync.test_post.py -python manage.py test networkapi/api_vip_request.tests.sanity.sync.test_put.py -python manage.py test networkapi/api_vip_request.tests.unit.async.test_delete.py -python manage.py test networkapi/api_vip_request.tests.unit.async.test_post.py -python manage.py test networkapi/api_vip_request.tests.unit.async.test_put.py +# echo "=============== Tests for VLAN =================" +# python manage.py test networkapi/api_vlan.tests.sanity.sync.test_vlan_delete.py +# python manage.py test networkapi/api_vlan.tests.sanity.sync.test_vlan_get.py +# python manage.py test networkapi/api_vlan.tests.sanity.sync.test_vlan_post.py +# python manage.py test networkapi/api_vlan.tests.sanity.sync.test_vlan_put.py +# python manage.py test networkapi/api_vlan.tests.unit.async.test_delete.py +# python manage.py test networkapi/api_vlan.tests.unit.async.test_post.py +# python manage.py test networkapi/api_vlan.tests.unit.async.test_put.py + +# echo "=============== Tests for IPV4 =================" +# python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_delete.py +# python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_get.py +# python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_post.py +# python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_put.py +# python manage.py test networkapi/api_ip.tests.unit.ipv4.async.test_delete.py +# python manage.py test networkapi/api_ip.tests.unit.ipv4.async.test_post.py +# python manage.py test networkapi/api_ip.tests.unit.ipv4.async.test_put.py +# python manage.py test networkapi/api_ip.v4.tests.sanity.ipv4.sync.test_delete.py +# python manage.py test networkapi/api_ip.v4.tests.sanity.ipv4.sync.test_get.py +# python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_post.py +# python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_put.py + +# echo "" +# echo "=============== Tests for IPV6 =================" +# python manage.py test networkapi/api_ip.tests.sanity.ipv6.sync.test_delete.py +# python manage.py test networkapi/api_ip.tests.sanity.ipv6.sync.test_get.py +# python manage.py test networkapi/api_ip.tests.sanity.ipv6.sync.test_post.py +# python manage.py test networkapi/api_ip.tests.sanity.ipv6.sync.test_put.py +# python manage.py test networkapi/api_ip.tests.unit.ipv6.async.test_delete.py +# python manage.py test networkapi/api_ip.tests.unit.ipv6.async.test_post.py +# python manage.py test networkapi/api_ip.tests.unit.ipv6.async.test_put.py +# python manage.py test networkapi/api_ip.v4.tests.sanity.ipv6.sync.test_delete.py +# python manage.py test networkapi/api_ip.v4.tests.sanity.ipv6.sync.test_get.py +# python manage.py test networkapi/api_ip.v4.tests.sanity.ipv6.sync.test_post.py +# python manage.py test networkapi/api_ip.v4.tests.sanity.ipv6.sync.test_put.py + +# echo "" +# echo "=============== Tests for Environment =================" +# python manage.py test networkapi/api_environment.tests.sanity.test_cidr_delete.py +# python manage.py test networkapi/api_environment.tests.sanity.test_cidr_get.py +# python manage.py test networkapi/api_environment.tests.sanity.test_cidr_post.py +# python manage.py test networkapi/api_environment.tests.sanity.test_cidr_put.py +# python manage.py test networkapi/api_environment.tests.sanity.test_environment_delete.py +# python manage.py test networkapi/api_environment.tests.sanity.test_environment_get.py +# python manage.py test networkapi/api_environment.tests.sanity.test_environment_post.py +# python manage.py test networkapi/api_environment.tests.sanity.test_environment_put.py +# python manage.py test networkapi/api_environment.tests.test_acl_flows.py + +# echo "" +# echo "=============== Tests for Environment VIP =================" +# python manage.py test networkapi/api_environment_vip.tests.sanity.test_environment_vip_delete.py +# python manage.py test networkapi/api_environment_vip.tests.sanity.test_environment_vip_get.py +# python manage.py test networkapi/api_environment_vip.tests.sanity.test_environment_vip_post.py +# python manage.py test networkapi/api_environment_vip.tests.sanity.test_environment_vip_put.py + +# echo "" +# echo "=============== Tests for Plugins =================" +# python manage.py test networkapi/plugins.SDN.ODL.tests.test_acl_flow_builder.py +# python manage.py test networkapi/plugins.SDN.ODL.tests.test_cookie_handler.py +# # python manage.py test networkapi/plugins.SDN.ODL.tests.test_generic_odl_plugin.py +# python manage.py test networkapi/plugins.SDN.ODL.tests.test_odl_acl.py +# python manage.py test networkapi/plugins.SDN.ODL.tests.test_odl_authentication.py +# python manage.py test networkapi/plugins.SDN.ODL.tests.test_send_flows_with_tcp_flags.py +# python manage.py test networkapi/plugins.SDN.ODL.tests.test_tcp_control_bits.py + +# echo "" +# echo "=============== Tests for Network v4 =================" +# python manage.py test networkapi/api_network.tests.test_create_network.py +# python manage.py test networkapi/api_network.tests.test_facade.py +# python manage.py test networkapi/api_network.tests.v3.unit.networkipv4.async.test_delete.py +# python manage.py test networkapi/api_network.tests.v3.unit.networkipv4.async.test_post.py +# python manage.py test networkapi/api_network.tests.v3.unit.networkipv4.async.test_put.py +# python manage.py test networkapi/api_network.tests.v3.sanity.allocate.test_network_v4.py +# python manage.py test networkapi/api_network.tests.v3.sanity.networkipv4.sync.test_delete.py +# python manage.py test networkapi/api_network.tests.v3.sanity.networkipv4.sync.test_get.py +# python manage.py test networkapi/api_network.tests.v3.sanity.networkipv4.sync.test_post.py +# python manage.py test networkapi/api_network.tests.v3.sanity.networkipv4.sync.test_put.py + +# echo "" +# echo "=============== Tests for Network v6 =================" +# python manage.py test networkapi/api_network.tests.v3.unit.networkipv6.async.test_delete.py +# python manage.py test networkapi/api_network.tests.v3.unit.networkipv6.async.test_post.py +# python manage.py test networkapi/api_network.tests.v3.unit.networkipv6.async.test_put.py +# python manage.py test networkapi/api_network.tests.v3.sanity.allocate.test_network_v4.py +# python manage.py test networkapi/api_network.tests.v3.sanity.networkipv6.sync.test_delete.py +# python manage.py test networkapi/api_network.tests.v3.sanity.networkipv6.sync.test_get.py +# python manage.py test networkapi/api_network.tests.v3.sanity.networkipv6.sync.test_post.py +# python manage.py test networkapi/api_network.tests.v3.sanity.networkipv6.sync.test_put.py + +# echo "" +# echo "=============== Tests for ASN =================" +# python manage.py test networkapi/api_asn.v4.tests.sanity.sync.test_as_delete.py +# python manage.py test networkapi/api_asn.v4.tests.sanity.sync.test_as_get.py +# python manage.py test networkapi/api_asn.v4.tests.sanity.sync.test_as_post.py +# python manage.py test networkapi/api_asn.v4.tests.sanity.sync.test_as_put.py + +# echo "" +# echo "=============== Tests for Interface =================" +# python manage.py test networkapi/api_interface.tests.sanity.interface.test_interface_delete.py +# python manage.py test networkapi/api_interface.tests.sanity.interface.test_interface_get.py +# python manage.py test networkapi/api_interface.tests.sanity.interface.test_interface_post.py +# python manage.py test networkapi/api_interface.tests.sanity.interface.teste_interface_put.py +# python manage.py test networkapi/api_interface.tests.sanity.interface_environments.teste_delete.py +# python manage.py test networkapi/api_interface.tests.sanity.interface_environments.teste_post.py + +# echo "" +# echo "=============== Tests for List Configuration BGP =================" +# python manage.py test networkapi/api_list_config_bgp.v4.tests.sanity.sync.test_delete.py +# python manage.py test networkapi/api_list_config_bgp.v4.tests.sanity.sync.test_get.py +# python manage.py test networkapi/api_list_config_bgp.v4.tests.sanity.sync.test_post.py +# python manage.py test networkapi/api_list_config_bgp.v4.tests.sanity.sync.test_put.py + +# echo "" +# echo "=============== Tests for Rack =================" +# python manage.py test networkapi/api_rack.tests.datacenter.test_datacenter.py +# python manage.py test networkapi/api_rack.tests.fabric.test_fabric.py +# python manage.py test networkapi/api_rack.tests.rack.test_rack.py + +# echo "" +# echo "=============== Tests for Pool =================" +# python manage.py test networkapi/api_pools.tests.functional.v1.test_facade.py +# python manage.py test networkapi/api_pools.tests.functional.v1.test_save_pool.py +# python manage.py test networkapi/api_pools.tests.sanity.test_pool_deploy_mock_delete.py +# python manage.py test networkapi/api_pools.tests.sanity.test_pool_deploy_mock_post.py +# python manage.py test networkapi/api_pools.tests.sanity.test_pool_deploy_mock_put.py +# python manage.py test networkapi/api_pools.tests.sanity.test_pool_get.py +# python manage.py test networkapi/api_pools.tests.sanity.test_pool_get_deploy_mock.py +# python manage.py test networkapi/api_pools.tests.sanity.test_pool_post_spec.py +# python manage.py test networkapi/api_pools.tests.sanity.test_pool_put_spec.py +# python manage.py test networkapi/api_pools.tests.unit.test_pool_deploy_mock_plugin.py +# python manage.py test networkapi/api_pools.tests.unit.async.test_delete.py +# python manage.py test networkapi/api_pools.tests.unit.async.test_post.py +# python manage.py test networkapi/api_pools.tests.unit.async.test_put.py + +# echo "" +# echo "=============== Tests for VIP Requests =================" +# python manage.py test networkapi/api_vip_request.tests.sanity.sync.test_delete.py +# python manage.py test networkapi/api_vip_request.tests.sanity.sync.test_get.py +# python manage.py test networkapi/api_vip_request.tests.sanity.sync.test_post.py +# python manage.py test networkapi/api_vip_request.tests.sanity.sync.test_put.py +# python manage.py test networkapi/api_vip_request.tests.unit.async.test_delete.py +# python manage.py test networkapi/api_vip_request.tests.unit.async.test_post.py +# python manage.py test networkapi/api_vip_request.tests.unit.async.test_put.py # echo "" echo "=============== Tests for Neighbor =================" -python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_delete.py -python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_get.py +# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_delete.py +# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_get.py python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_post.py -python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_put.py -python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_delete.py -python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_get.py -python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_post.py -python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_put.py \ No newline at end of file +# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_put.py +# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_delete.py +# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_get.py +# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_post.py +# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_put.py \ No newline at end of file diff --git a/networkapi/api_neighbor/models.py b/networkapi/api_neighbor/models.py index d498498cf..d05d578f2 100644 --- a/networkapi/api_neighbor/models.py +++ b/networkapi/api_neighbor/models.py @@ -325,7 +325,7 @@ def validate_neighbor_v4(self, user): self.check_if_local_ip_vrf_is_the_same_as_remote_ip_vrf() self.check_if_local_ip_and_local_asn_shares_at_least_one_equipment() self.check_if_remote_ip_and_remote_asn_shares_at_least_one_equipment() - # self.check_if_peer_group_environments_has_local_ip_environment() + self.check_if_peer_group_environments_has_local_ip_environment() self.check_if_neighbor_is_not_duplicated() def check_if_neighbor_already_deployed(self): diff --git a/networkapi/api_neighbor/v4/tests/neighbor_v4/sanity/sync/test_post.py b/networkapi/api_neighbor/v4/tests/neighbor_v4/sanity/sync/test_post.py index d02f3a882..ec16bef28 100644 --- a/networkapi/api_neighbor/v4/tests/neighbor_v4/sanity/sync/test_post.py +++ b/networkapi/api_neighbor/v4/tests/neighbor_v4/sanity/sync/test_post.py @@ -203,26 +203,26 @@ def test_post_neighbor_v4_with_remotes_in_different_eqpts(self): response.data['detail'] ) - # def test_post_neighbor_v4_with_peer_group_envs_diff_local_ip_env(self): - # """Test POST NeighborV4 with different peer groups environments - # different than LocalIp Environment.""" - - # neighbor_v4_path = self.json_path. \ - # format('neighbor_v4_with_peer_group_envs_' - # 'diff_than_local_ip_env.json') - - # response = self.client.post( - # self.neighbor_v4_uri, - # data=self.load_json(neighbor_v4_path), - # content_type=self.content_type, - # HTTP_AUTHORIZATION=self.authorization) - - # self.compare_status(400, response.status_code) - # self.compare_values( - # u'LocalIp id = 1 and PeerGroup id = 3 ' - # u'belongs to different Environments', - # response.data['detail'] - # ) + def test_post_neighbor_v4_with_peer_group_envs_diff_local_ip_env(self): + """Test POST NeighborV4 with different peer groups environments + different than LocalIp Environment.""" + + neighbor_v4_path = self.json_path. \ + format('neighbor_v4_with_peer_group_envs_' + 'diff_than_local_ip_env.json') + + response = self.client.post( + self.neighbor_v4_uri, + data=self.load_json(neighbor_v4_path), + content_type=self.content_type, + HTTP_AUTHORIZATION=self.authorization) + + self.compare_status(400, response.status_code) + self.compare_values( + u'LocalIp id = 9 and PeerGroup id = 4 ' + u'belongs to different Environments', + response.data['detail'] + ) def test_post_neighbor_v4_duplicated(self): """Test POST duplicated NeighborV4.""" diff --git a/networkapi/api_neighbor/v4/tests/neighbor_v6/sanity/sync/test_post.py b/networkapi/api_neighbor/v4/tests/neighbor_v6/sanity/sync/test_post.py index 010b34709..1967ff5d3 100644 --- a/networkapi/api_neighbor/v4/tests/neighbor_v6/sanity/sync/test_post.py +++ b/networkapi/api_neighbor/v4/tests/neighbor_v6/sanity/sync/test_post.py @@ -202,26 +202,26 @@ def test_post_neighbor_v6_with_remotes_in_different_eqpts(self): response.data['detail'] ) - # def test_post_neighbor_v6_with_peer_group_envs_diff_local_ip_env(self): - # """Test POST NeighborV6 with peer groups environments - # different than LocalIp Environment.""" - - # neighbor_v6_path = self.json_path. \ - # format('neighbor_v6_with_peer_group_envs_' - # 'diff_than_local_ip_env.json') - - # response = self.client.post( - # self.neighbor_v6_uri, - # data=self.load_json(neighbor_v6_path), - # content_type=self.content_type, - # HTTP_AUTHORIZATION=self.authorization) - - # self.compare_status(400, response.status_code) - # self.compare_values( - # u'LocalIp id = 1 and PeerGroup id = 3 ' - # u'belongs to different Environments', - # response.data['detail'] - # ) + def test_post_neighbor_v6_with_peer_group_envs_diff_local_ip_env(self): + """Test POST NeighborV6 with peer groups environments + different than LocalIp Environment.""" + + neighbor_v6_path = self.json_path. \ + format('neighbor_v6_with_peer_group_envs_' + 'diff_than_local_ip_env.json') + + response = self.client.post( + self.neighbor_v6_uri, + data=self.load_json(neighbor_v6_path), + content_type=self.content_type, + HTTP_AUTHORIZATION=self.authorization) + + self.compare_status(400, response.status_code) + self.compare_values( + u'LocalIp id = 1 and PeerGroup id = 3 ' + u'belongs to different Environments', + response.data['detail'] + ) def test_post_neighbor_v6_duplicated(self): """Test POST duplicated NeighborV6.""" From a4555359b00d9b2d66a3cad989b4cf32d47ee6db Mon Sep 17 00:00:00 2001 From: "renan.lopes" Date: Tue, 23 May 2023 17:19:50 -0300 Subject: [PATCH 2/4] networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_put.py --- fast_start_test.sh | 4 +- .../tests/neighbor_v4/sanity/sync/test_put.py | 40 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/fast_start_test.sh b/fast_start_test.sh index 34e19cffb..ea122d22e 100755 --- a/fast_start_test.sh +++ b/fast_start_test.sh @@ -165,8 +165,8 @@ echo "Starting tests.." echo "=============== Tests for Neighbor =================" # python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_delete.py # python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_get.py -python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_post.py -# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_put.py +# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_post.py +python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_put.py # python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_delete.py # python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_get.py # python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_post.py diff --git a/networkapi/api_neighbor/v4/tests/neighbor_v4/sanity/sync/test_put.py b/networkapi/api_neighbor/v4/tests/neighbor_v4/sanity/sync/test_put.py index 87e9a3626..4950745f8 100644 --- a/networkapi/api_neighbor/v4/tests/neighbor_v4/sanity/sync/test_put.py +++ b/networkapi/api_neighbor/v4/tests/neighbor_v4/sanity/sync/test_put.py @@ -219,26 +219,26 @@ def test_put_neighbor_v4_with_remotes_in_different_eqpts(self): response.data['detail'] ) - # def test_put_neighbor_v4_with_peer_group_envs_diff_local_ip_env(self): - # """Test PUT NeighborV4 with peer groups environments - # different than LocalIp Environment.""" - - # neighbor_v4_path = self.json_path. \ - # format('neighbor_v4_with_peer_group_envs_' - # 'diff_than_local_ip_env.json') - - # response = self.client.put( - # self.neighbor_v4_uri, - # data=self.load_json(neighbor_v4_path), - # content_type=self.content_type, - # HTTP_AUTHORIZATION=self.authorization) - - # self.compare_status(400, response.status_code) - # self.compare_values( - # u'LocalIp id = 1 and PeerGroup id = 3 ' - # u'belongs to different Environments', - # response.data['detail'] - # ) + def test_put_neighbor_v4_with_peer_group_envs_diff_local_ip_env(self): + """Test PUT NeighborV4 with peer groups environments + different than LocalIp Environment.""" + + neighbor_v4_path = self.json_path. \ + format('neighbor_v4_with_peer_group_envs_' + 'diff_than_local_ip_env.json') + + response = self.client.put( + self.neighbor_v4_uri, + data=self.load_json(neighbor_v4_path), + content_type=self.content_type, + HTTP_AUTHORIZATION=self.authorization) + + self.compare_status(400, response.status_code) + self.compare_values( + u'LocalIp id = 1 and PeerGroup id = 3 ' + u'belongs to different Environments', + response.data['detail'] + ) def test_put_neighbor_v4_duplicated(self): """Test PUT duplicated NeighborV4.""" From 240a9a63393d2fe8cd62fac64f4aac6bed0f8151 Mon Sep 17 00:00:00 2001 From: "renan.lopes" Date: Wed, 24 May 2023 11:40:10 -0300 Subject: [PATCH 3/4] networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_put.py --- fast_start_test.sh | 4 +- networkapi/api_neighbor/models.py | 2 +- .../initial_environment_peer_group.json | 8 ++++ .../v4/fixtures/neighbor_v6/initial_ipv6.json | 2 +- .../neighbor_v6/initial_networkipv6.json | 28 +++++++++++++ .../neighbor_v6/initial_peer_group.json | 9 +++++ .../v4/fixtures/neighbor_v6/initial_vlan.json | 9 +++++ ...eer_group_envs_diff_than_local_ip_env.json | 16 +++++--- .../tests/neighbor_v6/sanity/sync/test_put.py | 40 +++++++++---------- 9 files changed, 89 insertions(+), 29 deletions(-) diff --git a/fast_start_test.sh b/fast_start_test.sh index ea122d22e..60322f64f 100755 --- a/fast_start_test.sh +++ b/fast_start_test.sh @@ -166,8 +166,8 @@ echo "=============== Tests for Neighbor =================" # python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_delete.py # python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_get.py # python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_post.py -python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_put.py +# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_put.py # python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_delete.py # python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_get.py # python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_post.py -# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_put.py \ No newline at end of file +python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_put.py \ No newline at end of file diff --git a/networkapi/api_neighbor/models.py b/networkapi/api_neighbor/models.py index d05d578f2..cf85a476f 100644 --- a/networkapi/api_neighbor/models.py +++ b/networkapi/api_neighbor/models.py @@ -673,7 +673,7 @@ def validate_neighbor_v6(self, user): self.check_if_local_ip_vrf_is_the_same_as_remote_ip_vrf() self.check_if_local_ip_and_local_asn_shares_at_least_one_equipment() self.check_if_remote_ip_and_remote_asn_shares_at_least_one_equipment() - # self.check_if_peer_group_environments_has_local_ip_environment() + self.check_if_peer_group_environments_has_local_ip_environment() self.check_if_neighbor_is_not_duplicated() def check_if_neighbor_already_deployed(self): diff --git a/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_environment_peer_group.json b/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_environment_peer_group.json index badf37602..da6aa6c80 100644 --- a/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_environment_peer_group.json +++ b/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_environment_peer_group.json @@ -14,5 +14,13 @@ }, "model": "api_peer_group.EnvironmentPeerGroup", "pk": 2 + }, + { + "fields": { + "environment": 1, + "peer_group": 4 + }, + "model": "api_peer_group.EnvironmentPeerGroup", + "pk": 2 } ] diff --git a/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_ipv6.json b/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_ipv6.json index 6589e3ae6..61d2a926a 100644 --- a/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_ipv6.json +++ b/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_ipv6.json @@ -129,7 +129,7 @@ "block6": "0000", "block7": "0000", "block8": "0003", - "networkipv6": 2 + "networkipv6": 5 }, "model": "ip.ipv6", "pk": 9 diff --git a/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_networkipv6.json b/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_networkipv6.json index f1e0ae566..7ec3500ee 100644 --- a/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_networkipv6.json +++ b/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_networkipv6.json @@ -117,5 +117,33 @@ }, "model": "ip.networkipv6", "pk": 4 + }, + { + "fields": { + "active": true, + "ambient_vip": null, + "block": "64", + "block1": "fc00", + "block2": "0000", + "block3": "0000", + "block4": "0004", + "block5": "0000", + "block6": "0000", + "block7": "0000", + "block8": "0000", + "cluster_unit": "cluster-unit-1", + "mask1": "ffff", + "mask2": "ffff", + "mask3": "ffff", + "mask4": "ffff", + "mask5": "0000", + "mask6": "0000", + "mask7": "0000", + "mask8": "0000", + "network_type": 1, + "vlan": 5 + }, + "model": "ip.networkipv6", + "pk": 5 } ] diff --git a/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_peer_group.json b/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_peer_group.json index ca0392e32..2c20a13fe 100644 --- a/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_peer_group.json +++ b/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_peer_group.json @@ -25,5 +25,14 @@ }, "model": "api_peer_group.PeerGroup", "pk": 3 + }, + { + "fields": { + "name": "peer_group_3", + "route_map_in": 5, + "route_map_out": 6 + }, + "model": "api_peer_group.PeerGroup", + "pk": 4 } ] diff --git a/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_vlan.json b/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_vlan.json index 2d6e3f93b..1d5bf5301 100644 --- a/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_vlan.json +++ b/networkapi/api_neighbor/v4/fixtures/neighbor_v6/initial_vlan.json @@ -34,5 +34,14 @@ }, "model": "vlan.vlan", "pk": 4 + }, + { + "fields": { + "ambiente": 2, + "nome": "VLAN 5 of env 2", + "num_vlan": 5 + }, + "model": "vlan.vlan", + "pk": 5 } ] diff --git a/networkapi/api_neighbor/v4/tests/neighbor_v6/sanity/json/put/neighbor_v6_with_peer_group_envs_diff_than_local_ip_env.json b/networkapi/api_neighbor/v4/tests/neighbor_v6/sanity/json/put/neighbor_v6_with_peer_group_envs_diff_than_local_ip_env.json index 4afe0f27e..a623e81c1 100644 --- a/networkapi/api_neighbor/v4/tests/neighbor_v6/sanity/json/put/neighbor_v6_with_peer_group_envs_diff_than_local_ip_env.json +++ b/networkapi/api_neighbor/v4/tests/neighbor_v6/sanity/json/put/neighbor_v6_with_peer_group_envs_diff_than_local_ip_env.json @@ -2,16 +2,22 @@ "neighbors": [ { "id": 1, - "local_asn": 1, - "local_ip": 1, + "local_asn": 7, + "local_ip": 9, "peer_group": 3, - "remote_asn": 2, - "remote_ip": 2, + "remote_asn": 1, + "remote_ip": 1, "virtual_interface": "test_vi", "next_hop_self": true, "community": true, "soft_reconfiguration": true, - "remove_private_as": true + "remove_private_as": true, + "kind": "1", + "description": "teste", + "password": "123", + "maximum_hops": "2", + "timer_keepalive": "12", + "timer_timeout": "128" } ] } diff --git a/networkapi/api_neighbor/v4/tests/neighbor_v6/sanity/sync/test_put.py b/networkapi/api_neighbor/v4/tests/neighbor_v6/sanity/sync/test_put.py index d0d07989c..ee1b4e229 100644 --- a/networkapi/api_neighbor/v4/tests/neighbor_v6/sanity/sync/test_put.py +++ b/networkapi/api_neighbor/v4/tests/neighbor_v6/sanity/sync/test_put.py @@ -220,26 +220,26 @@ def test_put_neighbor_v6_with_remotes_in_different_eqpts(self): response.data['detail'] ) - # def test_put_neighbor_v6_with_peer_group_envs_diff_local_ip_env(self): - # """Test PUT NeighborV6 with peer groups environments - # different than LocalIp Environment.""" - - # neighbor_v6_path = self.json_path. \ - # format('neighbor_v6_with_peer_group_envs_' - # 'diff_than_local_ip_env.json') - - # response = self.client.put( - # self.neighbor_v6_uri, - # data=self.load_json(neighbor_v6_path), - # content_type=self.content_type, - # HTTP_AUTHORIZATION=self.authorization) - - # self.compare_status(400, response.status_code) - # self.compare_values( - # u'LocalIp id = 1 and PeerGroup id = 3 ' - # u'belongs to different Environments', - # response.data['detail'] - # ) + def test_put_neighbor_v6_with_peer_group_envs_diff_local_ip_env(self): + """Test PUT NeighborV6 with peer groups environments + different than LocalIp Environment.""" + + neighbor_v6_path = self.json_path. \ + format('neighbor_v6_with_peer_group_envs_' + 'diff_than_local_ip_env.json') + + response = self.client.put( + self.neighbor_v6_uri, + data=self.load_json(neighbor_v6_path), + content_type=self.content_type, + HTTP_AUTHORIZATION=self.authorization) + + self.compare_status(400, response.status_code) + self.compare_values( + u'LocalIp id = 9 and PeerGroup id = 3 ' + u'belongs to different Environments', + response.data['detail'] + ) def test_put_neighbor_v6_duplicated(self): """Test PUT duplicated NeighborV6.""" From f8dc9f0e4f0b131e4176f131f4bd16f139b247ef Mon Sep 17 00:00:00 2001 From: "renan.lopes" Date: Wed, 24 May 2023 11:40:36 -0300 Subject: [PATCH 4/4] networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_put.py --- fast_start_test.sh | 300 ++++++++++++++++++++++----------------------- 1 file changed, 150 insertions(+), 150 deletions(-) diff --git a/fast_start_test.sh b/fast_start_test.sh index 60322f64f..e29151f8c 100755 --- a/fast_start_test.sh +++ b/fast_start_test.sh @@ -17,157 +17,157 @@ echo "Found SDN controller at $REMOTE_CTRL_IP" echo "Starting tests.." -# echo "=============== Tests for VLAN =================" -# python manage.py test networkapi/api_vlan.tests.sanity.sync.test_vlan_delete.py -# python manage.py test networkapi/api_vlan.tests.sanity.sync.test_vlan_get.py -# python manage.py test networkapi/api_vlan.tests.sanity.sync.test_vlan_post.py -# python manage.py test networkapi/api_vlan.tests.sanity.sync.test_vlan_put.py -# python manage.py test networkapi/api_vlan.tests.unit.async.test_delete.py -# python manage.py test networkapi/api_vlan.tests.unit.async.test_post.py -# python manage.py test networkapi/api_vlan.tests.unit.async.test_put.py - -# echo "=============== Tests for IPV4 =================" -# python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_delete.py -# python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_get.py -# python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_post.py -# python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_put.py -# python manage.py test networkapi/api_ip.tests.unit.ipv4.async.test_delete.py -# python manage.py test networkapi/api_ip.tests.unit.ipv4.async.test_post.py -# python manage.py test networkapi/api_ip.tests.unit.ipv4.async.test_put.py -# python manage.py test networkapi/api_ip.v4.tests.sanity.ipv4.sync.test_delete.py -# python manage.py test networkapi/api_ip.v4.tests.sanity.ipv4.sync.test_get.py -# python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_post.py -# python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_put.py - -# echo "" -# echo "=============== Tests for IPV6 =================" -# python manage.py test networkapi/api_ip.tests.sanity.ipv6.sync.test_delete.py -# python manage.py test networkapi/api_ip.tests.sanity.ipv6.sync.test_get.py -# python manage.py test networkapi/api_ip.tests.sanity.ipv6.sync.test_post.py -# python manage.py test networkapi/api_ip.tests.sanity.ipv6.sync.test_put.py -# python manage.py test networkapi/api_ip.tests.unit.ipv6.async.test_delete.py -# python manage.py test networkapi/api_ip.tests.unit.ipv6.async.test_post.py -# python manage.py test networkapi/api_ip.tests.unit.ipv6.async.test_put.py -# python manage.py test networkapi/api_ip.v4.tests.sanity.ipv6.sync.test_delete.py -# python manage.py test networkapi/api_ip.v4.tests.sanity.ipv6.sync.test_get.py -# python manage.py test networkapi/api_ip.v4.tests.sanity.ipv6.sync.test_post.py -# python manage.py test networkapi/api_ip.v4.tests.sanity.ipv6.sync.test_put.py - -# echo "" -# echo "=============== Tests for Environment =================" -# python manage.py test networkapi/api_environment.tests.sanity.test_cidr_delete.py -# python manage.py test networkapi/api_environment.tests.sanity.test_cidr_get.py -# python manage.py test networkapi/api_environment.tests.sanity.test_cidr_post.py -# python manage.py test networkapi/api_environment.tests.sanity.test_cidr_put.py -# python manage.py test networkapi/api_environment.tests.sanity.test_environment_delete.py -# python manage.py test networkapi/api_environment.tests.sanity.test_environment_get.py -# python manage.py test networkapi/api_environment.tests.sanity.test_environment_post.py -# python manage.py test networkapi/api_environment.tests.sanity.test_environment_put.py -# python manage.py test networkapi/api_environment.tests.test_acl_flows.py - -# echo "" -# echo "=============== Tests for Environment VIP =================" -# python manage.py test networkapi/api_environment_vip.tests.sanity.test_environment_vip_delete.py -# python manage.py test networkapi/api_environment_vip.tests.sanity.test_environment_vip_get.py -# python manage.py test networkapi/api_environment_vip.tests.sanity.test_environment_vip_post.py -# python manage.py test networkapi/api_environment_vip.tests.sanity.test_environment_vip_put.py - -# echo "" -# echo "=============== Tests for Plugins =================" -# python manage.py test networkapi/plugins.SDN.ODL.tests.test_acl_flow_builder.py -# python manage.py test networkapi/plugins.SDN.ODL.tests.test_cookie_handler.py -# # python manage.py test networkapi/plugins.SDN.ODL.tests.test_generic_odl_plugin.py -# python manage.py test networkapi/plugins.SDN.ODL.tests.test_odl_acl.py -# python manage.py test networkapi/plugins.SDN.ODL.tests.test_odl_authentication.py -# python manage.py test networkapi/plugins.SDN.ODL.tests.test_send_flows_with_tcp_flags.py -# python manage.py test networkapi/plugins.SDN.ODL.tests.test_tcp_control_bits.py - -# echo "" -# echo "=============== Tests for Network v4 =================" -# python manage.py test networkapi/api_network.tests.test_create_network.py -# python manage.py test networkapi/api_network.tests.test_facade.py -# python manage.py test networkapi/api_network.tests.v3.unit.networkipv4.async.test_delete.py -# python manage.py test networkapi/api_network.tests.v3.unit.networkipv4.async.test_post.py -# python manage.py test networkapi/api_network.tests.v3.unit.networkipv4.async.test_put.py -# python manage.py test networkapi/api_network.tests.v3.sanity.allocate.test_network_v4.py -# python manage.py test networkapi/api_network.tests.v3.sanity.networkipv4.sync.test_delete.py -# python manage.py test networkapi/api_network.tests.v3.sanity.networkipv4.sync.test_get.py -# python manage.py test networkapi/api_network.tests.v3.sanity.networkipv4.sync.test_post.py -# python manage.py test networkapi/api_network.tests.v3.sanity.networkipv4.sync.test_put.py - -# echo "" -# echo "=============== Tests for Network v6 =================" -# python manage.py test networkapi/api_network.tests.v3.unit.networkipv6.async.test_delete.py -# python manage.py test networkapi/api_network.tests.v3.unit.networkipv6.async.test_post.py -# python manage.py test networkapi/api_network.tests.v3.unit.networkipv6.async.test_put.py -# python manage.py test networkapi/api_network.tests.v3.sanity.allocate.test_network_v4.py -# python manage.py test networkapi/api_network.tests.v3.sanity.networkipv6.sync.test_delete.py -# python manage.py test networkapi/api_network.tests.v3.sanity.networkipv6.sync.test_get.py -# python manage.py test networkapi/api_network.tests.v3.sanity.networkipv6.sync.test_post.py -# python manage.py test networkapi/api_network.tests.v3.sanity.networkipv6.sync.test_put.py - -# echo "" -# echo "=============== Tests for ASN =================" -# python manage.py test networkapi/api_asn.v4.tests.sanity.sync.test_as_delete.py -# python manage.py test networkapi/api_asn.v4.tests.sanity.sync.test_as_get.py -# python manage.py test networkapi/api_asn.v4.tests.sanity.sync.test_as_post.py -# python manage.py test networkapi/api_asn.v4.tests.sanity.sync.test_as_put.py - -# echo "" -# echo "=============== Tests for Interface =================" -# python manage.py test networkapi/api_interface.tests.sanity.interface.test_interface_delete.py -# python manage.py test networkapi/api_interface.tests.sanity.interface.test_interface_get.py -# python manage.py test networkapi/api_interface.tests.sanity.interface.test_interface_post.py -# python manage.py test networkapi/api_interface.tests.sanity.interface.teste_interface_put.py -# python manage.py test networkapi/api_interface.tests.sanity.interface_environments.teste_delete.py -# python manage.py test networkapi/api_interface.tests.sanity.interface_environments.teste_post.py - -# echo "" -# echo "=============== Tests for List Configuration BGP =================" -# python manage.py test networkapi/api_list_config_bgp.v4.tests.sanity.sync.test_delete.py -# python manage.py test networkapi/api_list_config_bgp.v4.tests.sanity.sync.test_get.py -# python manage.py test networkapi/api_list_config_bgp.v4.tests.sanity.sync.test_post.py -# python manage.py test networkapi/api_list_config_bgp.v4.tests.sanity.sync.test_put.py - -# echo "" -# echo "=============== Tests for Rack =================" -# python manage.py test networkapi/api_rack.tests.datacenter.test_datacenter.py -# python manage.py test networkapi/api_rack.tests.fabric.test_fabric.py -# python manage.py test networkapi/api_rack.tests.rack.test_rack.py - -# echo "" -# echo "=============== Tests for Pool =================" -# python manage.py test networkapi/api_pools.tests.functional.v1.test_facade.py -# python manage.py test networkapi/api_pools.tests.functional.v1.test_save_pool.py -# python manage.py test networkapi/api_pools.tests.sanity.test_pool_deploy_mock_delete.py -# python manage.py test networkapi/api_pools.tests.sanity.test_pool_deploy_mock_post.py -# python manage.py test networkapi/api_pools.tests.sanity.test_pool_deploy_mock_put.py -# python manage.py test networkapi/api_pools.tests.sanity.test_pool_get.py -# python manage.py test networkapi/api_pools.tests.sanity.test_pool_get_deploy_mock.py -# python manage.py test networkapi/api_pools.tests.sanity.test_pool_post_spec.py -# python manage.py test networkapi/api_pools.tests.sanity.test_pool_put_spec.py -# python manage.py test networkapi/api_pools.tests.unit.test_pool_deploy_mock_plugin.py -# python manage.py test networkapi/api_pools.tests.unit.async.test_delete.py -# python manage.py test networkapi/api_pools.tests.unit.async.test_post.py -# python manage.py test networkapi/api_pools.tests.unit.async.test_put.py - -# echo "" -# echo "=============== Tests for VIP Requests =================" -# python manage.py test networkapi/api_vip_request.tests.sanity.sync.test_delete.py -# python manage.py test networkapi/api_vip_request.tests.sanity.sync.test_get.py -# python manage.py test networkapi/api_vip_request.tests.sanity.sync.test_post.py -# python manage.py test networkapi/api_vip_request.tests.sanity.sync.test_put.py -# python manage.py test networkapi/api_vip_request.tests.unit.async.test_delete.py -# python manage.py test networkapi/api_vip_request.tests.unit.async.test_post.py -# python manage.py test networkapi/api_vip_request.tests.unit.async.test_put.py +echo "=============== Tests for VLAN =================" +python manage.py test networkapi/api_vlan.tests.sanity.sync.test_vlan_delete.py +python manage.py test networkapi/api_vlan.tests.sanity.sync.test_vlan_get.py +python manage.py test networkapi/api_vlan.tests.sanity.sync.test_vlan_post.py +python manage.py test networkapi/api_vlan.tests.sanity.sync.test_vlan_put.py +python manage.py test networkapi/api_vlan.tests.unit.async.test_delete.py +python manage.py test networkapi/api_vlan.tests.unit.async.test_post.py +python manage.py test networkapi/api_vlan.tests.unit.async.test_put.py + +echo "=============== Tests for IPV4 =================" +python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_delete.py +python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_get.py +python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_post.py +python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_put.py +python manage.py test networkapi/api_ip.tests.unit.ipv4.async.test_delete.py +python manage.py test networkapi/api_ip.tests.unit.ipv4.async.test_post.py +python manage.py test networkapi/api_ip.tests.unit.ipv4.async.test_put.py +python manage.py test networkapi/api_ip.v4.tests.sanity.ipv4.sync.test_delete.py +python manage.py test networkapi/api_ip.v4.tests.sanity.ipv4.sync.test_get.py +python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_post.py +python manage.py test networkapi/api_ip.tests.sanity.ipv4.sync.test_put.py + +echo "" +echo "=============== Tests for IPV6 =================" +python manage.py test networkapi/api_ip.tests.sanity.ipv6.sync.test_delete.py +python manage.py test networkapi/api_ip.tests.sanity.ipv6.sync.test_get.py +python manage.py test networkapi/api_ip.tests.sanity.ipv6.sync.test_post.py +python manage.py test networkapi/api_ip.tests.sanity.ipv6.sync.test_put.py +python manage.py test networkapi/api_ip.tests.unit.ipv6.async.test_delete.py +python manage.py test networkapi/api_ip.tests.unit.ipv6.async.test_post.py +python manage.py test networkapi/api_ip.tests.unit.ipv6.async.test_put.py +python manage.py test networkapi/api_ip.v4.tests.sanity.ipv6.sync.test_delete.py +python manage.py test networkapi/api_ip.v4.tests.sanity.ipv6.sync.test_get.py +python manage.py test networkapi/api_ip.v4.tests.sanity.ipv6.sync.test_post.py +python manage.py test networkapi/api_ip.v4.tests.sanity.ipv6.sync.test_put.py + +echo "" +echo "=============== Tests for Environment =================" +python manage.py test networkapi/api_environment.tests.sanity.test_cidr_delete.py +python manage.py test networkapi/api_environment.tests.sanity.test_cidr_get.py +python manage.py test networkapi/api_environment.tests.sanity.test_cidr_post.py +python manage.py test networkapi/api_environment.tests.sanity.test_cidr_put.py +python manage.py test networkapi/api_environment.tests.sanity.test_environment_delete.py +python manage.py test networkapi/api_environment.tests.sanity.test_environment_get.py +python manage.py test networkapi/api_environment.tests.sanity.test_environment_post.py +python manage.py test networkapi/api_environment.tests.sanity.test_environment_put.py +python manage.py test networkapi/api_environment.tests.test_acl_flows.py + +echo "" +echo "=============== Tests for Environment VIP =================" +python manage.py test networkapi/api_environment_vip.tests.sanity.test_environment_vip_delete.py +python manage.py test networkapi/api_environment_vip.tests.sanity.test_environment_vip_get.py +python manage.py test networkapi/api_environment_vip.tests.sanity.test_environment_vip_post.py +python manage.py test networkapi/api_environment_vip.tests.sanity.test_environment_vip_put.py + +echo "" +echo "=============== Tests for Plugins =================" +python manage.py test networkapi/plugins.SDN.ODL.tests.test_acl_flow_builder.py +python manage.py test networkapi/plugins.SDN.ODL.tests.test_cookie_handler.py +# python manage.py test networkapi/plugins.SDN.ODL.tests.test_generic_odl_plugin.py +python manage.py test networkapi/plugins.SDN.ODL.tests.test_odl_acl.py +python manage.py test networkapi/plugins.SDN.ODL.tests.test_odl_authentication.py +python manage.py test networkapi/plugins.SDN.ODL.tests.test_send_flows_with_tcp_flags.py +python manage.py test networkapi/plugins.SDN.ODL.tests.test_tcp_control_bits.py + +echo "" +echo "=============== Tests for Network v4 =================" +python manage.py test networkapi/api_network.tests.test_create_network.py +python manage.py test networkapi/api_network.tests.test_facade.py +python manage.py test networkapi/api_network.tests.v3.unit.networkipv4.async.test_delete.py +python manage.py test networkapi/api_network.tests.v3.unit.networkipv4.async.test_post.py +python manage.py test networkapi/api_network.tests.v3.unit.networkipv4.async.test_put.py +python manage.py test networkapi/api_network.tests.v3.sanity.allocate.test_network_v4.py +python manage.py test networkapi/api_network.tests.v3.sanity.networkipv4.sync.test_delete.py +python manage.py test networkapi/api_network.tests.v3.sanity.networkipv4.sync.test_get.py +python manage.py test networkapi/api_network.tests.v3.sanity.networkipv4.sync.test_post.py +python manage.py test networkapi/api_network.tests.v3.sanity.networkipv4.sync.test_put.py + +echo "" +echo "=============== Tests for Network v6 =================" +python manage.py test networkapi/api_network.tests.v3.unit.networkipv6.async.test_delete.py +python manage.py test networkapi/api_network.tests.v3.unit.networkipv6.async.test_post.py +python manage.py test networkapi/api_network.tests.v3.unit.networkipv6.async.test_put.py +python manage.py test networkapi/api_network.tests.v3.sanity.allocate.test_network_v4.py +python manage.py test networkapi/api_network.tests.v3.sanity.networkipv6.sync.test_delete.py +python manage.py test networkapi/api_network.tests.v3.sanity.networkipv6.sync.test_get.py +python manage.py test networkapi/api_network.tests.v3.sanity.networkipv6.sync.test_post.py +python manage.py test networkapi/api_network.tests.v3.sanity.networkipv6.sync.test_put.py + +echo "" +echo "=============== Tests for ASN =================" +python manage.py test networkapi/api_asn.v4.tests.sanity.sync.test_as_delete.py +python manage.py test networkapi/api_asn.v4.tests.sanity.sync.test_as_get.py +python manage.py test networkapi/api_asn.v4.tests.sanity.sync.test_as_post.py +python manage.py test networkapi/api_asn.v4.tests.sanity.sync.test_as_put.py + +echo "" +echo "=============== Tests for Interface =================" +python manage.py test networkapi/api_interface.tests.sanity.interface.test_interface_delete.py +python manage.py test networkapi/api_interface.tests.sanity.interface.test_interface_get.py +python manage.py test networkapi/api_interface.tests.sanity.interface.test_interface_post.py +python manage.py test networkapi/api_interface.tests.sanity.interface.teste_interface_put.py +python manage.py test networkapi/api_interface.tests.sanity.interface_environments.teste_delete.py +python manage.py test networkapi/api_interface.tests.sanity.interface_environments.teste_post.py + +echo "" +echo "=============== Tests for List Configuration BGP =================" +python manage.py test networkapi/api_list_config_bgp.v4.tests.sanity.sync.test_delete.py +python manage.py test networkapi/api_list_config_bgp.v4.tests.sanity.sync.test_get.py +python manage.py test networkapi/api_list_config_bgp.v4.tests.sanity.sync.test_post.py +python manage.py test networkapi/api_list_config_bgp.v4.tests.sanity.sync.test_put.py + +echo "" +echo "=============== Tests for Rack =================" +python manage.py test networkapi/api_rack.tests.datacenter.test_datacenter.py +python manage.py test networkapi/api_rack.tests.fabric.test_fabric.py +python manage.py test networkapi/api_rack.tests.rack.test_rack.py + +echo "" +echo "=============== Tests for Pool =================" +python manage.py test networkapi/api_pools.tests.functional.v1.test_facade.py +python manage.py test networkapi/api_pools.tests.functional.v1.test_save_pool.py +python manage.py test networkapi/api_pools.tests.sanity.test_pool_deploy_mock_delete.py +python manage.py test networkapi/api_pools.tests.sanity.test_pool_deploy_mock_post.py +python manage.py test networkapi/api_pools.tests.sanity.test_pool_deploy_mock_put.py +python manage.py test networkapi/api_pools.tests.sanity.test_pool_get.py +python manage.py test networkapi/api_pools.tests.sanity.test_pool_get_deploy_mock.py +python manage.py test networkapi/api_pools.tests.sanity.test_pool_post_spec.py +python manage.py test networkapi/api_pools.tests.sanity.test_pool_put_spec.py +python manage.py test networkapi/api_pools.tests.unit.test_pool_deploy_mock_plugin.py +python manage.py test networkapi/api_pools.tests.unit.async.test_delete.py +python manage.py test networkapi/api_pools.tests.unit.async.test_post.py +python manage.py test networkapi/api_pools.tests.unit.async.test_put.py + +echo "" +echo "=============== Tests for VIP Requests =================" +python manage.py test networkapi/api_vip_request.tests.sanity.sync.test_delete.py +python manage.py test networkapi/api_vip_request.tests.sanity.sync.test_get.py +python manage.py test networkapi/api_vip_request.tests.sanity.sync.test_post.py +python manage.py test networkapi/api_vip_request.tests.sanity.sync.test_put.py +python manage.py test networkapi/api_vip_request.tests.unit.async.test_delete.py +python manage.py test networkapi/api_vip_request.tests.unit.async.test_post.py +python manage.py test networkapi/api_vip_request.tests.unit.async.test_put.py # echo "" echo "=============== Tests for Neighbor =================" -# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_delete.py -# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_get.py -# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_post.py -# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_put.py -# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_delete.py -# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_get.py -# python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_post.py +python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_delete.py +python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_get.py +python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_post.py +python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v4.sanity.sync.test_put.py +python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_delete.py +python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_get.py +python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_post.py python manage.py test networkapi/api_neighbor.v4.tests.neighbor_v6.sanity.sync.test_put.py \ No newline at end of file