Rosh PR

Just blog

Category

Programming

Ansible connection error: Failed to connect to the host via ssh

Ansible 2.3 error during ssh connection to host is one of the common error faced by most of the new users of ansible. The error looks like the below statement. infra_ci | UNREACHABLE! => { “changed”: false, “msg”: “Failed to… Continue Reading →

Supporting transactional semantics for RPC definitions in Yang

Yang is a standard based schema for NETCONF to define data model, remote procedure calls and notifications. Though Yang is intended for device management, it is a good fit to define data model, remote procedure calls and notifications for any… Continue Reading →

Argparse: adding sub commands to your command line arguments

Use argparse to add support for command line arguments to your program. Argparse supports adding sub commands to a primary command. It also supports making your subcommands mandatory or optional. Let me jump into example & explain. import argparse, sys… Continue Reading →

Python: Pass by reference

One of the most confusing aspect for Java programmers in understanding Python is Pass by Reference. I have consolidated some of the example below for easier understanding How do I pass a variable by reference? class PassByReference: def __init__(self): self.variable… Continue Reading →

Python : String as immutable type

Many of them moving from Java to Python get confused with the way Python string immutability work. I have put down a compilation of different example I found to help you understand the same. The variable a is pointing at… Continue Reading →

Javascript data structure SET

The Set object lets you store unique values of any type, whether primitive values or object references. Set objects are collections of values, you can iterate its elements in insertion order. A value in the Set may only occur once;… Continue Reading →

Creating simple dynamic loading Python plugin model

To create a simple plugin framework in python we will be using the following features in Python Abstract Base Class : abc Dynamic module import : __import__ Use case: Create a plugin framework for loading dynamic model classes that will… Continue Reading →

© 2019 Rosh PR — Powered by WordPress

Theme by Anders NorenUp ↑