Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devel #1555

Merged
merged 3 commits into from
May 10, 2024
Merged

Devel #1555

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contextualization/ansible_install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

ANSIBLE_VERSION="2.9.21"
ANSIBLE_VERSION="4.10.0"

distribution_id() {
RETVAL=""
Expand Down Expand Up @@ -71,7 +71,7 @@ else

pip3 install "pip>=20.0"
pip3 install -U "setuptools<66.0"
pip3 install "pyOpenSSL>20.0,<22.1.0" "cryptography>37.0.0,<39.0.0" pyyaml jmespath scp "paramiko>=2.9.5" --prefer-binary
pip3 install "pyOpenSSL>20.0,<22.1.0" "cryptography>37.0.0,<39.0.0" pyyaml jmespath scp "paramiko>=2.9.5" packaging --prefer-binary
pip3 install ansible==$ANSIBLE_VERSION --prefer-binary
fi

Expand Down
3 changes: 3 additions & 0 deletions contextualization/conf-ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,6 @@
- { section: 'defaults', option: 'ansible_python_interpreter', value: 'auto' }
- { section: 'defaults', option: 'transport', value: 'ssh' }
- { section: 'ssh_connection', option: 'ssh_args', value: '-o ControlMaster=auto -o ControlPersist=900s -o UserKnownHostsFile=/dev/null' }
- { section: 'galaxy', option: 'server_list', value: 'galaxy, oldgalaxy' }
- { section: 'galaxy_server.galaxy', option: 'url', value: 'https://galaxy.ansible.com/api/' }
- { section: 'galaxy_server.oldgalaxy', option: 'url', value: 'https://old-galaxy.ansible.com/api/' }
12 changes: 6 additions & 6 deletions test/integration/QuickTestIM.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_11_create(self):
success, msg="ERROR calling CreateInfrastructure: " + str(inf_id))
self.__class__.inf_id = inf_id

all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 900)
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 1200)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand Down Expand Up @@ -236,7 +236,7 @@ def test_19_addresource(self):
self.assertEqual(len(vm_ids), 3, msg=("ERROR getting infrastructure info: Incorrect number of VMs(" +
str(len(vm_ids)) + "). It must be 3"))

all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 900)
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 1200)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand Down Expand Up @@ -301,7 +301,7 @@ def test_22_removeresource(self):
self.assertEqual(vm_state, VirtualMachine.RUNNING,
msg="ERROR unexpected state. Expected 'running' and obtained " + vm_state)

all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 600)
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 900)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand Down Expand Up @@ -341,7 +341,7 @@ def test_24_reconfigure(self):
self.inf_id, "", self.auth_data)
self.assertTrue(success, msg="ERROR calling Reconfigure: " + str(res))

all_stopped = self.wait_inf_state(VirtualMachine.CONFIGURED, 600)
all_stopped = self.wait_inf_state(VirtualMachine.CONFIGURED, 900)
self.assertTrue(
all_stopped, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand All @@ -353,7 +353,7 @@ def test_25_reconfigure_vmlist(self):
self.inf_id, "", self.auth_data, [0])
self.assertTrue(success, msg="ERROR calling Reconfigure: " + str(res))

all_stopped = self.wait_inf_state(VirtualMachine.CONFIGURED, 600)
all_stopped = self.wait_inf_state(VirtualMachine.CONFIGURED, 900)
self.assertTrue(
all_stopped, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand All @@ -366,7 +366,7 @@ def test_26_reconfigure_radl(self):
self.inf_id, radl, self.auth_data)
self.assertTrue(success, msg="ERROR calling Reconfigure: " + str(res))

all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 600)
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 900)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand Down
24 changes: 12 additions & 12 deletions test/integration/TestIM.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def test_11_create(self):
self.__class__.inf_id = inf_id

all_configured = self.wait_inf_state(
inf_id, VirtualMachine.CONFIGURED, 1800)
inf_id, VirtualMachine.CONFIGURED, 2400)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand Down Expand Up @@ -272,7 +272,7 @@ def test_19_addresource(self):
str(len(vm_ids)) + "). It must be 4"))

all_configured = self.wait_inf_state(
self.inf_id, VirtualMachine.CONFIGURED, 1200)
self.inf_id, VirtualMachine.CONFIGURED, 1500)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand Down Expand Up @@ -337,7 +337,7 @@ def test_22_removeresource(self):
msg="ERROR unexpected state. Expected 'running' and obtained " + vm_state)

all_configured = self.wait_inf_state(
self.inf_id, VirtualMachine.CONFIGURED, 900)
self.inf_id, VirtualMachine.CONFIGURED, 1200)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand Down Expand Up @@ -377,7 +377,7 @@ def test_24_reconfigure(self):
self.assertTrue(success, msg="ERROR calling Reconfigure: " + str(res))

all_stopped = self.wait_inf_state(
self.inf_id, VirtualMachine.CONFIGURED, 600)
self.inf_id, VirtualMachine.CONFIGURED, 900)
self.assertTrue(
all_stopped, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand All @@ -390,7 +390,7 @@ def test_25_reconfigure_vmlist(self):
self.assertTrue(success, msg="ERROR calling Reconfigure: " + str(res))

all_stopped = self.wait_inf_state(
self.inf_id, VirtualMachine.CONFIGURED, 600)
self.inf_id, VirtualMachine.CONFIGURED, 900)
self.assertTrue(
all_stopped, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand All @@ -404,7 +404,7 @@ def test_26_reconfigure_radl(self):
self.assertTrue(success, msg="ERROR calling Reconfigure: " + str(res))

all_configured = self.wait_inf_state(
self.inf_id, VirtualMachine.CONFIGURED, 600)
self.inf_id, VirtualMachine.CONFIGURED, 900)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand Down Expand Up @@ -635,7 +635,7 @@ def test_80_create_ansible_host(self):
self.__class__.inf_id = [inf_id]

all_configured = self.wait_inf_state(
inf_id, VirtualMachine.CONFIGURED, 600)
inf_id, VirtualMachine.CONFIGURED, 900)
self.assertTrue(
all_configured, msg="ERROR waiting the ansible master to be configured (timeout).")

Expand Down Expand Up @@ -672,7 +672,7 @@ def test_80_create_ansible_host(self):
self.__class__.inf_id.append(inf_id)

all_configured = self.wait_inf_state(
inf_id, VirtualMachine.CONFIGURED, 600)
inf_id, VirtualMachine.CONFIGURED, 900)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand All @@ -698,7 +698,7 @@ def test_90_create(self):
self.__class__.inf_id = [inf_id]

all_configured = self.wait_inf_state(
inf_id, VirtualMachine.CONFIGURED, 1500)
inf_id, VirtualMachine.CONFIGURED, 1800)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand All @@ -723,7 +723,7 @@ def test_96_create(self):
success, msg="ERROR calling CreateInfrastructure: " + str(inf_id))
self.__class__.inf_id = [inf_id]

all_configured = self.wait_inf_state(inf_id, VirtualMachine.CONFIGURED, 600)
all_configured = self.wait_inf_state(inf_id, VirtualMachine.CONFIGURED, 900)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand Down Expand Up @@ -759,7 +759,7 @@ def test_98_proxy(self):
self.assertTrue(success, msg="ERROR calling CreateInfrastructure: " + str(inf_id))
self.__class__.inf_id = [inf_id]

all_configured = self.wait_inf_state(inf_id, VirtualMachine.CONFIGURED, 600)
all_configured = self.wait_inf_state(inf_id, VirtualMachine.CONFIGURED, 900)
self.assertTrue(all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

(success, vminfo) = self.server.GetVMInfo(inf_id, 0, self.auth_data)
Expand All @@ -786,7 +786,7 @@ def test_98_proxy(self):
(success, inf_id2) = self.server.CreateInfrastructure(radl, self.auth_data)
self.__class__.inf_id.append(inf_id2)

all_configured = self.wait_inf_state(inf_id2, VirtualMachine.CONFIGURED, 600)
all_configured = self.wait_inf_state(inf_id2, VirtualMachine.CONFIGURED, 900)
self.assertTrue(all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

def test_99_destroy(self):
Expand Down
10 changes: 5 additions & 5 deletions test/integration/TestREST.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def test_20_create(self):

self.__class__.inf_id = str(os.path.basename(resp.text))

all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 600)
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 900)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand Down Expand Up @@ -278,7 +278,7 @@ def test_40_addresource(self):
vm_ids = resp.text.split("\n")
self.assertEqual(len(vm_ids), 2, msg=("ERROR getting infrastructure info: Incorrect number of VMs(" +
str(len(vm_ids)) + "). It must be 2"))
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 600)
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 900)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand Down Expand Up @@ -443,7 +443,7 @@ def test_93_create_tosca(self):

self.__class__.inf_id = str(os.path.basename(resp.text))

all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 1800)
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 2400)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand Down Expand Up @@ -473,7 +473,7 @@ def test_95_add_tosca(self):
vm_ids = resp.text.split("\n")
self.assertEqual(len(vm_ids), 3, msg=("ERROR getting infrastructure info: Incorrect number of VMs(" +
str(len(vm_ids)) + "). It must be 2"))
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 1200)
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 1500)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand All @@ -494,7 +494,7 @@ def test_96_remove_tosca(self):
vm_ids = resp.text.split("\n")
self.assertEqual(len(vm_ids), 2, msg=("ERROR getting infrastructure info: Incorrect number of VMs(" +
str(len(vm_ids)) + "). It must be 2"))
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 900)
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 1200)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand Down
6 changes: 3 additions & 3 deletions test/integration/TestREST_JSON.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def test_20_create(self):

self.__class__.inf_id = str(os.path.basename(resp.text))

all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 1200)
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 1500)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand Down Expand Up @@ -175,7 +175,7 @@ def test_40_addresource(self):
vm_ids = resp.text.split("\n")
self.assertEqual(len(vm_ids), 3, msg=("ERROR getting infrastructure info: Incorrect number of VMs(" +
str(len(vm_ids)) + "). It must be 2"))
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 600)
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 900)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand All @@ -195,7 +195,7 @@ def test_55_reconfigure(self):
body=new_config)
self.assertEqual(resp.status_code, 200, msg="ERROR reconfiguring:" + resp.text)

all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 500)
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 800)
self.assertTrue(
all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).")

Expand Down