Compare commits

..

2 Commits

Author SHA1 Message Date
9de14c46fb Bump version to 0.9.17 2021-05-19 17:06:29 -04:00
1b8b101b64 Fix bugs in log follow command 2021-05-19 16:22:48 -04:00
6 changed files with 19 additions and 4 deletions

View File

@ -20,6 +20,10 @@ To get started with PVC, please see the [About](https://parallelvirtualcluster.r
## Changelog ## Changelog
#### v0.9.17
* [CLI] Fixes bugs in log follow output
#### v0.9.16 #### v0.9.16
* Improves some CLI help messages * Improves some CLI help messages

View File

@ -26,7 +26,7 @@ import pvcapid.flaskapi as pvc_api
########################################################## ##########################################################
# Version string for startup output # Version string for startup output
version = '0.9.16' version = '0.9.17'
if pvc_api.config['ssl_enabled']: if pvc_api.config['ssl_enabled']:
context = (pvc_api.config['ssl_cert_file'], pvc_api.config['ssl_key_file']) context = (pvc_api.config['ssl_cert_file'], pvc_api.config['ssl_key_file'])

View File

@ -1002,8 +1002,9 @@ def follow_console_log(config, vm, lines=10):
API arguments: lines={lines} API arguments: lines={lines}
API schema: {"name":"{vmname}","data":"{console_log}"} API schema: {"name":"{vmname}","data":"{console_log}"}
""" """
# We always grab 500 to match the follow call, but only _show_ `lines` number
params = { params = {
'lines': lines 'lines': 500
} }
response = call_api(config, 'get', '/vm/{vm}/console'.format(vm=vm), params=params) response = call_api(config, 'get', '/vm/{vm}/console'.format(vm=vm), params=params)
@ -1012,7 +1013,7 @@ def follow_console_log(config, vm, lines=10):
# Shrink the log buffer to length lines # Shrink the log buffer to length lines
console_log = response.json()['data'] console_log = response.json()['data']
shrunk_log = console_log.split('\n')[-lines:] shrunk_log = console_log.split('\n')[-int(lines):]
loglines = '\n'.join(shrunk_log) loglines = '\n'.join(shrunk_log)
# Print the initial data and begin following # Print the initial data and begin following

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
pvc (0.9.17-0) unstable; urgency=high
* [CLI] Fixes bugs in log follow output
-- Joshua M. Boniface <joshua@boniface.me> Wed, 19 May 2021 17:06:29 -0400
pvc (0.9.16-0) unstable; urgency=high pvc (0.9.16-0) unstable; urgency=high
* Improves some CLI help messages * Improves some CLI help messages

View File

@ -18,6 +18,10 @@ To get started with PVC, please see the [About](https://parallelvirtualcluster.r
## Changelog ## Changelog
#### v0.9.17
* [CLI] Fixes bugs in log follow output
#### v0.9.16 #### v0.9.16
* Improves some CLI help messages * Improves some CLI help messages

View File

@ -53,7 +53,7 @@ import pvcnoded.CephInstance as CephInstance
import pvcnoded.MetadataAPIInstance as MetadataAPIInstance import pvcnoded.MetadataAPIInstance as MetadataAPIInstance
# Version string for startup output # Version string for startup output
version = '0.9.16' version = '0.9.17'
############################################################################### ###############################################################################
# PVCD - node daemon startup program # PVCD - node daemon startup program