Implementing missing endpoints

Hello people!

I’d like to share with you my weekly internship experience. This week I had the opportunity to finally start digging into the code! So at first, I had to understand how was the API organized. Once I understood that, I started working on the code by adding the features that were missing, which were:  ‘pool_update’, ‘pool_list’, ‘flavor_update’ and a ‘flavor_list’. There were other methods that had a similar functionality, so I could use those to implement something like that in the missing endpoints I was working on.

After writing code for these features, I started working on unit tests; as some of the methods I could look at in order to implement the missing endpoints, there were also some tests that I could use as examples to write my tests, even though I had some trouble understanding how to implement the flavor_update test. Flavors and pools usually have a similar implementation, but they are different from each other: you can think about pools like containers, or more precisely, like containers of data containers; while flavors basically have the main task of exposing pools.

While running unit tests during this week, I used at first only the command $ tox, that shows you not only if unit tests are working, but it also shows you if functional tests are working as well. What I found out when running that command is that most of the functional tests that involved pools were giving me errors, even if I didn’t actually touched them. The weird thing is that it didn’t seem like I was doing anything wrong; I had mongoDB running in a shell, as well as zaqar-server.

Then I found out that the zaqar-server was giving the error PoolNotFound, which meant that it wasn’t automatically creating a pool, as it should normally do. It was a bug inside the server! I have fixed bugs before, but I’ve never found one myself, so that was really exciting!

So that was pretty much my week, already exciting, don’t you think?! Wait for more posts, I’ll be writing you more about my weekly experiences with OpenStack!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s