X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Fapi%2Frest%2Fcompute.py;h=030055e44c1d6a96af68c86dbd96ba7e60e07fc2;hb=34566447ace17ef694334094140bf9feb115b715;hp=e412133c99bf2a5834a3b70066bb97e614237c8f;hpb=1027edcd4d26047a73bdcad0e3921d8273400df0;p=osm%2Fvim-emu.git diff --git a/src/emuvim/api/rest/compute.py b/src/emuvim/api/rest/compute.py index e412133..030055e 100755 --- a/src/emuvim/api/rest/compute.py +++ b/src/emuvim/api/rest/compute.py @@ -78,7 +78,8 @@ class ComputeStart(Resource): ''' nw_list = list() - if network_str is None or '),(' not in network_str : + # TODO make this more robust with regex check + if network_str is None : return nw_list networks = network_str[1:-1].split('),(') @@ -105,10 +106,10 @@ class ComputeList(Resource): global dcs - def get(self, dc_label): + def get(self, dc_label=None): logging.debug("API CALL: compute list") try: - if dc_label == 'None': + if dc_label is None or dc_label == 'None': # return list with all compute nodes in all DCs all_containers = [] for dc in dcs.itervalues():