/
opt
/
imh-python
/
lib
/
python3.9
/
site-packages
/
openstack
/
tests
/
functional
/
network
/
v2
/
/opt/imh-python/lib/python3.9/site-packages/openstack/tests/functional/network/v2
mkdir
upload
Name
Size
Mode
Actions
__pycache__/
-
0755
rm
test_address_scope.py
2342
0644
edit
dl
rm
test_agent.py
1641
0644
edit
dl
rm
test_agent_add_remove_network.py
2110
0644
edit
dl
rm
test_agent_add_remove_router.py
1815
0644
edit
dl
rm
test_auto_allocated_topology.py
2441
0644
edit
dl
rm
test_availability_zone.py
989
0644
edit
dl
rm
test_dvr_router.py
1946
0644
edit
dl
rm
test_extension.py
1065
0644
edit
dl
rm
test_firewall_group.py
1909
0644
edit
dl
rm
test_firewall_policy.py
1922
0644
edit
dl
rm
test_firewall_rule.py
2659
0644
edit
dl
rm
test_firewall_rule_insert_remove_policy.py
3936
0644
edit
dl
rm
test_flavor.py
2908
0644
edit
dl
rm
test_floating_ip.py
7489
0644
edit
dl
rm
test_network.py
3174
0644
edit
dl
rm
test_network_ip_availability.py
2750
0644
edit
dl
rm
test_network_segment_range.py
4133
0644
edit
dl
rm
test_port.py
3381
0644
edit
dl
rm
test_port_forwarding.py
7168
0644
edit
dl
rm
test_qos_bandwidth_limit_rule.py
3980
0644
edit
dl
rm
test_qos_dscp_marking_rule.py
3051
0644
edit
dl
rm
test_qos_minimum_bandwidth_rule.py
3396
0644
edit
dl
rm
test_qos_policy.py
2914
0644
edit
dl
rm
test_qos_rule_type.py
1308
0644
edit
dl
rm
test_quota.py
1527
0644
edit
dl
rm
test_rbac_policy.py
2167
0644
edit
dl
rm
test_router.py
2310
0644
edit
dl
rm
test_router_add_remove_interface.py
2774
0644
edit
dl
rm
test_security_group.py
2251
0644
edit
dl
rm
test_security_group_rule.py
2605
0644
edit
dl
rm
test_segment.py
3851
0644
edit
dl
rm
test_service_profile.py
2527
0644
edit
dl
rm
test_service_provider.py
926
0644
edit
dl
rm
test_subnet.py
3520
0644
edit
dl
rm
test_subnet_from_subnet_pool.py
3074
0644
edit
dl
rm
test_subnet_pool.py
3530
0644
edit
dl
rm
test_trunk.py
3340
0644
edit
dl
rm
__init__.py
0
0644
edit
dl
rm
Edit:
/opt/imh-python/lib/python3.9/site-packages/openstack/tests/functional/network/v2/test_agent.py
(1641B)
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import uuid from openstack.network.v2 import agent from openstack.tests.functional import base class TestAgent(base.BaseFunctionalTest): AGENT = None DESC = 'test description' def validate_uuid(self, s): try: uuid.UUID(s) except Exception: return False return True def setUp(self): super(TestAgent, self).setUp() agent_list = list(self.conn.network.agents()) self.AGENT = agent_list[0] assert isinstance(self.AGENT, agent.Agent) def test_list(self): agent_list = list(self.conn.network.agents()) self.AGENT = agent_list[0] assert isinstance(self.AGENT, agent.Agent) self.assertTrue(self.validate_uuid(self.AGENT.id)) def test_get(self): sot = self.conn.network.get_agent(self.AGENT.id) self.assertEqual(self.AGENT.id, sot.id) def test_update(self): sot = self.conn.network.update_agent(self.AGENT.id, description=self.DESC) self.assertEqual(self.DESC, sot.description)
Save
cmd:
run