Skip to content

Commit

Permalink
Rename num_of_enclaves to NumberOfEnclaves
Browse files Browse the repository at this point in the history
This modifucaiton better aligns the style of the toml files

Signed-off-by: Bruno Vavala <[email protected]>
  • Loading branch information
bvavala committed Apr 8, 2024
1 parent 57ecc18 commit 61ad951
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build/template/eservice.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ BaseName = "${identity}"
[EnclaveModule]

# Number of available enclave workers to service requests
num_of_enclaves = '7'
NumberOfEnclaves = '7'

# ias_url is the URL of the Intel Attestation Service (IAS) server. The
# example server is for debug enclaves only,
Expand Down
2 changes: 1 addition & 1 deletion build/template/pservice.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ BaseName = "${identity}"
[EnclaveModule]

# Number of available enclave workers to service requests
num_of_enclaves = '7'
NumberOfEnclaves = '7'

# ias_url is the URL of the Intel Attestation Service (IAS) server. The
# example server is for debug enclaves only,
Expand Down
4 changes: 2 additions & 2 deletions eservice/pdo/eservice/enclave/enclave_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ bool is_sgx_simulator()
pdo_enclave_info::pdo_enclave_info(
const std::string& enclaveModulePath,
const std::string& spid,
const int num_of_enclaves
const int NumberOfEnclaves
)
{
SAFE_LOG1(PDO_LOG_INFO, "Initializing SGX PDO enclave");
Expand All @@ -44,7 +44,7 @@ pdo_enclave_info::pdo_enclave_info(

pdo_err_t ret = pdo::enclave_api::base::Initialize(enclaveModulePath,
spid,
num_of_enclaves);
NumberOfEnclaves);
ThrowPDOError(ret);
SAFE_LOG1(PDO_LOG_INFO, "SGX PDO enclave initialized.");

Expand Down
2 changes: 1 addition & 1 deletion eservice/pdo/eservice/enclave/enclave_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class pdo_enclave_info
pdo_enclave_info(
const std::string& enclaveModulePath,
const std::string& spid,
const int num_of_enclaves
const int NumberOfEnclaves
);
virtual ~pdo_enclave_info();
std::string get_epid_group();
Expand Down
8 changes: 4 additions & 4 deletions eservice/pdo/eservice/pdo_enclave.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def initialize_with_configuration(config) :
'{}'.format(
', '.join(sorted(list(missing_keys)))))

num_of_enclaves = int(config.get('num_of_enclaves', 1))
NumberOfEnclaves = int(config.get('NumberOfEnclaves', 1))

try:
spid = Path(os.path.join(config['sgx_key_root'], "sgx_spid.txt")).read_text()
Expand All @@ -167,7 +167,7 @@ def initialize_with_configuration(config) :
if not _pdo:
signed_enclave = __find_enclave_library(config)
logger.debug("Attempting to load enclave at: %s", signed_enclave)
_pdo = enclave.pdo_enclave_info(signed_enclave, spid, num_of_enclaves)
_pdo = enclave.pdo_enclave_info(signed_enclave, spid, NumberOfEnclaves)
logger.info("Basename: %s", get_enclave_basename())
logger.info("MRENCLAVE: %s", get_enclave_measurement())

Expand Down Expand Up @@ -238,8 +238,8 @@ def get_enclave_service_info(spid, config=None) :
signed_enclave = __find_enclave_library(None)
logger.debug("Attempting to load enclave at: %s", signed_enclave)

num_of_enclaves = 1
pdo = enclave.pdo_enclave_info(signed_enclave, spid, num_of_enclaves)
NumberOfEnclaves = 1
pdo = enclave.pdo_enclave_info(signed_enclave, spid, NumberOfEnclaves)
if pdo is None :
raise Exception('unable to load the enclave')

Expand Down
2 changes: 1 addition & 1 deletion eservice/pdo/eservice/scripts/EServiceCLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def Main() :
# set up the default enclave module configuration (if necessary)
if config.get('EnclaveModule') is None :
config['EnclaveModule'] = {
'num_of_enclaves' : 7,
'NumberOfEnclaves' : 7,
'ias_url' : 'https://api.trustedservices.intel.com/sgx/dev',
'sgx_key_root' : os.environ.get('PDO_SGX_KEY_ROOT', '.')
}
Expand Down
2 changes: 1 addition & 1 deletion eservice/pdo/eservice/scripts/EServiceEnclaveInfoCLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def Main() :
# set up the default enclave module configuration (if necessary)
if config.get('EnclaveModule') is None :
config['EnclaveModule'] = {
'num_of_enclaves' : 7,
'NumberOfEnclaves' : 7,
'ias_url' : 'https://api.trustedservices.intel.com/sgx/dev',
'sgx_key_root' : os.environ.get('PDO_SGX_KEY_ROOT', '.')
}
Expand Down
2 changes: 1 addition & 1 deletion eservice/tests/test-secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def ErrorShutdown() :
# set up the default enclave module configuration (if necessary)
if config.get('EnclaveModule') is None :
config['EnclaveModule'] = {
'num_of_enclaves' : 7,
'NumberOfEnclaves' : 7,
'ias_url' : 'https://api.trustedservices.intel.com/sgx/dev',
'sgx_key_root' : os.environ.get('PDO_SGX_KEY_ROOT', '.')
}
Expand Down
2 changes: 1 addition & 1 deletion pservice/pdo/pservice/scripts/PServiceCLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def Main() :
# set up the default enclave module configuration (if necessary)
if config.get('EnclaveModule') is None :
config['EnclaveModule'] = {
'num_of_enclaves' : 7,
'NumberOfEnclaves' : 7,
'ias_url' : 'https://api.trustedservices.intel.com/sgx/dev',
'sgx_key_root' : os.environ.get('PDO_SGX_KEY_ROOT', '.')
}
Expand Down

0 comments on commit 61ad951

Please sign in to comment.