Python: check if one string is a rotation of another string

Another question I cover in a presentation I’m preparing for “Open University meets Open Source” meetups.

The question

You have two strings, str1 and str2 and you need to return True if the first string is a rotation of the second string. Otherwise, return False.

Examples

“hello”,    “llohe” -> True. If we’ll rotate the second string twice, you’ll get ‘hello’.

Continue reading “Python: check if one string is a rotation of another string”

OpenFlow: Introduction

What is OpenFlow?

If we tried to explain what OpenFlow is, a possible definition would be: OpenFlow is a protocol for controlling and interacting with forwarding behaviors of switches. It allows us to dynamically control  the behavior of the switches in our network. Many SDN (software defined network) and Open Source projects use OpenFlow or support it as a plugin, such as OpenStack Neutron and OpenDaylight.

But It’s hard to grasp what it is, what it solves and how it works only using this brief description. In order to truly understand what is OpenFlow, we need to start from the beginning, before SDN era.

Continue reading “OpenFlow: Introduction”

Networking: Self-Study Resources Collection

Usually I don’t publish a post on every new project I create, but in this case I believe a lot of people can find it helpful in their learning process. So for the junior networking folks out there, or folks who just enjoy learning more about networking, you might want to take a look on the following page:

Computer Networking

Basically, it’s a collection of networking videos and slides on a variety of computer networking subjects (sdn, ovs, neutron, openflow, general networking concepts, etc.).

Continue reading “Networking: Self-Study Resources Collection”

Open vSwitch: Introduction – Part 1

This post turned out to be much longer than I planned. So I decided to split it into two posts.

This part covers:

  • Overview
  • Installation
  • Simple scenario walkthrough (connecting a virtual machine through ovs bridge to the internet)
  • Basic commands ( add/delete bridge, add/delete ports, show configuration, etc)

The second part covers:

  • Components (ovsdb-server, ovs-vswitch, ovs kernel module)
  • Utilities (ovs-vsctl, ovs-ofctl, ovs-appctl, etc)
  • Modes (normal & flow)

What is Open vSwitch?

Open vSwitch is a multilayer software/virtual switch used to interconnect virtual machines in the same host and between different hosts.

Continue reading “Open vSwitch: Introduction – Part 1”

Linux: Network Namespace

What is a Network Namespace?

Network namespaces allow you to have isolated network environments on a single host.

Each namespace has its own interfaces and routing table, separated from other namespaces. In addition, processes on your system can be associated with a specific network namespace.

Network namespace used in a variety of projects such as OpenStack, Docker and Mininet. To deep dive into these projects, you’ll have to be familiar with namespaces and know how to work with them.

Continue reading “Linux: Network Namespace”

OpenStack Infra: How to deploy Zuul

This is the second post on Zuul, which focuses on deploying it and its services. To learn what is Zuul and how it works, I recommend to read the previous post.

Methods of deployment

I’ll introduce two ways to deploy Zuul. Both are basically the same, but in one you will have this nice Ansible role which you can execute really quickly, while using the other way will require you to execute each command manually.

For a quick deployment, use the Ansible way. To learn how exactly the deployment is done, step by step, use the manual way.

Continue reading “OpenStack Infra: How to deploy Zuul”

OpenStack Infra: Understanding Zuul

Recently I had the time to explore Zuul. I decided to gather everything I learned here in this post. Perhaps you’ll find it useful for your understanding of Zuul.

I split it into two posts. This post will focus on understanding what is Zuul and how it works. The second post will focus on how to deploy it along with common failures in the process.

What is Zuul?

In the beginning there was only Jenkins. The infra was unformed and broken , darkness and sadness was among developers. So the wise infra people decided to create Zuul.

Continue reading “OpenStack Infra: Understanding Zuul”