Skip to content

Commit

Permalink
Fix: #876
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Sep 23, 2019
1 parent 38ecdd9 commit 73a001b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions IM/connectors/FogBow.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,9 @@ def launch(self, inf, radl, requested_radl, num_vm, auth_data):
if not name:
name = "userimage"
requirements = {}
sgx = system.getValue('cpu.sgx')
if sgx and sgx.lower() not in ["no", "false"]:
requirements["sgx"] = "true"
sgx = system.getValue('cpu.sgx.epc_size')
if sgx:
requirements["sgx:epc_size"] = str(sgx)
gpu = system.getValue('gpu.count')
if gpu:
requirements["gpu"] = "true"
Expand Down
4 changes: 2 additions & 2 deletions test/unit/connectors/Fogbow.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def test_20_launch(self, save_data, requests):
network net4 (federated = 'yes' and providers = ['p1','p2'])
system test (
gpu.count=1 and
cpu.sgx='true' and
cpu.sgx.epc_size=8 and
cpu.arch='x86_64' and
cpu.count>=1 and
memory.size>=512m and
Expand Down Expand Up @@ -252,7 +252,7 @@ def test_20_launch(self, save_data, requests):
self.assertEqual(data["compute"]["vCPU"], 1)
self.assertEqual(data["compute"]["memory"], 512)
self.assertEqual(data["compute"]["imageId"], "fogbow-ubuntu")
self.assertEqual(data["compute"]["requirements"], {'sgx': 'true', 'gpu': 'true'})
self.assertEqual(data["compute"]["requirements"], {'sgx:epc_size': '8', 'gpu': 'true'})
self.assertEqual(data["federatedNetworkId"], "1")

@patch('requests.request')
Expand Down

0 comments on commit 73a001b

Please sign in to comment.