My 4th Week of the GSoC’21

Sahan Dilshan
3 min readJul 4, 2021

This blog will cover what did I do in my fourth week of the GSoC’21. If you can remember from my previous blog, this week I have to implement these features,

  • Fix the issue in kbox -remove command.
  • Integrate the modified KBox feature (Json Serialization) with the airML project.
  • Remove the hyphens from the KBox commands.

First I was able to fix the issue in the KBox -remove command mentioned above. The remove command did not work as mention in the documentation of the KBox commands -remove -kns <kns-URL>. This issue was fixed with the following modification and now the user can use the -remove command as mentioned in the documentation.

The second and most important feature that I had to implement was integrating the KBox JSON sterilization feature with the airML project. airML has already implemented some functions to execute -list, -search, -info, -locate, -remove, -version,-r-dir commands in kbox.jar. To execute these functions with airML, the user has to install the airML package into their python environment with the pip install airML command. Then the user can execute one of the functions listed here to execute KBox commands in the kbox.jar and get the relevant outputs from the python environment. But this implementation has a problem as I mentioned in my previous blogs. The output is not properly formatted for the user to extract some valuable information from it. This where the JSON serialization feature comes into action. Now, since the KBox can return outputs in json format, the airML can return this output to the user. So the user can use this json output and extract some valuable information. The airML package with the JSON serialization feature can be installed from here. Now when we invoke a function in airML (ex:airML.list()), It will return a json output of the result instead of printing unformatted output.

How the airML.list() command works in the latest(0.0.2) airML release

After this major upgrade, I start to work with removing hyphens from KBox commands. As you already know, every KBox commands start with a hyphen( -list, -remove, -install ... ). So my third and final task was in this week to remove these hyphens from major KBox commands and make sure KBox works without these hyphens.

After completing that, I had the weekly meeting with my mentors and discussed the upcoming week's plans. In there, we discussed changing the behavior of the airML with a major modification. In the current implementation of the airML, the user can only use the functionalities of the airML inside a python environment. First, the user has to import the airML into their project. Then they can start to use the functions provided in the airML to execute commands in the kbox.jar. But we planned to make airML available for users to execute even without a python environment, as shown below.

airML list kns -o json

If the user opens a terminal and executes that line in the terminal, it should print the exact same output which will be shown if that command executes with the KBox.jar. So this is the task for my upcoming week.

--

--