+#
+# 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.
+#
FROM ubuntu:16.04
RUN apt-get update && apt-get -y install git make python python3 \
libcurl4-gnutls-dev libgnutls-dev tox python-dev python3-dev \
- debhelper python-setuptools python-all apt-utils
+ debhelper python-setuptools python3-setuptools python-all python3-all \
+ apt-utils
#!/bin/sh
+
+# 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.
+
rm -rf deb_dist
-tox -e build
+tox -e build,build3
resp = ''
if resp_unicode:
resp = json.loads(resp_unicode)
- # print 'HTTP CODE: {}'.format(http_code)
- # print 'RESP: {}'.format(resp)
- # print 'URL: {}/{}'.format(apiUrlStatus, entity_id)
+ # print('HTTP CODE: {}'.format(http_code))
+ # print('RESP: {}'.format(resp))
+ # print('URL: {}/{}'.format(apiUrlStatus, entity_id))
if deleteFlag and http_code == 404:
# In case of deletion, '404 Not Found' means successfully deleted
# Display 'detailed-status: Deleted' and return
else:
time_to_return = True
new_detailed_status = _get_detailed_status(resp, entity_label, detailed_status_deleted)
- # print 'DETAILED-STATUS: {}'.format(new_detailed_status)
- # print 'DELETE-ATTEMPTS-LEFT: {}'.format(delete_attempts_left)
+ # print('DETAILED-STATUS: {}'.format(new_detailed_status))
+ # print('DELETE-ATTEMPTS-LEFT: {}'.format(delete_attempts_left))
if not new_detailed_status:
new_detailed_status = 'In progress'
# TODO: Change LCM to provide detailed-status more up to date
resp = ctx.obj.nsd.list(filter)
else:
resp = ctx.obj.nsd.list()
- # print yaml.safe_dump(resp)
+ # print(yaml.safe_dump(resp))
table = PrettyTable(['nsd name', 'id'])
fullclassname = ctx.obj.__module__ + "." + ctx.obj.__class__.__name__
if fullclassname == 'osmclient.sol005.client.Client':
resp = ctx.obj.vnfd.list(filter)
else:
resp = ctx.obj.vnfd.list()
- # print yaml.safe_dump(resp)
+ # print(yaml.safe_dump(resp))
table = PrettyTable(['nfpkg name', 'id'])
fullclassname = ctx.obj.__module__ + "." + ctx.obj.__class__.__name__
if fullclassname == 'osmclient.sol005.client.Client':
except ClientException as inst:
print((inst.message))
exit(1)
- # print yaml.safe_dump(resp)
+ # print(yaml.safe_dump(resp))
table = PrettyTable(['nst name', 'id'])
for nst in resp:
name = nst['name'] if 'name' in nst else '-'
def _get_curl_cmd(self, endpoint):
curl_cmd = pycurl.Curl()
- #print self._url + endpoint
+ #print(self._url + endpoint)
curl_cmd.setopt(pycurl.URL, self._url + endpoint)
curl_cmd.setopt(pycurl.SSL_VERIFYPEER, 0)
curl_cmd.setopt(pycurl.SSL_VERIFYHOST, 0)
curl_cmd.setopt(pycurl.WRITEFUNCTION, data.write)
curl_cmd.perform()
http_code = curl_cmd.getinfo(pycurl.HTTP_CODE)
- #print 'HTTP_CODE: {}'.format(http_code)
+ #print('HTTP_CODE: {}'.format(http_code))
curl_cmd.close()
# TODO 202 accepted should be returned somehow
if data.getvalue():
break
resp = self._http.get_cmd('{}/{}'.format(self._apiBase, ns_id))
#resp = self._http.get_cmd('{}/{}/nsd_content'.format(self._apiBase, ns_id))
- #print yaml.safe_dump(resp)
+ #print(yaml.safe_dump(resp))
if resp:
return resp
raise NotFound("ns {} not found".format(name))
querystring = '?FORCE=True'
http_code, resp = self._http.delete_cmd('{}/{}{}'.format(self._apiBase,
ns['_id'], querystring))
- # print 'HTTP CODE: {}'.format(http_code)
- # print 'RESP: {}'.format(resp)
+ # print('HTTP CODE: {}'.format(http_code))
+ # print('RESP: {}'.format(resp))
if http_code == 202:
if wait and resp:
resp = json.loads(resp)
if wim_account is not None:
ns['wimAccountId'] = get_wim_account_id(wim_account)
- # print yaml.safe_dump(ns)
+ # print(yaml.safe_dump(ns))
try:
self._apiResource = '/ns_instances_content'
self._apiBase = '{}{}{}'.format(self._apiName,
self._http.set_http_header(http_header)
http_code, resp = self._http.post_cmd(endpoint=self._apiBase,
postfields_dict=ns)
- # print 'HTTP CODE: {}'.format(http_code)
- # print 'RESP: {}'.format(resp)
+ # print('HTTP CODE: {}'.format(http_code))
+ # print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if resp:
resp = json.loads(resp)
http_code, resp = self._http.get2_cmd('{}?nsInstanceId={}'.format(
self._apiBase, ns['_id'],
filter_string) )
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code == 200:
if resp:
resp = json.loads(resp)
self._apiBase = '{}{}{}'.format(self._apiName,
self._apiVersion, self._apiResource)
http_code, resp = self._http.get2_cmd('{}/{}'.format(self._apiBase, operationId))
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code == 200:
if resp:
resp = json.loads(resp)
self._apiBase = '{}{}{}'.format(self._apiName,
self._apiVersion, self._apiResource)
endpoint = '{}/{}/{}'.format(self._apiBase, ns['_id'], op_name)
- #print 'OP_NAME: {}'.format(op_name)
- #print 'OP_DATA: {}'.format(json.dumps(op_data))
+ #print('OP_NAME: {}'.format(op_name))
+ #print('OP_DATA: {}'.format(json.dumps(op_data)))
http_code, resp = self._http.post_cmd(endpoint=endpoint, postfields_dict=op_data)
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if resp:
resp = json.loads(resp)
try:
http_code, resp = self._http.post_cmd(endpoint='/test/message/alarm_request',
postfields_dict=data)
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
#resp = json.loads(resp)
print('Alarm created')
try:
http_code, resp = self._http.post_cmd(endpoint='/test/message/alarm_request',
postfields_dict=data)
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
#resp = json.loads(resp)
print('Alarm deleted')
try:
http_code, resp = self._http.post_cmd(endpoint='/test/message/metric_request',
postfields_dict=data)
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
#resp = json.loads(resp)
return 'Metric exported'
if filter:
filter_string = '?{}'.format(filter)
resp = self._http.get_cmd('{}{}'.format(self._apiBase, filter_string))
- #print yaml.safe_dump(resp)
+ #print(yaml.safe_dump(resp))
if resp:
return resp
return list()
# It is redundant, since the previous one already gets the whole nsdinfo
# The only difference is that a different primitive is exercised
resp = self._http.get_cmd('{}/{}'.format(self._apiBase, nsd['_id']))
- #print yaml.safe_dump(resp)
+ #print(yaml.safe_dump(resp))
if resp:
return resp
raise NotFound("nsd {} not found".format(name))
headers = self._client._headers
headers['Accept'] = 'application/binary'
http_code, resp = self._http.get2_cmd('{}/{}/{}'.format(self._apiBase, nsd['_id'], thing))
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if resp:
#store in a file
querystring = '?FORCE=True'
http_code, resp = self._http.delete_cmd('{}/{}{}'.format(self._apiBase,
nsd['_id'], querystring))
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code == 202:
print('Deletion in progress')
elif http_code == 204:
self._apiVersion, self._apiResource)
endpoint = '{}{}'.format(self._apiBase,ow_string)
http_code, resp = self._http.post_cmd(endpoint=endpoint, filename=filename)
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if resp:
resp = json.loads(resp)
break
resp = self._http.get_cmd('{}/{}'.format(self._apiBase, nsi_id))
#resp = self._http.get_cmd('{}/{}/nsd_content'.format(self._apiBase, nsi_id))
- #print yaml.safe_dump(resp)
+ #print(yaml.safe_dump(resp))
if resp:
return resp
raise NotFound("nsi {} not found".format(name))
querystring = '?FORCE=True'
http_code, resp = self._http.delete_cmd('{}/{}{}'.format(self._apiBase,
nsi['_id'], querystring))
- # print 'HTTP CODE: {}'.format(http_code)
- # print 'RESP: {}'.format(resp)
+ # print('HTTP CODE: {}'.format(http_code))
+ # print('RESP: {}'.format(resp))
if http_code == 202:
if wait and resp:
resp = json.loads(resp)
raise ValueError("Error at --config 'additionalParamsForSubnet' items must contain "
"'additionalParamsForNs' and/or 'additionalParamsForVnf'")
- # print yaml.safe_dump(nsi)
+ # print(yaml.safe_dump(nsi))
try:
self._apiResource = '/netslice_instances_content'
self._apiBase = '{}{}{}'.format(self._apiName,
self._http.set_http_header(http_header)
http_code, resp = self._http.post_cmd(endpoint=self._apiBase,
postfields_dict=nsi)
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if resp:
resp = json.loads(resp)
http_code, resp = self._http.get2_cmd('{}?netsliceInstanceId={}'.format(
self._apiBase, nsi['_id'],
filter_string) )
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code == 200:
if resp:
resp = json.loads(resp)
self._apiBase = '{}{}{}'.format(self._apiName,
self._apiVersion, self._apiResource)
http_code, resp = self._http.get2_cmd('{}/{}'.format(self._apiBase, operationId))
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code == 200:
if resp:
resp = json.loads(resp)
self._apiBase = '{}{}{}'.format(self._apiName,
self._apiVersion, self._apiResource)
endpoint = '{}/{}/{}'.format(self._apiBase, nsi['_id'], op_name)
- #print 'OP_NAME: {}'.format(op_name)
- #print 'OP_DATA: {}'.format(json.dumps(op_data))
+ #print('OP_NAME: {}'.format(op_name))
+ #print('OP_DATA: {}'.format(json.dumps(op_data)))
http_code, resp = self._http.post_cmd(endpoint=endpoint, postfields_dict=op_data)
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if resp:
resp = json.loads(resp)
if filter:
filter_string = '?{}'.format(filter)
resp = self._http.get_cmd('{}{}'.format(self._apiBase, filter_string))
- #print yaml.safe_dump(resp)
+ #print(yaml.safe_dump(resp))
if resp:
return resp
return list()
# It is redundant, since the previous one already gets the whole nstinfo
# The only difference is that a different primitive is exercised
resp = self._http.get_cmd('{}/{}'.format(self._apiBase, nst['_id']))
- #print yaml.safe_dump(resp)
+ #print(yaml.safe_dump(resp))
if resp:
return resp
raise NotFound("nst {} not found".format(name))
headers = self._client._headers
headers['Accept'] = 'application/binary'
http_code, resp = self._http.get2_cmd('{}/{}/{}'.format(self._apiBase, nst['_id'], thing))
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if resp:
#store in a file
querystring = '?FORCE=True'
http_code, resp = self._http.delete_cmd('{}/{}{}'.format(self._apiBase,
nst['_id'], querystring))
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code == 202:
print('Deletion in progress')
elif http_code == 204:
self._apiVersion, self._apiResource)
endpoint = '{}{}'.format(self._apiBase,ow_string)
http_code, resp = self._http.post_cmd(endpoint=endpoint, filename=filename)
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if resp:
resp = json.loads(resp)
else:
endpoint = '/vnfpkgm/v1/vnf_packages_content'
#endpoint = '/nsds' if pkg_type['type'] == 'nsd' else '/vnfds'
- #print 'Endpoint: {}'.format(endpoint)
+ #print('Endpoint: {}'.format(endpoint))
headers = self._client._headers
headers['Content-Type'] = 'application/gzip'
#headers['Content-Type'] = 'application/binary'
for (key,val) in list(headers.items())]
self._http.set_http_header(http_header)
http_code, resp = self._http.post_cmd(endpoint=endpoint, filename=filename)
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if resp:
resp = json.loads(resp)
# It is redundant, since the previous one already gets the whole pdudInfo
# The only difference is that a different primitive is exercised
resp = self._http.get_cmd('{}/{}'.format(self._apiBase, pdud['_id']))
- #print yaml.safe_dump(resp)
+ #print(yaml.safe_dump(resp))
if resp:
return resp
raise NotFound("pdu {} not found".format(name))
querystring = '?FORCE=True'
http_code, resp = self._http.delete_cmd('{}/{}{}'.format(self._apiBase,
pdud['_id'], querystring))
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code == 202:
print('Deletion in progress')
elif http_code == 204:
endpoint = self._apiBase
#endpoint = '{}{}'.format(self._apiBase,ow_string)
http_code, resp = self._http.post_cmd(endpoint=endpoint, postfields_dict=pdu)
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if resp:
resp = json.loads(resp)
def create(self, name, sdn_controller, wait=False):
http_code, resp = self._http.post_cmd(endpoint=self._apiBase,
postfields_dict=sdn_controller)
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if resp:
resp = json.loads(resp)
sdnc_id_for_wait = self._get_id_for_wait(name)
http_code, resp = self._http.put_cmd(endpoint='{}/{}'.format(self._apiBase,sdnc['_id']),
postfields_dict=sdn_controller)
- # print 'HTTP CODE: {}'.format(http_code)
- # print 'RESP: {}'.format(resp)
+ # print('HTTP CODE: {}'.format(http_code))
+ # print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if wait:
# In this case, 'resp' always returns None, so 'resp['id']' cannot be used.
querystring = '?FORCE=True'
http_code, resp = self._http.delete_cmd('{}/{}{}'.format(self._apiBase,
sdn_controller['_id'], querystring))
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code == 202:
if wait:
# Wait for status for SDNC instance deletion
if filter:
filter_string = '?{}'.format(filter)
resp = self._http.get_cmd('{}{}'.format(self._apiBase,filter_string))
- #print 'RESP: {}'.format(resp)
+ #print('RESP: {}'.format(resp))
if resp:
return resp
return list()
http_code, resp = self._http.post_cmd(endpoint=self._apiBase,
postfields_dict=vim_account)
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if resp:
resp = json.loads(resp)
#vim_account['config'] = json.dumps(vim_config)
http_code, resp = self._http.put_cmd(endpoint='{}/{}'.format(self._apiBase,vim['_id']),
postfields_dict=vim_account)
- # print 'HTTP CODE: {}'.format(http_code)
- # print 'RESP: {}'.format(resp)
+ # print('HTTP CODE: {}'.format(http_code))
+ # print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if wait:
# In this case, 'resp' always returns None, so 'resp['id']' cannot be used.
querystring = '?FORCE=True'
http_code, resp = self._http.delete_cmd('{}/{}{}'.format(self._apiBase,
vim_id, querystring))
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code == 202:
if wait:
# When deleting an account, 'resp' may be None.
else:
filter_string = '?nsr-id-ref={}'.format(ns_instance['_id'])
resp = self._http.get_cmd('{}{}'.format(self._apiBase,filter_string))
- #print 'RESP: {}'.format(resp)
+ #print('RESP: {}'.format(resp))
if resp:
return resp
return list()
vnf_id = vnf['_id']
break
resp = self._http.get_cmd('{}/{}'.format(self._apiBase, vnf_id))
- #print 'RESP: {}'.format(resp)
+ #print('RESP: {}'.format(resp))
if resp:
return resp
raise NotFound("vnf {} not found".format(name))
# It is redundant, since the previous one already gets the whole vnfpkginfo
# The only difference is that a different primitive is exercised
resp = self._http.get_cmd('{}/{}'.format(self._apiBase, vnfd['_id']))
- #print yaml.safe_dump(resp)
+ #print(yaml.safe_dump(resp))
if resp:
return resp
raise NotFound("vnfd {} not found".format(name))
headers = self._client._headers
headers['Accept'] = 'application/binary'
http_code, resp = self._http.get2_cmd('{}/{}/{}'.format(self._apiBase, vnfd['_id'], thing))
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if resp:
#store in a file
querystring = '?FORCE=True'
http_code, resp = self._http.delete_cmd('{}/{}{}'.format(self._apiBase,
vnfd['_id'], querystring))
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code == 202:
print('Deletion in progress')
elif http_code == 204:
self._apiVersion, self._apiResource)
endpoint = '{}{}'.format(self._apiBase,ow_string)
http_code, resp = self._http.post_cmd(endpoint=endpoint, filename=filename)
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202):
if resp:
resp = json.loads(resp)
http_code, resp = self._http.post_cmd(endpoint=self._apiBase,
postfields_dict=wim_account)
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if resp:
resp = json.loads(resp)
#wim_account['config'] = json.dumps(wim_config)
http_code, resp = self._http.put_cmd(endpoint='{}/{}'.format(self._apiBase,wim['_id']),
postfields_dict=wim_account)
- #print 'HTTP CODE: {}'.format(http_code)
- #print 'RESP: {}'.format(resp)
+ #print('HTTP CODE: {}'.format(http_code))
+ #print('RESP: {}'.format(resp))
if http_code in (200, 201, 202, 204):
if wait:
# In this case, 'resp' always returns None, so 'resp['id']' cannot be used.
raise ClientException("failed to update wim {} - {}".format(wim_name, msg))
def update_wim_account_dict(self, wim_account, wim_input):
- print (wim_input)
+ print(wim_input)
wim_account['wim_type'] = wim_input['wim_type']
wim_account['description'] = wim_input['description']
wim_account['wim_url'] = wim_input['url']
querystring = '?FORCE=True'
http_code, resp = self._http.delete_cmd('{}/{}{}'.format(self._apiBase,
wim_id, querystring))
- # print 'HTTP CODE: {}'.format(http_code)
- # print 'RESP: {}'.format(resp)
- # print 'WIM_ID: {}'.format(wim_id)
+ # print('HTTP CODE: {}'.format(http_code))
+ # print('RESP: {}'.format(resp))
+ # print('WIM_ID: {}'.format(wim_id))
if http_code == 202:
if wait:
# 'resp' may be None.
+#
+# 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.
+#
from setuptools import setup, find_packages
setup(
],
setup_requires=['setuptools-version-command'],
test_suite='nose.collector',
- entry_points='''
- [console_scripts]
- osm=osmclient.scripts.osm:cli
- ''',
+ entry_points={
+ 'console_scripts': [
+ 'osm = osmclient.scripts.osm:cli',
+ ],
+ },
)
+#
+# 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.
+#
[DEFAULT]
+Suite: xenial
Build-Depends: dh-python
Depends: python-setuptools, python-pycurl, python-click, python-prettytable, python-yaml
+#
+# 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.
+#
[tox]
-envlist = py27,py3,flake8,pyflakes
+envlist = py27,py35,flake8,pyflakes
toxworkdir={homedir}/.tox
[testenv]
-deps=nose
- mock
-commands=nosetests
+deps = nose
+ mock
+commands =
+ nosetests
[testenv:flake8]
basepython = python
deps = stdeb
setuptools-version-command
commands = python setup.py --command-packages=stdeb.command bdist_deb
+
+[testenv:build3]
+basepython = python3
+deps = stdeb
+ setuptools-version-command
+commands = python3 setup.py --command-packages=stdeb.command bdist_deb
+